|
Greetings! fragment: Some(StaticFragmentStateDesc {
entry_point: Some("fs_main"),
targets: &[Some(wgpu::ColorTargetState {
format: wgpu::TextureFormat::Rgba8UnormSrgb,
blend: Some(wgpu::BlendState::REPLACE),
write_mask: unsafe { std::mem::transmute::<u32, wgpu::ColorWrites>(0) },
})],
}),This appears to be working correctly, at least on the vulkan backend. Could this lead to UB or other unforeseen consequences? |
Answered by
Vecvec
Nov 6, 2025
Replies: 1 comment
|
I think that this is possible by specifying that the flags are empty (no bits set). This can be done with https://docs.rs/wgpu/latest/wgpu/struct.ColorWrites.html#method.empty . |
0 replies
Answer selected by
cwfitzgerald
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I think that this is possible by specifying that the flags are empty (no bits set). This can be done with https://docs.rs/wgpu/latest/wgpu/struct.ColorWrites.html#method.empty .