From e9dcdd884ac616b4c9f5b258fb2a78d10bfce293 Mon Sep 17 00:00:00 2001 From: Mukund Keshava Date: Fri, 13 Jun 2025 11:50:17 +0530 Subject: Add new capdef for lss intrinsics (#7427) * Add new capdef for lss intrinsics Fixes #7426 Raygen shaders need to be supported for only hitobject APIs. So we need a special capability for that, instead of a common one. * regenerate command line reference --------- Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com> --- tests/cuda/lss-test.slang | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'tests') diff --git a/tests/cuda/lss-test.slang b/tests/cuda/lss-test.slang index f3052cacb..d3f4437de 100644 --- a/tests/cuda/lss-test.slang +++ b/tests/cuda/lss-test.slang @@ -10,6 +10,12 @@ //CHECK: optixHitObjectIsSphereHit //CHECK: optixHitObjectIsLSSHit +//CHECK_: __global__ void __raygen__raygenShaderLSS() +//CHECK: optixHitObjectGetSpherePositionAndRadius +//CHECK: optixHitObjectGetLssPositionsAndRadii +//CHECK: optixHitObjectIsSphereHit +//CHECK: optixHitObjectIsLSSHit + struct RayPayload { float4 color; @@ -27,6 +33,17 @@ void closestHitShaderLss(inout RayPayload payload, in BuiltInTriangleIntersectio payload.isSphere = IsSphereHit(); payload.isLss = IsLssHit(); + // Test HitObject API functions + HitObject hitObj; + float4 sphereData = hitObj.GetSpherePositionAndRadius(); + float2x4 lssData = hitObj.GetLssPositionsAndRadii(); + bool isSphereHit = hitObj.IsSphereHit(); + bool isLssHit = hitObj.IsLssHit(); +} + +[shader("raygen")] +void raygenShaderLSS(inout RayPayload payload, in BuiltInTriangleIntersectionAttributes attr) +{ // Test HitObject API functions HitObject hitObj; float4 sphereData = hitObj.GetSpherePositionAndRadius(); -- cgit v1.2.3