[naga] Apply module compaction to GLSL tests. (#7186)

This commit is contained in:
Jim Blandy
2025-02-19 17:59:06 -08:00
committed by GitHub
parent 7e42040fa5
commit 5dad2c4cd4
27 changed files with 1299 additions and 1301 deletions

View File

@@ -14,10 +14,10 @@ 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;
}
@@ -25,6 +25,6 @@ fn main_1() {
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);
}

View File

@@ -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;
}
@@ -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);
}

View File

@@ -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;
}
@@ -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);
}

View File

@@ -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() {

View File

@@ -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);
}

File diff suppressed because it is too large Load Diff

View File

@@ -37,18 +37,18 @@ fn main_1() {
let _e21 = world_position;
v_WorldPosition = _e21.xyz;
let _e23 = global_1.Model;
let _e33 = Vertex_Normal_1;
v_WorldNormal = (mat3x3<f32>(_e23[0].xyz, _e23[1].xyz, _e23[2].xyz) * _e33);
let _e35 = Vertex_Uv_1;
v_Uv = _e35;
let _e36 = global_1.Model;
let _e46 = Vertex_Tangent_1;
let _e48 = (mat3x3<f32>(_e36[0].xyz, _e36[1].xyz, _e36[2].xyz) * _e46.xyz);
let _e49 = Vertex_Tangent_1;
v_WorldTangent = vec4<f32>(_e48.x, _e48.y, _e48.z, _e49.w);
let _e56 = global.ViewProj;
let _e57 = world_position;
gl_Position = (_e56 * _e57);
let _e31 = Vertex_Normal_1;
v_WorldNormal = (mat3x3<f32>(_e23[0].xyz, _e23[1].xyz, _e23[2].xyz) * _e31);
let _e33 = Vertex_Uv_1;
v_Uv = _e33;
let _e34 = global_1.Model;
let _e42 = Vertex_Tangent_1;
let _e44 = (mat3x3<f32>(_e34[0].xyz, _e34[1].xyz, _e34[2].xyz) * _e42.xyz);
let _e45 = Vertex_Tangent_1;
v_WorldTangent = vec4<f32>(_e44.x, _e44.y, _e44.z, _e45.w);
let _e52 = global.ViewProj;
let _e53 = world_position;
gl_Position = (_e52 * _e53);
return;
}
@@ -59,10 +59,10 @@ fn main(@location(0) Vertex_Position: vec3<f32>, @location(1) Vertex_Normal: vec
Vertex_Uv_1 = Vertex_Uv;
Vertex_Tangent_1 = Vertex_Tangent;
main_1();
let _e29 = v_WorldPosition;
let _e31 = v_WorldNormal;
let _e33 = v_Uv;
let _e35 = v_WorldTangent;
let _e37 = gl_Position;
return VertexOutput(_e29, _e31, _e33, _e35, _e37);
let _e9 = v_WorldPosition;
let _e11 = v_WorldNormal;
let _e13 = v_Uv;
let _e15 = v_WorldTangent;
let _e17 = gl_Position;
return VertexOutput(_e9, _e11, _e13, _e15, _e17);
}

View File

@@ -10,98 +10,98 @@ fn main_1() {
var f2_: vec2<f32> = vec2(0f);
var f4_: vec4<f32> = vec4(0f);
let _e32 = f4_;
u = pack4x8snorm(_e32);
let _e34 = f4_;
u = pack4x8unorm(_e34);
let _e28 = f4_;
u = pack4x8snorm(_e28);
let _e30 = f4_;
u = pack4x8unorm(_e30);
let _e32 = f2_;
u = pack2x16unorm(_e32);
let _e34 = f2_;
u = pack2x16snorm(_e34);
let _e36 = f2_;
u = pack2x16unorm(_e36);
let _e38 = f2_;
u = pack2x16snorm(_e38);
let _e40 = f2_;
u = pack2x16float(_e40);
u = pack2x16float(_e36);
let _e38 = u;
f4_ = unpack4x8snorm(_e38);
let _e40 = u;
f4_ = unpack4x8unorm(_e40);
let _e42 = u;
f4_ = unpack4x8snorm(_e42);
f2_ = unpack2x16snorm(_e42);
let _e44 = u;
f4_ = unpack4x8unorm(_e44);
f2_ = unpack2x16unorm(_e44);
let _e46 = u;
f2_ = unpack2x16snorm(_e46);
let _e48 = u;
f2_ = unpack2x16unorm(_e48);
let _e50 = u;
f2_ = unpack2x16float(_e50);
let _e52 = i;
let _e53 = i;
i = insertBits(_e52, _e53, 5u, 10u);
let _e59 = i2_;
let _e60 = i2_;
i2_ = insertBits(_e59, _e60, 5u, 10u);
let _e66 = i3_;
let _e67 = i3_;
i3_ = insertBits(_e66, _e67, 5u, 10u);
let _e73 = i4_;
let _e74 = i4_;
i4_ = insertBits(_e73, _e74, 5u, 10u);
let _e80 = u;
let _e81 = u;
u = insertBits(_e80, _e81, 5u, 10u);
let _e87 = u2_;
let _e88 = u2_;
u2_ = insertBits(_e87, _e88, 5u, 10u);
let _e94 = u3_;
let _e95 = u3_;
u3_ = insertBits(_e94, _e95, 5u, 10u);
let _e101 = u4_;
let _e102 = u4_;
u4_ = insertBits(_e101, _e102, 5u, 10u);
let _e108 = i;
i = extractBits(_e108, 5u, 10u);
let _e114 = i2_;
i2_ = extractBits(_e114, 5u, 10u);
let _e120 = i3_;
i3_ = extractBits(_e120, 5u, 10u);
f2_ = unpack2x16float(_e46);
let _e48 = i;
let _e49 = i;
i = insertBits(_e48, _e49, 5u, 10u);
let _e53 = i2_;
let _e54 = i2_;
i2_ = insertBits(_e53, _e54, 5u, 10u);
let _e58 = i3_;
let _e59 = i3_;
i3_ = insertBits(_e58, _e59, 5u, 10u);
let _e63 = i4_;
let _e64 = i4_;
i4_ = insertBits(_e63, _e64, 5u, 10u);
let _e68 = u;
let _e69 = u;
u = insertBits(_e68, _e69, 5u, 10u);
let _e73 = u2_;
let _e74 = u2_;
u2_ = insertBits(_e73, _e74, 5u, 10u);
let _e78 = u3_;
let _e79 = u3_;
u3_ = insertBits(_e78, _e79, 5u, 10u);
let _e83 = u4_;
let _e84 = u4_;
u4_ = insertBits(_e83, _e84, 5u, 10u);
let _e88 = i;
i = extractBits(_e88, 5u, 10u);
let _e92 = i2_;
i2_ = extractBits(_e92, 5u, 10u);
let _e96 = i3_;
i3_ = extractBits(_e96, 5u, 10u);
let _e100 = i4_;
i4_ = extractBits(_e100, 5u, 10u);
let _e104 = u;
u = extractBits(_e104, 5u, 10u);
let _e108 = u2_;
u2_ = extractBits(_e108, 5u, 10u);
let _e112 = u3_;
u3_ = extractBits(_e112, 5u, 10u);
let _e116 = u4_;
u4_ = extractBits(_e116, 5u, 10u);
let _e120 = i;
i = firstTrailingBit(_e120);
let _e122 = i2_;
i2_ = firstTrailingBit(_e122);
let _e124 = i3_;
i3_ = firstTrailingBit(_e124);
let _e126 = i4_;
i4_ = extractBits(_e126, 5u, 10u);
let _e132 = u;
u = extractBits(_e132, 5u, 10u);
let _e138 = u2_;
u2_ = extractBits(_e138, 5u, 10u);
let _e144 = u3_;
u3_ = extractBits(_e144, 5u, 10u);
let _e150 = u4_;
u4_ = extractBits(_e150, 5u, 10u);
let _e156 = i;
i = firstTrailingBit(_e156);
let _e158 = i2_;
i2_ = firstTrailingBit(_e158);
let _e160 = i3_;
i3_ = firstTrailingBit(_e160);
let _e162 = i4_;
i4_ = firstTrailingBit(_e162);
let _e164 = u;
i = i32(firstTrailingBit(_e164));
let _e167 = u2_;
i2_ = vec2<i32>(firstTrailingBit(_e167));
let _e170 = u3_;
i3_ = vec3<i32>(firstTrailingBit(_e170));
let _e173 = u4_;
i4_ = vec4<i32>(firstTrailingBit(_e173));
let _e176 = i;
i = firstLeadingBit(_e176);
let _e178 = i2_;
i2_ = firstLeadingBit(_e178);
let _e180 = i3_;
i3_ = firstLeadingBit(_e180);
let _e182 = i4_;
i4_ = firstLeadingBit(_e182);
let _e184 = u;
i = i32(firstLeadingBit(_e184));
let _e187 = u2_;
i2_ = vec2<i32>(firstLeadingBit(_e187));
let _e190 = u3_;
i3_ = vec3<i32>(firstLeadingBit(_e190));
let _e193 = u4_;
i4_ = vec4<i32>(firstLeadingBit(_e193));
i4_ = firstTrailingBit(_e126);
let _e128 = u;
i = i32(firstTrailingBit(_e128));
let _e131 = u2_;
i2_ = vec2<i32>(firstTrailingBit(_e131));
let _e134 = u3_;
i3_ = vec3<i32>(firstTrailingBit(_e134));
let _e137 = u4_;
i4_ = vec4<i32>(firstTrailingBit(_e137));
let _e140 = i;
i = firstLeadingBit(_e140);
let _e142 = i2_;
i2_ = firstLeadingBit(_e142);
let _e144 = i3_;
i3_ = firstLeadingBit(_e144);
let _e146 = i4_;
i4_ = firstLeadingBit(_e146);
let _e148 = u;
i = i32(firstLeadingBit(_e148));
let _e151 = u2_;
i2_ = vec2<i32>(firstLeadingBit(_e151));
let _e154 = u3_;
i3_ = vec3<i32>(firstLeadingBit(_e154));
let _e157 = u4_;
i4_ = vec4<i32>(firstLeadingBit(_e157));
return;
}

View File

