Search Issue Tracker
By Design
Votes
0
Found in
2021.3.46f1
2022.3.54f1
6000.0.30f1
6000.1.0a7
Issue ID
UUM-89984
Regression
No
Compiled Shader code has self-assignments and redundant code in the Shaders that use "enable_d3d11_debug_symbols"
How to reproduce:
1. Open the attached “IN-89929.zip” project
2. Select the “NewUnlitShader” Shader Asset in the Project window
3. In the Inspector expand the “Compile and show code” Dropdown button
4. Select the “Metal” option in the Dropdown
5. Press the “Compile and show Code” Button in the Inspector
6. Observe the generated code
Excepted results: Compiled Shader code has no issues
Actual results: Shader has self assignments, such as ‘u_xlat0 = u_xlat0;'
Reproducible with: 2021.3.46f1, 2022.3.54f1, 6000.0.30f1, 6000.1.0a7
Reproducible on: Windows 11, Windows 10 (user’s)
Not reproducible on: macOS 15.1.1 (Intel)
Notes:
- Reporter noted that changing Target Platform to Switch reproduces the issue, but targeting Windows Standalone doesn’t reproduce the issue, however during testing this was not observed issue was always reproducible regardless of Build Target, but using the “Current Build Platform” option in the “Compile and show code” will accordingly show results. If macOS is the Target Platform the issue is reproducible, if the Target Platform is Windows it will not reproduce the issue.
- Reproducible with Graphics Platforms: GLES3x, Metal, OpenGLCore
- Not reproducible with Graphics Platforms: D3D, Vulkan, WebGPU
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Crash on ScriptableRenderLoopDraw when rendering a specific VFX in Play Mode
- The script is not renamed in the Project window when renaming and a compilation Error is present
- Average FPS in Play Mode degradation on a newly created BiRP project when it's upgraded from 2020.3.48f1 to a newer Editor version
- DecoratorDrawer indentation is incorrect when it is called with EditorGUI
- "Unable to get the list of approved APIs." is thrown when testing the App Packages with Windows App Certification Kit
Resolution Note:
Turning on debug symbols also turns off all compiler optimizations.
It is expected that the resulting code is different.