For GLSL targets, uniform
struct fields if unused will optimize out but still appear in function calls
#3929
Labels
goal:quality & productivity
Quality issues and issues that impact our productivity coding day to day inside slang
kind:bug
something doesn't work like it should
For GLSL targets,
uniform
struct fields if unused will optimize out but still appear in function calls.repro of issue:
compiles into:
Notice as issue specifically:
int _S1 = loadDefaultData_0(noInit_1, noInit_texture_1, noInit_samplerState1_1, noInit_samplerState2_1);
despite the uniformsnoInit_texture_1
,noInit_samplerState1_1
, andnoInit_samplerState2_1
missingHLSL/SPIR-V both work in this scenario through not optimizing out the variables. Slang->GLSL should not optimize out any struct members
The text was updated successfully, but these errors were encountered: