From af61737e7ba107e9e92164bf39ce6ab34e05ce82 Mon Sep 17 00:00:00 2001 From: Yong He Date: Thu, 28 Sep 2023 18:08:06 -0700 Subject: [Direct SPIRV]: ray tracing pipeline intrinsics. (#3244) * Use a dedicated inst opcode to retrieve ray payload locations. * [Direct SPIRV]: ray tracing pipeline intrinsics. * Fix. --------- Co-authored-by: Yong He --- tests/vkray/intersection.slang | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'tests/vkray/intersection.slang') diff --git a/tests/vkray/intersection.slang b/tests/vkray/intersection.slang index 65705c845..4b4495680 100644 --- a/tests/vkray/intersection.slang +++ b/tests/vkray/intersection.slang @@ -1,6 +1,6 @@ // intersection.slang -//TEST:CROSS_COMPILE: -profile glsl_460+GL_NV_ray_tracing -stage intersection -entry main -target spirv-assembly - +//TEST:SIMPLE(filecheck=CHECK): -profile glsl_460+GL_NV_ray_tracing -stage intersection -entry main -target spirv-assembly +//TEST:SIMPLE(filecheck=CHECK): -emit-spirv-directly -stage intersection -entry main -target spirv-assembly struct Sphere { float3 position; @@ -45,3 +45,12 @@ void main() ReportHit(tHit, 0, attrs); } } + +// CHECK: OpEntryPoint IntersectionNV %main "main" +// CHECK: OpDecorate %[[rayTMin:[a-zA-Z0-9_]+]] BuiltIn RayTminNV + +// CHECK-DAG: %[[ATTR:[A-Za-z0-9_]+]] = OpVariable %_ptr_HitAttributeNV_SphereHitAttributes{{.*}} HitAttributeNV +// CHECK-DAG: %[[VAL:[A-Za-z0-9_]+]] = Op{{.+}} %SphereHitAttributes{{.*}} {{.*}} +// CHECK-DAG: OpStore %[[ATTR]] %[[VAL]] + +// CHECK-DAG: OpReportIntersectionKHR -- cgit v1.2.3