This repository was archived by the owner on Jan 29, 2025. It is now read-only.
This repository was archived by the owner on Jan 29, 2025. It is now read-only.
Outputting integral type from fragment shader causes Vulkan validation error #2270
Closed
Description
Validation layer trips off since Naga emits flat
qualifier for integer outputs of fragment shader.
Note that wgpu correctly forces output to be an integer type when writing to a "true" (non-snorm/unorm) target.
Happens with a shader like this:
@fragment
fn fs_main_outline_mask(in: VertexOut) -> @location(0) vec2<u32> {
return batch.outline_mask;
}
More details in this comment rerun-io/rerun#1532 (comment)
Not familiar with Naga's code, but it looks like there's a check missing here for fragment outputs https://github.com/gfx-rs/naga/blob/master/src/back/spv/writer.rs#L1415