diff options
| author | jsmall-nvidia <jsmall@nvidia.com> | 2019-10-11 14:14:08 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-10-11 14:14:08 -0400 |
| commit | 9c17d0be79834a8ebe2888aed8905bae355cb674 (patch) | |
| tree | f0ebf7d256f43af686f63c6375f2a53bd12dc1a3 /tools/render-test/shader-input-layout.cpp | |
| parent | deeb8647012fc6362f1bb33842cf0842e16f13b7 (diff) | |
Support for unbounded array of arrays (#1078)
* WIP: Unsized arrays on CPU.
* unbounded-array-of-array working on CPU.
* Remove some left over comments.
Diffstat (limited to 'tools/render-test/shader-input-layout.cpp')
| -rw-r--r-- | tools/render-test/shader-input-layout.cpp | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/tools/render-test/shader-input-layout.cpp b/tools/render-test/shader-input-layout.cpp index b5b65f52d..37aa5dab6 100644 --- a/tools/render-test/shader-input-layout.cpp +++ b/tools/render-test/shader-input-layout.cpp @@ -138,7 +138,11 @@ namespace renderer_test { ShaderInputLayoutEntry entry; - if (parser.LookAhead("cbuffer")) + if (parser.LookAhead("array")) + { + entry.type = ShaderInputType::Array; + } + else if (parser.LookAhead("cbuffer")) { entry.type = ShaderInputType::Buffer; entry.bufferDesc.type = InputBufferType::ConstantBuffer; @@ -253,7 +257,15 @@ namespace renderer_test else if (word == "size") { parser.Read("="); - entry.textureDesc.size = parser.ReadInt(); + auto size = parser.ReadInt(); + if (entry.type == ShaderInputType::Array) + { + entry.arrayDesc.size = size; + } + else + { + entry.textureDesc.size = size; + } } else if (word == "random") { |
