From 14409bf1015af47691f09d2be6afb18cfb999aea Mon Sep 17 00:00:00 2001 From: Mukund Keshava Date: Fri, 30 May 2025 16:23:03 +0530 Subject: Enable LSS hit object test (#7273) * Enable LSS hit object test Enabled LSS SER tests now that PR #7211, which added SER support to OptiX, has been merged. Ran: ./build/Debug/bin/slangc.exe tests/cuda/lss-test.slang -target ptx -Xnvrtc -I"C:/ProgramData/NVIDIA Corporation/OptiX SDK 9.0.0/include" and confirmed that the HitObject intrinsic is called. eg: call (%f15, %f16, %f17, %f18, %f19, %f20, %f21, %f22), _optix_hitobject_get_linear_curve_vertex_data, (); * format code --------- Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com> --- tests/cuda/lss-test.slang | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'tests') diff --git a/tests/cuda/lss-test.slang b/tests/cuda/lss-test.slang index 4b0512cb1..f3052cacb 100644 --- a/tests/cuda/lss-test.slang +++ b/tests/cuda/lss-test.slang @@ -1,10 +1,15 @@ //TEST:SIMPLE(filecheck=CHECK): -target cuda //CHECK_: __global__ void __closesthit__closestHitShaderLss //CHECK: optixGetSpherePositionAndRadius -//CHECK: optixObjectPositionsAndRadii +//CHECK: optixGetLssPositionsAndRadii //CHECK: optixIsSphereHit //CHECK: optixIsLSSHit +//CHECK: optixHitObjectGetSpherePositionAndRadius +//CHECK: optixHitObjectGetLssPositionsAndRadii +//CHECK: optixHitObjectIsSphereHit +//CHECK: optixHitObjectIsLSSHit + struct RayPayload { float4 color; @@ -22,13 +27,10 @@ void closestHitShaderLss(inout RayPayload payload, in BuiltInTriangleIntersectio payload.isSphere = IsSphereHit(); payload.isLss = IsLssHit(); -// TODO: This will be enabled once issue #6647 is completed. -#if 0 // Test HitObject API functions HitObject hitObj; - float4 sphereData = hitObj.GetSphereObjectPositionAndRadius(); - float2x4 lssData = hitObj.GetLssObjectPositionsAndRadii(); + float4 sphereData = hitObj.GetSpherePositionAndRadius(); + float2x4 lssData = hitObj.GetLssPositionsAndRadii(); bool isSphereHit = hitObj.IsSphereHit(); bool isLssHit = hitObj.IsLssHit(); -#endif } \ No newline at end of file -- cgit v1.2.3