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:
parent
16a99a3804
commit
265c0618b1
4 changed files with 316 additions and 9 deletions
|
|
@ -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"},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue