HLSL: allow implicit array sizing.
In HLSL array sizes need not be provided explicitly in all circumstances.
For example, this is valid (note no number between the [ ]):
// no explicit array size
uniform float g_array[] = { 1, 2, 3, 4, 5 };
This PR does not attempt to validate most invalid cases.
A new test is added to verify the resulting linker objects.
This commit is contained in:
@@ -81,6 +81,7 @@ INSTANTIATE_TEST_CASE_P(
|
||||
ToSpirv, HlslCompileTest,
|
||||
::testing::ValuesIn(std::vector<FileNameEntryPointPair>{
|
||||
{"hlsl.array.frag", "PixelShaderFunction"},
|
||||
{"hlsl.array.implicit-size.frag", "PixelShaderFunction"},
|
||||
{"hlsl.assoc.frag", "PixelShaderFunction"},
|
||||
{"hlsl.attribute.frag", "PixelShaderFunction"},
|
||||
{"hlsl.buffer.frag", "PixelShaderFunction"},
|
||||
|
||||
Reference in New Issue
Block a user