diff options
Diffstat (limited to 'tools/slang-reflection-test/main.cpp')
| -rw-r--r-- | tools/slang-reflection-test/main.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/tools/slang-reflection-test/main.cpp b/tools/slang-reflection-test/main.cpp index 7e5f268f3..872d2ff3a 100644 --- a/tools/slang-reflection-test/main.cpp +++ b/tools/slang-reflection-test/main.cpp @@ -372,6 +372,27 @@ static void emitReflectionTypeInfoJSON( } write(writer, "\""); } + + // TODO: We should really print the result type for all resource + // types, but current test output depends on the old behavior, so + // we only add result type output for structured buffers at first. + // + switch (shape & SLANG_RESOURCE_BASE_SHAPE_MASK) + { + default: + break; + + case SLANG_STRUCTURED_BUFFER: + if( auto resultType = type->getResourceResultType() ) + { + write(writer, ",\n"); + write(writer, "\"resultType\": "); + emitReflectionTypeJSON( + writer, + resultType); + } + break; + } } break; |
