summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorvenkataram-nv <vedavamadath@nvidia.com>2024-07-10 23:34:44 -0700
committerGitHub <noreply@github.com>2024-07-10 23:34:44 -0700
commit055d4acd8c4d37a45b27e1333af96c203bec85e8 (patch)
tree65b432442e9546c068b82a589b871d80997d22c6 /tests
parent4ae755f0a1f9828284f1bb8de15719a7b94938d6 (diff)
Implement 64-bit version of clockARB (#4571)
* Implement 64-bit version of clockARB * Fix capability versions * Corrections to capabilities --------- Co-authored-by: Yong He <yonghe@outlook.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/glsl-intrinsic/clock-read.slang23
1 files changed, 14 insertions, 9 deletions
diff --git a/tests/glsl-intrinsic/clock-read.slang b/tests/glsl-intrinsic/clock-read.slang
index 4bac5a07d..9f13012d6 100644
--- a/tests/glsl-intrinsic/clock-read.slang
+++ b/tests/glsl-intrinsic/clock-read.slang
@@ -1,19 +1,24 @@
-//TEST:SIMPLE(filecheck=CHECK1): -target glsl
-//TEST:SIMPLE(filecheck=CHECK2): -target spirv
-//TEST:SIMPLE(filecheck=CHECK3): -target spirv -emit-spirv-via-glsl
+//TEST:SIMPLE(filecheck=GLSL): -target glsl
+//TEST:SIMPLE(filecheck=SPIRV): -target spirv
+//TEST:SIMPLE(filecheck=SPIRV): -target spirv -emit-spirv-via-glsl
+// GLSL: GL_ARB_shader_clock : require
+// GLSL: GL_ARB_gpu_shader_int64 : require
-// CHECK1: GL_ARB_shader_clock : require
-// CHECK2: OpCapability ShaderClockKHR
-// CHECK2: OpExtension "SPV_KHR_shader_clock"
+//SPIRV: OpCapability ShaderClockKHR
+//SPIRV: OpExtension "SPV_KHR_shader_clock"
RWStructuredBuffer<float> output;
[shader("compute")]
[numthreads(1, 1, 1)]
void computeMain(uint3 id: SV_DispatchThreadID)
{
+ //GLSL: clock2x32ARB
+ //SPIRV: OpReadClockKHR %v2uint %uint_3
output[0] = clock2x32ARB().x;
- // CHECK1: clock2x32ARB
- // CHECK2: OpReadClockKHR %v2uint %uint_3
- // CHECK3: OpReadClockKHR %v2uint %uint_3
+
+ //GLSL: clockARB
+ //SPIRV: OpReadClockKHR %ulong %uint_3
+ uint64_t c = clockARB();
+ output[1] = c;
}