summaryrefslogtreecommitdiffstats
path: root/tools/render-test/shader-input-layout.cpp
diff options
context:
space:
mode:
authorjsmall-nvidia <jsmall@nvidia.com>2019-10-11 14:14:08 -0400
committerGitHub <noreply@github.com>2019-10-11 14:14:08 -0400
commit9c17d0be79834a8ebe2888aed8905bae355cb674 (patch)
treef0ebf7d256f43af686f63c6375f2a53bd12dc1a3 /tools/render-test/shader-input-layout.cpp
parentdeeb8647012fc6362f1bb33842cf0842e16f13b7 (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.cpp16
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")
{