Search Issue Tracker
Fixed in 2021.2.X
Fixed in 2019.4.X, 2020.3.X, 2021.1.X
Votes
0
Found in
2019.4
2020.1
2020.2
2021.1
2021.2
Issue ID
1318619
Regression
No
GL shader reflection is truncated or crash occurs when struct is used from named CBuffer with at least one other constant
Reproduction steps:
1. Add the attached shader "GLES3_GLCore_struct_name_reflection_truncation.shader" to a project
2. Select the shader
3. In the shader's Inspector Window select the dropdown next to "Compile and show code" and tick "Custom" and "OpenGLCore" or "GLES3x"
4. Click the "Compile and show code" button
Expected result:
The "Compile and show code" output for OpenGLCore and GLES3 contains "Vector4 myStruct.m_Float4" in the 'Constant Buffer "NamedCBuffer"' section
Actual result:
The "Compile and show code" output for OpenGLCore and GLES3 contains "Vector4 myStru.m_Float4" in the 'Constant Buffer "NamedCBuffer"' section (2 chars from the struct name are truncated). Also the following error is printed: "Struct 'myStru' is not found." to the Console Window
Note: if the shader constant "anyConstant" is moved from the "NamedCBuffer" to the global scope (as seen in attached "GLES3_GLCore_compiler_crash.shader"), and "Compile and show code" is run for the mentioned GL targets, it will crash the compiler, resulting in an empty output and error:
"Shader compiler: Compile GLES3_GLCore_struct_name_reflection_truncation - <Unnamed Pass>, Vertex Program: Internal error, unrecognized message from the shader compiler process. Please report a bug including this shader and the editor log."
Reproducible in: 2021.2.0a7, 2021.1.0b9, 2020.2.6f1, 2020.1.17f1, 2019.4.21f1
Couldn't reproduce in: 2018.4.32f1
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- "Draw Additional Lights Shadowmap" calls increase when custom MaterialBlockProperty is used
- Crash on _platform_memmove when importing the "Dragon Crashers - URP 2D Sample Project" to a new 2D project
- "Shader is not supported on this GPU" warnings and and shaders are not loading when building the project for non-Chromium browsers
- [iOS][URP] The screen flickers and the "Execution of the command buffer was aborted due to an error during execution" error is thrown continuously
- Shortcut Manager shows empty conflict filter when resolving runtime conflicts involving different contexts
Add comment