Fix SPIR-V for HLSL EvaluateAttribute* of interpolants in structs
authorGreg Fischer <greg@lunarg.com>
Wed, 31 Mar 2021 21:24:48 +0000 (15:24 -0600)
committerGreg Fischer <greg@lunarg.com>
Thu, 1 Apr 2021 06:31:31 +0000 (00:31 -0600)
commit7fbaca0d0697a46149365f95ecb0577b0a27c978
tree2fb220551d38daad22b6c856c749d8a63ad7bf8f
parent6dc24ffa47174662a2599cc033069a10b77b46b8
Fix SPIR-V for HLSL EvaluateAttribute* of interpolants in structs

Generate load of interpolant for first operand to GLSLstd450
InterpolateAt* SPIR-V ops. This allows the interpolants to
propagate from the input struct in the wrapper around main
into the shader during HLSL legalization. A new pass has been
added to legalization which will remove the load and replace
with the pointer of the load to create valid external
interpolate op.

Fixes #2584
SPIRV/GlslangToSpv.cpp
SPIRV/SpvTools.cpp
Test/baseLegalResults/hlsl.intrinsics.evalfns.frag.out [new file with mode: 0644]
Test/baseResults/hlsl.intrinsics.evalfns.frag.out [deleted file]
Test/hlsl.intrinsics.evalfns.frag
glslang/HLSL/hlslParseHelper.cpp
gtests/Hlsl.FromFile.cpp
known_good.json