Expected vs observed behavior
I would expect a mat4 to be fine as a push constant? Compiling the shader with just the mat4x4<f32> in the uniform buffer works fine. The above shader does compile fine on VULKAN but DX12 crashes with the error formatted above.
Platform
Windows 11, NVIDIA RTX 4060 8GB, DX12 backend
wgpu = { version = "0.19.3", default-features = false, features = ["wgsl", "metal", "dx12"] }
Description Using a
var<push_constant>
of typemat4x4<f32>
fails to compile on DX12.Repro steps Wgsl Shader:
Naga Hlsl Output:
Error:
ERROR [wgpu_core::device::global] Device::create_render_pipeline error: Internal error in ShaderStages(VERTEX) shader: FXC D3DCompile error (0x80004005): C:\Dev\undertone\ut-raster-pass::draw(13,16-24): error X3000: syntax error: unexpected token 'row_major' ?
Expected vs observed behavior I would expect a mat4 to be fine as a push constant? Compiling the shader with just the
mat4x4<f32>
in the uniform buffer works fine. The above shader does compile fine onVULKAN
butDX12
crashes with the error formatted above.Platform Windows 11, NVIDIA RTX 4060 8GB, DX12 backend
wgpu = { version = "0.19.3", default-features = false, features = ["wgsl", "metal", "dx12"] }