summaryrefslogtreecommitdiff
path: root/tests/reflection
diff options
context:
space:
mode:
Diffstat (limited to 'tests/reflection')
-rw-r--r--tests/reflection/parameter-block.slang2
-rw-r--r--tests/reflection/parameter-block.slang.1.expected54
-rw-r--r--tests/reflection/parameter-block.slang.2.expected51
3 files changed, 107 insertions, 0 deletions
diff --git a/tests/reflection/parameter-block.slang b/tests/reflection/parameter-block.slang
index 5fbcbb959..5c91ed339 100644
--- a/tests/reflection/parameter-block.slang
+++ b/tests/reflection/parameter-block.slang
@@ -1,4 +1,6 @@
//TEST:REFLECTION:-stage fragment -target glsl
+//TEST:REFLECTION:-stage fragment -target hlsl -profile sm_5_0
+//TEST:REFLECTION:-stage fragment -target hlsl -profile sm_5_1
// Confirm that we do parameter binding correctly
// when we have both a parameter block *and* user-defined
diff --git a/tests/reflection/parameter-block.slang.1.expected b/tests/reflection/parameter-block.slang.1.expected
new file mode 100644
index 000000000..bbd52a784
--- /dev/null
+++ b/tests/reflection/parameter-block.slang.1.expected
@@ -0,0 +1,54 @@
+result code = 0
+standard error = {
+}
+standard output = {
+{
+ "parameters": [
+ {
+ "name": "a",
+ "bindings": [
+ {"kind": "shaderResource", "index": 0},
+ {"kind": "samplerState", "index": 0}
+ ],
+ "type": {
+ "kind": "parameterBlock",
+ "elementType": {
+ "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}
+ }
+ ]
+ }
+ }
+ },
+ {
+ "name": "b",
+ "binding": {"kind": "shaderResource", "index": 1},
+ "type": {
+ "kind": "resource",
+ "baseShape": "texture2D"
+ }
+ }
+ ],
+ "entryPoints": [
+ {
+ "name": "main",
+ "stage:": "fragment"
+ }
+ ]
+}
+}
diff --git a/tests/reflection/parameter-block.slang.2.expected b/tests/reflection/parameter-block.slang.2.expected
new file mode 100644
index 000000000..e692718e8
--- /dev/null
+++ b/tests/reflection/parameter-block.slang.2.expected
@@ -0,0 +1,51 @@
+result code = 0
+standard error = {
+}
+standard output = {
+{
+ "parameters": [
+ {
+ "name": "a",
+ "binding": {"kind": "registerSpace", "index": 1},
+ "type": {
+ "kind": "parameterBlock",
+ "elementType": {
+ "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}
+ }
+ ]
+ }
+ }
+ },
+ {
+ "name": "b",
+ "binding": {"kind": "shaderResource", "index": 0},
+ "type": {
+ "kind": "resource",
+ "baseShape": "texture2D"
+ }
+ }
+ ],
+ "entryPoints": [
+ {
+ "name": "main",
+ "stage:": "fragment"
+ }
+ ]
+}
+}