Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[naga wgsl-out] Include the f suffix on f32 literals. #4869

Merged
merged 1 commit into from
Dec 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,8 @@ Passing an owned value `window` to `Surface` will return a `Surface<'static>`. S

- In WGSL output, always include the `i` suffix on `i32` literals. By @jimblandy in [#4863](https://github.com/gfx-rs/wgpu/pull/4863).

- In WGSL output, always include the `f` suffix on `f32` literals. By @jimblandy in [#4869](https://github.com/gfx-rs/wgpu/pull/4869).

### Bug Fixes

#### General
Expand Down
32 changes: 14 additions & 18 deletions naga/src/back/wgsl/writer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1087,25 +1087,21 @@ impl<W: Write> Writer<W> {
use crate::Expression;

match expressions[expr] {
Expression::Literal(literal) => {
match literal {
// Floats are written using `Debug` instead of `Display` because it always appends the
// decimal part even it's zero
crate::Literal::F32(value) => write!(self.out, "{:?}", value)?,
crate::Literal::U32(value) => write!(self.out, "{}u", value)?,
crate::Literal::I32(value) => write!(self.out, "{}i", value)?,
crate::Literal::Bool(value) => write!(self.out, "{}", value)?,
crate::Literal::F64(value) => write!(self.out, "{:?}lf", value)?,
crate::Literal::I64(_) => {
return Err(Error::Custom("unsupported i64 literal".to_string()));
}
crate::Literal::AbstractInt(_) | crate::Literal::AbstractFloat(_) => {
return Err(Error::Custom(
"Abstract types should not appear in IR presented to backends".into(),
));
}
Expression::Literal(literal) => match literal {
crate::Literal::F32(value) => write!(self.out, "{}f", value)?,
crate::Literal::U32(value) => write!(self.out, "{}u", value)?,
crate::Literal::I32(value) => write!(self.out, "{}i", value)?,
crate::Literal::Bool(value) => write!(self.out, "{}", value)?,
crate::Literal::F64(value) => write!(self.out, "{:?}lf", value)?,
crate::Literal::I64(_) => {
return Err(Error::Custom("unsupported i64 literal".to_string()));
}
}
crate::Literal::AbstractInt(_) | crate::Literal::AbstractFloat(_) => {
return Err(Error::Custom(
"Abstract types should not appear in IR presented to backends".into(),
));
}
},
Expression::Constant(handle) => {
let constant = &module.constants[handle];
if constant.name.is_some() {
Expand Down
4 changes: 2 additions & 2 deletions naga/tests/out/wgsl/210-bevy-2d-shader.vert.wgsl
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ fn main_1() {
v_Uv = _e10;
let _e11 = Vertex_Position_1;
let _e12 = global_2.size;
position = (_e11 * vec3<f32>(_e12.x, _e12.y, 1.0));
position = (_e11 * vec3<f32>(_e12.x, _e12.y, 1f));
let _e20 = global.ViewProj;
let _e21 = global_1.Model;
let _e23 = position;
gl_Position = ((_e20 * _e21) * vec4<f32>(_e23.x, _e23.y, _e23.z, 1.0));
gl_Position = ((_e20 * _e21) * vec4<f32>(_e23.x, _e23.y, _e23.z, 1f));
return;
}

Expand Down
6 changes: 3 additions & 3 deletions naga/tests/out/wgsl/210-bevy-shader.vert.wgsl
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,18 @@ var<private> gl_Position: vec4<f32>;
fn main_1() {
let _e10 = global_1.Model;
let _e11 = Vertex_Normal_1;
v_Normal = (_e10 * vec4<f32>(_e11.x, _e11.y, _e11.z, 1.0)).xyz;
v_Normal = (_e10 * vec4<f32>(_e11.x, _e11.y, _e11.z, 1f)).xyz;
let _e19 = global_1.Model;
let _e29 = Vertex_Normal_1;
v_Normal = (mat3x3<f32>(_e19[0].xyz, _e19[1].xyz, _e19[2].xyz) * _e29);
let _e31 = global_1.Model;
let _e32 = Vertex_Position_1;
v_Position = (_e31 * vec4<f32>(_e32.x, _e32.y, _e32.z, 1.0)).xyz;
v_Position = (_e31 * vec4<f32>(_e32.x, _e32.y, _e32.z, 1f)).xyz;
let _e40 = Vertex_Uv_1;
v_Uv = _e40;
let _e42 = global.ViewProj;
let _e43 = v_Position;
gl_Position = (_e42 * vec4<f32>(_e43.x, _e43.y, _e43.z, 1.0));
gl_Position = (_e42 * vec4<f32>(_e43.x, _e43.y, _e43.z, 1f));
return;
}

Expand Down
2 changes: 1 addition & 1 deletion naga/tests/out/wgsl/246-collatz.comp.wgsl
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ fn collatz_iterations(n: u32) -> u32 {
{
let _e14 = n_1;
let _e15 = f32(_e14);
if ((_e15 - (floor((_e15 / 2.0)) * 2.0)) == 0.0) {
if ((_e15 - (floor((_e15 / 2f)) * 2f)) == 0f) {
{
let _e25 = n_1;
n_1 = (_e25 / 2u);
Expand Down
2 changes: 1 addition & 1 deletion naga/tests/out/wgsl/277-casting.frag.wgsl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
fn main_1() {
var a: f32 = 1.0;
var a: f32 = 1f;

return;
}
Expand Down
2 changes: 1 addition & 1 deletion naga/tests/out/wgsl/280-matrix-cast.frag.wgsl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
fn main_1() {
var a: mat4x4<f32> = mat4x4<f32>(vec4<f32>(1.0, 0.0, 0.0, 0.0), vec4<f32>(0.0, 1.0, 0.0, 0.0), vec4<f32>(0.0, 0.0, 1.0, 0.0), vec4<f32>(0.0, 0.0, 0.0, 1.0));
var a: mat4x4<f32> = mat4x4<f32>(vec4<f32>(1f, 0f, 0f, 0f), vec4<f32>(0f, 1f, 0f, 0f), vec4<f32>(0f, 0f, 1f, 0f), vec4<f32>(0f, 0f, 0f, 1f));

}

Expand Down
4 changes: 2 additions & 2 deletions naga/tests/out/wgsl/800-out-of-bounds-panic.vert.wgsl
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ fn main_1() {
let _e9 = global.view_matrix;
let _e10 = global_1.world_matrix;
let _e12 = position_1;
gl_Position = ((_e9 * _e10) * vec4<f32>(_e12.x, _e12.y, 0.0, 1.0));
gl_Position = ((_e9 * _e10) * vec4<f32>(_e12.x, _e12.y, 0f, 1f));
let _e20 = gl_Position;
let _e22 = gl_Position;
gl_Position.z = ((_e20.z + _e22.w) / 2.0);
gl_Position.z = ((_e20.z + _e22.w) / 2f);
return;
}

Expand Down
4 changes: 2 additions & 2 deletions naga/tests/out/wgsl/900-implicit-conversions.frag.wgsl
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ fn implicit_dims_3(v_6: vec4<f32>) {

fn main_1() {
exact_1(1i);
implicit(1.0);
implicit_dims_2(vec3(1.0));
implicit(1f);
implicit_dims_2(vec3(1f));
return;
}

Expand Down
4 changes: 2 additions & 2 deletions naga/tests/out/wgsl/901-lhs-field-select.frag.wgsl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
fn main_1() {
var a: vec4<f32> = vec4(1.0);
var a: vec4<f32> = vec4(1f);

a.x = 2.0;
a.x = 2f;
return;
}

Expand Down
2 changes: 1 addition & 1 deletion naga/tests/out/wgsl/931-constant-emitting.frag.wgsl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const constant: i32 = 10i;

fn function() -> f32 {
return 0.0;
return 0f;
}

fn main_1() {
Expand Down
80 changes: 40 additions & 40 deletions naga/tests/out/wgsl/abstract-types-const.wgsl
Original file line number Diff line number Diff line change
Expand Up @@ -5,51 +5,51 @@ struct S {
}

const xvupaiai: vec2<u32> = vec2<u32>(42u, 43u);
const xvfpaiai: vec2<f32> = vec2<f32>(44.0, 45.0);
const xvfpaiai: vec2<f32> = vec2<f32>(44f, 45f);
const xvupuai: vec2<u32> = vec2<u32>(42u, 43u);
const xvupaiu: vec2<u32> = vec2<u32>(42u, 43u);
const xvuuai: vec2<u32> = vec2<u32>(42u, 43u);
const xvuaiu: vec2<u32> = vec2<u32>(42u, 43u);
const xmfpaiaiaiai: mat2x2<f32> = mat2x2<f32>(vec2<f32>(1.0, 2.0), vec2<f32>(3.0, 4.0));
const xmfpafaiaiai: mat2x2<f32> = mat2x2<f32>(vec2<f32>(1.0, 2.0), vec2<f32>(3.0, 4.0));
const xmfpaiafaiai: mat2x2<f32> = mat2x2<f32>(vec2<f32>(1.0, 2.0), vec2<f32>(3.0, 4.0));
const xmfpaiaiafai: mat2x2<f32> = mat2x2<f32>(vec2<f32>(1.0, 2.0), vec2<f32>(3.0, 4.0));
const xmfpaiaiaiaf: mat2x2<f32> = mat2x2<f32>(vec2<f32>(1.0, 2.0), vec2<f32>(3.0, 4.0));
const imfpaiaiaiai: mat2x2<f32> = mat2x2<f32>(vec2<f32>(1.0, 2.0), vec2<f32>(3.0, 4.0));
const imfpafaiaiai: mat2x2<f32> = mat2x2<f32>(vec2<f32>(1.0, 2.0), vec2<f32>(3.0, 4.0));
const imfpafafafaf: mat2x2<f32> = mat2x2<f32>(vec2<f32>(1.0, 2.0), vec2<f32>(3.0, 4.0));
const xmfpaiaiaiai: mat2x2<f32> = mat2x2<f32>(vec2<f32>(1f, 2f), vec2<f32>(3f, 4f));
const xmfpafaiaiai: mat2x2<f32> = mat2x2<f32>(vec2<f32>(1f, 2f), vec2<f32>(3f, 4f));
const xmfpaiafaiai: mat2x2<f32> = mat2x2<f32>(vec2<f32>(1f, 2f), vec2<f32>(3f, 4f));
const xmfpaiaiafai: mat2x2<f32> = mat2x2<f32>(vec2<f32>(1f, 2f), vec2<f32>(3f, 4f));
const xmfpaiaiaiaf: mat2x2<f32> = mat2x2<f32>(vec2<f32>(1f, 2f), vec2<f32>(3f, 4f));
const imfpaiaiaiai: mat2x2<f32> = mat2x2<f32>(vec2<f32>(1f, 2f), vec2<f32>(3f, 4f));
const imfpafaiaiai: mat2x2<f32> = mat2x2<f32>(vec2<f32>(1f, 2f), vec2<f32>(3f, 4f));
const imfpafafafaf: mat2x2<f32> = mat2x2<f32>(vec2<f32>(1f, 2f), vec2<f32>(3f, 4f));
const ivispai: vec2<i32> = vec2(1i);
const ivfspaf: vec2<f32> = vec2(1.0);
const ivfspaf: vec2<f32> = vec2(1f);
const ivis_ai: vec2<i32> = vec2(1i);
const ivus_ai: vec2<u32> = vec2(1u);
const ivfs_ai: vec2<f32> = vec2(1.0);
const ivfs_af: vec2<f32> = vec2(1.0);
const iafafaf: array<f32, 2> = array<f32, 2>(1.0, 2.0);
const iafaiai: array<f32, 2> = array<f32, 2>(1.0, 2.0);
const iafpafaf: array<f32, 2> = array<f32, 2>(1.0, 2.0);
const iafpaiaf: array<f32, 2> = array<f32, 2>(1.0, 2.0);
const iafpafai: array<f32, 2> = array<f32, 2>(1.0, 2.0);
const xafpafaf: array<f32, 2> = array<f32, 2>(1.0, 2.0);
const s_f_i_u: S = S(1.0, 1i, 1u);
const s_f_iai: S = S(1.0, 1i, 1u);
const s_fai_u: S = S(1.0, 1i, 1u);
const s_faiai: S = S(1.0, 1i, 1u);
const saf_i_u: S = S(1.0, 1i, 1u);
const saf_iai: S = S(1.0, 1i, 1u);
const safai_u: S = S(1.0, 1i, 1u);
const safaiai: S = S(1.0, 1i, 1u);
const ivfr_f_f: vec3<f32> = vec3<f32>(vec2<f32>(1.0, 2.0), 3.0);
const ivfr_f_af: vec3<f32> = vec3<f32>(vec2<f32>(1.0, 2.0), 3.0);
const ivfraf_f: vec3<f32> = vec3<f32>(vec2<f32>(1.0, 2.0), 3.0);
const ivfraf_af: vec3<f32> = vec3<f32>(vec2<f32>(1.0, 2.0), 3.0);
const ivf_fr_f: vec3<f32> = vec3<f32>(1.0, vec2<f32>(2.0, 3.0));
const ivf_fraf: vec3<f32> = vec3<f32>(1.0, vec2<f32>(2.0, 3.0));
const ivf_afr_f: vec3<f32> = vec3<f32>(1.0, vec2<f32>(2.0, 3.0));
const ivf_afraf: vec3<f32> = vec3<f32>(1.0, vec2<f32>(2.0, 3.0));
const ivfr_f_ai: vec3<f32> = vec3<f32>(vec2<f32>(1.0, 2.0), 3.0);
const ivfrai_f: vec3<f32> = vec3<f32>(vec2<f32>(1.0, 2.0), 3.0);
const ivfrai_ai: vec3<f32> = vec3<f32>(vec2<f32>(1.0, 2.0), 3.0);
const ivf_frai: vec3<f32> = vec3<f32>(1.0, vec2<f32>(2.0, 3.0));
const ivf_air_f: vec3<f32> = vec3<f32>(1.0, vec2<f32>(2.0, 3.0));
const ivf_airai: vec3<f32> = vec3<f32>(1.0, vec2<f32>(2.0, 3.0));
const ivfs_ai: vec2<f32> = vec2(1f);
const ivfs_af: vec2<f32> = vec2(1f);
const iafafaf: array<f32, 2> = array<f32, 2>(1f, 2f);
const iafaiai: array<f32, 2> = array<f32, 2>(1f, 2f);
const iafpafaf: array<f32, 2> = array<f32, 2>(1f, 2f);
const iafpaiaf: array<f32, 2> = array<f32, 2>(1f, 2f);
const iafpafai: array<f32, 2> = array<f32, 2>(1f, 2f);
const xafpafaf: array<f32, 2> = array<f32, 2>(1f, 2f);
const s_f_i_u: S = S(1f, 1i, 1u);
const s_f_iai: S = S(1f, 1i, 1u);
const s_fai_u: S = S(1f, 1i, 1u);
const s_faiai: S = S(1f, 1i, 1u);
const saf_i_u: S = S(1f, 1i, 1u);
const saf_iai: S = S(1f, 1i, 1u);
const safai_u: S = S(1f, 1i, 1u);
const safaiai: S = S(1f, 1i, 1u);
const ivfr_f_f: vec3<f32> = vec3<f32>(vec2<f32>(1f, 2f), 3f);
const ivfr_f_af: vec3<f32> = vec3<f32>(vec2<f32>(1f, 2f), 3f);
const ivfraf_f: vec3<f32> = vec3<f32>(vec2<f32>(1f, 2f), 3f);
const ivfraf_af: vec3<f32> = vec3<f32>(vec2<f32>(1f, 2f), 3f);
const ivf_fr_f: vec3<f32> = vec3<f32>(1f, vec2<f32>(2f, 3f));
const ivf_fraf: vec3<f32> = vec3<f32>(1f, vec2<f32>(2f, 3f));
const ivf_afr_f: vec3<f32> = vec3<f32>(1f, vec2<f32>(2f, 3f));
const ivf_afraf: vec3<f32> = vec3<f32>(1f, vec2<f32>(2f, 3f));
const ivfr_f_ai: vec3<f32> = vec3<f32>(vec2<f32>(1f, 2f), 3f);
const ivfrai_f: vec3<f32> = vec3<f32>(vec2<f32>(1f, 2f), 3f);
const ivfrai_ai: vec3<f32> = vec3<f32>(vec2<f32>(1f, 2f), 3f);
const ivf_frai: vec3<f32> = vec3<f32>(1f, vec2<f32>(2f, 3f));
const ivf_air_f: vec3<f32> = vec3<f32>(1f, vec2<f32>(2f, 3f));
const ivf_airai: vec3<f32> = vec3<f32>(1f, vec2<f32>(2f, 3f));

94 changes: 47 additions & 47 deletions naga/tests/out/wgsl/abstract-types-var.wgsl
Original file line number Diff line number Diff line change
@@ -1,62 +1,62 @@
var<private> xvipaiai_1: vec2<i32> = vec2<i32>(42i, 43i);
var<private> xvupaiai_1: vec2<u32> = vec2<u32>(44u, 45u);
var<private> xvfpaiai_1: vec2<f32> = vec2<f32>(46.0, 47.0);
var<private> xvfpaiai_1: vec2<f32> = vec2<f32>(46f, 47f);
var<private> xvupuai_2: vec2<u32> = vec2<u32>(42u, 43u);
var<private> xvupaiu_2: vec2<u32> = vec2<u32>(42u, 43u);
var<private> xvuuai_2: vec2<u32> = vec2<u32>(42u, 43u);
var<private> xvuaiu_2: vec2<u32> = vec2<u32>(42u, 43u);
var<private> xmfpaiaiaiai_1: mat2x2<f32> = mat2x2<f32>(vec2<f32>(1.0, 2.0), vec2<f32>(3.0, 4.0));
var<private> xmfpafaiaiai_1: mat2x2<f32> = mat2x2<f32>(vec2<f32>(1.0, 2.0), vec2<f32>(3.0, 4.0));
var<private> xmfpaiafaiai_1: mat2x2<f32> = mat2x2<f32>(vec2<f32>(1.0, 2.0), vec2<f32>(3.0, 4.0));
var<private> xmfpaiaiafai_1: mat2x2<f32> = mat2x2<f32>(vec2<f32>(1.0, 2.0), vec2<f32>(3.0, 4.0));
var<private> xmfpaiaiaiaf_1: mat2x2<f32> = mat2x2<f32>(vec2<f32>(1.0, 2.0), vec2<f32>(3.0, 4.0));
var<private> xmfpaiaiaiai_1: mat2x2<f32> = mat2x2<f32>(vec2<f32>(1f, 2f), vec2<f32>(3f, 4f));
var<private> xmfpafaiaiai_1: mat2x2<f32> = mat2x2<f32>(vec2<f32>(1f, 2f), vec2<f32>(3f, 4f));
var<private> xmfpaiafaiai_1: mat2x2<f32> = mat2x2<f32>(vec2<f32>(1f, 2f), vec2<f32>(3f, 4f));
var<private> xmfpaiaiafai_1: mat2x2<f32> = mat2x2<f32>(vec2<f32>(1f, 2f), vec2<f32>(3f, 4f));
var<private> xmfpaiaiaiaf_1: mat2x2<f32> = mat2x2<f32>(vec2<f32>(1f, 2f), vec2<f32>(3f, 4f));
var<private> xvispai_1: vec2<i32> = vec2(1i);
var<private> xvfspaf_1: vec2<f32> = vec2(1.0);
var<private> xvfspaf_1: vec2<f32> = vec2(1f);
var<private> xvis_ai_1: vec2<i32> = vec2(1i);
var<private> xvus_ai_1: vec2<u32> = vec2(1u);
var<private> xvfs_ai_1: vec2<f32> = vec2(1.0);
var<private> xvfs_af_1: vec2<f32> = vec2(1.0);
var<private> xafafaf_1: array<f32, 2> = array<f32, 2>(1.0, 2.0);
var<private> xafaiai_1: array<f32, 2> = array<f32, 2>(1.0, 2.0);
var<private> xvfs_ai_1: vec2<f32> = vec2(1f);
var<private> xvfs_af_1: vec2<f32> = vec2(1f);
var<private> xafafaf_1: array<f32, 2> = array<f32, 2>(1f, 2f);
var<private> xafaiai_1: array<f32, 2> = array<f32, 2>(1f, 2f);
var<private> xafpaiai_1: array<i32, 2> = array<i32, 2>(1i, 2i);
var<private> xafpaiaf_1: array<f32, 2> = array<f32, 2>(1.0, 2.0);
var<private> xafpafai_1: array<f32, 2> = array<f32, 2>(1.0, 2.0);
var<private> xafpafaf_1: array<f32, 2> = array<f32, 2>(1.0, 2.0);
var<private> xafpaiaf_1: array<f32, 2> = array<f32, 2>(1f, 2f);
var<private> xafpafai_1: array<f32, 2> = array<f32, 2>(1f, 2f);
var<private> xafpafaf_1: array<f32, 2> = array<f32, 2>(1f, 2f);

fn all_constant_arguments() {
var xvipaiai: vec2<i32> = vec2<i32>(42i, 43i);
var xvupaiai: vec2<u32> = vec2<u32>(44u, 45u);
var xvfpaiai: vec2<f32> = vec2<f32>(46.0, 47.0);
var xvfpaiai: vec2<f32> = vec2<f32>(46f, 47f);
var xvupuai: vec2<u32> = vec2<u32>(42u, 43u);
var xvupaiu: vec2<u32> = vec2<u32>(42u, 43u);
var xvuuai: vec2<u32> = vec2<u32>(42u, 43u);
var xvuaiu: vec2<u32> = vec2<u32>(42u, 43u);
var xmfpaiaiaiai: mat2x2<f32> = mat2x2<f32>(vec2<f32>(1.0, 2.0), vec2<f32>(3.0, 4.0));
var xmfpafaiaiai: mat2x2<f32> = mat2x2<f32>(vec2<f32>(1.0, 2.0), vec2<f32>(3.0, 4.0));
var xmfpaiafaiai: mat2x2<f32> = mat2x2<f32>(vec2<f32>(1.0, 2.0), vec2<f32>(3.0, 4.0));
var xmfpaiaiafai: mat2x2<f32> = mat2x2<f32>(vec2<f32>(1.0, 2.0), vec2<f32>(3.0, 4.0));
var xmfpaiaiaiaf: mat2x2<f32> = mat2x2<f32>(vec2<f32>(1.0, 2.0), vec2<f32>(3.0, 4.0));
var xmfp_faiaiai: mat2x2<f32> = mat2x2<f32>(vec2<f32>(1.0, 2.0), vec2<f32>(3.0, 4.0));
var xmfpai_faiai: mat2x2<f32> = mat2x2<f32>(vec2<f32>(1.0, 2.0), vec2<f32>(3.0, 4.0));
var xmfpaiai_fai: mat2x2<f32> = mat2x2<f32>(vec2<f32>(1.0, 2.0), vec2<f32>(3.0, 4.0));
var xmfpaiaiai_f: mat2x2<f32> = mat2x2<f32>(vec2<f32>(1.0, 2.0), vec2<f32>(3.0, 4.0));
var xmfpaiaiaiai: mat2x2<f32> = mat2x2<f32>(vec2<f32>(1f, 2f), vec2<f32>(3f, 4f));
var xmfpafaiaiai: mat2x2<f32> = mat2x2<f32>(vec2<f32>(1f, 2f), vec2<f32>(3f, 4f));
var xmfpaiafaiai: mat2x2<f32> = mat2x2<f32>(vec2<f32>(1f, 2f), vec2<f32>(3f, 4f));
var xmfpaiaiafai: mat2x2<f32> = mat2x2<f32>(vec2<f32>(1f, 2f), vec2<f32>(3f, 4f));
var xmfpaiaiaiaf: mat2x2<f32> = mat2x2<f32>(vec2<f32>(1f, 2f), vec2<f32>(3f, 4f));
var xmfp_faiaiai: mat2x2<f32> = mat2x2<f32>(vec2<f32>(1f, 2f), vec2<f32>(3f, 4f));
var xmfpai_faiai: mat2x2<f32> = mat2x2<f32>(vec2<f32>(1f, 2f), vec2<f32>(3f, 4f));
var xmfpaiai_fai: mat2x2<f32> = mat2x2<f32>(vec2<f32>(1f, 2f), vec2<f32>(3f, 4f));
var xmfpaiaiai_f: mat2x2<f32> = mat2x2<f32>(vec2<f32>(1f, 2f), vec2<f32>(3f, 4f));
var xvispai: vec2<i32> = vec2(1i);
var xvfspaf: vec2<f32> = vec2(1.0);
var xvfspaf: vec2<f32> = vec2(1f);
var xvis_ai: vec2<i32> = vec2(1i);
var xvus_ai: vec2<u32> = vec2(1u);
var xvfs_ai: vec2<f32> = vec2(1.0);
var xvfs_af: vec2<f32> = vec2(1.0);
var xafafaf: array<f32, 2> = array<f32, 2>(1.0, 2.0);
var xaf_faf: array<f32, 2> = array<f32, 2>(1.0, 2.0);
var xafaf_f: array<f32, 2> = array<f32, 2>(1.0, 2.0);
var xafaiai: array<f32, 2> = array<f32, 2>(1.0, 2.0);
var xvfs_ai: vec2<f32> = vec2(1f);
var xvfs_af: vec2<f32> = vec2(1f);
var xafafaf: array<f32, 2> = array<f32, 2>(1f, 2f);
var xaf_faf: array<f32, 2> = array<f32, 2>(1f, 2f);
var xafaf_f: array<f32, 2> = array<f32, 2>(1f, 2f);
var xafaiai: array<f32, 2> = array<f32, 2>(1f, 2f);
var xai_iai: array<i32, 2> = array<i32, 2>(1i, 2i);
var xaiai_i: array<i32, 2> = array<i32, 2>(1i, 2i);
var xaipaiai: array<i32, 2> = array<i32, 2>(1i, 2i);
var xafpaiai: array<f32, 2> = array<f32, 2>(1.0, 2.0);
var xafpaiaf: array<f32, 2> = array<f32, 2>(1.0, 2.0);
var xafpafai: array<f32, 2> = array<f32, 2>(1.0, 2.0);
var xafpafaf: array<f32, 2> = array<f32, 2>(1.0, 2.0);
var xafpaiai: array<f32, 2> = array<f32, 2>(1f, 2f);
var xafpaiaf: array<f32, 2> = array<f32, 2>(1f, 2f);
var xafpafai: array<f32, 2> = array<f32, 2>(1f, 2f);
var xafpafaf: array<f32, 2> = array<f32, 2>(1f, 2f);

}

Expand Down Expand Up @@ -94,33 +94,33 @@ fn mixed_constant_and_runtime_arguments() {
let _e15 = u;
xvuaiu_1 = vec2<u32>(42u, _e15);
let _e19 = f;
xmfp_faiaiai_1 = mat2x2<f32>(vec2<f32>(_e19, 2.0), vec2<f32>(3.0, 4.0));
xmfp_faiaiai_1 = mat2x2<f32>(vec2<f32>(_e19, 2f), vec2<f32>(3f, 4f));
let _e27 = f;
xmfpai_faiai_1 = mat2x2<f32>(vec2<f32>(1.0, _e27), vec2<f32>(3.0, 4.0));
xmfpai_faiai_1 = mat2x2<f32>(vec2<f32>(1f, _e27), vec2<f32>(3f, 4f));
let _e35 = f;
xmfpaiai_fai_1 = mat2x2<f32>(vec2<f32>(1.0, 2.0), vec2<f32>(_e35, 4.0));
xmfpaiai_fai_1 = mat2x2<f32>(vec2<f32>(1f, 2f), vec2<f32>(_e35, 4f));
let _e43 = f;
xmfpaiaiai_f_1 = mat2x2<f32>(vec2<f32>(1.0, 2.0), vec2<f32>(3.0, _e43));
xmfpaiaiai_f_1 = mat2x2<f32>(vec2<f32>(1f, 2f), vec2<f32>(3f, _e43));
let _e51 = f;
xaf_faf_1 = array<f32, 2>(_e51, 2.0);
xaf_faf_1 = array<f32, 2>(_e51, 2f);
let _e55 = f;
xafaf_f_1 = array<f32, 2>(1.0, _e55);
xafaf_f_1 = array<f32, 2>(1f, _e55);
let _e59 = f;
xaf_fai = array<f32, 2>(_e59, 2.0);
xaf_fai = array<f32, 2>(_e59, 2f);
let _e63 = f;
xafai_f = array<f32, 2>(1.0, _e63);
xafai_f = array<f32, 2>(1f, _e63);
let _e67 = i;
xai_iai_1 = array<i32, 2>(_e67, 2i);
let _e71 = i;
xaiai_i_1 = array<i32, 2>(1i, _e71);
let _e75 = f;
xafp_faf = array<f32, 2>(_e75, 2.0);
xafp_faf = array<f32, 2>(_e75, 2f);
let _e79 = f;
xafpaf_f = array<f32, 2>(1.0, _e79);
xafpaf_f = array<f32, 2>(1f, _e79);
let _e83 = f;
xafp_fai = array<f32, 2>(_e83, 2.0);
xafp_fai = array<f32, 2>(_e83, 2f);
let _e87 = f;
xafpai_f = array<f32, 2>(1.0, _e87);
xafpai_f = array<f32, 2>(1f, _e87);
let _e91 = i;
xaip_iai = array<i32, 2>(_e91, 2i);
let _e95 = i;
Expand Down
Loading
Loading