diff options
| author | Tim Foley <tfoleyNV@users.noreply.github.com> | 2017-12-08 14:23:12 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-12-08 14:23:12 -0800 |
| commit | 0f55649cc1aa8ad3218b7f8ba7b1eabdd2ec6526 (patch) | |
| tree | 0dc7fd5e88fbc530dc121946f4a20085aa5518d8 /tools | |
| parent | 301cdf5ef42797b1073d9e6c741ef0ba98a38792 (diff) | |
Cleanups to `ParameterBlock<T>` behavior. (#304)
* Cleanups to `ParameterBlock<T>` behavior.
These add some more realistic tests using the `ParameterBlock<T>` support, and show that it can work with the "rewriter" mode.
Unfortunately, this code does *not* currently work with the rewriter + the IR at once. That will need to be fixed in a follow-on change, because I now see that the root problem is pretty ugly.
* cleanup
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/slang-reflection-test/main.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tools/slang-reflection-test/main.cpp b/tools/slang-reflection-test/main.cpp index 219acbc76..057bcd127 100644 --- a/tools/slang-reflection-test/main.cpp +++ b/tools/slang-reflection-test/main.cpp @@ -356,6 +356,15 @@ static void emitReflectionTypeInfoJSON( type->getElementType()); break; + case slang::TypeReflection::Kind::ParameterBlock: + write(writer, "\"kind\": \"parameterBlock\""); + write(writer, ",\n"); + write(writer, "\"elementType\": "); + emitReflectionTypeJSON( + writer, + type->getElementType()); + break; + case slang::TypeReflection::Kind::TextureBuffer: write(writer, "\"kind\": \"textureBuffer\""); write(writer, ",\n"); @@ -515,6 +524,15 @@ static void emitReflectionTypeLayoutInfoJSON( typeLayout->getElementTypeLayout()); break; + case slang::TypeReflection::Kind::ParameterBlock: + write(writer, "\"kind\": \"parameterBlock\""); + write(writer, ",\n"); + write(writer, "\"elementType\": "); + emitReflectionTypeLayoutJSON( + writer, + typeLayout->getElementTypeLayout()); + break; + case slang::TypeReflection::Kind::TextureBuffer: write(writer, "\"kind\": \"textureBuffer\""); write(writer, ",\n"); |
