summaryrefslogtreecommitdiffstats
path: root/tests/spirv
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2024-05-14 18:01:31 -0700
committerGitHub <noreply@github.com>2024-05-14 18:01:31 -0700
commit4edc72e4dea47cf549b4e28940e3509a5ab61439 (patch)
tree10475236b4a0e1f8a7a0bafdaa05a09d26f9412f /tests/spirv
parentd76bed6c1b03e5d7ef19c947fdd5fcaf33b595f7 (diff)
Remove use of `G0` and `__target_intrinsic` in stdlib. (#4170)
* Remove use of `G0` and `__target_intrinsic` in stdlib. * Fix. * Fix calling intrinsic in global scope.
Diffstat (limited to 'tests/spirv')
-rw-r--r--tests/spirv/global-compute.slang12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/spirv/global-compute.slang b/tests/spirv/global-compute.slang
new file mode 100644
index 000000000..1af3bfe5b
--- /dev/null
+++ b/tests/spirv/global-compute.slang
@@ -0,0 +1,12 @@
+//TEST:SIMPLE(filecheck=CHECK): -stage compute -target spirv -emit-spirv-directly -entry main
+
+RWStructuredBuffer<float> output;
+static const int vmin = min(1,2);
+
+// CHECK: OpEntryPoint
+
+[numthreads(1,1,1)]
+void main()
+{
+ output[0] = vmin;
+}