-
Notifications
You must be signed in to change notification settings - Fork 87
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Integer Built-ins in fragment shaders currently require the flat decoration, like in our compiletest:
rust-gpu/tests/compiletests/ui/spirv-attr/all-builtins.rs
Lines 96 to 100 in a30bd43
| #[spirv(primitive_id, flat)] primitive_id: u32, | |
| #[spirv(sample_id, flat)] sample_id: u32, | |
| #[spirv(sample_mask, flat)] sample_mask: [u32; 1], | |
| #[spirv(sample_position)] sample_position: Vec2, | |
| #[spirv(viewport_index, flat)] viewport_index: u32, |
otherwise compile will fail with:
error: `Fragment` entry-point `Input` parameter must be decorated with `#[spirv(flat)]`
--> crates/restir-shader/src/visibility/raster.rs:40:39
|
40 | #[spirv(primitive_id)] primitive_id: u32,
| ^^^However, decorating them with flat makes no sense and may even be illegal, since they are builtins, and flat configures interpolation behaviour.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working