From 90b3817498d9cf664346f04dcea71f48ce81993e Mon Sep 17 00:00:00 2001 From: Yong He Date: Thu, 27 Feb 2025 13:21:20 -0800 Subject: Make capability diagnostic message more friendly. (#6474) * Make capability diagnostic message more friendly. * Fix. * Fix. * Fix. * Fix test. * Update expected fail setting for aarch64/linux * Fix. --- tests/diagnostics/discard-in-rt.slang | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 tests/diagnostics/discard-in-rt.slang (limited to 'tests/diagnostics') diff --git a/tests/diagnostics/discard-in-rt.slang b/tests/diagnostics/discard-in-rt.slang new file mode 100644 index 000000000..93c3d1038 --- /dev/null +++ b/tests/diagnostics/discard-in-rt.slang @@ -0,0 +1,24 @@ +//TEST:SIMPLE(filecheck=CHECK): -target spirv + +// CHECK: 'closestHit' uses features that are not available in 'closesthit' stage. +// CHECK: see using of 'discard' + +struct PrimaryRayPayload{} +[require(spvRayTracingKHR)] +[shader("closesthit")] +void closestHit( + inout PrimaryRayPayload rayData : SV_RayPayload, + BuiltInTriangleIntersectionAttributes attribs : SV_IntersectionAttributes) +{ + discard; +} + +// CHECK: 'closestHit1' uses features that are not available in 'closesthit' stage +// CHECK: see using of 'discard' +[shader("closesthit")] +void closestHit1( + inout PrimaryRayPayload rayData : SV_RayPayload, + BuiltInTriangleIntersectionAttributes attribs : SV_IntersectionAttributes) +{ + discard; +} -- cgit v1.2.3