diff options
| author | Yong He <yonghe@outlook.com> | 2020-12-03 08:23:05 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-12-03 08:23:05 -0800 |
| commit | 44c0a56974b664e50b2cb8cb6f10740b19c4e02f (patch) | |
| tree | d6141003be376bdb2c0037178b649b6b2aae673e /tools/render-test/shader-input-layout.cpp | |
| parent | ad5dda9261bae63e32bcb914b109fcb5c92faf25 (diff) | |
Add shader object parameter binding to renderer_test. (#1622)
* Add shader object parameter binding to renderer_test.
* remove multiple-definitions.hlsl
* Fix cuda implementation.
Co-authored-by: Tim Foley <tfoleyNV@users.noreply.github.com>
Diffstat (limited to 'tools/render-test/shader-input-layout.cpp')
| -rw-r--r-- | tools/render-test/shader-input-layout.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tools/render-test/shader-input-layout.cpp b/tools/render-test/shader-input-layout.cpp index 6c6f67c86..5f43b254d 100644 --- a/tools/render-test/shader-input-layout.cpp +++ b/tools/render-test/shader-input-layout.cpp @@ -140,11 +140,19 @@ namespace renderer_test entry.type = ShaderInputType::Buffer; entry.bufferDesc.type = InputBufferType::ConstantBuffer; } + else if (parser.LookAhead("object")) + { + entry.type = ShaderInputType::Object; + } else if (parser.LookAhead("root_constants")) { entry.type = ShaderInputType::Buffer; entry.bufferDesc.type = InputBufferType::RootConstantBuffer; } + else if (parser.LookAhead("Uniform")) + { + entry.type = ShaderInputType::Uniform; + } else if (parser.LookAhead("ubuffer")) { entry.type = ShaderInputType::Buffer; @@ -226,6 +234,10 @@ namespace renderer_test numRenderTargets = parser.ReadInt(); continue; } + else + { + throw TextFormatException(String("Invalid input syntax at line ") + String(parser.NextToken().Position.Line)); + } parser.ReadToken(); // parse options if (parser.LookAhead("(")) @@ -510,6 +522,11 @@ namespace renderer_test parser.Read("="); entry.textureDesc.mipMapCount = int(parser.ReadInt()); } + else if( word == "type" ) + { + parser.Read("="); + entry.objectDesc.typeName = parser.ReadWord(); + } if (parser.LookAhead(",")) parser.Read(","); |
