wgpu: Do not use 'packed' as variable name in WGSL shaders
Turns out that 'packed' is a keyword in some GLSL shaders, and naga currently preserves it, producing a syntax error. As a workaround, this patch renames the variable to something else.
This commit is contained in:
parent
575481f9cc
commit
83ed478beb
|
@ -40,8 +40,8 @@ fn main_vertex(in: VertexInput) -> VertexOutput {
|
|||
return VertexOutput(pos, in.uv);
|
||||
}
|
||||
|
||||
fn unpack_components(packed: u32) -> vec2<u32> {
|
||||
return vec2<u32>(packed >> 8u, packed & 15u);
|
||||
fn unpack_components(packed_components: u32) -> vec2<u32> {
|
||||
return vec2<u32>(packed_components >> 8u, packed_components & 15u);
|
||||
}
|
||||
|
||||
fn get_component(map: vec4<f32>, component: u32) -> f32 {
|
||||
|
|
Loading…
Reference in New Issue