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
This commit is contained in:
Greg Fischer
2021-03-31 15:24:48 -06:00
parent 6dc24ffa47
commit 7fbaca0d06
8 changed files with 163 additions and 305 deletions

View File

@@ -245,7 +245,6 @@ INSTANTIATE_TEST_SUITE_P(
{"hlsl.isfinite.frag", "main"},
{"hlsl.intrinsics.barriers.comp", "ComputeShaderFunction"},
{"hlsl.intrinsics.comp", "ComputeShaderFunction"},
{"hlsl.intrinsics.evalfns.frag", "main"},
{"hlsl.intrinsics.d3dcolortoubyte4.frag", "main"},
{"hlsl.intrinsics.double.frag", "PixelShaderFunction"},
{"hlsl.intrinsics.f1632.frag", "main"},
@@ -471,6 +470,7 @@ INSTANTIATE_TEST_SUITE_P(
{"hlsl.flattenOpaqueInitMix.vert", "main"},
{"hlsl.flattenSubset.frag", "main"},
{"hlsl.flattenSubset2.frag", "main"},
{"hlsl.intrinsics.evalfns.frag", "main"},
{"hlsl.partialFlattenLocal.vert", "main"},
{"hlsl.partialFlattenMixed.vert", "main"}
}),