mirror of
https://github.com/gfx-rs/wgpu.git
synced 2024-11-25 08:13:27 +00:00
3ffd5a1e56
Without the suffix, `Expression::Literal(Literal::F32)` expressions get written without any suffix on the number, meaning that they get re-parsed as `AbstractFloat` values. In theory, this should always be fine, but since we don't actually support abstract types yet in all the places we should, having them appear in the output causes validation problems. See also: #4863, which did the same for `i32` literals.
34 lines
518 B
WebGPU Shading Language
34 lines
518 B
WebGPU Shading Language
struct S {
|
|
a: vec3<f32>,
|
|
}
|
|
|
|
struct Test {
|
|
a: S,
|
|
b: f32,
|
|
}
|
|
|
|
struct Test2_ {
|
|
a: array<vec3<f32>, 2>,
|
|
b: f32,
|
|
}
|
|
|
|
struct Test3_ {
|
|
a: mat4x3<f32>,
|
|
b: f32,
|
|
}
|
|
|
|
@group(0) @binding(0)
|
|
var<uniform> input1_: Test;
|
|
@group(0) @binding(1)
|
|
var<uniform> input2_: Test2_;
|
|
@group(0) @binding(2)
|
|
var<uniform> input3_: Test3_;
|
|
|
|
@vertex
|
|
fn vertex() -> @builtin(position) vec4<f32> {
|
|
let _e4 = input1_.b;
|
|
let _e8 = input2_.b;
|
|
let _e12 = input3_.b;
|
|
return (((vec4(1f) * _e4) * _e8) * _e12);
|
|
}
|