Search Issue Tracker
Third Party Issue
Votes
0
Found in
2018.4
2019.4
2020.3
2020.3.0f1
2021.1
2021.2
Issue ID
1322046
Regression
No
Invalid arithmetic in compute shader when multiplying with uint value
Reproduction steps:
1. Open the user's attached project
2. Select DEBUG/Dispatch shader
3. Observe the Console window
Expected result: "modulo8 = 24" is printed
Actual result: "modulo8 = 8" is printed
Reproducible with: 2018.4.32f1, 2019.4.22f1, 2020.3.1f1, 2021.1.0f1, 2021.2.0a10
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
- Some UXML Template Asset foldouts appear enabled when all fields inside are disabled
- URP Terrain Demo crash on burst_signal_handler after Generating lighting
- Project window button icons are poorly visible and their shades differ in Light theme
- GC.Alloc called by HDRenderPipeline.LensFlareMergeOcclusionDataDrivenPass() when playing the default HDRP Sample Template project
- Automatic LOD fails and SRP Batcher incompatibility occurs when using spline-based quad-topology meshes
Resolution Note (2021.2.X):
Unfortunately this is a bug in the FXC shader compiler which is a black box to us and therefore can't fix it. Fortunately the repro case already presents couple of different workarounds (casting to int and using immediate value instead of a uniform). E.g. touching the calculation in a way that prevents the compiler choosing the flawed path.