HLSL: Partially flatten hierarchies, instead of all or nothing.

Fixes #1092.  Allows arrays of opaques to keep arrayness, unless
needed by uniform array flattening.
Can handle assignments of mixed amounts of flattening.
This commit is contained in:
John Kessenich
2017-10-11 14:03:45 -06:00
parent 60e9161100
commit 41aa19953f
8 changed files with 741 additions and 163 deletions

View File

@@ -247,6 +247,7 @@ INSTANTIATE_TEST_CASE_P(
{"hlsl.params.default.frag", "main"},
{"hlsl.params.default.negative.frag", "main"},
{"hlsl.partialInit.frag", "PixelShaderFunction"},
{"hlsl.partialFlattenLocal.vert", "main"},
{"hlsl.pp.vert", "main"},
{"hlsl.pp.line.frag", "main"},
{"hlsl.precise.frag", "main"},
@@ -367,6 +368,7 @@ INSTANTIATE_TEST_CASE_P(
ToSpirv, HlslCompileAndFlattenTest,
::testing::ValuesIn(std::vector<FileNameEntryPointPair>{
{"hlsl.array.flatten.frag", "main"},
{"hlsl.partialFlattenMixed.vert", "main"},
}),
FileNameAsCustomTestSuffix
);