From 25bc5a3ada5a2404f25ecf2de7d035ba60cd9fdf Mon Sep 17 00:00:00 2001 From: venkataram-nv Date: Fri, 16 Aug 2024 23:08:00 -0700 Subject: Avoiding the use of the global AST builder in DeclRefType::create (#4866) --- tests/modules/hit.slang | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 tests/modules/hit.slang (limited to 'tests/modules/hit.slang') diff --git a/tests/modules/hit.slang b/tests/modules/hit.slang new file mode 100644 index 000000000..d175275b4 --- /dev/null +++ b/tests/modules/hit.slang @@ -0,0 +1,24 @@ +//TEST:COMPILE: tests/modules/environment.slang -o tests/modules/environment.slang-module +//TEST:COMPILE: tests/modules/hit.slang -stage closesthit -entry closesthit -target dxil -o monolithic.dxil + +import environment; + +StructuredBuffer environment_sample_buffer; + +float3 sample_lights(inout uint seed) +{ + return environment_sample(environment_sample_buffer, seed); +} + +struct RadianceHitInfo +{ + float3 contribution; +}; + +struct Attributes +{ + float2 bary; +}; + +[shader("closesthit")] +void closesthit(inout RadianceHitInfo payload, Attributes attrib) {} -- cgit v1.2.3