summaryrefslogtreecommitdiffstats
path: root/tests/reflection
diff options
context:
space:
mode:
Diffstat (limited to 'tests/reflection')
-rw-r--r--tests/reflection/shared-modifier.hlsl12
-rw-r--r--tests/reflection/shared-modifier.hlsl.expected47
2 files changed, 59 insertions, 0 deletions
diff --git a/tests/reflection/shared-modifier.hlsl b/tests/reflection/shared-modifier.hlsl
new file mode 100644
index 000000000..45a1dfac8
--- /dev/null
+++ b/tests/reflection/shared-modifier.hlsl
@@ -0,0 +1,12 @@
+// shared-modifier.hlsl
+//TEST:REFLECTION:-profile ps_5_0 -target hlsl
+
+// Confirm that we expose the `shared` modifier in reflection data.
+
+Texture2D t;
+shared SamplerState s;
+
+float4 main(float2 uv : UV) : SV_Target
+{
+ return t.Sample(s, uv);
+} \ No newline at end of file
diff --git a/tests/reflection/shared-modifier.hlsl.expected b/tests/reflection/shared-modifier.hlsl.expected
new file mode 100644
index 000000000..ddb982177
--- /dev/null
+++ b/tests/reflection/shared-modifier.hlsl.expected
@@ -0,0 +1,47 @@
+result code = 0
+standard error = {
+}
+standard output = {
+{
+ "parameters": [
+ {
+ "name": "t",
+ "binding": {"kind": "shaderResource", "index": 0},
+ "type": {
+ "kind": "resource",
+ "baseShape": "texture2D"
+ }
+ },
+ {
+ "name": "s",
+ "shared": true,
+ "binding": {"kind": "samplerState", "index": 0},
+ "type": {
+ "kind": "samplerState"
+ }
+ }
+ ],
+ "entryPoints": [
+ {
+ "name": "main",
+ "stage:": "fragment",
+ "parameters": [
+ {
+ "name": "uv",
+ "stage": "fragment",
+ "binding": {"kind": "varyingInput", "index": 0},
+ "semanticName": "UV",
+ "type": {
+ "kind": "vector",
+ "elementCount": 2,
+ "elementType": {
+ "kind": "scalar",
+ "scalarType": "float32"
+ }
+ }
+ }
+ ]
+ }
+ ]
+}
+}