@@ -10,9 +10,9 @@ fn TevPerCompGT(a: f32, b: f32) -> f32 {
a_1 = a;
b_1 = b;
let _e5 = a_1;
let _e6 = b_1;
return select(0f, 1f, (_e5 > _e6));
let _e4 = a_1;
let _e5 = b_1;
return select(0f, 1f, (_e4 > _e5));
}
fn TevPerCompGT_1(a_2: vec3<f32>, b_2: vec3<f32>) -> vec3<f32> {
@@ -21,25 +21,24 @@ fn TevPerCompGT_1(a_2: vec3<f32>, b_2: vec3<f32>) -> vec3<f32> {
a_3 = a_2;
b_3 = b_2;
let _e5 = a_3;
let _e6 = b_3;
return select(vec3(0f), vec3(1f), (_e5 > _e6));
let _e4 = a_3;
let _e5 = b_3;
return select(vec3(0f), vec3(1f), (_e4 > _e5));
}
fn main_1() {
let _e1 = o_color;
let _e7 = TevPerCompGT_1(vec3(3f), vec3(5f));
o_color.x = _e7.x;
o_color.y = _e7.y;
o_color.z = _e7.z;
let _e17 = TevPerCompGT(3f, 5f);
o_color.w = _e17;
let _e5 = TevPerCompGT_1(vec3(3f), vec3(5f));
o_color.x = _e5.x;
o_color.y = _e5.y;
o_color.z = _e5.z;
let _e15 = TevPerCompGT(3f, 5f);
o_color.w = _e15;
return;
}
@fragment
fn main() -> FragmentOutput {
main_1();
let _e3 = o_color;
return FragmentOutput(_e3);
let _e1 = o_color;
return FragmentOutput(_e1);
}

View File

@@ -15,11 +15,11 @@ fn main_1() {
var a: u32;
var b: u32;
let _e9 = testBuffer.data[0];
a = _e9;
let _e4 = testBuffer.data[0];
a = _e4;
testBuffer.data[1i] = 2u;
let _e19 = testBufferReadOnly.data[0];
b = _e19;
let _e12 = testBufferReadOnly.data[0];
b = _e12;
return;
}

View File

@@ -16,6 +16,6 @@ fn main_1() {
fn main(@location(0) a_pos: vec2<f32>) -> VertexOutput {
a_pos_1 = a_pos;
main_1();
let _e5 = gl_Position;
return VertexOutput(_e5);
let _e3 = gl_Position;
return VertexOutput(_e3);
}

View File

@@ -21,6 +21,6 @@ fn main_1() {
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);
}

View File

@@ -12,23 +12,23 @@ fn function() -> vec4<f32> {
var i: i32 = 0i;
loop {
let _e9 = i;
if !((_e9 < NUM_VECS)) {
let _e8 = i;
if !((_e8 < NUM_VECS)) {
break;
}
{
let _e15 = sum;
let _e16 = i;
let _e18 = global.vecs[_e16];
sum = (_e15 + _e18);
let _e14 = sum;
let _e15 = i;
let _e17 = global.vecs[_e15];
sum = (_e14 + _e17);
}
continuing {
let _e12 = i;
i = (_e12 + 1i);
let _e11 = i;
i = (_e11 + 1i);
}
}
let _e20 = sum;
return _e20;
let _e19 = sum;
return _e19;
}
fn main_1() {

View File

@@ -44,12 +44,12 @@ fn main_1() {
var a_1: f32;
var b: f32;
let _e35 = in_array_2[1];
from_input_array = _e35;
let _e41 = array_2d[0][0];
a_1 = _e41;
let _e57 = array_toomanyd[0][0][0][0][0][0][0];
b = _e57;
let _e17 = in_array_2[1];
from_input_array = _e17;
let _e21 = array_2d[0][0];
a_1 = _e21;
let _e30 = array_toomanyd[0][0][0][0][0][0][0];
b = _e30;
out_array[0i] = vec4(2f);
return;
}
@@ -61,9 +61,9 @@ fn main(@location(0) position: vec2<f32>, @location(1) a: vec2<f32>, @location(2
in_array_2[0] = in_array;
in_array_2[1] = in_array_1;
main_1();
let _e30 = frag.position;
let _e32 = frag.a;
let _e35 = out_array[0];
let _e37 = out_array[1];
return FragmentOutput(_e30, _e32, _e35, _e37);
let _e12 = frag.position;
let _e14 = frag.a;
let _e17 = out_array[0];
let _e19 = out_array[1];
return FragmentOutput(_e12, _e14, _e17, _e19);
}

View File

@@ -29,64 +29,64 @@ fn main_1() {
var smoothStepVector: vec4<f64>;
var smoothStepMixed: vec4<f64>;
let _e6 = a;
let _e7 = b;
let _e8 = a;
let _e9 = b;
let _e10 = a;
let _e11 = b;
m = mat4x4<f64>(vec4<f64>(_e8.x, _e8.y, _e8.z, _e8.w), vec4<f64>(_e9.x, _e9.y, _e9.z, _e9.w), vec4<f64>(_e10.x, _e10.y, _e10.z, _e10.w), vec4<f64>(_e11.x, _e11.y, _e11.z, _e11.w));
let _e36 = a;
ceilOut = ceil(_e36);
let _e39 = a;
roundOut = round(_e39);
let _e42 = a;
floorOut = floor(_e42);
let _e45 = a;
fractOut = fract(_e45);
let _e48 = a;
truncOut = trunc(_e48);
let _e51 = a;
absOut = abs(_e51);
let _e54 = a;
sqrtOut = sqrt(_e54);
let _e57 = a;
inversesqrtOut = inverseSqrt(_e57);
let _e60 = a;
signOut = sign(_e60);
let _e63 = m;
transposeOut = transpose(_e63);
let _e66 = a;
normalizeOut = normalize(_e66);
let _e69 = a;
lengthOut = length(_e69);
let _e72 = m;
determinantOut = determinant(_e72);
let _e75 = a;
let _e77 = b;
modOut = (_e75.x - (floor((_e75.x / _e77.x)) * _e77.x));
let _e84 = a;
let _e85 = b;
dotOut = dot(_e84, _e85);
let _e88 = a;
let _e89 = b;
maxOut = max(_e88, _e89);
let _e92 = a;
let _e93 = b;
minOut = min(_e92, _e93);
let _e96 = a;
let _e97 = b;
reflectOut = reflect(_e96, _e97);
let _e100 = a;
let _e102 = b;
crossOut = cross(_e100.xyz, _e102.xyz);
let _e106 = a;
let _e107 = b;
distanceOut = distance(_e106, _e107);
let _e110 = a;
let _e111 = b;
stepOut = step(_e110, _e111);
let _e114 = a;
let _e116 = i;
ldexpOut = ldexp(_e114.x, _e116);
m = mat4x4<f64>(vec4<f64>(_e6.x, _e6.y, _e6.z, _e6.w), vec4<f64>(_e7.x, _e7.y, _e7.z, _e7.w), vec4<f64>(_e8.x, _e8.y, _e8.z, _e8.w), vec4<f64>(_e9.x, _e9.y, _e9.z, _e9.w));
let _e34 = a;
ceilOut = ceil(_e34);
let _e37 = a;
roundOut = round(_e37);
let _e40 = a;
floorOut = floor(_e40);
let _e43 = a;
fractOut = fract(_e43);
let _e46 = a;
truncOut = trunc(_e46);
let _e49 = a;
absOut = abs(_e49);
let _e52 = a;
sqrtOut = sqrt(_e52);
let _e55 = a;
inversesqrtOut = inverseSqrt(_e55);
let _e58 = a;
signOut = sign(_e58);
let _e61 = m;
transposeOut = transpose(_e61);
let _e64 = a;
normalizeOut = normalize(_e64);
let _e67 = a;
lengthOut = length(_e67);
let _e70 = m;
determinantOut = determinant(_e70);
let _e73 = a;
let _e75 = b;
modOut = (_e73.x - (floor((_e73.x / _e75.x)) * _e75.x));
let _e82 = a;
let _e83 = b;
dotOut = dot(_e82, _e83);
let _e86 = a;
let _e87 = b;
maxOut = max(_e86, _e87);
let _e90 = a;
let _e91 = b;
minOut = min(_e90, _e91);
let _e94 = a;
let _e95 = b;
reflectOut = reflect(_e94, _e95);
let _e98 = a;
let _e100 = b;
crossOut = cross(_e98.xyz, _e100.xyz);
let _e104 = a;
let _e105 = b;
distanceOut = distance(_e104, _e105);
let _e108 = a;
let _e109 = b;
stepOut = step(_e108, _e109);
let _e112 = a;
let _e114 = i;
ldexpOut = ldexp(_e112.x, _e114);
smoothStepScalar = f64(smoothstep(0f, 1f, 0.5f));
smoothStepVector = smoothstep(vec4(0.0lf), vec4(1.0lf), vec4(0.5lf));
smoothStepMixed = smoothstep(vec4(0.0lf), vec4(1.0lf), vec4(0.5lf));

View File

@@ -305,8 +305,8 @@ fn testNonImplicitCastVectorCast() {
var a_18: u32 = 1u;
var b_16: vec4<i32>;
let _e3 = a_18;
b_16 = vec4(i32(_e3));
let _e2 = a_18;
b_16 = vec4(i32(_e2));
return;
}
@@ -326,44 +326,44 @@ fn ternary(a_20: bool) {
var nested: u32;
a_21 = a_20;
let _e3 = a_21;
if _e3 {
let _e2 = a_21;
if _e2 {
local = 0u;
} else {
local = 1u;
}
let _e8 = local;
b_17 = _e8;
let _e10 = a_21;
if _e10 {
let _e6 = local;
b_17 = _e6;
let _e8 = a_21;
if _e8 {
local_1 = 0u;
} else {
local_1 = 1u;
}
let _e15 = local_1;
c_1 = _e15;
let _e17 = a_21;
if _e17 {
let _e18 = a_21;
if _e18 {
let _e19 = a_21;
if _e19 {
let _e12 = local_1;
c_1 = _e12;
let _e14 = a_21;
if _e14 {
let _e15 = a_21;
if _e15 {
let _e16 = a_21;
if _e16 {
local_2 = 2u;
} else {
local_2 = 3u;
}
let _e24 = local_2;
local_3 = _e24;
let _e20 = local_2;
local_3 = _e20;
} else {
local_3 = 4u;
}
let _e27 = local_3;
local_4 = _e27;
let _e23 = local_3;
local_4 = _e23;
} else {
local_4 = 5u;
}
let _e31 = local_4;
nested = _e31;
let _e26 = local_4;
nested = _e26;
return;
}
@@ -374,9 +374,9 @@ fn testMatrixMultiplication(a_22: mat4x3<f32>, b_18: mat4x4<f32>) {
a_23 = a_22;
b_19 = b_18;
let _e5 = a_23;
let _e6 = b_19;
c_2 = (_e5 * _e6);
let _e4 = a_23;
let _e5 = b_19;
c_2 = (_e4 * _e5);
return;
}
@@ -401,9 +401,9 @@ fn indexConstantNonConstantIndex(i: i32) {
var a_26: vec4<u32>;
i_1 = i;
let _e6 = i_1;
let _e11 = local_5.array_[_e6];
a_26 = _e11;
let _e2 = i_1;
let _e7 = local_5.array_[_e2];
a_26 = _e7;
return;
}
@@ -411,30 +411,27 @@ fn testSwizzleWrites(a_27: vec3<f32>) {
var a_28: vec3<f32>;
a_28 = a_27;
let _e6 = a_28;
a_28.z = 3f;
a_28.x = 4f;
let _e6 = a_28;
let _e9 = (_e6.xy * 5f);
a_28.x = _e9.x;
a_28.y = _e9.y;
let _e14 = a_28;
let _e16 = a_28;
let _e19 = (_e16.xy * 5f);
a_28.x = _e19.x;
a_28.y = _e19.y;
let _e24 = a_28;
let _e28 = (_e24.zy + vec2(1f));
a_28.z = _e28.x;
a_28.y = _e28.y;
let _e18 = (_e14.zy + vec2(1f));
a_28.z = _e18.x;
a_28.y = _e18.y;
return;
}
fn main_1() {
var local_6: f32;
let _e6 = global;
local_6 = _e6;
let _e2 = global;
local_6 = _e2;
privatePointer((&local_6));
let _e8 = local_6;
global = _e8;
let _e9 = o_color;
let _e4 = local_6;
global = _e4;
o_color.x = 1f;
o_color.y = 1f;
o_color.z = 1f;
@@ -445,6 +442,6 @@ fn main_1() {
@fragment
fn main() -> FragmentOutput {
main_1();
let _e9 = o_color;
return FragmentOutput(_e9);
let _e1 = o_color;
return FragmentOutput(_e1);
}

View File

@@ -32,7 +32,6 @@ fn Fma(d: ptr<function, Mat4x3_>, m: Mat4x3_, s: f32) {
}
fn main_1() {
let _e1 = o_color;
o_color.x = 1f;
o_color.y = 1f;
o_color.z = 1f;
@@ -43,6 +42,6 @@ fn main_1() {
@fragment
fn main() -> FragmentOutput {
main_1();
let _e3 = o_color;
return FragmentOutput(_e3);
let _e1 = o_color;
return FragmentOutput(_e1);
}

View File

@@ -8,13 +8,12 @@ fn swizzleCaller(a_1: vec3<f32>) {
a_2 = a_1;
let _e2 = a_2;
let _e4 = a_2;
local = _e4.xz;
local = _e2.xz;
swizzleCallee((&local));
let _e11 = local.x;
a_2.x = _e11;
let _e12 = local.y;
a_2.z = _e12;
let _e9 = local.x;
a_2.x = _e9;
let _e10 = local.y;
a_2.z = _e10;
return;
}
@@ -28,8 +27,8 @@ fn outImplicitCastCaller(a_4: f32) {
a_5 = a_4;
outImplicitCastCallee((&local_1));
let _e5 = local_1;
a_5 = f32(_e5);
let _e3 = local_1;
a_5 = f32(_e3);
return;
}
@@ -42,13 +41,11 @@ fn swizzleImplicitCastCaller(a_7: vec3<f32>) {
var local_2: vec2<u32>;
a_8 = a_7;
let _e2 = a_8;
let _e4 = a_8;
swizzleImplicitCastCallee((&local_2));
let _e11 = local_2.x;
a_8.x = f32(_e11);
let _e13 = local_2.y;
a_8.z = f32(_e13);
let _e7 = local_2.x;
a_8.x = f32(_e7);
let _e9 = local_2.y;
a_8.z = f32(_e9);
return;
}

View File

@@ -5,7 +5,6 @@ var<private> i: u32;
fn main_1() {
var local: array<f32, 2> = array_;
let _e2 = i;
return;
}

View File

@@ -21,13 +21,13 @@ fn testImg1D(coord: i32) {
var c: vec4<f32>;
coord_1 = coord;
let _e10 = textureDimensions(img1D);
size = i32(_e10);
let _e13 = coord_1;
textureStore(img1D, _e13, vec4(2f));
let _e17 = coord_1;
let _e18 = textureLoad(img1D, _e17);
c = _e18;
let _e3 = textureDimensions(img1D);
size = i32(_e3);
let _e6 = coord_1;
textureStore(img1D, _e6, vec4(2f));
let _e9 = coord_1;
let _e10 = textureLoad(img1D, _e9);
c = _e10;
return;
}
@@ -37,14 +37,14 @@ fn testImg1DArray(coord_2: vec2<i32>) {
var c_1: vec4<f32>;
coord_3 = coord_2;
let _e10 = textureDimensions(img1DArray);
let _e11 = textureNumLayers(img1DArray);
size_1 = vec2<f32>(vec2<i32>(vec2<u32>(_e10, _e11)));
let _e16 = coord_3;
let _e19 = textureLoad(img1DArray, _e16.x, _e16.y);
c_1 = _e19;
let _e21 = coord_3;
textureStore(img1DArray, _e21.x, _e21.y, vec4(2f));
let _e3 = textureDimensions(img1DArray);
let _e4 = textureNumLayers(img1DArray);
size_1 = vec2<f32>(vec2<i32>(vec2<u32>(_e3, _e4)));
let _e9 = coord_3;
let _e12 = textureLoad(img1DArray, _e9.x, _e9.y);
c_1 = _e12;
let _e14 = coord_3;
textureStore(img1DArray, _e14.x, _e14.y, vec4(2f));
return;
}
@@ -54,13 +54,13 @@ fn testImg2D(coord_4: vec2<i32>) {
var c_2: vec4<f32>;
coord_5 = coord_4;
let _e10 = textureDimensions(img2D);
size_2 = vec2<f32>(vec2<i32>(_e10));
let _e14 = coord_5;
let _e15 = textureLoad(img2D, _e14);
c_2 = _e15;
let _e17 = coord_5;
textureStore(img2D, _e17, vec4(2f));
let _e3 = textureDimensions(img2D);
size_2 = vec2<f32>(vec2<i32>(_e3));
let _e7 = coord_5;
let _e8 = textureLoad(img2D, _e7);
c_2 = _e8;
let _e10 = coord_5;
textureStore(img2D, _e10, vec4(2f));
return;
}
@@ -70,14 +70,14 @@ fn testImg2DArray(coord_6: vec3<i32>) {
var c_3: vec4<f32>;
coord_7 = coord_6;
let _e10 = textureDimensions(img2DArray);
let _e13 = textureNumLayers(img2DArray);
size_3 = vec3<f32>(vec3<i32>(vec3<u32>(_e10.x, _e10.y, _e13)));
let _e18 = coord_7;
let _e21 = textureLoad(img2DArray, _e18.xy, _e18.z);
c_3 = _e21;
let _e23 = coord_7;
textureStore(img2DArray, _e23.xy, _e23.z, vec4(2f));
let _e3 = textureDimensions(img2DArray);
let _e6 = textureNumLayers(img2DArray);
size_3 = vec3<f32>(vec3<i32>(vec3<u32>(_e3.x, _e3.y, _e6)));
let _e11 = coord_7;
let _e14 = textureLoad(img2DArray, _e11.xy, _e11.z);
c_3 = _e14;
let _e16 = coord_7;
textureStore(img2DArray, _e16.xy, _e16.z, vec4(2f));
return;
}
@@ -87,13 +87,13 @@ fn testImg3D(coord_8: vec3<i32>) {
var c_4: vec4<f32>;
coord_9 = coord_8;
let _e10 = textureDimensions(img3D);
size_4 = vec3<f32>(vec3<i32>(_e10));
let _e14 = coord_9;
let _e15 = textureLoad(img3D, _e14);
c_4 = _e15;
let _e17 = coord_9;
textureStore(img3D, _e17, vec4(2f));
let _e3 = textureDimensions(img3D);
size_4 = vec3<f32>(vec3<i32>(_e3));
let _e7 = coord_9;
let _e8 = textureLoad(img3D, _e7);
c_4 = _e8;
let _e10 = coord_9;
textureStore(img3D, _e10, vec4(2f));
return;
}
@@ -103,11 +103,11 @@ fn testImgReadOnly(coord_10: vec2<i32>) {
var c_5: vec4<f32>;
coord_11 = coord_10;
let _e10 = textureDimensions(img2D);
size_5 = vec2<f32>(vec2<i32>(_e10));
let _e14 = coord_11;
let _e15 = textureLoad(imgReadOnly, _e14);
c_5 = _e15;
let _e4 = textureDimensions(img2D);
size_5 = vec2<f32>(vec2<i32>(_e4));
let _e8 = coord_11;
let _e9 = textureLoad(imgReadOnly, _e8);
c_5 = _e9;
return;
}
@@ -116,10 +116,10 @@ fn testImgWriteOnly(coord_12: vec2<i32>) {
var size_6: vec2<f32>;
coord_13 = coord_12;
let _e10 = textureDimensions(img2D);
size_6 = vec2<f32>(vec2<i32>(_e10));
let _e14 = coord_13;
textureStore(imgWriteOnly, _e14, vec4(2f));
let _e4 = textureDimensions(img2D);
size_6 = vec2<f32>(vec2<i32>(_e4));
let _e8 = coord_13;
textureStore(imgWriteOnly, _e8, vec4(2f));
return;
}
@@ -128,8 +128,8 @@ fn testImgWriteReadOnly(coord_14: vec2<i32>) {
var size_7: vec2<f32>;
coord_15 = coord_14;
let _e10 = textureDimensions(imgWriteReadOnly);
size_7 = vec2<f32>(vec2<i32>(_e10));
let _e3 = textureDimensions(imgWriteReadOnly);
size_7 = vec2<f32>(vec2<i32>(_e3));
return;
}

View File

@@ -4,19 +4,19 @@ fn main_1() {
var a: vec4<f32>;
loop {
let _e6 = i;
if !((_e6 < 4i)) {
let _e5 = i;
if !((_e5 < 4i)) {
break;
}
{
a = vec4(1f);
let _e17 = sum;
let _e18 = a;
sum = (_e17 + _e18);
let _e15 = sum;
let _e16 = a;
sum = (_e15 + _e16);
}
continuing {
let _e10 = i;
i = (_e10 + 1i);
let _e9 = i;
i = (_e9 + 1i);
}
}
return;

View File

@@ -13,22 +13,22 @@ fn main_1() {
let _e8 = (_e6 - 1i);
scalar = _e8;
scalar_target = _e8;
let _e14 = vec;
vec = (_e14 - vec2(1u));
vec_target = _e14;
let _e18 = vec;
let _e21 = (_e18 + vec2(1u));
vec = _e21;
vec_target = _e21;
let _e32 = mat;
const _e34 = vec3(1f);
mat = (_e32 + mat4x3<f32>(_e34, _e34, _e34, _e34));
mat_target = _e32;
let _e37 = mat;
const _e39 = vec3(1f);
let _e41 = (_e37 - mat4x3<f32>(_e39, _e39, _e39, _e39));
mat = _e41;
mat_target = _e41;
let _e13 = vec;
vec = (_e13 - vec2(1u));
vec_target = _e13;
let _e17 = vec;
let _e20 = (_e17 + vec2(1u));
vec = _e20;
vec_target = _e20;
let _e30 = mat;
const _e32 = vec3(1f);
mat = (_e30 + mat4x3<f32>(_e32, _e32, _e32, _e32));
mat_target = _e30;
let _e35 = mat;
const _e37 = vec3(1f);
let _e39 = (_e35 - mat4x3<f32>(_e37, _e37, _e37, _e37));
mat = _e39;
mat_target = _e39;
return;
}

View File

@@ -14,6 +14,6 @@ fn main_1() {
fn main(@location(0) v_uv: vec2<f32>) -> FragmentOutput {
v_uv_1 = v_uv;
main_1();
let _e7 = o_color;
return FragmentOutput(_e7);
let _e3 = o_color;
return FragmentOutput(_e3);
}

View File

@@ -24,7 +24,7 @@ fn main(@location(0) a_pos: vec2<f32>, @location(1) a_uv: vec2<f32>) -> VertexOu
a_pos_1 = a_pos;
a_uv_1 = a_uv;
main_1();
let _e13 = v_uv;
let _e15 = gl_Position;
return VertexOutput(_e13, _e15);
let _e5 = v_uv;
let _e7 = gl_Position;
return VertexOutput(_e5, _e7);
}

View File

@@ -8,8 +8,8 @@ fn CalcShadowPCF1_(T_P_t_TextureDepth: texture_depth_2d, S_P_t_TextureDepth: sam
let _e8 = _e7.xyz;
let _e11 = textureSampleCompare(T_P_t_TextureDepth, S_P_t_TextureDepth, _e8.xy, _e8.z);
t_Res = (_e6 + (_e11 * 0.2f));
let _e17 = t_Res;
return _e17;
let _e15 = t_Res;
return _e15;
}
fn CalcShadowPCF(T_P_t_TextureDepth_1: texture_depth_2d, S_P_t_TextureDepth_1: sampler_comparison, t_ProjCoord_2: vec3<f32>, t_Bias: f32) -> f32 {

View File

@@ -42,82 +42,82 @@ fn testTex1D(coord: f32) {
var c: vec4<f32>;
coord_1 = coord;
let _e21 = textureDimensions(tex1D, 0i);
size1D = i32(_e21);
let _e24 = textureNumLevels(tex1D);
levels = i32(_e24);
let _e5 = textureDimensions(tex1D, 0i);
size1D = i32(_e5);
let _e8 = textureNumLevels(tex1D);
levels = i32(_e8);
let _e12 = coord_1;
let _e13 = textureSample(tex1D, samp, _e12);
c = _e13;
let _e14 = coord_1;
let _e17 = textureSampleGrad(tex1D, samp, _e14, 4f, 4f);
c = _e17;
let _e18 = coord_1;
let _e21 = textureSampleGrad(tex1D, samp, _e18, 4f, 4f, 5i);
c = _e21;
let _e22 = coord_1;
let _e24 = textureSampleLevel(tex1D, samp, _e22, 3f);
c = _e24;
let _e25 = coord_1;
let _e27 = textureSampleLevel(tex1D, samp, _e25, 3f, 5i);
c = _e27;
let _e28 = coord_1;
let _e29 = textureSample(tex1D, samp, _e28);
let _e29 = textureSample(tex1D, samp, _e28, 5i);
c = _e29;
let _e30 = coord_1;
let _e33 = textureSampleGrad(tex1D, samp, _e30, 4f, 4f);
c = _e33;
let _e34 = coord_1;
let _e38 = textureSampleGrad(tex1D, samp, _e34, 4f, 4f, 5i);
c = _e38;
let _e39 = coord_1;
let _e41 = textureSampleLevel(tex1D, samp, _e39, 3f);
c = _e41;
let _e42 = coord_1;
let _e45 = textureSampleLevel(tex1D, samp, _e42, 3f, 5i);
c = _e45;
let _e46 = coord_1;
let _e48 = textureSample(tex1D, samp, _e46, 5i);
c = _e48;
let _e49 = coord_1;
let _e51 = vec2<f32>(_e49, 6f);
let _e55 = textureSample(tex1D, samp, (_e51.x / _e51.y));
c = _e55;
let _e56 = coord_1;
let _e60 = vec4<f32>(_e56, 0f, 0f, 6f);
let _e66 = textureSample(tex1D, samp, (_e60.xyz / vec3(_e60.w)).x);
c = _e66;
let _e67 = coord_1;
let _e69 = vec2<f32>(_e67, 6f);
let _e75 = textureSampleGrad(tex1D, samp, (_e69.x / _e69.y), 4f, 4f);
c = _e75;
let _e76 = coord_1;
let _e80 = vec4<f32>(_e76, 0f, 0f, 6f);
let _e88 = textureSampleGrad(tex1D, samp, (_e80.xyz / vec3(_e80.w)).x, 4f, 4f);
c = _e88;
let _e89 = coord_1;
let _e91 = vec2<f32>(_e89, 6f);
let _e98 = textureSampleGrad(tex1D, samp, (_e91.x / _e91.y), 4f, 4f, 5i);
c = _e98;
let _e99 = coord_1;
let _e103 = vec4<f32>(_e99, 0f, 0f, 6f);
let _e112 = textureSampleGrad(tex1D, samp, (_e103.xyz / vec3(_e103.w)).x, 4f, 4f, 5i);
c = _e112;
let _e113 = coord_1;
let _e115 = vec2<f32>(_e113, 6f);
let _e120 = textureSampleLevel(tex1D, samp, (_e115.x / _e115.y), 3f);
c = _e120;
let _e121 = coord_1;
let _e125 = vec4<f32>(_e121, 0f, 0f, 6f);
let _e132 = textureSampleLevel(tex1D, samp, (_e125.xyz / vec3(_e125.w)).x, 3f);
c = _e132;
let _e133 = coord_1;
let _e135 = vec2<f32>(_e133, 6f);
let _e141 = textureSampleLevel(tex1D, samp, (_e135.x / _e135.y), 3f, 5i);
c = _e141;
let _e142 = coord_1;
let _e146 = vec4<f32>(_e142, 0f, 0f, 6f);
let _e154 = textureSampleLevel(tex1D, samp, (_e146.xyz / vec3(_e146.w)).x, 3f, 5i);
c = _e154;
let _e155 = coord_1;
let _e157 = vec2<f32>(_e155, 6f);
let _e162 = textureSample(tex1D, samp, (_e157.x / _e157.y), 5i);
c = _e162;
let _e163 = coord_1;
let _e167 = vec4<f32>(_e163, 0f, 0f, 6f);
let _e174 = textureSample(tex1D, samp, (_e167.xyz / vec3(_e167.w)).x, 5i);
c = _e174;
let _e175 = coord_1;
let _e178 = textureLoad(tex1D, i32(_e175), 3i);
c = _e178;
let _e179 = coord_1;
let _e183 = textureLoad(tex1D, i32(_e179), 3i);
c = _e183;
let _e32 = vec2<f32>(_e30, 6f);
let _e36 = textureSample(tex1D, samp, (_e32.x / _e32.y));
c = _e36;
let _e37 = coord_1;
let _e41 = vec4<f32>(_e37, 0f, 0f, 6f);
let _e47 = textureSample(tex1D, samp, (_e41.xyz / vec3(_e41.w)).x);
c = _e47;
let _e48 = coord_1;
let _e50 = vec2<f32>(_e48, 6f);
let _e56 = textureSampleGrad(tex1D, samp, (_e50.x / _e50.y), 4f, 4f);
c = _e56;
let _e57 = coord_1;
let _e61 = vec4<f32>(_e57, 0f, 0f, 6f);
let _e69 = textureSampleGrad(tex1D, samp, (_e61.xyz / vec3(_e61.w)).x, 4f, 4f);
c = _e69;
let _e70 = coord_1;
let _e72 = vec2<f32>(_e70, 6f);
let _e78 = textureSampleGrad(tex1D, samp, (_e72.x / _e72.y), 4f, 4f, 5i);
c = _e78;
let _e79 = coord_1;
let _e83 = vec4<f32>(_e79, 0f, 0f, 6f);
let _e91 = textureSampleGrad(tex1D, samp, (_e83.xyz / vec3(_e83.w)).x, 4f, 4f, 5i);
c = _e91;
let _e92 = coord_1;
let _e94 = vec2<f32>(_e92, 6f);
let _e99 = textureSampleLevel(tex1D, samp, (_e94.x / _e94.y), 3f);
c = _e99;
let _e100 = coord_1;
let _e104 = vec4<f32>(_e100, 0f, 0f, 6f);
let _e111 = textureSampleLevel(tex1D, samp, (_e104.xyz / vec3(_e104.w)).x, 3f);
c = _e111;
let _e112 = coord_1;
let _e114 = vec2<f32>(_e112, 6f);
let _e119 = textureSampleLevel(tex1D, samp, (_e114.x / _e114.y), 3f, 5i);
c = _e119;
let _e120 = coord_1;
let _e124 = vec4<f32>(_e120, 0f, 0f, 6f);
let _e131 = textureSampleLevel(tex1D, samp, (_e124.xyz / vec3(_e124.w)).x, 3f, 5i);
c = _e131;
let _e132 = coord_1;
let _e134 = vec2<f32>(_e132, 6f);
let _e138 = textureSample(tex1D, samp, (_e134.x / _e134.y), 5i);
c = _e138;
let _e139 = coord_1;
let _e143 = vec4<f32>(_e139, 0f, 0f, 6f);
let _e149 = textureSample(tex1D, samp, (_e143.xyz / vec3(_e143.w)).x, 5i);
c = _e149;
let _e150 = coord_1;
let _e153 = textureLoad(tex1D, i32(_e150), 3i);
c = _e153;
let _e154 = coord_1;
let _e157 = textureLoad(tex1D, i32(_e154), 3i);
c = _e157;
return;
}
@@ -128,37 +128,37 @@ fn testTex1DArray(coord_2: vec2<f32>) {
var c_1: vec4<f32>;
coord_3 = coord_2;
let _e21 = textureDimensions(tex1DArray, 0i);
let _e22 = textureNumLayers(tex1DArray);
size1DArray = vec2<i32>(vec2<u32>(_e21, _e22));
let _e26 = textureNumLevels(tex1DArray);
levels_1 = i32(_e26);
let _e30 = coord_3;
let _e34 = textureSample(tex1DArray, samp, _e30.x, i32(_e30.y));
c_1 = _e34;
let _e35 = coord_3;
let _e41 = textureSampleGrad(tex1DArray, samp, _e35.x, i32(_e35.y), 4f, 4f);
c_1 = _e41;
let _e42 = coord_3;
let _e49 = textureSampleGrad(tex1DArray, samp, _e42.x, i32(_e42.y), 4f, 4f, 5i);
let _e5 = textureDimensions(tex1DArray, 0i);
let _e6 = textureNumLayers(tex1DArray);
size1DArray = vec2<i32>(vec2<u32>(_e5, _e6));
let _e10 = textureNumLevels(tex1DArray);
levels_1 = i32(_e10);
let _e14 = coord_3;
let _e18 = textureSample(tex1DArray, samp, _e14.x, i32(_e14.y));
c_1 = _e18;
let _e19 = coord_3;
let _e25 = textureSampleGrad(tex1DArray, samp, _e19.x, i32(_e19.y), 4f, 4f);
c_1 = _e25;
let _e26 = coord_3;
let _e32 = textureSampleGrad(tex1DArray, samp, _e26.x, i32(_e26.y), 4f, 4f, 5i);
c_1 = _e32;
let _e33 = coord_3;
let _e38 = textureSampleLevel(tex1DArray, samp, _e33.x, i32(_e33.y), 3f);
c_1 = _e38;
let _e39 = coord_3;
let _e44 = textureSampleLevel(tex1DArray, samp, _e39.x, i32(_e39.y), 3f, 5i);
c_1 = _e44;
let _e45 = coord_3;
let _e49 = textureSample(tex1DArray, samp, _e45.x, i32(_e45.y), 5i);
c_1 = _e49;
let _e50 = coord_3;
let _e55 = textureSampleLevel(tex1DArray, samp, _e50.x, i32(_e50.y), 3f);
let _e51 = vec2<i32>(_e50);
let _e55 = textureLoad(tex1DArray, _e51.x, _e51.y, 3i);
c_1 = _e55;
let _e56 = coord_3;
let _e62 = textureSampleLevel(tex1DArray, samp, _e56.x, i32(_e56.y), 3f, 5i);
c_1 = _e62;
let _e63 = coord_3;
let _e68 = textureSample(tex1DArray, samp, _e63.x, i32(_e63.y), 5i);
c_1 = _e68;
let _e69 = coord_3;
let _e70 = vec2<i32>(_e69);
let _e74 = textureLoad(tex1DArray, _e70.x, _e70.y, 3i);
c_1 = _e74;
let _e75 = coord_3;
let _e76 = vec2<i32>(_e75);
let _e81 = textureLoad(tex1DArray, _e76.x, _e76.y, 3i);
c_1 = _e81;
let _e57 = vec2<i32>(_e56);
let _e61 = textureLoad(tex1DArray, _e57.x, _e57.y, 3i);
c_1 = _e61;
return;
}
@@ -169,116 +169,116 @@ fn testTex2D(coord_4: vec2<f32>) {
var c_2: vec4<f32>;
coord_5 = coord_4;
let _e21 = textureDimensions(tex2D, 0i);
size2D = vec2<i32>(_e21);
let _e24 = textureNumLevels(tex2D);
levels_2 = i32(_e24);
let _e28 = coord_5;
let _e29 = textureSample(tex2D, samp, _e28);
c_2 = _e29;
let _e30 = coord_5;
let _e32 = textureSampleBias(tex2D, samp, _e30, 2f);
c_2 = _e32;
let _e33 = coord_5;
let _e38 = textureSampleGrad(tex2D, samp, _e33, vec2(4f), vec2(4f));
let _e7 = textureDimensions(tex2D, 0i);
size2D = vec2<i32>(_e7);
let _e10 = textureNumLevels(tex2D);
levels_2 = i32(_e10);
let _e14 = coord_5;
let _e15 = textureSample(tex2D, samp, _e14);
c_2 = _e15;
let _e16 = coord_5;
let _e18 = textureSampleBias(tex2D, samp, _e16, 2f);
c_2 = _e18;
let _e19 = coord_5;
let _e24 = textureSampleGrad(tex2D, samp, _e19, vec2(4f), vec2(4f));
c_2 = _e24;
let _e25 = coord_5;
let _e30 = textureSampleGrad(tex2D, samp, _e25, vec2(4f), vec2(4f), vec2(5i));
c_2 = _e30;
let _e31 = coord_5;
let _e33 = textureSampleLevel(tex2D, samp, _e31, 3f);
c_2 = _e33;
let _e34 = coord_5;
let _e36 = textureSampleLevel(tex2D, samp, _e34, 3f, vec2(5i));
c_2 = _e36;
let _e37 = coord_5;
let _e38 = textureSample(tex2D, samp, _e37, vec2(5i));
c_2 = _e38;
let _e39 = coord_5;
let _e46 = textureSampleGrad(tex2D, samp, _e39, vec2(4f), vec2(4f), vec2(5i));
c_2 = _e46;
let _e47 = coord_5;
let _e49 = textureSampleLevel(tex2D, samp, _e47, 3f);
c_2 = _e49;
let _e50 = coord_5;
let _e54 = textureSampleLevel(tex2D, samp, _e50, 3f, vec2(5i));
c_2 = _e54;
let _e55 = coord_5;
let _e58 = textureSample(tex2D, samp, _e55, vec2(5i));
c_2 = _e58;
let _e59 = coord_5;
let _e63 = textureSampleBias(tex2D, samp, _e59, 2f, vec2(5i));
let _e41 = textureSampleBias(tex2D, samp, _e39, 2f, vec2(5i));
c_2 = _e41;
let _e42 = coord_5;
let _e46 = vec3<f32>(_e42.x, _e42.y, 6f);
let _e51 = textureSample(tex2D, samp, (_e46.xy / vec2(_e46.z)));
c_2 = _e51;
let _e52 = coord_5;
let _e57 = vec4<f32>(_e52.x, _e52.y, 0f, 6f);
let _e63 = textureSample(tex2D, samp, (_e57.xyz / vec3(_e57.w)).xy);
c_2 = _e63;
let _e64 = coord_5;
let _e68 = vec3<f32>(_e64.x, _e64.y, 6f);
let _e73 = textureSample(tex2D, samp, (_e68.xy / vec2(_e68.z)));
c_2 = _e73;
let _e74 = coord_5;
let _e79 = vec4<f32>(_e74.x, _e74.y, 0f, 6f);
let _e85 = textureSample(tex2D, samp, (_e79.xyz / vec3(_e79.w)).xy);
c_2 = _e85;
let _e86 = coord_5;
let _e90 = vec3<f32>(_e86.x, _e86.y, 6f);
let _e96 = textureSampleBias(tex2D, samp, (_e90.xy / vec2(_e90.z)), 2f);
c_2 = _e96;
let _e97 = coord_5;
let _e102 = vec4<f32>(_e97.x, _e97.y, 0f, 6f);
let _e109 = textureSampleBias(tex2D, samp, (_e102.xyz / vec3(_e102.w)).xy, 2f);
c_2 = _e109;
let _e110 = coord_5;
let _e114 = vec3<f32>(_e110.x, _e110.y, 6f);
let _e123 = textureSampleGrad(tex2D, samp, (_e114.xy / vec2(_e114.z)), vec2(4f), vec2(4f));
c_2 = _e123;
let _e124 = coord_5;
let _e129 = vec4<f32>(_e124.x, _e124.y, 0f, 6f);
let _e139 = textureSampleGrad(tex2D, samp, (_e129.xyz / vec3(_e129.w)).xy, vec2(4f), vec2(4f));
c_2 = _e139;
let _e140 = coord_5;
let _e144 = vec3<f32>(_e140.x, _e140.y, 6f);
let _e155 = textureSampleGrad(tex2D, samp, (_e144.xy / vec2(_e144.z)), vec2(4f), vec2(4f), vec2(5i));
c_2 = _e155;
let _e156 = coord_5;
let _e161 = vec4<f32>(_e156.x, _e156.y, 0f, 6f);
let _e173 = textureSampleGrad(tex2D, samp, (_e161.xyz / vec3(_e161.w)).xy, vec2(4f), vec2(4f), vec2(5i));
c_2 = _e173;
let _e174 = coord_5;
let _e178 = vec3<f32>(_e174.x, _e174.y, 6f);
let _e184 = textureSampleLevel(tex2D, samp, (_e178.xy / vec2(_e178.z)), 3f);
c_2 = _e184;
let _e185 = coord_5;
let _e190 = vec4<f32>(_e185.x, _e185.y, 0f, 6f);
let _e197 = textureSampleLevel(tex2D, samp, (_e190.xyz / vec3(_e190.w)).xy, 3f);
c_2 = _e197;
let _e198 = coord_5;
let _e202 = vec3<f32>(_e198.x, _e198.y, 6f);
let _e210 = textureSampleLevel(tex2D, samp, (_e202.xy / vec2(_e202.z)), 3f, vec2(5i));
c_2 = _e210;
let _e211 = coord_5;
let _e216 = vec4<f32>(_e211.x, _e211.y, 0f, 6f);
let _e225 = textureSampleLevel(tex2D, samp, (_e216.xyz / vec3(_e216.w)).xy, 3f, vec2(5i));
c_2 = _e225;
let _e226 = coord_5;
let _e230 = vec3<f32>(_e226.x, _e226.y, 6f);
let _e237 = textureSample(tex2D, samp, (_e230.xy / vec2(_e230.z)), vec2(5i));
c_2 = _e237;
let _e238 = coord_5;
let _e243 = vec4<f32>(_e238.x, _e238.y, 0f, 6f);
let _e251 = textureSample(tex2D, samp, (_e243.xyz / vec3(_e243.w)).xy, vec2(5i));
c_2 = _e251;
let _e252 = coord_5;
let _e256 = vec3<f32>(_e252.x, _e252.y, 6f);
let _e264 = textureSampleBias(tex2D, samp, (_e256.xy / vec2(_e256.z)), 2f, vec2(5i));
c_2 = _e264;
let _e74 = textureSampleBias(tex2D, samp, (_e68.xy / vec2(_e68.z)), 2f);
c_2 = _e74;
let _e75 = coord_5;
let _e80 = vec4<f32>(_e75.x, _e75.y, 0f, 6f);
let _e87 = textureSampleBias(tex2D, samp, (_e80.xyz / vec3(_e80.w)).xy, 2f);
c_2 = _e87;
let _e88 = coord_5;
let _e92 = vec3<f32>(_e88.x, _e88.y, 6f);
let _e101 = textureSampleGrad(tex2D, samp, (_e92.xy / vec2(_e92.z)), vec2(4f), vec2(4f));
c_2 = _e101;
let _e102 = coord_5;
let _e107 = vec4<f32>(_e102.x, _e102.y, 0f, 6f);
let _e117 = textureSampleGrad(tex2D, samp, (_e107.xyz / vec3(_e107.w)).xy, vec2(4f), vec2(4f));
c_2 = _e117;
let _e118 = coord_5;
let _e122 = vec3<f32>(_e118.x, _e118.y, 6f);
let _e131 = textureSampleGrad(tex2D, samp, (_e122.xy / vec2(_e122.z)), vec2(4f), vec2(4f), vec2(5i));
c_2 = _e131;
let _e132 = coord_5;
let _e137 = vec4<f32>(_e132.x, _e132.y, 0f, 6f);
let _e147 = textureSampleGrad(tex2D, samp, (_e137.xyz / vec3(_e137.w)).xy, vec2(4f), vec2(4f), vec2(5i));
c_2 = _e147;
let _e148 = coord_5;
let _e152 = vec3<f32>(_e148.x, _e148.y, 6f);
let _e158 = textureSampleLevel(tex2D, samp, (_e152.xy / vec2(_e152.z)), 3f);
c_2 = _e158;
let _e159 = coord_5;
let _e164 = vec4<f32>(_e159.x, _e159.y, 0f, 6f);
let _e171 = textureSampleLevel(tex2D, samp, (_e164.xyz / vec3(_e164.w)).xy, 3f);
c_2 = _e171;
let _e172 = coord_5;
let _e176 = vec3<f32>(_e172.x, _e172.y, 6f);
let _e182 = textureSampleLevel(tex2D, samp, (_e176.xy / vec2(_e176.z)), 3f, vec2(5i));
c_2 = _e182;
let _e183 = coord_5;
let _e188 = vec4<f32>(_e183.x, _e183.y, 0f, 6f);
let _e195 = textureSampleLevel(tex2D, samp, (_e188.xyz / vec3(_e188.w)).xy, 3f, vec2(5i));
c_2 = _e195;
let _e196 = coord_5;
let _e200 = vec3<f32>(_e196.x, _e196.y, 6f);
let _e205 = textureSample(tex2D, samp, (_e200.xy / vec2(_e200.z)), vec2(5i));
c_2 = _e205;
let _e206 = coord_5;
let _e211 = vec4<f32>(_e206.x, _e206.y, 0f, 6f);
let _e217 = textureSample(tex2D, samp, (_e211.xyz / vec3(_e211.w)).xy, vec2(5i));
c_2 = _e217;
let _e218 = coord_5;
let _e222 = vec3<f32>(_e218.x, _e218.y, 6f);
let _e228 = textureSampleBias(tex2D, samp, (_e222.xy / vec2(_e222.z)), 2f, vec2(5i));
c_2 = _e228;
let _e229 = coord_5;
let _e234 = vec4<f32>(_e229.x, _e229.y, 0f, 6f);
let _e241 = textureSampleBias(tex2D, samp, (_e234.xyz / vec3(_e234.w)).xy, 2f, vec2(5i));
c_2 = _e241;
let _e242 = coord_5;
let _e245 = textureLoad(tex2D, vec2<i32>(_e242), 3i);
c_2 = _e245;
let _e246 = coord_5;
let _e249 = textureLoad(utex2D, vec2<i32>(_e246), 3i);
c_2 = vec4<f32>(_e249);
let _e251 = coord_5;
let _e254 = textureLoad(itex2D, vec2<i32>(_e251), 3i);
c_2 = vec4<f32>(_e254);
let _e256 = coord_5;
let _e259 = textureLoad(tex2D, vec2<i32>(_e256), 3i);
c_2 = _e259;
let _e260 = coord_5;
let _e263 = textureLoad(utex2D, vec2<i32>(_e260), 3i);
c_2 = vec4<f32>(_e263);
let _e265 = coord_5;
let _e270 = vec4<f32>(_e265.x, _e265.y, 0f, 6f);
let _e279 = textureSampleBias(tex2D, samp, (_e270.xyz / vec3(_e270.w)).xy, 2f, vec2(5i));
c_2 = _e279;
let _e280 = coord_5;
let _e283 = textureLoad(tex2D, vec2<i32>(_e280), 3i);
c_2 = _e283;
let _e284 = coord_5;
let _e287 = textureLoad(utex2D, vec2<i32>(_e284), 3i);
c_2 = vec4<f32>(_e287);
let _e289 = coord_5;
let _e292 = textureLoad(itex2D, vec2<i32>(_e289), 3i);
c_2 = vec4<f32>(_e292);
let _e294 = coord_5;
let _e299 = textureLoad(tex2D, vec2<i32>(_e294), 3i);
c_2 = _e299;
let _e300 = coord_5;
let _e305 = textureLoad(utex2D, vec2<i32>(_e300), 3i);
c_2 = vec4<f32>(_e305);
let _e307 = coord_5;
let _e312 = textureLoad(itex2D, vec2<i32>(_e307), 3i);
c_2 = vec4<f32>(_e312);
let _e268 = textureLoad(itex2D, vec2<i32>(_e265), 3i);
c_2 = vec4<f32>(_e268);
return;
}
@@ -289,64 +289,64 @@ fn testTex2DShadow(coord_6: vec2<f32>) {
var d: f32;
coord_7 = coord_6;
let _e21 = textureDimensions(tex2DShadow, 0i);
size2DShadow = vec2<i32>(_e21);
let _e24 = textureNumLevels(tex2DShadow);
levels_3 = i32(_e24);
let _e5 = textureDimensions(tex2DShadow, 0i);
size2DShadow = vec2<i32>(_e5);
let _e8 = textureNumLevels(tex2DShadow);
levels_3 = i32(_e8);
let _e12 = coord_7;
let _e16 = vec3<f32>(_e12.x, _e12.y, 1f);
let _e19 = textureSampleCompare(tex2DShadow, sampShadow, _e16.xy, _e16.z);
d = _e19;
let _e20 = coord_7;
let _e24 = vec3<f32>(_e20.x, _e20.y, 1f);
let _e27 = textureSampleCompareLevel(tex2DShadow, sampShadow, _e24.xy, _e24.z);
d = _e27;
let _e28 = coord_7;
let _e32 = vec3<f32>(_e28.x, _e28.y, 1f);
let _e35 = textureSampleCompare(tex2DShadow, sampShadow, _e32.xy, _e32.z);
let _e35 = textureSampleCompareLevel(tex2DShadow, sampShadow, _e32.xy, _e32.z, vec2(5i));
d = _e35;
let _e36 = coord_7;
let _e40 = vec3<f32>(_e36.x, _e36.y, 1f);
let _e47 = textureSampleCompareLevel(tex2DShadow, sampShadow, _e40.xy, _e40.z);
d = _e47;
let _e48 = coord_7;
let _e52 = vec3<f32>(_e48.x, _e48.y, 1f);
let _e61 = textureSampleCompareLevel(tex2DShadow, sampShadow, _e52.xy, _e52.z, vec2(5i));
d = _e61;
let _e62 = coord_7;
let _e66 = vec3<f32>(_e62.x, _e62.y, 1f);
let _e70 = textureSampleCompareLevel(tex2DShadow, sampShadow, _e66.xy, _e66.z);
d = _e70;
let _e71 = coord_7;
let _e75 = vec3<f32>(_e71.x, _e71.y, 1f);
let _e81 = textureSampleCompareLevel(tex2DShadow, sampShadow, _e75.xy, _e75.z, vec2(5i));
d = _e81;
let _e82 = coord_7;
let _e86 = vec3<f32>(_e82.x, _e82.y, 1f);
let _e91 = textureSampleCompare(tex2DShadow, sampShadow, _e86.xy, _e86.z, vec2(5i));
d = _e91;
let _e92 = coord_7;
let _e97 = vec4<f32>(_e92.x, _e92.y, 1f, 6f);
let _e101 = (_e97.xyz / vec3(_e97.w));
let _e104 = textureSampleCompare(tex2DShadow, sampShadow, _e101.xy, _e101.z);
d = _e104;
let _e105 = coord_7;
let _e110 = vec4<f32>(_e105.x, _e105.y, 1f, 6f);
let _e118 = (_e110.xyz / vec3(_e110.w));
let _e121 = textureSampleCompareLevel(tex2DShadow, sampShadow, _e118.xy, _e118.z);
d = _e121;
let _e122 = coord_7;
let _e127 = vec4<f32>(_e122.x, _e122.y, 1f, 6f);
let _e137 = (_e127.xyz / vec3(_e127.w));
let _e140 = textureSampleCompareLevel(tex2DShadow, sampShadow, _e137.xy, _e137.z, vec2(5i));
d = _e140;
let _e141 = coord_7;
let _e146 = vec4<f32>(_e141.x, _e141.y, 1f, 6f);
let _e151 = (_e146.xyz / vec3(_e146.w));
let _e154 = textureSampleCompareLevel(tex2DShadow, sampShadow, _e151.xy, _e151.z);
d = _e154;
let _e155 = coord_7;
let _e160 = vec4<f32>(_e155.x, _e155.y, 1f, 6f);
let _e167 = (_e160.xyz / vec3(_e160.w));
let _e170 = textureSampleCompareLevel(tex2DShadow, sampShadow, _e167.xy, _e167.z, vec2(5i));
d = _e170;
let _e171 = coord_7;
let _e176 = vec4<f32>(_e171.x, _e171.y, 1f, 6f);
let _e182 = (_e176.xyz / vec3(_e176.w));
let _e185 = textureSampleCompare(tex2DShadow, sampShadow, _e182.xy, _e182.z, vec2(5i));
d = _e185;
let _e43 = textureSampleCompareLevel(tex2DShadow, sampShadow, _e40.xy, _e40.z);
d = _e43;
let _e44 = coord_7;
let _e48 = vec3<f32>(_e44.x, _e44.y, 1f);
let _e51 = textureSampleCompareLevel(tex2DShadow, sampShadow, _e48.xy, _e48.z, vec2(5i));
d = _e51;
let _e52 = coord_7;
let _e56 = vec3<f32>(_e52.x, _e52.y, 1f);
let _e59 = textureSampleCompare(tex2DShadow, sampShadow, _e56.xy, _e56.z, vec2(5i));
d = _e59;
let _e60 = coord_7;
let _e65 = vec4<f32>(_e60.x, _e60.y, 1f, 6f);
let _e69 = (_e65.xyz / vec3(_e65.w));
let _e72 = textureSampleCompare(tex2DShadow, sampShadow, _e69.xy, _e69.z);
d = _e72;
let _e73 = coord_7;
let _e78 = vec4<f32>(_e73.x, _e73.y, 1f, 6f);
let _e82 = (_e78.xyz / vec3(_e78.w));
let _e85 = textureSampleCompareLevel(tex2DShadow, sampShadow, _e82.xy, _e82.z);
d = _e85;
let _e86 = coord_7;
let _e91 = vec4<f32>(_e86.x, _e86.y, 1f, 6f);
let _e95 = (_e91.xyz / vec3(_e91.w));
let _e98 = textureSampleCompareLevel(tex2DShadow, sampShadow, _e95.xy, _e95.z, vec2(5i));
d = _e98;
let _e99 = coord_7;
let _e104 = vec4<f32>(_e99.x, _e99.y, 1f, 6f);
let _e108 = (_e104.xyz / vec3(_e104.w));
let _e111 = textureSampleCompareLevel(tex2DShadow, sampShadow, _e108.xy, _e108.z);
d = _e111;
let _e112 = coord_7;
let _e117 = vec4<f32>(_e112.x, _e112.y, 1f, 6f);
let _e121 = (_e117.xyz / vec3(_e117.w));
let _e124 = textureSampleCompareLevel(tex2DShadow, sampShadow, _e121.xy, _e121.z, vec2(5i));
d = _e124;
let _e125 = coord_7;
let _e130 = vec4<f32>(_e125.x, _e125.y, 1f, 6f);
let _e134 = (_e130.xyz / vec3(_e130.w));
let _e137 = textureSampleCompare(tex2DShadow, sampShadow, _e134.xy, _e134.z, vec2(5i));
d = _e137;
return;
}
@@ -357,43 +357,43 @@ fn testTex2DArray(coord_8: vec3<f32>) {
var c_3: vec4<f32>;
coord_9 = coord_8;
let _e21 = textureDimensions(tex2DArray, 0i);
let _e24 = textureNumLayers(tex2DArray);
size2DArray = vec3<i32>(vec3<u32>(_e21.x, _e21.y, _e24));
let _e28 = textureNumLevels(tex2DArray);
levels_4 = i32(_e28);
let _e32 = coord_9;
let _e36 = textureSample(tex2DArray, samp, _e32.xy, i32(_e32.z));
c_3 = _e36;
let _e37 = coord_9;
let _e42 = textureSampleBias(tex2DArray, samp, _e37.xy, i32(_e37.z), 2f);
c_3 = _e42;
let _e43 = coord_9;
let _e51 = textureSampleGrad(tex2DArray, samp, _e43.xy, i32(_e43.z), vec2(4f), vec2(4f));
c_3 = _e51;
let _e52 = coord_9;
let _e62 = textureSampleGrad(tex2DArray, samp, _e52.xy, i32(_e52.z), vec2(4f), vec2(4f), vec2(5i));
c_3 = _e62;
let _e63 = coord_9;
let _e68 = textureSampleLevel(tex2DArray, samp, _e63.xy, i32(_e63.z), 3f);
c_3 = _e68;
let _e69 = coord_9;
let _e76 = textureSampleLevel(tex2DArray, samp, _e69.xy, i32(_e69.z), 3f, vec2(5i));
c_3 = _e76;
let _e77 = coord_9;
let _e83 = textureSample(tex2DArray, samp, _e77.xy, i32(_e77.z), vec2(5i));
c_3 = _e83;
let _e84 = coord_9;
let _e91 = textureSampleBias(tex2DArray, samp, _e84.xy, i32(_e84.z), 2f, vec2(5i));
c_3 = _e91;
let _e92 = coord_9;
let _e93 = vec3<i32>(_e92);
let _e97 = textureLoad(tex2DArray, _e93.xy, _e93.z, 3i);
c_3 = _e97;
let _e98 = coord_9;
let _e99 = vec3<i32>(_e98);
let _e105 = textureLoad(tex2DArray, _e99.xy, _e99.z, 3i);
c_3 = _e105;
let _e5 = textureDimensions(tex2DArray, 0i);
let _e8 = textureNumLayers(tex2DArray);
size2DArray = vec3<i32>(vec3<u32>(_e5.x, _e5.y, _e8));
let _e12 = textureNumLevels(tex2DArray);
levels_4 = i32(_e12);
let _e16 = coord_9;
let _e20 = textureSample(tex2DArray, samp, _e16.xy, i32(_e16.z));
c_3 = _e20;
let _e21 = coord_9;
let _e26 = textureSampleBias(tex2DArray, samp, _e21.xy, i32(_e21.z), 2f);
c_3 = _e26;
let _e27 = coord_9;
let _e35 = textureSampleGrad(tex2DArray, samp, _e27.xy, i32(_e27.z), vec2(4f), vec2(4f));
c_3 = _e35;
let _e36 = coord_9;
let _e44 = textureSampleGrad(tex2DArray, samp, _e36.xy, i32(_e36.z), vec2(4f), vec2(4f), vec2(5i));
c_3 = _e44;
let _e45 = coord_9;
let _e50 = textureSampleLevel(tex2DArray, samp, _e45.xy, i32(_e45.z), 3f);
c_3 = _e50;
let _e51 = coord_9;
let _e56 = textureSampleLevel(tex2DArray, samp, _e51.xy, i32(_e51.z), 3f, vec2(5i));
c_3 = _e56;
let _e57 = coord_9;
let _e61 = textureSample(tex2DArray, samp, _e57.xy, i32(_e57.z), vec2(5i));
c_3 = _e61;
let _e62 = coord_9;
let _e67 = textureSampleBias(tex2DArray, samp, _e62.xy, i32(_e62.z), 2f, vec2(5i));
c_3 = _e67;
let _e68 = coord_9;
let _e69 = vec3<i32>(_e68);
let _e73 = textureLoad(tex2DArray, _e69.xy, _e69.z, 3i);
c_3 = _e73;
let _e74 = coord_9;
let _e75 = vec3<i32>(_e74);
let _e79 = textureLoad(tex2DArray, _e75.xy, _e75.z, 3i);
c_3 = _e79;
return;
}
@@ -404,27 +404,27 @@ fn testTex2DArrayShadow(coord_10: vec3<f32>) {
var d_1: f32;
coord_11 = coord_10;
let _e21 = textureDimensions(tex2DArrayShadow, 0i);
let _e24 = textureNumLayers(tex2DArrayShadow);
size2DArrayShadow = vec3<i32>(vec3<u32>(_e21.x, _e21.y, _e24));
let _e28 = textureNumLevels(tex2DArrayShadow);
levels_5 = i32(_e28);
let _e32 = coord_11;
let _e37 = vec4<f32>(_e32.x, _e32.y, _e32.z, 1f);
let _e42 = textureSampleCompare(tex2DArrayShadow, sampShadow, _e37.xy, i32(_e37.z), _e37.w);
d_1 = _e42;
let _e43 = coord_11;
let _e48 = vec4<f32>(_e43.x, _e43.y, _e43.z, 1f);
let _e57 = textureSampleCompareLevel(tex2DArrayShadow, sampShadow, _e48.xy, i32(_e48.z), _e48.w);
d_1 = _e57;
let _e58 = coord_11;
let _e63 = vec4<f32>(_e58.x, _e58.y, _e58.z, 1f);
let _e74 = textureSampleCompareLevel(tex2DArrayShadow, sampShadow, _e63.xy, i32(_e63.z), _e63.w, vec2(5i));
d_1 = _e74;
let _e75 = coord_11;
let _e80 = vec4<f32>(_e75.x, _e75.y, _e75.z, 1f);
let _e87 = textureSampleCompare(tex2DArrayShadow, sampShadow, _e80.xy, i32(_e80.z), _e80.w, vec2(5i));
d_1 = _e87;
let _e5 = textureDimensions(tex2DArrayShadow, 0i);
let _e8 = textureNumLayers(tex2DArrayShadow);
size2DArrayShadow = vec3<i32>(vec3<u32>(_e5.x, _e5.y, _e8));
let _e12 = textureNumLevels(tex2DArrayShadow);
levels_5 = i32(_e12);
let _e16 = coord_11;
let _e21 = vec4<f32>(_e16.x, _e16.y, _e16.z, 1f);
let _e26 = textureSampleCompare(tex2DArrayShadow, sampShadow, _e21.xy, i32(_e21.z), _e21.w);
d_1 = _e26;
let _e27 = coord_11;
let _e32 = vec4<f32>(_e27.x, _e27.y, _e27.z, 1f);
let _e37 = textureSampleCompareLevel(tex2DArrayShadow, sampShadow, _e32.xy, i32(_e32.z), _e32.w);
d_1 = _e37;
let _e38 = coord_11;
let _e43 = vec4<f32>(_e38.x, _e38.y, _e38.z, 1f);
let _e48 = textureSampleCompareLevel(tex2DArrayShadow, sampShadow, _e43.xy, i32(_e43.z), _e43.w, vec2(5i));
d_1 = _e48;
let _e49 = coord_11;
let _e54 = vec4<f32>(_e49.x, _e49.y, _e49.z, 1f);
let _e59 = textureSampleCompare(tex2DArrayShadow, sampShadow, _e54.xy, i32(_e54.z), _e54.w, vec2(5i));
d_1 = _e59;
return;
}
@@ -435,22 +435,22 @@ fn testTexCube(coord_12: vec3<f32>) {
var c_4: vec4<f32>;
coord_13 = coord_12;
let _e21 = textureDimensions(texCube, 0i);
sizeCube = vec2<i32>(_e21);
let _e24 = textureNumLevels(texCube);
levels_6 = i32(_e24);
let _e28 = coord_13;
let _e29 = textureSample(texCube, samp, _e28);
c_4 = _e29;
let _e30 = coord_13;
let _e32 = textureSampleBias(texCube, samp, _e30, 2f);
c_4 = _e32;
let _e33 = coord_13;
let _e38 = textureSampleGrad(texCube, samp, _e33, vec3(4f), vec3(4f));
c_4 = _e38;
let _e39 = coord_13;
let _e41 = textureSampleLevel(texCube, samp, _e39, 3f);
c_4 = _e41;
let _e5 = textureDimensions(texCube, 0i);
sizeCube = vec2<i32>(_e5);
let _e8 = textureNumLevels(texCube);
levels_6 = i32(_e8);
let _e12 = coord_13;
let _e13 = textureSample(texCube, samp, _e12);
c_4 = _e13;
let _e14 = coord_13;
let _e16 = textureSampleBias(texCube, samp, _e14, 2f);
c_4 = _e16;
let _e17 = coord_13;
let _e22 = textureSampleGrad(texCube, samp, _e17, vec3(4f), vec3(4f));
c_4 = _e22;
let _e23 = coord_13;
let _e25 = textureSampleLevel(texCube, samp, _e23, 3f);
c_4 = _e25;
return;
}
@@ -461,18 +461,18 @@ fn testTexCubeShadow(coord_14: vec3<f32>) {
var d_2: f32;
coord_15 = coord_14;
let _e21 = textureDimensions(texCubeShadow, 0i);
sizeCubeShadow = vec2<i32>(_e21);
let _e24 = textureNumLevels(texCubeShadow);
levels_7 = i32(_e24);
let _e28 = coord_15;
let _e33 = vec4<f32>(_e28.x, _e28.y, _e28.z, 1f);
let _e36 = textureSampleCompare(texCubeShadow, sampShadow, _e33.xyz, _e33.w);
d_2 = _e36;
let _e37 = coord_15;
let _e42 = vec4<f32>(_e37.x, _e37.y, _e37.z, 1f);
let _e49 = textureSampleCompareLevel(texCubeShadow, sampShadow, _e42.xyz, _e42.w);
d_2 = _e49;
let _e5 = textureDimensions(texCubeShadow, 0i);
sizeCubeShadow = vec2<i32>(_e5);
let _e8 = textureNumLevels(texCubeShadow);
levels_7 = i32(_e8);
let _e12 = coord_15;
let _e17 = vec4<f32>(_e12.x, _e12.y, _e12.z, 1f);
let _e20 = textureSampleCompare(texCubeShadow, sampShadow, _e17.xyz, _e17.w);
d_2 = _e20;
let _e21 = coord_15;
let _e26 = vec4<f32>(_e21.x, _e21.y, _e21.z, 1f);
let _e29 = textureSampleCompareLevel(texCubeShadow, sampShadow, _e26.xyz, _e26.w);
d_2 = _e29;
return;
}
@@ -483,23 +483,23 @@ fn testTexCubeArray(coord_16: vec4<f32>) {
var c_5: vec4<f32>;
coord_17 = coord_16;
let _e21 = textureDimensions(texCubeArray, 0i);
let _e24 = textureNumLayers(texCubeArray);
sizeCubeArray = vec3<i32>(vec3<u32>(_e21.x, _e21.y, _e24));
let _e28 = textureNumLevels(texCubeArray);
levels_8 = i32(_e28);
let _e32 = coord_17;
let _e36 = textureSample(texCubeArray, samp, _e32.xyz, i32(_e32.w));
c_5 = _e36;
let _e37 = coord_17;
let _e42 = textureSampleBias(texCubeArray, samp, _e37.xyz, i32(_e37.w), 2f);
c_5 = _e42;
let _e43 = coord_17;
let _e51 = textureSampleGrad(texCubeArray, samp, _e43.xyz, i32(_e43.w), vec3(4f), vec3(4f));
c_5 = _e51;
let _e52 = coord_17;
let _e57 = textureSampleLevel(texCubeArray, samp, _e52.xyz, i32(_e52.w), 3f);
c_5 = _e57;
let _e5 = textureDimensions(texCubeArray, 0i);
let _e8 = textureNumLayers(texCubeArray);
sizeCubeArray = vec3<i32>(vec3<u32>(_e5.x, _e5.y, _e8));
let _e12 = textureNumLevels(texCubeArray);
levels_8 = i32(_e12);
let _e16 = coord_17;
let _e20 = textureSample(texCubeArray, samp, _e16.xyz, i32(_e16.w));
c_5 = _e20;
let _e21 = coord_17;
let _e26 = textureSampleBias(texCubeArray, samp, _e21.xyz, i32(_e21.w), 2f);
c_5 = _e26;
let _e27 = coord_17;
let _e35 = textureSampleGrad(texCubeArray, samp, _e27.xyz, i32(_e27.w), vec3(4f), vec3(4f));
c_5 = _e35;
let _e36 = coord_17;
let _e41 = textureSampleLevel(texCubeArray, samp, _e36.xyz, i32(_e36.w), 3f);
c_5 = _e41;
return;
}
@@ -510,14 +510,14 @@ fn testTexCubeArrayShadow(coord_18: vec4<f32>) {
var d_3: f32;
coord_19 = coord_18;
let _e21 = textureDimensions(texCubeArrayShadow, 0i);
let _e24 = textureNumLayers(texCubeArrayShadow);
sizeCubeArrayShadow = vec3<i32>(vec3<u32>(_e21.x, _e21.y, _e24));
let _e28 = textureNumLevels(texCubeArrayShadow);
levels_9 = i32(_e28);
let _e32 = coord_19;
let _e37 = textureSampleCompare(texCubeArrayShadow, sampShadow, _e32.xyz, i32(_e32.w), 1f);
d_3 = _e37;
let _e5 = textureDimensions(texCubeArrayShadow, 0i);
let _e8 = textureNumLayers(texCubeArrayShadow);
sizeCubeArrayShadow = vec3<i32>(vec3<u32>(_e5.x, _e5.y, _e8));
let _e12 = textureNumLevels(texCubeArrayShadow);
levels_9 = i32(_e12);
let _e16 = coord_19;
let _e21 = textureSampleCompare(texCubeArrayShadow, sampShadow, _e16.xyz, i32(_e16.w), 1f);
d_3 = _e21;
return;
}
@@ -528,72 +528,72 @@ fn testTex3D(coord_20: vec3<f32>) {
var c_6: vec4<f32>;
coord_21 = coord_20;
let _e21 = textureDimensions(tex3D, 0i);
size3D = vec3<i32>(_e21);
let _e24 = textureNumLevels(tex3D);
levels_10 = i32(_e24);
let _e5 = textureDimensions(tex3D, 0i);
size3D = vec3<i32>(_e5);
let _e8 = textureNumLevels(tex3D);
levels_10 = i32(_e8);
let _e12 = coord_21;
let _e13 = textureSample(tex3D, samp, _e12);
c_6 = _e13;
let _e14 = coord_21;
let _e16 = textureSampleBias(tex3D, samp, _e14, 2f);
c_6 = _e16;
let _e17 = coord_21;
let _e22 = vec4<f32>(_e17.x, _e17.y, _e17.z, 6f);
let _e27 = textureSample(tex3D, samp, (_e22.xyz / vec3(_e22.w)));
c_6 = _e27;
let _e28 = coord_21;
let _e29 = textureSample(tex3D, samp, _e28);
c_6 = _e29;
let _e30 = coord_21;
let _e32 = textureSampleBias(tex3D, samp, _e30, 2f);
c_6 = _e32;
let _e33 = coord_21;
let _e38 = vec4<f32>(_e33.x, _e33.y, _e33.z, 6f);
let _e43 = textureSample(tex3D, samp, (_e38.xyz / vec3(_e38.w)));
c_6 = _e43;
let _e44 = coord_21;
let _e49 = vec4<f32>(_e44.x, _e44.y, _e44.z, 6f);
let _e55 = textureSampleBias(tex3D, samp, (_e49.xyz / vec3(_e49.w)), 2f);
c_6 = _e55;
let _e56 = coord_21;
let _e61 = vec4<f32>(_e56.x, _e56.y, _e56.z, 6f);
let _e68 = textureSample(tex3D, samp, (_e61.xyz / vec3(_e61.w)), vec3(5i));
c_6 = _e68;
let _e69 = coord_21;
let _e74 = vec4<f32>(_e69.x, _e69.y, _e69.z, 6f);
let _e82 = textureSampleBias(tex3D, samp, (_e74.xyz / vec3(_e74.w)), 2f, vec3(5i));
c_6 = _e82;
let _e83 = coord_21;
let _e88 = vec4<f32>(_e83.x, _e83.y, _e83.z, 6f);
let _e94 = textureSampleLevel(tex3D, samp, (_e88.xyz / vec3(_e88.w)), 3f);
c_6 = _e94;
let _e95 = coord_21;
let _e100 = vec4<f32>(_e95.x, _e95.y, _e95.z, 6f);
let _e108 = textureSampleLevel(tex3D, samp, (_e100.xyz / vec3(_e100.w)), 3f, vec3(5i));
c_6 = _e108;
let _e109 = coord_21;
let _e114 = vec4<f32>(_e109.x, _e109.y, _e109.z, 6f);
let _e123 = textureSampleGrad(tex3D, samp, (_e114.xyz / vec3(_e114.w)), vec3(4f), vec3(4f));
c_6 = _e123;
let _e124 = coord_21;
let _e129 = vec4<f32>(_e124.x, _e124.y, _e124.z, 6f);
let _e140 = textureSampleGrad(tex3D, samp, (_e129.xyz / vec3(_e129.w)), vec3(4f), vec3(4f), vec3(5i));
c_6 = _e140;
let _e141 = coord_21;
let _e146 = textureSampleGrad(tex3D, samp, _e141, vec3(4f), vec3(4f));
c_6 = _e146;
let _e147 = coord_21;
let _e154 = textureSampleGrad(tex3D, samp, _e147, vec3(4f), vec3(4f), vec3(5i));
c_6 = _e154;
let _e155 = coord_21;
let _e157 = textureSampleLevel(tex3D, samp, _e155, 3f);
c_6 = _e157;
let _e158 = coord_21;
let _e162 = textureSampleLevel(tex3D, samp, _e158, 3f, vec3(5i));
c_6 = _e162;
let _e163 = coord_21;
let _e166 = textureSample(tex3D, samp, _e163, vec3(5i));
c_6 = _e166;
let _e167 = coord_21;
let _e171 = textureSampleBias(tex3D, samp, _e167, 2f, vec3(5i));
c_6 = _e171;
let _e172 = coord_21;
let _e175 = textureLoad(tex3D, vec3<i32>(_e172), 3i);
c_6 = _e175;
let _e176 = coord_21;
let _e181 = textureLoad(tex3D, vec3<i32>(_e176), 3i);
c_6 = _e181;
let _e33 = vec4<f32>(_e28.x, _e28.y, _e28.z, 6f);
let _e39 = textureSampleBias(tex3D, samp, (_e33.xyz / vec3(_e33.w)), 2f);
c_6 = _e39;
let _e40 = coord_21;
let _e45 = vec4<f32>(_e40.x, _e40.y, _e40.z, 6f);
let _e50 = textureSample(tex3D, samp, (_e45.xyz / vec3(_e45.w)), vec3(5i));
c_6 = _e50;
let _e51 = coord_21;
let _e56 = vec4<f32>(_e51.x, _e51.y, _e51.z, 6f);
let _e62 = textureSampleBias(tex3D, samp, (_e56.xyz / vec3(_e56.w)), 2f, vec3(5i));
c_6 = _e62;
let _e63 = coord_21;
let _e68 = vec4<f32>(_e63.x, _e63.y, _e63.z, 6f);
let _e74 = textureSampleLevel(tex3D, samp, (_e68.xyz / vec3(_e68.w)), 3f);
c_6 = _e74;
let _e75 = coord_21;
let _e80 = vec4<f32>(_e75.x, _e75.y, _e75.z, 6f);
let _e86 = textureSampleLevel(tex3D, samp, (_e80.xyz / vec3(_e80.w)), 3f, vec3(5i));
c_6 = _e86;
let _e87 = coord_21;
let _e92 = vec4<f32>(_e87.x, _e87.y, _e87.z, 6f);
let _e101 = textureSampleGrad(tex3D, samp, (_e92.xyz / vec3(_e92.w)), vec3(4f), vec3(4f));
c_6 = _e101;
let _e102 = coord_21;
let _e107 = vec4<f32>(_e102.x, _e102.y, _e102.z, 6f);
let _e116 = textureSampleGrad(tex3D, samp, (_e107.xyz / vec3(_e107.w)), vec3(4f), vec3(4f), vec3(5i));
c_6 = _e116;
let _e117 = coord_21;
let _e122 = textureSampleGrad(tex3D, samp, _e117, vec3(4f), vec3(4f));
c_6 = _e122;
let _e123 = coord_21;
let _e128 = textureSampleGrad(tex3D, samp, _e123, vec3(4f), vec3(4f), vec3(5i));
c_6 = _e128;
let _e129 = coord_21;
let _e131 = textureSampleLevel(tex3D, samp, _e129, 3f);
c_6 = _e131;
let _e132 = coord_21;
let _e134 = textureSampleLevel(tex3D, samp, _e132, 3f, vec3(5i));
c_6 = _e134;
let _e135 = coord_21;
let _e136 = textureSample(tex3D, samp, _e135, vec3(5i));
c_6 = _e136;
let _e137 = coord_21;
let _e139 = textureSampleBias(tex3D, samp, _e137, 2f, vec3(5i));
c_6 = _e139;
let _e140 = coord_21;
let _e143 = textureLoad(tex3D, vec3<i32>(_e140), 3i);
c_6 = _e143;
let _e144 = coord_21;
let _e147 = textureLoad(tex3D, vec3<i32>(_e144), 3i);
c_6 = _e147;
return;
}
@@ -603,11 +603,11 @@ fn testTex2DMS(coord_22: vec2<f32>) {
var c_7: vec4<f32>;
coord_23 = coord_22;
let _e20 = textureDimensions(tex2DMS);
size2DMS = vec2<i32>(_e20);
let _e24 = coord_23;
let _e27 = textureLoad(tex2DMS, vec2<i32>(_e24), 3i);
c_7 = _e27;
let _e3 = textureDimensions(tex2DMS);
size2DMS = vec2<i32>(_e3);
let _e7 = coord_23;
let _e10 = textureLoad(tex2DMS, vec2<i32>(_e7), 3i);
c_7 = _e10;
return;
}
@@ -617,13 +617,13 @@ fn testTex2DMSArray(coord_24: vec3<f32>) {
var c_8: vec4<f32>;
coord_25 = coord_24;
let _e20 = textureDimensions(tex2DMSArray);
let _e23 = textureNumLayers(tex2DMSArray);
size2DMSArray = vec3<i32>(vec3<u32>(_e20.x, _e20.y, _e23));
let _e28 = coord_25;
let _e29 = vec3<i32>(_e28);
let _e33 = textureLoad(tex2DMSArray, _e29.xy, _e29.z, 3i);
c_8 = _e33;
let _e3 = textureDimensions(tex2DMSArray);
let _e6 = textureNumLayers(tex2DMSArray);
size2DMSArray = vec3<i32>(vec3<u32>(_e3.x, _e3.y, _e6));
let _e11 = coord_25;
let _e12 = vec3<i32>(_e11);
let _e16 = textureLoad(tex2DMSArray, _e12.xy, _e12.z, 3i);
c_8 = _e16;
return;
}

View File

@@ -1177,7 +1177,7 @@ fn convert_glsl_folder() {
}
let mut parser = naga::front::glsl::Frontend::default();
let module = parser
let mut module = parser
.parse(
&naga::front::glsl::Options {
stage: match file_name.extension().and_then(|s| s.to_str()).unwrap() {
@@ -1199,6 +1199,18 @@ fn convert_glsl_folder() {
.validate(&module)
.unwrap();
#[cfg(feature = "compact")]
let info = {
naga::compact::compact(&mut module);
naga::valid::Validator::new(
naga::valid::ValidationFlags::all(),
naga::valid::Capabilities::all(),
)
.validate(&module)
.unwrap()
};
#[cfg(wgsl_out)]
{
write_output_wgsl(&input, &module, &info, &WgslOutParameters::default());