diff --git a/naga/src/common/wgsl/types.rs b/naga/src/common/wgsl/types.rs index 2a25302ee..d84cb3201 100644 --- a/naga/src/common/wgsl/types.rs +++ b/naga/src/common/wgsl/types.rs @@ -245,7 +245,13 @@ pub trait TypeContext { let caps = if vertex_return { "" } else { "" }; write!(out, "acceleration_structure{}", caps)? } - _ => unreachable!("invalid TypeInner"), + TypeInner::Struct { .. } => { + unreachable!("structs can only be referenced by name in WGSL"); + } + TypeInner::RayQuery { vertex_return } => { + let caps = if vertex_return { "" } else { "" }; + write!(out, "ray_query{}", caps)? + } } Ok(())