summaryrefslogtreecommitdiffstats
path: root/tests/cuda
diff options
context:
space:
mode:
authorMukund Keshava <mkeshava@nvidia.com>2025-06-13 11:50:17 +0530
committerGitHub <noreply@github.com>2025-06-13 06:20:17 +0000
commite9dcdd884ac616b4c9f5b258fb2a78d10bfce293 (patch)
tree345f47b5969379d3d03e1d58141d760fd6fa3ffb /tests/cuda
parent9c8fab83a53c43e345566c35f87c16fe7b815e01 (diff)
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>
Diffstat (limited to 'tests/cuda')
-rw-r--r--tests/cuda/lss-test.slang17
1 files changed, 17 insertions, 0 deletions
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;
@@ -33,4 +39,15 @@ void closestHitShaderLss(inout RayPayload payload, in BuiltInTriangleIntersectio
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();
+ float2x4 lssData = hitObj.GetLssPositionsAndRadii();
+ bool isSphereHit = hitObj.IsSphereHit();
+ bool isLssHit = hitObj.IsLssHit();
} \ No newline at end of file