From 4edc72e4dea47cf549b4e28940e3509a5ab61439 Mon Sep 17 00:00:00 2001 From: Yong He Date: Tue, 14 May 2024 18:01:31 -0700 Subject: 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. --- tests/spirv/global-compute.slang | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 tests/spirv/global-compute.slang (limited to 'tests/spirv') 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 output; +static const int vmin = min(1,2); + +// CHECK: OpEntryPoint + +[numthreads(1,1,1)] +void main() +{ + output[0] = vmin; +} -- cgit v1.2.3