summaryrefslogtreecommitdiffstats
path: root/source/slang/slang-reflection-json.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/slang/slang-reflection-json.cpp')
-rw-r--r--source/slang/slang-reflection-json.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/source/slang/slang-reflection-json.cpp b/source/slang/slang-reflection-json.cpp
index 4e8b6b2a4..82e8e1e3f 100644
--- a/source/slang/slang-reflection-json.cpp
+++ b/source/slang/slang-reflection-json.cpp
@@ -2,6 +2,7 @@
#include "slang-reflection-json.h"
#include "../core/slang-blob.h"
+#include "slang-ast-support-types.h"
template<typename T>
struct Range
@@ -237,6 +238,15 @@ static void emitReflectionVarBindingInfoJSON(
writer << "\"semanticIndex\": " << int(semanticIndex);
}
}
+
+ if (auto format = var->getImageFormat())
+ {
+ writer.maybeComma();
+ auto formatName = getImageFormatInfo((Slang::ImageFormat)format).name;
+ writer << "\"format\": \"";
+ writer << formatName;
+ writer << "\"";
+ }
}
static void emitReflectionNameInfoJSON(PrettyWriter& writer, char const* name)