summaryrefslogtreecommitdiff
path: root/tests/bugs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/bugs')
-rw-r--r--tests/bugs/ray-flags-non-constant.slang12
-rw-r--r--tests/bugs/ray-flags-non-constant.slang.expected6
2 files changed, 18 insertions, 0 deletions
diff --git a/tests/bugs/ray-flags-non-constant.slang b/tests/bugs/ray-flags-non-constant.slang
new file mode 100644
index 000000000..e2197c6cd
--- /dev/null
+++ b/tests/bugs/ray-flags-non-constant.slang
@@ -0,0 +1,12 @@
+// ray-flags-non-constant.slang
+
+// Regression test for a compiler crash occuring when a generic with integer
+// value parameters is specialized to a non-constant (and hence invalid) value.
+
+//TEST:SIMPLE:-target dxil-assembly -entry main -stage compute
+
+void main()
+{
+ RAY_FLAG rayFlags = RAY_FLAG_CULL_FRONT_FACING_TRIANGLES | RAY_FLAG_CULL_NON_OPAQUE;
+ RayQuery<rayFlags> query;
+}
diff --git a/tests/bugs/ray-flags-non-constant.slang.expected b/tests/bugs/ray-flags-non-constant.slang.expected
new file mode 100644
index 000000000..3c5ef5d07
--- /dev/null
+++ b/tests/bugs/ray-flags-non-constant.slang.expected
@@ -0,0 +1,6 @@
+result code = -1
+standard error = {
+tests/bugs/ray-flags-non-constant.slang(11): error 39999: expression does not evaluate to a compile-time constant
+}
+standard output = {
+}