summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/diagnostics/gh-38-fs.hlsl9
-rw-r--r--tests/diagnostics/gh-38-vs.hlsl9
-rw-r--r--tests/diagnostics/gh-38-vs.hlsl.expected9
3 files changed, 27 insertions, 0 deletions
diff --git a/tests/diagnostics/gh-38-fs.hlsl b/tests/diagnostics/gh-38-fs.hlsl
new file mode 100644
index 000000000..61c8381e4
--- /dev/null
+++ b/tests/diagnostics/gh-38-fs.hlsl
@@ -0,0 +1,9 @@
+//TEST_IGNORE_FILE:
+
+// Companion file to `gh-38-fs.hlsl`
+
+Texture2D overlappingB : register(t0);
+
+Texture2D conflicting : register(t2);
+
+float4 main() : SV_Target { return 0; }
diff --git a/tests/diagnostics/gh-38-vs.hlsl b/tests/diagnostics/gh-38-vs.hlsl
new file mode 100644
index 000000000..7b23efdea
--- /dev/null
+++ b/tests/diagnostics/gh-38-vs.hlsl
@@ -0,0 +1,9 @@
+//TEST:SIMPLE: -target dxbc-assembly -profile vs_5_0 -entry main tests/diagnostics/gh-38-fs.hlsl -profile ps_5_0 -entry main
+
+// Ensure that we catch errors with overlapping or conflicting parameter bindings.
+
+Texture2D overlappingA : register(t0);
+
+Texture2D conflicting : register(t1);
+
+float4 main() : SV_Position { return 0; }
diff --git a/tests/diagnostics/gh-38-vs.hlsl.expected b/tests/diagnostics/gh-38-vs.hlsl.expected
new file mode 100644
index 000000000..05f455821
--- /dev/null
+++ b/tests/diagnostics/gh-38-vs.hlsl.expected
@@ -0,0 +1,9 @@
+result code = -1
+standard error = {
+tests/diagnostics/gh-38-fs.hlsl(7): error 39999: conflicting explicit bindings for parameter 'conflicting'
+tests/diagnostics/gh-38-vs.hlsl(7): note: see other declaration of 'conflicting'
+tests/diagnostics/gh-38-fs.hlsl(5): warning 39999: explicit binding for parameter 'overlappingB' overlaps with parameter 'overlappingA'
+tests/diagnostics/gh-38-vs.hlsl(5): note: see declaration of 'overlappingA'
+}
+standard output = {
+}