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] Apply module compaction to GLSL tests. #7186

Merged
merged 1 commit into from
Feb 20, 2025
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
12 changes: 6 additions & 6 deletions naga/tests/out/wgsl/210-bevy-2d-shader.frag.wgsl
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,17 @@ var<uniform> global: ColorMaterial_color;
fn main_1() {
var color: vec4<f32>;

let _e4 = global.Color;
color = _e4;
let _e6 = color;
o_Target = _e6;
let _e3 = global.Color;
color = _e3;
let _e5 = color;
o_Target = _e5;
return;
}

@fragment
fn main(@location(0) v_Uv: vec2<f32>) -> FragmentOutput {
v_Uv_1 = v_Uv;
main_1();
let _e9 = o_Target;
return FragmentOutput(_e9);
let _e3 = o_Target;
return FragmentOutput(_e3);
}
24 changes: 12 additions & 12 deletions naga/tests/out/wgsl/210-bevy-2d-shader.vert.wgsl
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@ var<private> gl_Position: vec4<f32>;
fn main_1() {
var position: vec3<f32>;

let _e10 = Vertex_Uv_1;
v_Uv = _e10;
let _e11 = Vertex_Position_1;
let _e12 = global_2.size;
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, 1f));
let _e9 = Vertex_Uv_1;
v_Uv = _e9;
let _e10 = Vertex_Position_1;
let _e11 = global_2.size;
position = (_e10 * vec3<f32>(_e11.x, _e11.y, 1f));
let _e19 = global.ViewProj;
let _e20 = global_1.Model;
let _e22 = position;
gl_Position = ((_e19 * _e20) * vec4<f32>(_e22.x, _e22.y, _e22.z, 1f));
return;
}

Expand All @@ -48,7 +48,7 @@ fn main(@location(0) Vertex_Position: vec3<f32>, @location(1) Vertex_Normal: vec
Vertex_Normal_1 = Vertex_Normal;
Vertex_Uv_1 = Vertex_Uv;
main_1();
let _e21 = v_Uv;
let _e23 = gl_Position;
return VertexOutput(_e21, _e23);
let _e7 = v_Uv;
let _e9 = gl_Position;
return VertexOutput(_e7, _e9);
}
30 changes: 15 additions & 15 deletions naga/tests/out/wgsl/210-bevy-shader.vert.wgsl
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,16 @@ fn main_1() {
let _e11 = Vertex_Normal_1;
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, 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, 1f));
let _e27 = Vertex_Normal_1;
v_Normal = (mat3x3<f32>(_e19[0].xyz, _e19[1].xyz, _e19[2].xyz) * _e27);
let _e29 = global_1.Model;
let _e30 = Vertex_Position_1;
v_Position = (_e29 * vec4<f32>(_e30.x, _e30.y, _e30.z, 1f)).xyz;
let _e38 = Vertex_Uv_1;
v_Uv = _e38;
let _e40 = global.ViewProj;
let _e41 = v_Position;
gl_Position = (_e40 * vec4<f32>(_e41.x, _e41.y, _e41.z, 1f));
return;
}

Expand All @@ -49,9 +49,9 @@ fn main(@location(0) Vertex_Position: vec3<f32>, @location(1) Vertex_Normal: vec
Vertex_Normal_1 = Vertex_Normal;
Vertex_Uv_1 = Vertex_Uv;
main_1();
let _e23 = v_Position;
let _e25 = v_Normal;
let _e27 = v_Uv;
let _e29 = gl_Position;
return VertexOutput(_e23, _e25, _e27, _e29);
let _e7 = v_Position;
let _e9 = v_Normal;
let _e11 = v_Uv;
let _e13 = gl_Position;
return VertexOutput(_e7, _e9, _e11, _e13);
}
26 changes: 13 additions & 13 deletions naga/tests/out/wgsl/246-collatz.comp.wgsl
Original file line number Diff line number Diff line change
Expand Up @@ -12,30 +12,30 @@ fn collatz_iterations(n: u32) -> u32 {

n_1 = n;
loop {
let _e7 = n_1;
if !((_e7 != 1u)) {
let _e4 = n_1;
if !((_e4 != 1u)) {
break;
}
{
let _e12 = n_1;
let _e14 = f32(_e12);
if ((_e14 - (floor((_e14 / 2f)) * 2f)) == 0f) {
let _e8 = n_1;
let _e9 = f32(_e8);
if ((_e9 - (floor((_e9 / 2f)) * 2f)) == 0f) {
{
let _e23 = n_1;
n_1 = (_e23 / 2u);
let _e17 = n_1;
n_1 = (_e17 / 2u);
}
} else {
{
let _e28 = n_1;
n_1 = ((3u * _e28) + 1u);
let _e20 = n_1;
n_1 = ((3u * _e20) + 1u);
}
}
let _e34 = i;
i = (_e34 + 1u);
let _e25 = i;
i = (_e25 + 1u);
}
}
let _e37 = i;
return _e37;
let _e28 = i;
return _e28;
}

fn main_1() {
Expand Down
6 changes: 3 additions & 3 deletions naga/tests/out/wgsl/800-out-of-bounds-panic.vert.wgsl
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ fn main(@location(0) position: vec2<f32>, @location(1) color: vec4<f32>) -> Vert
position_1 = position;
color_1 = color;
main_1();
let _e15 = frag_color;
let _e17 = gl_Position;
return VertexOutput(_e15, _e17);
let _e5 = frag_color;
let _e7 = gl_Position;
return VertexOutput(_e5, _e7);
}
Loading