Search Issue Tracker
Third Party Issue
Votes
0
Found in
2021.3.42f1
2022.3.41f1
6000.0.14f1
Issue ID
UUM-77825
Regression
No
"Compiler timed out" is thrown when compiling a Compute shader
How to reproduce:
1. Open the attached project "IN-82004.zip"
2. Select Assets/RTMain.compute in the Project window
3. Click "Show compiled code" in the Inspector window
Expected results: Compiled code is shown
Actual results: "Shader compiler: Compile RTMain.compute - RTMain: Compiler timed out." is thrown
Reproducible with: 2021.3.42f1, 2022.3.41f1, 6000.0.14f1
Reproducible on: Windows 10 22H2
Not reproducible on: No other environment tested
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
- GameObjects change Hierarchy order when undoing adding Component to multiple GameObjects
- [macOS] Editor crashes after entering Play mode with overlapping GameObjects with Cloth Component and Cloth Inter-Collision enabled
- Look Dev constantly regenerates the default Volume Profile when set to "None" instead of using the default one
- Look Dev errors are spammed when opening a new HDRP project when Look Dev was added to the layout in the previous project
- URP Scene Templates are not editable when first opened from the New Scene dialog
Resolution Note:
This is unfortunately a bug in the Microsoft DirectX shader compiler (FXC). Having multiple levels of loop nesting can cause the compiler to go into an extremely slow processing path and there is nothing we can do about it. There are couple of workarounds to try though:
1) Add #pragma use_dxc in the shader to force the compilation to use the newer DXC compiler instead. This is not the default compiler atm but can be used for overcoming some of these issues. The shader code might need some tweaking though since DXC can be more strict on some things that FXC just happily took in.
2) Increase the shader compiler timeout value by setting UNITY_SHADER_COMPILER_TASK_TIMEOUT_MINUTES environment variable. The shader compilation should finish eventually. But of course this is not very helpful for iteration type work. I'd suggest using the DXC workaround for iteration and only use this other workaround in the end if using FXC is necessary for the release process.