Closed
Description
Expected Behaviour
ObjectToWorldKHR should be able to be used, but throws an error.
Example & Steps To Reproduce
#[spirv(closest_hit)]
pub fn chit(
#[spirv(object_to_world)] object_to_world: [Vec3; 4],
) {
// ...
}
object_to_world
fails to compile with the error:
[VUID-ObjectToWorldKHR-ObjectToWorldKHR-04307] According to the Vulkan spec BuiltIn ObjectToWorldKHR variable needs to be a matrix with 4 columns of 3-component vectors of 32-bit floats. ID <5> (OpVariable) has columns 0 and rows 0 not equal to expected 4x3.
Are matrix types implemented? I know Vector
is implemented for glam
types allowing them to be assigned to builtin variables, but there doesn't appear to be an equivalent matrix trait.
It does not work for any combination: [f32; 12]
, &mut [Vec3; 4]
, &mut [f32; 12]
System Info
- Rust: rustc 1.84.0-nightly (b19329a37 2024-11-21)
- OS: Windows 11
- GPU: RTX 3060
- SPIR-V: SPIRV-Tools v2024.4 v2024.4.rc2-0-g4d2f0b40