WIP: HLSL: Fix ordering defect if global SB decl after fn param
This change propagates the storage qualifier from the buffer object to its contained array type so that isStructBufferType() realizes it is one. That propagation was happening before only for global variable declarations, so compilation defects would result if the use of a function parameter happened before a global declaration. This fixes that case, whether or not there ever is a global declaration, and regardless of the relative order. This changes the hlsl.structbuffer.fn.frag test to exercise the alternate order. There are no differences to generated SPIR-V for the cases which successfully compiled before.
Showing
- Test/baseResults/hlsl.structbuffer.fn.frag.out 92 additions, 92 deletionsTest/baseResults/hlsl.structbuffer.fn.frag.out
- Test/hlsl.structbuffer.fn.frag 5 additions, 4 deletionsTest/hlsl.structbuffer.fn.frag
- hlsl/hlslGrammar.cpp 1 addition, 0 deletionshlsl/hlslGrammar.cpp
- hlsl/hlslParseHelper.cpp 0 additions, 6 deletionshlsl/hlslParseHelper.cpp
Loading
Please register or sign in to comment