From 055d4acd8c4d37a45b27e1333af96c203bec85e8 Mon Sep 17 00:00:00 2001 From: venkataram-nv Date: Wed, 10 Jul 2024 23:34:44 -0700 Subject: Implement 64-bit version of clockARB (#4571) * Implement 64-bit version of clockARB * Fix capability versions * Corrections to capabilities --------- Co-authored-by: Yong He --- tests/glsl-intrinsic/clock-read.slang | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) (limited to 'tests') 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 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; } -- cgit v1.2.3