yum-mirror/slang

Making it easier to work with shaders

git clone https://git.yummers.dev/yum-mirror/slang

ArielG-NVError if super-type capabilities are a super-set of sub-type (#7452)07f21ee31

master
683 B24 linesraw
1//TEST:SIMPLE(filecheck=CHECK): -target spirv
2
3// CHECK: error 36117:{{.*}}'closestHit'{{.*}}'closesthit'
4// CHECK: see using of 'discard'
5
6struct PrimaryRayPayload{}
7[require(spvRayTracingKHR)]
8[shader("closesthit")]
9void closestHit(
10    inout PrimaryRayPayload rayData : SV_RayPayload,
11    BuiltInTriangleIntersectionAttributes attribs : SV_IntersectionAttributes)
12{
13    discard;
14}
15
16// CHECK: error 36107:{{.*}}'closestHit1'{{.*}}'closesthit'{{.* }}'spirv' 
17// CHECK: see using of 'discard'
18[shader("closesthit")]
19void closestHit1(
20    inout PrimaryRayPayload rayData : SV_RayPayload,
21    BuiltInTriangleIntersectionAttributes attribs : SV_IntersectionAttributes)
22{
23    discard;
24}