@@ -165,9 +165,9 @@ pub enum EntryPointError {
165165 #[ error( "Task payload must be at least 4 bytes, but is {0} bytes" ) ]
166166 TaskPayloadTooSmall ( u32 ) ,
167167 #[ error( "Only the `ray_generation`, `closest_hit`, and `any_hit` shader stages can access a global variable in the `ray_payload` address space" ) ]
168- RayPayloadInInvalidStage ,
168+ RayPayloadInInvalidStage ( crate :: ShaderStage ) ,
169169 #[ error( "Only the `closest_hit`, `any_hit`, and `miss` shader stages can access a global variable in the `incoming_ray_payload` address space" ) ]
170- IncomingRayPayloadInInvalidStage ,
170+ IncomingRayPayloadInInvalidStage ( crate :: ShaderStage ) ,
171171}
172172
173173fn storage_usage ( access : crate :: StorageAccess ) -> GlobalUse {
@@ -1340,7 +1340,7 @@ impl super::Validator {
13401340 | crate :: ShaderStage :: ClosestHit
13411341 | crate :: ShaderStage :: Miss
13421342 ) {
1343- return Err ( EntryPointError :: RayPayloadInInvalidStage
1343+ return Err ( EntryPointError :: RayPayloadInInvalidStage ( ep . stage )
13441344 . with_span_handle ( var_handle, & module. global_variables ) ) ;
13451345 }
13461346 GlobalUse :: READ | GlobalUse :: QUERY | GlobalUse :: WRITE
@@ -1352,7 +1352,7 @@ impl super::Validator {
13521352 | crate :: ShaderStage :: ClosestHit
13531353 | crate :: ShaderStage :: Miss
13541354 ) {
1355- return Err ( EntryPointError :: IncomingRayPayloadInInvalidStage
1355+ return Err ( EntryPointError :: IncomingRayPayloadInInvalidStage ( ep . stage )
13561356 . with_span_handle ( var_handle, & module. global_variables ) ) ;
13571357 }
13581358 GlobalUse :: READ | GlobalUse :: QUERY | GlobalUse :: WRITE
0 commit comments