summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/cross-compile/cpp-resource-reflection.slang.32.expected36
-rw-r--r--tests/cross-compile/cpp-resource-reflection.slang.64.expected36
-rw-r--r--tests/reflection/arrays.hlsl.expected55
-rw-r--r--tests/reflection/attribute.slang.expected86
-rw-r--r--tests/reflection/binding-gl.hlsl.expected55
-rw-r--r--tests/reflection/binding-push-constant-gl.hlsl.expected83
-rw-r--r--tests/reflection/buffer-layout.slang.1.expected79
-rw-r--r--tests/reflection/buffer-layout.slang.expected79
-rw-r--r--tests/reflection/cross-compile.slang.expected38
-rw-r--r--tests/reflection/default-space.slang.expected35
-rw-r--r--tests/reflection/explicit-register-space.slang.expected15
-rw-r--r--tests/reflection/global-type-params.slang.expected92
-rw-r--r--tests/reflection/matrix-layout.slang.1.expected125
-rw-r--r--tests/reflection/matrix-layout.slang.expected125
-rw-r--r--tests/reflection/multi-file.hlsl.expected193
-rw-r--r--tests/reflection/parameter-block-explicit-space.slang.expected115
-rw-r--r--tests/reflection/parameter-block.slang.1.expected45
-rw-r--r--tests/reflection/parameter-block.slang.2.expected45
-rw-r--r--tests/reflection/parameter-block.slang.expected42
-rw-r--r--tests/reflection/reflect-imported-code.hlsl.expected53
-rw-r--r--tests/reflection/reflection0.hlsl.expected34
-rw-r--r--tests/reflection/resource-in-cbuffer.hlsl.expected65
-rw-r--r--tests/reflection/sample-index-input.hlsl.expected15
-rw-r--r--tests/reflection/sample-rate-input.hlsl.expected15
-rw-r--r--tests/reflection/shared-modifier.hlsl.expected15
-rw-r--r--tests/reflection/structured-buffer.slang.expected15
-rw-r--r--tests/reflection/vertex-input-semantics.hlsl.expected13
27 files changed, 1581 insertions, 23 deletions
diff --git a/tests/cross-compile/cpp-resource-reflection.slang.32.expected b/tests/cross-compile/cpp-resource-reflection.slang.32.expected
index 7f88c134e..f40cc0fcc 100644
--- a/tests/cross-compile/cpp-resource-reflection.slang.32.expected
+++ b/tests/cross-compile/cpp-resource-reflection.slang.32.expected
@@ -38,6 +38,42 @@ standard output = {
"binding": {"kind": "uniform", "offset": 8, "size": 4}
}
]
+ },
+ "containerVarLayout": {
+ "binding": {"kind": "uniform", "offset": 0, "size": 4}
+ },
+ "elementVarLayout": {
+ "type": {
+ "kind": "struct",
+ "name": "Thing",
+ "fields": [
+ {
+ "name": "a",
+ "type": {
+ "kind": "scalar",
+ "scalarType": "int32"
+ },
+ "binding": {"kind": "uniform", "offset": 0, "size": 4}
+ },
+ {
+ "name": "b",
+ "type": {
+ "kind": "scalar",
+ "scalarType": "float32"
+ },
+ "binding": {"kind": "uniform", "offset": 4, "size": 4}
+ },
+ {
+ "name": "c",
+ "type": {
+ "kind": "scalar",
+ "scalarType": "float32"
+ },
+ "binding": {"kind": "uniform", "offset": 8, "size": 4}
+ }
+ ]
+ },
+ "binding": {"kind": "uniform", "offset": 0, "size": 12}
}
}
},
diff --git a/tests/cross-compile/cpp-resource-reflection.slang.64.expected b/tests/cross-compile/cpp-resource-reflection.slang.64.expected
index a0e5241f0..2a03aaa91 100644
--- a/tests/cross-compile/cpp-resource-reflection.slang.64.expected
+++ b/tests/cross-compile/cpp-resource-reflection.slang.64.expected
@@ -38,6 +38,42 @@ standard output = {
"binding": {"kind": "uniform", "offset": 8, "size": 4}
}
]
+ },
+ "containerVarLayout": {
+ "binding": {"kind": "uniform", "offset": 0, "size": 8}
+ },
+ "elementVarLayout": {
+ "type": {
+ "kind": "struct",
+ "name": "Thing",
+ "fields": [
+ {
+ "name": "a",
+ "type": {
+ "kind": "scalar",
+ "scalarType": "int32"
+ },
+ "binding": {"kind": "uniform", "offset": 0, "size": 4}
+ },
+ {
+ "name": "b",
+ "type": {
+ "kind": "scalar",
+ "scalarType": "float32"
+ },
+ "binding": {"kind": "uniform", "offset": 4, "size": 4}
+ },
+ {
+ "name": "c",
+ "type": {
+ "kind": "scalar",
+ "scalarType": "float32"
+ },
+ "binding": {"kind": "uniform", "offset": 8, "size": 4}
+ }
+ ]
+ },
+ "binding": {"kind": "uniform", "offset": 0, "size": 12}
}
}
},
diff --git a/tests/reflection/arrays.hlsl.expected b/tests/reflection/arrays.hlsl.expected
index f815ea88c..2152ed0df 100644
--- a/tests/reflection/arrays.hlsl.expected
+++ b/tests/reflection/arrays.hlsl.expected
@@ -42,6 +42,46 @@ standard output = {
"binding": {"kind": "uniform", "offset": 164, "size": 4}
}
]
+ },
+ "containerVarLayout": {
+ "binding": {"kind": "constantBuffer", "index": 0}
+ },
+ "elementVarLayout": {
+ "type": {
+ "kind": "struct",
+ "fields": [
+ {
+ "name": "x",
+ "type": {
+ "kind": "scalar",
+ "scalarType": "float32"
+ },
+ "binding": {"kind": "uniform", "offset": 0, "size": 4}
+ },
+ {
+ "name": "a",
+ "type": {
+ "kind": "array",
+ "elementCount": 10,
+ "elementType": {
+ "kind": "scalar",
+ "scalarType": "float32"
+ },
+ "uniformStride": 16
+ },
+ "binding": {"kind": "uniform", "offset": 16, "size": 148}
+ },
+ {
+ "name": "y",
+ "type": {
+ "kind": "scalar",
+ "scalarType": "float32"
+ },
+ "binding": {"kind": "uniform", "offset": 164, "size": 4}
+ }
+ ]
+ },
+ "binding": {"kind": "uniform", "offset": 0, "size": 168}
}
}
},
@@ -102,7 +142,20 @@ standard output = {
"entryPoints": [
{
"name": "main",
- "stage:": "fragment"
+ "stage:": "fragment",
+ "result:": {
+ "stage": "fragment",
+ "binding": {"kind": "varyingOutput", "index": 0},
+ "semanticName": "SV_TARGET",
+ "type": {
+ "kind": "vector",
+ "elementCount": 4,
+ "elementType": {
+ "kind": "scalar",
+ "scalarType": "float32"
+ }
+ }
+ }
}
]
}
diff --git a/tests/reflection/attribute.slang.expected b/tests/reflection/attribute.slang.expected
index 4348b898f..b15c87df8 100644
--- a/tests/reflection/attribute.slang.expected
+++ b/tests/reflection/attribute.slang.expected
@@ -45,6 +45,49 @@ standard output = {
]
}
]
+ },
+ "containerVarLayout": {
+ "binding": {"kind": "constantBuffer", "index": 0}
+ },
+ "elementVarLayout": {
+ "type": {
+ "kind": "struct",
+ "name": "A",
+ "fields": [
+ {
+ "name": "x",
+ "type": {
+ "kind": "scalar",
+ "scalarType": "float32"
+ },
+ "binding": {"kind": "uniform", "offset": 0, "size": 4}
+ },
+ {
+ "name": "y",
+ "type": {
+ "kind": "scalar",
+ "scalarType": "float32"
+ },
+ "binding": {"kind": "uniform", "offset": 4, "size": 4},
+ "userAttribs": [{
+ "name": "DefaultValue",
+ "arguments": [
+ 1
+ ]
+ }
+ ]
+ }
+ ],
+ "userAttribs": [{
+ "name": "MyStruct",
+ "arguments": [
+ 0,
+ 1.000000
+ ]
+ }
+ ]
+ },
+ "binding": {"kind": "uniform", "offset": 0, "size": 8}
}
}
},
@@ -89,6 +132,49 @@ standard output = {
]
}
]
+ },
+ "containerVarLayout": {
+ "binding": {"kind": "constantBuffer", "index": 0}
+ },
+ "elementVarLayout": {
+ "type": {
+ "kind": "struct",
+ "name": "B",
+ "fields": [
+ {
+ "name": "x",
+ "type": {
+ "kind": "scalar",
+ "scalarType": "float32"
+ },
+ "binding": {"kind": "uniform", "offset": 0, "size": 4}
+ },
+ {
+ "name": "z",
+ "type": {
+ "kind": "scalar",
+ "scalarType": "float32"
+ },
+ "binding": {"kind": "uniform", "offset": 4, "size": 4},
+ "userAttribs": [{
+ "name": "DefaultValue",
+ "arguments": [
+ 2
+ ]
+ }
+ ]
+ }
+ ],
+ "userAttribs": [{
+ "name": "MyStruct",
+ "arguments": [
+ 0,
+ 2.000000
+ ]
+ }
+ ]
+ },
+ "binding": {"kind": "uniform", "offset": 0, "size": 8}
}
}
}
diff --git a/tests/reflection/binding-gl.hlsl.expected b/tests/reflection/binding-gl.hlsl.expected
index 1b5e7354f..8c2e761b5 100644
--- a/tests/reflection/binding-gl.hlsl.expected
+++ b/tests/reflection/binding-gl.hlsl.expected
@@ -42,6 +42,46 @@ standard output = {
"binding": {"kind": "uniform", "offset": 176, "size": 4}
}
]
+ },
+ "containerVarLayout": {
+ "binding": {"kind": "descriptorTableSlot", "index": 0}
+ },
+ "elementVarLayout": {
+ "type": {
+ "kind": "struct",
+ "fields": [
+ {
+ "name": "x",
+ "type": {
+ "kind": "scalar",
+ "scalarType": "float32"
+ },
+ "binding": {"kind": "uniform", "offset": 0, "size": 4}
+ },
+ {
+ "name": "a",
+ "type": {
+ "kind": "array",
+ "elementCount": 10,
+ "elementType": {
+ "kind": "scalar",
+ "scalarType": "float32"
+ },
+ "uniformStride": 16
+ },
+ "binding": {"kind": "uniform", "offset": 16, "size": 160}
+ },
+ {
+ "name": "y",
+ "type": {
+ "kind": "scalar",
+ "scalarType": "float32"
+ },
+ "binding": {"kind": "uniform", "offset": 176, "size": 4}
+ }
+ ]
+ },
+ "binding": {"kind": "uniform", "offset": 0, "size": 192}
}
}
},
@@ -98,7 +138,20 @@ standard output = {
"entryPoints": [
{
"name": "main",
- "stage:": "fragment"
+ "stage:": "fragment",
+ "result:": {
+ "stage": "fragment",
+ "binding": {"kind": "varyingOutput", "index": 0},
+ "semanticName": "SV_TARGET",
+ "type": {
+ "kind": "vector",
+ "elementCount": 4,
+ "elementType": {
+ "kind": "scalar",
+ "scalarType": "float32"
+ }
+ }
+ }
}
]
}
diff --git a/tests/reflection/binding-push-constant-gl.hlsl.expected b/tests/reflection/binding-push-constant-gl.hlsl.expected
index ed6983364..13dfe2fcd 100644
--- a/tests/reflection/binding-push-constant-gl.hlsl.expected
+++ b/tests/reflection/binding-push-constant-gl.hlsl.expected
@@ -42,6 +42,46 @@ standard output = {
"binding": {"kind": "uniform", "offset": 176, "size": 4}
}
]
+ },
+ "containerVarLayout": {
+ "binding": {"kind": "descriptorTableSlot", "index": 0}
+ },
+ "elementVarLayout": {
+ "type": {
+ "kind": "struct",
+ "fields": [
+ {
+ "name": "x",
+ "type": {
+ "kind": "scalar",
+ "scalarType": "float32"
+ },
+ "binding": {"kind": "uniform", "offset": 0, "size": 4}
+ },
+ {
+ "name": "a",
+ "type": {
+ "kind": "array",
+ "elementCount": 10,
+ "elementType": {
+ "kind": "scalar",
+ "scalarType": "float32"
+ },
+ "uniformStride": 16
+ },
+ "binding": {"kind": "uniform", "offset": 16, "size": 160}
+ },
+ {
+ "name": "y",
+ "type": {
+ "kind": "scalar",
+ "scalarType": "float32"
+ },
+ "binding": {"kind": "uniform", "offset": 176, "size": 4}
+ }
+ ]
+ },
+ "binding": {"kind": "uniform", "offset": 0, "size": 192}
}
}
},
@@ -71,6 +111,34 @@ standard output = {
"binding": {"kind": "uniform", "offset": 4, "size": 4}
}
]
+ },
+ "containerVarLayout": {
+ "binding": {"kind": "pushConstantBuffer", "index": 0}
+ },
+ "elementVarLayout": {
+ "type": {
+ "kind": "struct",
+ "name": "MyPushConstantStruct",
+ "fields": [
+ {
+ "name": "pushX",
+ "type": {
+ "kind": "scalar",
+ "scalarType": "float32"
+ },
+ "binding": {"kind": "uniform", "offset": 0, "size": 4}
+ },
+ {
+ "name": "pushY",
+ "type": {
+ "kind": "scalar",
+ "scalarType": "float32"
+ },
+ "binding": {"kind": "uniform", "offset": 4, "size": 4}
+ }
+ ]
+ },
+ "binding": {"kind": "uniform", "offset": 0, "size": 16}
}
}
},
@@ -127,7 +195,20 @@ standard output = {
"entryPoints": [
{
"name": "main",
- "stage:": "fragment"
+ "stage:": "fragment",
+ "result:": {
+ "stage": "fragment",
+ "binding": {"kind": "varyingOutput", "index": 0},
+ "semanticName": "SV_TARGET",
+ "type": {
+ "kind": "vector",
+ "elementCount": 4,
+ "elementType": {
+ "kind": "scalar",
+ "scalarType": "float32"
+ }
+ }
+ }
}
]
}
diff --git a/tests/reflection/buffer-layout.slang.1.expected b/tests/reflection/buffer-layout.slang.1.expected
index 890f31481..0b01f54a1 100644
--- a/tests/reflection/buffer-layout.slang.1.expected
+++ b/tests/reflection/buffer-layout.slang.1.expected
@@ -81,6 +81,85 @@ standard output = {
"binding": {"kind": "uniform", "offset": 80, "size": 4}
}
]
+ },
+ "containerVarLayout": {
+ "binding": {"kind": "descriptorTableSlot", "index": 0}
+ },
+ "elementVarLayout": {
+ "type": {
+ "kind": "struct",
+ "name": "S",
+ "fields": [
+ {
+ "name": "z",
+ "type": {
+ "kind": "scalar",
+ "scalarType": "float32"
+ },
+ "binding": {"kind": "uniform", "offset": 0, "size": 4}
+ },
+ {
+ "name": "a",
+ "type": {
+ "kind": "struct",
+ "name": "A",
+ "fields": [
+ {
+ "name": "x",
+ "type": {
+ "kind": "scalar",
+ "scalarType": "float32"
+ },
+ "binding": {"kind": "uniform", "offset": 0, "size": 4}
+ },
+ {
+ "name": "y",
+ "type": {
+ "kind": "scalar",
+ "scalarType": "float32"
+ },
+ "binding": {"kind": "uniform", "offset": 4, "size": 4}
+ }
+ ]
+ },
+ "binding": {"kind": "uniform", "offset": 16, "size": 16}
+ },
+ {
+ "name": "b",
+ "type": {
+ "kind": "scalar",
+ "scalarType": "int32"
+ },
+ "binding": {"kind": "uniform", "offset": 32, "size": 4}
+ },
+ {
+ "name": "c",
+ "type": {
+ "kind": "array",
+ "elementCount": 2,
+ "elementType": {
+ "kind": "vector",
+ "elementCount": 2,
+ "elementType": {
+ "kind": "scalar",
+ "scalarType": "float32"
+ }
+ },
+ "uniformStride": 16
+ },
+ "binding": {"kind": "uniform", "offset": 48, "size": 32}
+ },
+ {
+ "name": "d",
+ "type": {
+ "kind": "scalar",
+ "scalarType": "int32"
+ },
+ "binding": {"kind": "uniform", "offset": 80, "size": 4}
+ }
+ ]
+ },
+ "binding": {"kind": "uniform", "offset": 0, "size": 96}
}
}
},
diff --git a/tests/reflection/buffer-layout.slang.expected b/tests/reflection/buffer-layout.slang.expected
index 25a41bc6d..4fc7b2381 100644
--- a/tests/reflection/buffer-layout.slang.expected
+++ b/tests/reflection/buffer-layout.slang.expected
@@ -81,6 +81,85 @@ standard output = {
"binding": {"kind": "uniform", "offset": 56, "size": 4}
}
]
+ },
+ "containerVarLayout": {
+ "binding": {"kind": "constantBuffer", "index": 0}
+ },
+ "elementVarLayout": {
+ "type": {
+ "kind": "struct",
+ "name": "S",
+ "fields": [
+ {
+ "name": "z",
+ "type": {
+ "kind": "scalar",
+ "scalarType": "float32"
+ },
+ "binding": {"kind": "uniform", "offset": 0, "size": 4}
+ },
+ {
+ "name": "a",
+ "type": {
+ "kind": "struct",
+ "name": "A",
+ "fields": [
+ {
+ "name": "x",
+ "type": {
+ "kind": "scalar",
+ "scalarType": "float32"
+ },
+ "binding": {"kind": "uniform", "offset": 0, "size": 4}
+ },
+ {
+ "name": "y",
+ "type": {
+ "kind": "scalar",
+ "scalarType": "float32"
+ },
+ "binding": {"kind": "uniform", "offset": 4, "size": 4}
+ }
+ ]
+ },
+ "binding": {"kind": "uniform", "offset": 16, "size": 8}
+ },
+ {
+ "name": "b",
+ "type": {
+ "kind": "scalar",
+ "scalarType": "int32"
+ },
+ "binding": {"kind": "uniform", "offset": 24, "size": 4}
+ },
+ {
+ "name": "c",
+ "type": {
+ "kind": "array",
+ "elementCount": 2,
+ "elementType": {
+ "kind": "vector",
+ "elementCount": 2,
+ "elementType": {
+ "kind": "scalar",
+ "scalarType": "float32"
+ }
+ },
+ "uniformStride": 16
+ },
+ "binding": {"kind": "uniform", "offset": 32, "size": 24}
+ },
+ {
+ "name": "d",
+ "type": {
+ "kind": "scalar",
+ "scalarType": "int32"
+ },
+ "binding": {"kind": "uniform", "offset": 56, "size": 4}
+ }
+ ]
+ },
+ "binding": {"kind": "uniform", "offset": 0, "size": 60}
}
}
},
diff --git a/tests/reflection/cross-compile.slang.expected b/tests/reflection/cross-compile.slang.expected
index a54598d08..e3dd63095 100644
--- a/tests/reflection/cross-compile.slang.expected
+++ b/tests/reflection/cross-compile.slang.expected
@@ -40,6 +40,29 @@ standard output = {
"binding": {"kind": "uniform", "offset": 0, "size": 12}
}
]
+ },
+ "containerVarLayout": {
+ "binding": {"kind": "descriptorTableSlot", "index": 0}
+ },
+ "elementVarLayout": {
+ "type": {
+ "kind": "struct",
+ "fields": [
+ {
+ "name": "c",
+ "type": {
+ "kind": "vector",
+ "elementCount": 3,
+ "elementType": {
+ "kind": "scalar",
+ "scalarType": "float32"
+ }
+ },
+ "binding": {"kind": "uniform", "offset": 0, "size": 12}
+ }
+ ]
+ },
+ "binding": {"kind": "uniform", "offset": 0, "size": 16}
}
}
}
@@ -47,7 +70,20 @@ standard output = {
"entryPoints": [
{
"name": "main",
- "stage:": "fragment"
+ "stage:": "fragment",
+ "result:": {
+ "stage": "fragment",
+ "binding": {"kind": "varyingOutput", "index": 0},
+ "semanticName": "SV_TARGET",
+ "type": {
+ "kind": "vector",
+ "elementCount": 4,
+ "elementType": {
+ "kind": "scalar",
+ "scalarType": "float32"
+ }
+ }
+ }
}
]
}
diff --git a/tests/reflection/default-space.slang.expected b/tests/reflection/default-space.slang.expected
index 548de2be0..5ba17790c 100644
--- a/tests/reflection/default-space.slang.expected
+++ b/tests/reflection/default-space.slang.expected
@@ -30,6 +30,26 @@ standard output = {
"binding": {"kind": "shaderResource", "index": 0}
}
]
+ },
+ "containerVarLayout": {
+ "binding": {"kind": "registerSpace", "index": 0}
+ },
+ "elementVarLayout": {
+ "type": {
+ "kind": "struct",
+ "name": "B",
+ "fields": [
+ {
+ "name": "b",
+ "type": {
+ "kind": "resource",
+ "baseShape": "texture2D"
+ },
+ "binding": {"kind": "shaderResource", "index": 0}
+ }
+ ]
+ },
+ "binding": {"kind": "shaderResource", "index": 0}
}
}
}
@@ -37,7 +57,20 @@ standard output = {
"entryPoints": [
{
"name": "main",
- "stage:": "fragment"
+ "stage:": "fragment",
+ "result:": {
+ "stage": "fragment",
+ "binding": {"kind": "varyingOutput", "index": 0},
+ "semanticName": "SV_TARGET",
+ "type": {
+ "kind": "vector",
+ "elementCount": 4,
+ "elementType": {
+ "kind": "scalar",
+ "scalarType": "float32"
+ }
+ }
+ }
}
]
}
diff --git a/tests/reflection/explicit-register-space.slang.expected b/tests/reflection/explicit-register-space.slang.expected
index c9e32c4f5..0c282f5f9 100644
--- a/tests/reflection/explicit-register-space.slang.expected
+++ b/tests/reflection/explicit-register-space.slang.expected
@@ -16,7 +16,20 @@ standard output = {
"entryPoints": [
{
"name": "main",
- "stage:": "fragment"
+ "stage:": "fragment",
+ "result:": {
+ "stage": "fragment",
+ "binding": {"kind": "varyingOutput", "index": 0},
+ "semanticName": "SV_TARGET",
+ "type": {
+ "kind": "vector",
+ "elementCount": 4,
+ "elementType": {
+ "kind": "scalar",
+ "scalarType": "float32"
+ }
+ }
+ }
}
]
}
diff --git a/tests/reflection/global-type-params.slang.expected b/tests/reflection/global-type-params.slang.expected
index 8f6ba2838..4fb7d0279 100644
--- a/tests/reflection/global-type-params.slang.expected
+++ b/tests/reflection/global-type-params.slang.expected
@@ -22,6 +22,26 @@ standard output = {
"binding": {"kind": "generic", "index": 0}
}
]
+ },
+ "containerVarLayout": {
+
+ },
+ "elementVarLayout": {
+ "type": {
+ "kind": "struct",
+ "name": "S",
+ "fields": [
+ {
+ "name": "p",
+ "type": {
+ "kind": "GenericTypeParameter",
+ "name": "TParam2"
+ },
+ "binding": {"kind": "generic", "index": 0}
+ }
+ ]
+ },
+ "binding": {"kind": "generic", "index": 0}
}
}
},
@@ -33,6 +53,16 @@ standard output = {
"elementType": {
"kind": "GenericTypeParameter",
"name": "TParam"
+ },
+ "containerVarLayout": {
+
+ },
+ "elementVarLayout": {
+ "type": {
+ "kind": "GenericTypeParameter",
+ "name": "TParam"
+ },
+ "binding": {"kind": "generic", "index": 0}
}
}
},
@@ -96,6 +126,53 @@ standard output = {
"binding": {"kind": "uniform", "offset": 32, "size": 16}
}
]
+ },
+ "containerVarLayout": {
+ "binding": {"kind": "constantBuffer", "index": 0}
+ },
+ "elementVarLayout": {
+ "type": {
+ "kind": "struct",
+ "fields": [
+ {
+ "name": "u",
+ "type": {
+ "kind": "vector",
+ "elementCount": 4,
+ "elementType": {
+ "kind": "scalar",
+ "scalarType": "float32"
+ }
+ },
+ "binding": {"kind": "uniform", "offset": 0, "size": 16}
+ },
+ {
+ "name": "v",
+ "type": {
+ "kind": "vector",
+ "elementCount": 4,
+ "elementType": {
+ "kind": "scalar",
+ "scalarType": "float32"
+ }
+ },
+ "binding": {"kind": "uniform", "offset": 16, "size": 16}
+ },
+ {
+ "name": "w",
+ "type": {
+ "kind": "vector",
+ "elementCount": 4,
+ "elementType": {
+ "kind": "scalar",
+ "scalarType": "float32"
+ }
+ },
+ "binding": {"kind": "uniform", "offset": 32, "size": 16}
+ }
+ ]
+ },
+ "binding": {"kind": "uniform", "offset": 0, "size": 48}
}
}
}
@@ -103,7 +180,20 @@ standard output = {
"entryPoints": [
{
"name": "main",
- "stage:": "fragment"
+ "stage:": "fragment",
+ "result:": {
+ "stage": "fragment",
+ "binding": {"kind": "varyingOutput", "index": 0},
+ "semanticName": "SV_TARGET",
+ "type": {
+ "kind": "vector",
+ "elementCount": 4,
+ "elementType": {
+ "kind": "scalar",
+ "scalarType": "float32"
+ }
+ }
+ }
}
],
"typeParams":
diff --git a/tests/reflection/matrix-layout.slang.1.expected b/tests/reflection/matrix-layout.slang.1.expected
index 57fd29c6d..0683a6edc 100644
--- a/tests/reflection/matrix-layout.slang.1.expected
+++ b/tests/reflection/matrix-layout.slang.1.expected
@@ -52,6 +52,56 @@ standard output = {
"binding": {"kind": "uniform", "offset": 96, "size": 60}
}
]
+ },
+ "containerVarLayout": {
+ "binding": {"kind": "constantBuffer", "index": 0}
+ },
+ "elementVarLayout": {
+ "type": {
+ "kind": "struct",
+ "fields": [
+ {
+ "name": "aa",
+ "type": {
+ "kind": "matrix",
+ "rowCount": 3,
+ "columnCount": 4,
+ "elementType": {
+ "kind": "scalar",
+ "scalarType": "float32"
+ }
+ },
+ "binding": {"kind": "uniform", "offset": 0, "size": 48}
+ },
+ {
+ "name": "ab",
+ "type": {
+ "kind": "matrix",
+ "rowCount": 3,
+ "columnCount": 4,
+ "elementType": {
+ "kind": "scalar",
+ "scalarType": "float32"
+ }
+ },
+ "binding": {"kind": "uniform", "offset": 48, "size": 48}
+ },
+ {
+ "name": "ac",
+ "type": {
+ "kind": "matrix",
+ "rowCount": 3,
+ "columnCount": 4,
+ "elementType": {
+ "kind": "scalar",
+ "scalarType": "float32"
+ }
+ },
+ "binding": {"kind": "uniform", "offset": 96, "size": 60}
+ }
+ ]
+ },
+ "binding": {"kind": "uniform", "offset": 0, "size": 156}
}
}
},
@@ -113,6 +163,66 @@ standard output = {
"binding": {"kind": "uniform", "offset": 0, "size": 156}
}
]
+ },
+ "containerVarLayout": {
+ "binding": {"kind": "constantBuffer", "index": 0}
+ },
+ "elementVarLayout": {
+ "type": {
+ "kind": "struct",
+ "fields": [
+ {
+ "name": "b",
+ "type": {
+ "kind": "struct",
+ "name": "SB",
+ "fields": [
+ {
+ "name": "ba",
+ "type": {
+ "kind": "matrix",
+ "rowCount": 3,
+ "columnCount": 4,
+ "elementType": {
+ "kind": "scalar",
+ "scalarType": "float32"
+ }
+ },
+ "binding": {"kind": "uniform", "offset": 0, "size": 48}
+ },
+ {
+ "name": "bb",
+ "type": {
+ "kind": "matrix",
+ "rowCount": 3,
+ "columnCount": 4,
+ "elementType": {
+ "kind": "scalar",
+ "scalarType": "float32"
+ }
+ },
+ "binding": {"kind": "uniform", "offset": 48, "size": 48}
+ },
+ {
+ "name": "bc",
+ "type": {
+ "kind": "matrix",
+ "rowCount": 3,
+ "columnCount": 4,
+ "elementType": {
+ "kind": "scalar",
+ "scalarType": "float32"
+ }
+ },
+ "binding": {"kind": "uniform", "offset": 96, "size": 60}
+ }
+ ]
+ },
+ "binding": {"kind": "uniform", "offset": 0, "size": 156}
+ }
+ ]
+ },
+ "binding": {"kind": "uniform", "offset": 0, "size": 156}
}
}
}
@@ -120,7 +230,20 @@ standard output = {
"entryPoints": [
{
"name": "main",
- "stage:": "fragment"
+ "stage:": "fragment",
+ "result:": {
+ "stage": "fragment",
+ "binding": {"kind": "varyingOutput", "index": 0},
+ "semanticName": "SV_TARGET",
+ "type": {
+ "kind": "vector",
+ "elementCount": 4,
+ "elementType": {
+ "kind": "scalar",
+ "scalarType": "float32"
+ }
+ }
+ }
}
]
}
diff --git a/tests/reflection/matrix-layout.slang.expected b/tests/reflection/matrix-layout.slang.expected
index c8aeb2ae1..c81207216 100644
--- a/tests/reflection/matrix-layout.slang.expected
+++ b/tests/reflection/matrix-layout.slang.expected
@@ -52,6 +52,56 @@ standard output = {
"binding": {"kind": "uniform", "offset": 112, "size": 60}
}
]
+ },
+ "containerVarLayout": {
+ "binding": {"kind": "constantBuffer", "index": 0}
+ },
+ "elementVarLayout": {
+ "type": {
+ "kind": "struct",
+ "fields": [
+ {
+ "name": "aa",
+ "type": {
+ "kind": "matrix",
+ "rowCount": 3,
+ "columnCount": 4,
+ "elementType": {
+ "kind": "scalar",
+ "scalarType": "float32"
+ }
+ },
+ "binding": {"kind": "uniform", "offset": 0, "size": 60}
+ },
+ {
+ "name": "ab",
+ "type": {
+ "kind": "matrix",
+ "rowCount": 3,
+ "columnCount": 4,
+ "elementType": {
+ "kind": "scalar",
+ "scalarType": "float32"
+ }
+ },
+ "binding": {"kind": "uniform", "offset": 64, "size": 48}
+ },
+ {
+ "name": "ac",
+ "type": {
+ "kind": "matrix",
+ "rowCount": 3,
+ "columnCount": 4,
+ "elementType": {
+ "kind": "scalar",
+ "scalarType": "float32"
+ }
+ },
+ "binding": {"kind": "uniform", "offset": 112, "size": 60}
+ }
+ ]
+ },
+ "binding": {"kind": "uniform", "offset": 0, "size": 172}
}
}
},
@@ -113,6 +163,66 @@ standard output = {
"binding": {"kind": "uniform", "offset": 0, "size": 172}
}
]
+ },
+ "containerVarLayout": {
+ "binding": {"kind": "constantBuffer", "index": 0}
+ },
+ "elementVarLayout": {
+ "type": {
+ "kind": "struct",
+ "fields": [
+ {
+ "name": "b",
+ "type": {
+ "kind": "struct",
+ "name": "SB",
+ "fields": [
+ {
+ "name": "ba",
+ "type": {
+ "kind": "matrix",
+ "rowCount": 3,
+ "columnCount": 4,
+ "elementType": {
+ "kind": "scalar",
+ "scalarType": "float32"
+ }
+ },
+ "binding": {"kind": "uniform", "offset": 0, "size": 60}
+ },
+ {
+ "name": "bb",
+ "type": {
+ "kind": "matrix",
+ "rowCount": 3,
+ "columnCount": 4,
+ "elementType": {
+ "kind": "scalar",
+ "scalarType": "float32"
+ }
+ },
+ "binding": {"kind": "uniform", "offset": 64, "size": 48}
+ },
+ {
+ "name": "bc",
+ "type": {
+ "kind": "matrix",
+ "rowCount": 3,
+ "columnCount": 4,
+ "elementType": {
+ "kind": "scalar",
+ "scalarType": "float32"
+ }
+ },
+ "binding": {"kind": "uniform", "offset": 112, "size": 60}
+ }
+ ]
+ },
+ "binding": {"kind": "uniform", "offset": 0, "size": 172}
+ }
+ ]
+ },
+ "binding": {"kind": "uniform", "offset": 0, "size": 172}
}
}
}
@@ -120,7 +230,20 @@ standard output = {
"entryPoints": [
{
"name": "main",
- "stage:": "fragment"
+ "stage:": "fragment",
+ "result:": {
+ "stage": "fragment",
+ "binding": {"kind": "varyingOutput", "index": 0},
+ "semanticName": "SV_TARGET",
+ "type": {
+ "kind": "vector",
+ "elementCount": 4,
+ "elementType": {
+ "kind": "scalar",
+ "scalarType": "float32"
+ }
+ }
+ }
}
]
}
diff --git a/tests/reflection/multi-file.hlsl.expected b/tests/reflection/multi-file.hlsl.expected
index 814c648e0..1cbc73f5c 100644
--- a/tests/reflection/multi-file.hlsl.expected
+++ b/tests/reflection/multi-file.hlsl.expected
@@ -72,6 +72,61 @@ standard output = {
"binding": {"kind": "uniform", "offset": 32, "size": 8}
}
]
+ },
+ "containerVarLayout": {
+ "binding": {"kind": "constantBuffer", "index": 0}
+ },
+ "elementVarLayout": {
+ "type": {
+ "kind": "struct",
+ "fields": [
+ {
+ "name": "vertexCA",
+ "type": {
+ "kind": "vector",
+ "elementCount": 3,
+ "elementType": {
+ "kind": "scalar",
+ "scalarType": "float32"
+ }
+ },
+ "binding": {"kind": "uniform", "offset": 0, "size": 12}
+ },
+ {
+ "name": "vertexCB",
+ "type": {
+ "kind": "scalar",
+ "scalarType": "float32"
+ },
+ "binding": {"kind": "uniform", "offset": 12, "size": 4}
+ },
+ {
+ "name": "vertexCC",
+ "type": {
+ "kind": "vector",
+ "elementCount": 3,
+ "elementType": {
+ "kind": "scalar",
+ "scalarType": "float32"
+ }
+ },
+ "binding": {"kind": "uniform", "offset": 16, "size": 12}
+ },
+ {
+ "name": "vertexCD",
+ "type": {
+ "kind": "vector",
+ "elementCount": 2,
+ "elementType": {
+ "kind": "scalar",
+ "scalarType": "float32"
+ }
+ },
+ "binding": {"kind": "uniform", "offset": 32, "size": 8}
+ }
+ ]
+ },
+ "binding": {"kind": "uniform", "offset": 0, "size": 40}
}
}
},
@@ -143,6 +198,61 @@ standard output = {
"binding": {"kind": "uniform", "offset": 32, "size": 8}
}
]
+ },
+ "containerVarLayout": {
+ "binding": {"kind": "constantBuffer", "index": 0}
+ },
+ "elementVarLayout": {
+ "type": {
+ "kind": "struct",
+ "fields": [
+ {
+ "name": "fragmentCA",
+ "type": {
+ "kind": "vector",
+ "elementCount": 3,
+ "elementType": {
+ "kind": "scalar",
+ "scalarType": "float32"
+ }
+ },
+ "binding": {"kind": "uniform", "offset": 0, "size": 12}
+ },
+ {
+ "name": "fragmentCB",
+ "type": {
+ "kind": "scalar",
+ "scalarType": "float32"
+ },
+ "binding": {"kind": "uniform", "offset": 12, "size": 4}
+ },
+ {
+ "name": "fragmentCC",
+ "type": {
+ "kind": "vector",
+ "elementCount": 3,
+ "elementType": {
+ "kind": "scalar",
+ "scalarType": "float32"
+ }
+ },
+ "binding": {"kind": "uniform", "offset": 16, "size": 12}
+ },
+ {
+ "name": "fragmentCD",
+ "type": {
+ "kind": "vector",
+ "elementCount": 2,
+ "elementType": {
+ "kind": "scalar",
+ "scalarType": "float32"
+ }
+ },
+ "binding": {"kind": "uniform", "offset": 32, "size": 8}
+ }
+ ]
+ },
+ "binding": {"kind": "uniform", "offset": 0, "size": 40}
}
}
},
@@ -214,6 +324,61 @@ standard output = {
"binding": {"kind": "uniform", "offset": 32, "size": 8}
}
]
+ },
+ "containerVarLayout": {
+ "binding": {"kind": "constantBuffer", "index": 0}
+ },
+ "elementVarLayout": {
+ "type": {
+ "kind": "struct",
+ "fields": [
+ {
+ "name": "sharedCA",
+ "type": {
+ "kind": "vector",
+ "elementCount": 3,
+ "elementType": {
+ "kind": "scalar",
+ "scalarType": "float32"
+ }
+ },
+ "binding": {"kind": "uniform", "offset": 0, "size": 12}
+ },
+ {
+ "name": "sharedCB",
+ "type": {
+ "kind": "scalar",
+ "scalarType": "float32"
+ },
+ "binding": {"kind": "uniform", "offset": 12, "size": 4}
+ },
+ {
+ "name": "sharedCC",
+ "type": {
+ "kind": "vector",
+ "elementCount": 3,
+ "elementType": {
+ "kind": "scalar",
+ "scalarType": "float32"
+ }
+ },
+ "binding": {"kind": "uniform", "offset": 16, "size": 12}
+ },
+ {
+ "name": "sharedCD",
+ "type": {
+ "kind": "vector",
+ "elementCount": 2,
+ "elementType": {
+ "kind": "scalar",
+ "scalarType": "float32"
+ }
+ },
+ "binding": {"kind": "uniform", "offset": 32, "size": 8}
+ }
+ ]
+ },
+ "binding": {"kind": "uniform", "offset": 0, "size": 40}
}
}
},
@@ -237,11 +402,35 @@ standard output = {
"entryPoints": [
{
"name": "mainVS",
- "stage:": "vertex"
+ "stage:": "vertex",
+ "result:": {
+ "semanticName": "SV_POSITION",
+ "type": {
+ "kind": "vector",
+ "elementCount": 4,
+ "elementType": {
+ "kind": "scalar",
+ "scalarType": "float32"
+ }
+ }
+ }
},
{
"name": "mainFS",
- "stage:": "fragment"
+ "stage:": "fragment",
+ "result:": {
+ "stage": "fragment",
+ "binding": {"kind": "varyingOutput", "index": 0},
+ "semanticName": "SV_TARGET",
+ "type": {
+ "kind": "vector",
+ "elementCount": 4,
+ "elementType": {
+ "kind": "scalar",
+ "scalarType": "float32"
+ }
+ }
+ }
}
]
}
diff --git a/tests/reflection/parameter-block-explicit-space.slang.expected b/tests/reflection/parameter-block-explicit-space.slang.expected
index f7944c644..a96f95961 100644
--- a/tests/reflection/parameter-block-explicit-space.slang.expected
+++ b/tests/reflection/parameter-block-explicit-space.slang.expected
@@ -52,6 +52,60 @@ standard output = {
"binding": {"kind": "samplerState", "index": 0}
}
]
+ },
+ "containerVarLayout": {
+ "bindings": [
+ {"kind": "constantBuffer", "index": 0},
+ {"kind": "registerSpace", "index": 0}
+ ]
+ },
+ "elementVarLayout": {
+ "type": {
+ "kind": "struct",
+ "name": "A",
+ "fields": [
+ {
+ "name": "au",
+ "type": {
+ "kind": "vector",
+ "elementCount": 4,
+ "elementType": {
+ "kind": "scalar",
+ "scalarType": "float32"
+ }
+ },
+ "binding": {"kind": "uniform", "offset": 0, "size": 16}
+ },
+ {
+ "name": "at1",
+ "type": {
+ "kind": "resource",
+ "baseShape": "texture2D"
+ },
+ "binding": {"kind": "shaderResource", "index": 0}
+ },
+ {
+ "name": "at2",
+ "type": {
+ "kind": "resource",
+ "baseShape": "texture2D"
+ },
+ "binding": {"kind": "shaderResource", "index": 1}
+ },
+ {
+ "name": "as",
+ "type": {
+ "kind": "samplerState"
+ },
+ "binding": {"kind": "samplerState", "index": 0}
+ }
+ ]
+ },
+ "bindings": [
+ {"kind": "shaderResource", "index": 0, "count": 2},
+ {"kind": "samplerState", "index": 0},
+ {"kind": "uniform", "offset": 0, "size": 16}
+ ]
}
}
},
@@ -95,6 +149,52 @@ standard output = {
"binding": {"kind": "samplerState", "index": 0}
}
]
+ },
+ "containerVarLayout": {
+ "bindings": [
+ {"kind": "constantBuffer", "index": 0},
+ {"kind": "registerSpace", "index": 0}
+ ]
+ },
+ "elementVarLayout": {
+ "type": {
+ "kind": "struct",
+ "name": "B",
+ "fields": [
+ {
+ "name": "bu",
+ "type": {
+ "kind": "vector",
+ "elementCount": 4,
+ "elementType": {
+ "kind": "scalar",
+ "scalarType": "float32"
+ }
+ },
+ "binding": {"kind": "uniform", "offset": 0, "size": 16}
+ },
+ {
+ "name": "bt",
+ "type": {
+ "kind": "resource",
+ "baseShape": "texture2D"
+ },
+ "binding": {"kind": "shaderResource", "index": 0}
+ },
+ {
+ "name": "bs",
+ "type": {
+ "kind": "samplerState"
+ },
+ "binding": {"kind": "samplerState", "index": 0}
+ }
+ ]
+ },
+ "bindings": [
+ {"kind": "shaderResource", "index": 0},
+ {"kind": "samplerState", "index": 0},
+ {"kind": "uniform", "offset": 0, "size": 16}
+ ]
}
}
}
@@ -102,7 +202,20 @@ standard output = {
"entryPoints": [
{
"name": "main",
- "stage:": "fragment"
+ "stage:": "fragment",
+ "result:": {
+ "stage": "fragment",
+ "binding": {"kind": "varyingOutput", "index": 0},
+ "semanticName": "SV_TARGET",
+ "type": {
+ "kind": "vector",
+ "elementCount": 4,
+ "elementType": {
+ "kind": "scalar",
+ "scalarType": "float32"
+ }
+ }
+ }
}
]
}
diff --git a/tests/reflection/parameter-block.slang.1.expected b/tests/reflection/parameter-block.slang.1.expected
index bbd52a784..b8f462e60 100644
--- a/tests/reflection/parameter-block.slang.1.expected
+++ b/tests/reflection/parameter-block.slang.1.expected
@@ -32,6 +32,36 @@ standard output = {
"binding": {"kind": "samplerState", "index": 0}
}
]
+ },
+ "containerVarLayout": {
+
+ },
+ "elementVarLayout": {
+ "type": {
+ "kind": "struct",
+ "name": "Helper",
+ "fields": [
+ {
+ "name": "t",
+ "type": {
+ "kind": "resource",
+ "baseShape": "texture2D"
+ },
+ "binding": {"kind": "shaderResource", "index": 0}
+ },
+ {
+ "name": "s",
+ "type": {
+ "kind": "samplerState"
+ },
+ "binding": {"kind": "samplerState", "index": 0}
+ }
+ ]
+ },
+ "bindings": [
+ {"kind": "shaderResource", "index": 0},
+ {"kind": "samplerState", "index": 0}
+ ]
}
}
},
@@ -47,7 +77,20 @@ standard output = {
"entryPoints": [
{
"name": "main",
- "stage:": "fragment"
+ "stage:": "fragment",
+ "result:": {
+ "stage": "fragment",
+ "binding": {"kind": "varyingOutput", "index": 0},
+ "semanticName": "SV_TARGET",
+ "type": {
+ "kind": "vector",
+ "elementCount": 4,
+ "elementType": {
+ "kind": "scalar",
+ "scalarType": "float32"
+ }
+ }
+ }
}
]
}
diff --git a/tests/reflection/parameter-block.slang.2.expected b/tests/reflection/parameter-block.slang.2.expected
index e692718e8..e4bf9b6cb 100644
--- a/tests/reflection/parameter-block.slang.2.expected
+++ b/tests/reflection/parameter-block.slang.2.expected
@@ -29,6 +29,36 @@ standard output = {
"binding": {"kind": "samplerState", "index": 0}
}
]
+ },
+ "containerVarLayout": {
+ "binding": {"kind": "registerSpace", "index": 0}
+ },
+ "elementVarLayout": {
+ "type": {
+ "kind": "struct",
+ "name": "Helper",
+ "fields": [
+ {
+ "name": "t",
+ "type": {
+ "kind": "resource",
+ "baseShape": "texture2D"
+ },
+ "binding": {"kind": "shaderResource", "index": 0}
+ },
+ {
+ "name": "s",
+ "type": {
+ "kind": "samplerState"
+ },
+ "binding": {"kind": "samplerState", "index": 0}
+ }
+ ]
+ },
+ "bindings": [
+ {"kind": "shaderResource", "index": 0},
+ {"kind": "samplerState", "index": 0}
+ ]
}
}
},
@@ -44,7 +74,20 @@ standard output = {
"entryPoints": [
{
"name": "main",
- "stage:": "fragment"
+ "stage:": "fragment",
+ "result:": {
+ "stage": "fragment",
+ "binding": {"kind": "varyingOutput", "index": 0},
+ "semanticName": "SV_TARGET",
+ "type": {
+ "kind": "vector",
+ "elementCount": 4,
+ "elementType": {
+ "kind": "scalar",
+ "scalarType": "float32"
+ }
+ }
+ }
}
]
}
diff --git a/tests/reflection/parameter-block.slang.expected b/tests/reflection/parameter-block.slang.expected
index 58344bc12..0909dc8cf 100644
--- a/tests/reflection/parameter-block.slang.expected
+++ b/tests/reflection/parameter-block.slang.expected
@@ -29,6 +29,33 @@ standard output = {
"binding": {"kind": "descriptorTableSlot", "index": 1}
}
]
+ },
+ "containerVarLayout": {
+ "binding": {"kind": "registerSpace", "index": 0}
+ },
+ "elementVarLayout": {
+ "type": {
+ "kind": "struct",
+ "name": "Helper",
+ "fields": [
+ {
+ "name": "t",
+ "type": {
+ "kind": "resource",
+ "baseShape": "texture2D"
+ },
+ "binding": {"kind": "descriptorTableSlot", "index": 0}
+ },
+ {
+ "name": "s",
+ "type": {
+ "kind": "samplerState"
+ },
+ "binding": {"kind": "descriptorTableSlot", "index": 1}
+ }
+ ]
+ },
+ "binding": {"kind": "descriptorTableSlot", "index": 0, "count": 2}
}
}
},
@@ -44,7 +71,20 @@ standard output = {
"entryPoints": [
{
"name": "main",
- "stage:": "fragment"
+ "stage:": "fragment",
+ "result:": {
+ "stage": "fragment",
+ "binding": {"kind": "varyingOutput", "index": 0},
+ "semanticName": "SV_TARGET",
+ "type": {
+ "kind": "vector",
+ "elementCount": 4,
+ "elementType": {
+ "kind": "scalar",
+ "scalarType": "float32"
+ }
+ }
+ }
}
]
}
diff --git a/tests/reflection/reflect-imported-code.hlsl.expected b/tests/reflection/reflect-imported-code.hlsl.expected
index 78e7ce195..5d51ddb5c 100644
--- a/tests/reflection/reflect-imported-code.hlsl.expected
+++ b/tests/reflection/reflect-imported-code.hlsl.expected
@@ -36,6 +36,25 @@ standard output = {
"binding": {"kind": "uniform", "offset": 0, "size": 4}
}
]
+ },
+ "containerVarLayout": {
+ "binding": {"kind": "constantBuffer", "index": 0}
+ },
+ "elementVarLayout": {
+ "type": {
+ "kind": "struct",
+ "fields": [
+ {
+ "name": "c",
+ "type": {
+ "kind": "scalar",
+ "scalarType": "float32"
+ },
+ "binding": {"kind": "uniform", "offset": 0, "size": 4}
+ }
+ ]
+ },
+ "binding": {"kind": "uniform", "offset": 0, "size": 4}
}
}
},
@@ -71,6 +90,25 @@ standard output = {
"binding": {"kind": "uniform", "offset": 0, "size": 4}
}
]
+ },
+ "containerVarLayout": {
+ "binding": {"kind": "constantBuffer", "index": 0}
+ },
+ "elementVarLayout": {
+ "type": {
+ "kind": "struct",
+ "fields": [
+ {
+ "name": "c_i",
+ "type": {
+ "kind": "scalar",
+ "scalarType": "float32"
+ },
+ "binding": {"kind": "uniform", "offset": 0, "size": 4}
+ }
+ ]
+ },
+ "binding": {"kind": "uniform", "offset": 0, "size": 4}
}
}
}
@@ -78,7 +116,20 @@ standard output = {
"entryPoints": [
{
"name": "main",
- "stage:": "fragment"
+ "stage:": "fragment",
+ "result:": {
+ "stage": "fragment",
+ "binding": {"kind": "varyingOutput", "index": 0},
+ "semanticName": "SV_TARGET",
+ "type": {
+ "kind": "vector",
+ "elementCount": 4,
+ "elementType": {
+ "kind": "scalar",
+ "scalarType": "float32"
+ }
+ }
+ }
}
]
}
diff --git a/tests/reflection/reflection0.hlsl.expected b/tests/reflection/reflection0.hlsl.expected
index e4d6070ca..64b8fcd85 100644
--- a/tests/reflection/reflection0.hlsl.expected
+++ b/tests/reflection/reflection0.hlsl.expected
@@ -36,6 +36,25 @@ standard output = {
"binding": {"kind": "uniform", "offset": 0, "size": 4}
}
]
+ },
+ "containerVarLayout": {
+ "binding": {"kind": "constantBuffer", "index": 0}
+ },
+ "elementVarLayout": {
+ "type": {
+ "kind": "struct",
+ "fields": [
+ {
+ "name": "c",
+ "type": {
+ "kind": "scalar",
+ "scalarType": "float32"
+ },
+ "binding": {"kind": "uniform", "offset": 0, "size": 4}
+ }
+ ]
+ },
+ "binding": {"kind": "uniform", "offset": 0, "size": 4}
}
}
}
@@ -43,7 +62,20 @@ standard output = {
"entryPoints": [
{
"name": "main",
- "stage:": "fragment"
+ "stage:": "fragment",
+ "result:": {
+ "stage": "fragment",
+ "binding": {"kind": "varyingOutput", "index": 0},
+ "semanticName": "SV_TARGET",
+ "type": {
+ "kind": "vector",
+ "elementCount": 4,
+ "elementType": {
+ "kind": "scalar",
+ "scalarType": "float32"
+ }
+ }
+ }
}
]
}
diff --git a/tests/reflection/resource-in-cbuffer.hlsl.expected b/tests/reflection/resource-in-cbuffer.hlsl.expected
index d14fbe577..03299a8e0 100644
--- a/tests/reflection/resource-in-cbuffer.hlsl.expected
+++ b/tests/reflection/resource-in-cbuffer.hlsl.expected
@@ -48,6 +48,56 @@ standard output = {
"binding": {"kind": "samplerState", "index": 0}
}
]
+ },
+ "containerVarLayout": {
+ "binding": {"kind": "constantBuffer", "index": 0}
+ },
+ "elementVarLayout": {
+ "type": {
+ "kind": "struct",
+ "fields": [
+ {
+ "name": "v",
+ "type": {
+ "kind": "vector",
+ "elementCount": 3,
+ "elementType": {
+ "kind": "scalar",
+ "scalarType": "float32"
+ }
+ },
+ "binding": {"kind": "uniform", "offset": 0, "size": 12}
+ },
+ {
+ "name": "myTexture",
+ "type": {
+ "kind": "resource",
+ "baseShape": "texture2D"
+ },
+ "binding": {"kind": "shaderResource", "index": 0}
+ },
+ {
+ "name": "c",
+ "type": {
+ "kind": "scalar",
+ "scalarType": "float32"
+ },
+ "binding": {"kind": "uniform", "offset": 12, "size": 4}
+ },
+ {
+ "name": "mySampler",
+ "type": {
+ "kind": "samplerState"
+ },
+ "binding": {"kind": "samplerState", "index": 0}
+ }
+ ]
+ },
+ "bindings": [
+ {"kind": "shaderResource", "index": 0},
+ {"kind": "samplerState", "index": 0},
+ {"kind": "uniform", "offset": 0, "size": 16}
+ ]
}
}
}
@@ -55,7 +105,20 @@ standard output = {
"entryPoints": [
{
"name": "main",
- "stage:": "fragment"
+ "stage:": "fragment",
+ "result:": {
+ "stage": "fragment",
+ "binding": {"kind": "varyingOutput", "index": 0},
+ "semanticName": "SV_TARGET",
+ "type": {
+ "kind": "vector",
+ "elementCount": 4,
+ "elementType": {
+ "kind": "scalar",
+ "scalarType": "float32"
+ }
+ }
+ }
}
]
}
diff --git a/tests/reflection/sample-index-input.hlsl.expected b/tests/reflection/sample-index-input.hlsl.expected
index 5bf5f297e..d0bc3c1b9 100644
--- a/tests/reflection/sample-index-input.hlsl.expected
+++ b/tests/reflection/sample-index-input.hlsl.expected
@@ -45,7 +45,20 @@ standard output = {
}
}
],
- "usesAnySampleRateInput": true
+ "usesAnySampleRateInput": true,
+ "result:": {
+ "stage": "fragment",
+ "binding": {"kind": "varyingOutput", "index": 0},
+ "semanticName": "SV_TARGET",
+ "type": {
+ "kind": "vector",
+ "elementCount": 4,
+ "elementType": {
+ "kind": "scalar",
+ "scalarType": "float32"
+ }
+ }
+ }
}
]
}
diff --git a/tests/reflection/sample-rate-input.hlsl.expected b/tests/reflection/sample-rate-input.hlsl.expected
index 0c86ebecb..485594fae 100644
--- a/tests/reflection/sample-rate-input.hlsl.expected
+++ b/tests/reflection/sample-rate-input.hlsl.expected
@@ -51,7 +51,20 @@ standard output = {
}
}
],
- "usesAnySampleRateInput": true
+ "usesAnySampleRateInput": true,
+ "result:": {
+ "stage": "fragment",
+ "binding": {"kind": "varyingOutput", "index": 0},
+ "semanticName": "SV_TARGET",
+ "type": {
+ "kind": "vector",
+ "elementCount": 4,
+ "elementType": {
+ "kind": "scalar",
+ "scalarType": "float32"
+ }
+ }
+ }
}
]
}
diff --git a/tests/reflection/shared-modifier.hlsl.expected b/tests/reflection/shared-modifier.hlsl.expected
index ddb982177..782e038de 100644
--- a/tests/reflection/shared-modifier.hlsl.expected
+++ b/tests/reflection/shared-modifier.hlsl.expected
@@ -40,7 +40,20 @@ standard output = {
}
}
}
- ]
+ ],
+ "result:": {
+ "stage": "fragment",
+ "binding": {"kind": "varyingOutput", "index": 0},
+ "semanticName": "SV_TARGET",
+ "type": {
+ "kind": "vector",
+ "elementCount": 4,
+ "elementType": {
+ "kind": "scalar",
+ "scalarType": "float32"
+ }
+ }
+ }
}
]
}
diff --git a/tests/reflection/structured-buffer.slang.expected b/tests/reflection/structured-buffer.slang.expected
index 3e79fd1c5..d0cb3e501 100644
--- a/tests/reflection/structured-buffer.slang.expected
+++ b/tests/reflection/structured-buffer.slang.expected
@@ -78,7 +78,20 @@ standard output = {
"entryPoints": [
{
"name": "main",
- "stage:": "fragment"
+ "stage:": "fragment",
+ "result:": {
+ "stage": "fragment",
+ "binding": {"kind": "varyingOutput", "index": 0},
+ "semanticName": "SV_TARGET",
+ "type": {
+ "kind": "vector",
+ "elementCount": 4,
+ "elementType": {
+ "kind": "scalar",
+ "scalarType": "float32"
+ }
+ }
+ }
}
]
}
diff --git a/tests/reflection/vertex-input-semantics.hlsl.expected b/tests/reflection/vertex-input-semantics.hlsl.expected
index 06b7bc95a..e15a3a258 100644
--- a/tests/reflection/vertex-input-semantics.hlsl.expected
+++ b/tests/reflection/vertex-input-semantics.hlsl.expected
@@ -160,7 +160,18 @@ standard output = {
]
}
}
- ]
+ ],
+ "result:": {
+ "semanticName": "SV_POSITION",
+ "type": {
+ "kind": "vector",
+ "elementCount": 4,
+ "elementType": {
+ "kind": "scalar",
+ "scalarType": "float32"
+ }
+ }
+ }
}
]
}