You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
error: error:0:0 - Expected Image Operand Grad dx to have 3 components, but given 4
%38 = OpImageSampleDrefExplicitLod %float %37 %32 %float_1 Grad %33 %34
Mitigation
Problems:
glam v0.33.6 is a breaking change for rust-gpu
glam added _w: f32 member to get impl bytemuck::Pod for Vec3A, so reverting this is a breaking change for regular glam users
don't want impl Podnot to be impl on spirv
Ideas:
hack something in the compiler to special case glam::Vec3A
how do we know if a type is Vec3A? This will be a hack and not really sustainable
PR adjust Matrix4x3 to unbreak glam 0.33.6 #646 adjusts Matrix4x3 to use Vec3 instead of Vec3A. The layout of that special type is screwed up anyway, so we don't really care about it changing.
not a full mitigation!
Strategy:
short term fix
special case spirv to not have _w: f32 member and not impl Pod,
release glam v0.33.9, fixing rust-gpu
long term fix
glam::Vec3A:
remove short term fix
change attribute to #[spirv::vector::v1(3, f32)] to overwrite rust-gpu vector type
release glam v0.34.0
rust-gpu:
adjust #[spirv::vector::v1] attribute to take params to overwrite vector type
Activity
[-]glam v0.33.6 breaks `Matrix4x3`[/-][+]glam v0.33.6 breaks `Vec3A`[/+]fix: rust-gpu breakage after PR 786 / v0.33.6 (#861)
Firestar99 commentedon Sep 28, 2026
fixed in PR bitshifter/glam-rs#861, released as glam v0.33.10