summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/slang.h3
-rw-r--r--source/slang/slang-ast-type.cpp2
-rw-r--r--source/slang/slang-reflection-json.cpp5
-rw-r--r--tests/bindings/hlsl-to-vulkan-combined.hlsl.expected2
4 files changed, 11 insertions, 1 deletions
diff --git a/include/slang.h b/include/slang.h
index 5db0a8ee0..97ed08bed 100644
--- a/include/slang.h
+++ b/include/slang.h
@@ -1922,12 +1922,13 @@ public: \
SLANG_ACCELERATION_STRUCTURE = 0x09,
SLANG_TEXTURE_SUBPASS = 0x0A,
- SLANG_RESOURCE_EXT_SHAPE_MASK = 0xF0,
+ SLANG_RESOURCE_EXT_SHAPE_MASK = 0x1F0,
SLANG_TEXTURE_FEEDBACK_FLAG = 0x10,
SLANG_TEXTURE_SHADOW_FLAG = 0x20,
SLANG_TEXTURE_ARRAY_FLAG = 0x40,
SLANG_TEXTURE_MULTISAMPLE_FLAG = 0x80,
+ SLANG_TEXTURE_COMBINED_FLAG = 0x100,
SLANG_TEXTURE_1D_ARRAY = SLANG_TEXTURE_1D | SLANG_TEXTURE_ARRAY_FLAG,
SLANG_TEXTURE_2D_ARRAY = SLANG_TEXTURE_2D | SLANG_TEXTURE_ARRAY_FLAG,
diff --git a/source/slang/slang-ast-type.cpp b/source/slang/slang-ast-type.cpp
index 5056e5407..8a224b305 100644
--- a/source/slang/slang-ast-type.cpp
+++ b/source/slang/slang-ast-type.cpp
@@ -1118,6 +1118,8 @@ SlangResourceShape ResourceType::getShape()
baseShape = (SlangResourceShape)((uint32_t)baseShape | SLANG_TEXTURE_SHADOW_FLAG);
if (isFeedback())
baseShape = (SlangResourceShape)((uint32_t)baseShape | SLANG_TEXTURE_FEEDBACK_FLAG);
+ if (isCombined())
+ baseShape = (SlangResourceShape)((uint32_t)baseShape | SLANG_TEXTURE_COMBINED_FLAG);
return baseShape;
}
diff --git a/source/slang/slang-reflection-json.cpp b/source/slang/slang-reflection-json.cpp
index 72855a9b1..ee11b061a 100644
--- a/source/slang/slang-reflection-json.cpp
+++ b/source/slang/slang-reflection-json.cpp
@@ -496,6 +496,11 @@ static void emitReflectionResourceTypeBaseInfoJSON(
writer.maybeComma();
writer << "\"feedback\": true";
}
+ if (shape & SLANG_TEXTURE_COMBINED_FLAG)
+ {
+ writer.maybeComma();
+ writer << "\"combined\": true";
+ }
if (access != SLANG_RESOURCE_ACCESS_READ)
{
diff --git a/tests/bindings/hlsl-to-vulkan-combined.hlsl.expected b/tests/bindings/hlsl-to-vulkan-combined.hlsl.expected
index 32c99bd78..9c718ebe8 100644
--- a/tests/bindings/hlsl-to-vulkan-combined.hlsl.expected
+++ b/tests/bindings/hlsl-to-vulkan-combined.hlsl.expected
@@ -10,6 +10,7 @@ standard output = {
"type": {
"kind": "resource",
"baseShape": "texture2D",
+ "combined": true,
"resultType": {
"kind": "scalar",
"scalarType": "float32"
@@ -22,6 +23,7 @@ standard output = {
"type": {
"kind": "resource",
"baseShape": "texture2D",
+ "combined": true,
"resultType": {
"kind": "vector",
"elementCount": 4,