Add tests for conditionals that return a struct value

There are 3 separate tests added to cover the 3 cases in
visitSelection(). With SPIR-V versions prior to 1.4, control flow is
generated, with GLSL generating code to execute only the appropriate
branch of the conditional while HLSL executes both branches and uses the
control flow to select the appropriate one. Finally, with SPIR-V
versions newer than 1.4, OpSelect can be used on structs.

Note that the hlsl.structcopy.comp and hlsl.structcopylogical.comp tests
have identical shader code, but are compiled with different versions of
SPIR-V and result in different codepaths being used and different SPIR-V
generated.
This commit is contained in:
Arcady Goldmints-Orlov
2023-03-31 14:29:50 -06:00
committed by arcady-lunarg
parent cdb350b356
commit adcc7e8163
8 changed files with 1026 additions and 1 deletions

View File

@@ -441,6 +441,7 @@ INSTANTIATE_TEST_SUITE_P(
"spv.sparseTexture.frag",
"spv.sparseTextureClamp.frag",
"spv.structAssignment.frag",
"spv.structCopy.comp",
"spv.structDeref.frag",
"spv.structure.frag",
"spv.switch.frag",