[ir] Tighter ValueToLet access restrictions.
Instead of just assuming any call is a `Load, Store` this CL adds
methods into the various `MemberBuiltinCall`, `CoreBuiltinCall` and
`BuiltinCall` classes to allow the backends to specify the restrictions
for any given method. This allows more calls to be inlined by the
backends.
Bug: 379684039
Change-Id: Ifcad3a8ffc66361d3b5d57c2cd27ea3c151ca0e0
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/215354
Auto-Submit: dan sinclair <dsinclair@chromium.org>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Commit-Queue: dan sinclair <dsinclair@chromium.org>
diff --git a/test/tint/builtins/atomicStore/array/aliased_arrays.spvasm.expected.glsl b/test/tint/builtins/atomicStore/array/aliased_arrays.spvasm.expected.glsl
index e73ff10..612522e 100644
--- a/test/tint/builtins/atomicStore/array/aliased_arrays.spvasm.expected.glsl
+++ b/test/tint/builtins/atomicStore/array/aliased_arrays.spvasm.expected.glsl
@@ -3,8 +3,7 @@
uint local_invocation_index_1 = 0u;
shared uint wg[3][2][1];
uint tint_mod_u32(uint lhs, uint rhs) {
- uint v = mix(rhs, 1u, (rhs == 0u));
- return (lhs - ((lhs / v) * v));
+ return (lhs - ((lhs / mix(rhs, 1u, (rhs == 0u))) * mix(rhs, 1u, (rhs == 0u))));
}
uint tint_div_u32(uint lhs, uint rhs) {
return (lhs / mix(rhs, 1u, (rhs == 0u)));
@@ -20,10 +19,10 @@
uint x_31 = idx;
uint x_33 = idx;
uint x_35 = idx;
- uint v_1 = tint_div_u32(x_31, 2u);
- uint v_2 = tint_mod_u32(x_33, 2u);
- uint v_3 = tint_mod_u32(x_35, 1u);
- atomicExchange(wg[v_1][v_2][v_3], 0u);
+ uint v = tint_div_u32(x_31, 2u);
+ uint v_1 = tint_mod_u32(x_33, 2u);
+ uint v_2 = tint_mod_u32(x_35, 1u);
+ atomicExchange(wg[v][v_1][v_2], 0u);
{
idx = (idx + 1u);
}
@@ -39,16 +38,16 @@
}
void compute_main_inner_1(uint local_invocation_index_1_param) {
{
- uint v_4 = 0u;
- v_4 = local_invocation_index_1_param;
+ uint v_3 = 0u;
+ v_3 = local_invocation_index_1_param;
while(true) {
- uint v_5 = v_4;
- if ((v_5 >= 6u)) {
+ uint v_4 = v_3;
+ if ((v_4 >= 6u)) {
break;
}
- atomicExchange(wg[(v_5 / 2u)][(v_5 % 2u)][0u], 0u);
+ atomicExchange(wg[(v_4 / 2u)][(v_4 % 2u)][0u], 0u);
{
- v_4 = (v_5 + 1u);
+ v_3 = (v_4 + 1u);
}
continue;
}
diff --git a/test/tint/builtins/atomicStore/array/aliased_arrays.spvasm.expected.ir.msl b/test/tint/builtins/atomicStore/array/aliased_arrays.spvasm.expected.ir.msl
index e14cb85..16b6bfa 100644
--- a/test/tint/builtins/atomicStore/array/aliased_arrays.spvasm.expected.ir.msl
+++ b/test/tint/builtins/atomicStore/array/aliased_arrays.spvasm.expected.ir.msl
@@ -26,8 +26,7 @@
};
uint tint_mod_u32(uint lhs, uint rhs) {
- uint const v = select(rhs, 1u, (rhs == 0u));
- return (lhs - ((lhs / v) * v));
+ return (lhs - ((lhs / select(rhs, 1u, (rhs == 0u))) * select(rhs, 1u, (rhs == 0u))));
}
uint tint_div_u32(uint lhs, uint rhs) {
@@ -46,9 +45,9 @@
uint const x_31 = idx;
uint const x_33 = idx;
uint const x_35 = idx;
- uint const v_1 = tint_div_u32(x_31, 2u);
- uint const v_2 = tint_mod_u32(x_33, 2u);
- atomic_store_explicit((&(*tint_module_vars.wg)[v_1][v_2][tint_mod_u32(x_35, 1u)]), 0u, memory_order_relaxed);
+ uint const v = tint_div_u32(x_31, 2u);
+ uint const v_1 = tint_mod_u32(x_33, 2u);
+ atomic_store_explicit((&(*tint_module_vars.wg)[v][v_1][tint_mod_u32(x_35, 1u)]), 0u, memory_order_relaxed);
{
idx = (idx + 1u);
}
@@ -66,17 +65,17 @@
void compute_main_inner_1(uint local_invocation_index_1_param, tint_module_vars_struct tint_module_vars) {
{
- uint v_3 = 0u;
- v_3 = local_invocation_index_1_param;
+ uint v_2 = 0u;
+ v_2 = local_invocation_index_1_param;
while(true) {
TINT_ISOLATE_UB(tint_volatile_false_1)
- uint const v_4 = v_3;
- if ((v_4 >= 6u)) {
+ uint const v_3 = v_2;
+ if ((v_3 >= 6u)) {
break;
}
- atomic_store_explicit((&(*tint_module_vars.wg)[(v_4 / 2u)][(v_4 % 2u)][0u]), 0u, memory_order_relaxed);
+ atomic_store_explicit((&(*tint_module_vars.wg)[(v_3 / 2u)][(v_3 % 2u)][0u]), 0u, memory_order_relaxed);
{
- v_3 = (v_4 + 1u);
+ v_2 = (v_3 + 1u);
}
continue;
}
@@ -86,8 +85,8 @@
compute_main_1(tint_module_vars);
}
-kernel void compute_main(uint local_invocation_index_1_param [[thread_index_in_threadgroup]], threadgroup tint_symbol_1* v_5 [[threadgroup(0)]]) {
+kernel void compute_main(uint local_invocation_index_1_param [[thread_index_in_threadgroup]], threadgroup tint_symbol_1* v_4 [[threadgroup(0)]]) {
thread uint local_invocation_index_1 = 0u;
- tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.local_invocation_index_1=(&local_invocation_index_1), .wg=(&(*v_5).tint_symbol)};
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.local_invocation_index_1=(&local_invocation_index_1), .wg=(&(*v_4).tint_symbol)};
compute_main_inner_1(local_invocation_index_1_param, tint_module_vars);
}
diff --git a/test/tint/builtins/atomicStore/array/arrays.spvasm.expected.glsl b/test/tint/builtins/atomicStore/array/arrays.spvasm.expected.glsl
index e73ff10..612522e 100644
--- a/test/tint/builtins/atomicStore/array/arrays.spvasm.expected.glsl
+++ b/test/tint/builtins/atomicStore/array/arrays.spvasm.expected.glsl
@@ -3,8 +3,7 @@
uint local_invocation_index_1 = 0u;
shared uint wg[3][2][1];
uint tint_mod_u32(uint lhs, uint rhs) {
- uint v = mix(rhs, 1u, (rhs == 0u));
- return (lhs - ((lhs / v) * v));
+ return (lhs - ((lhs / mix(rhs, 1u, (rhs == 0u))) * mix(rhs, 1u, (rhs == 0u))));
}
uint tint_div_u32(uint lhs, uint rhs) {
return (lhs / mix(rhs, 1u, (rhs == 0u)));
@@ -20,10 +19,10 @@
uint x_31 = idx;
uint x_33 = idx;
uint x_35 = idx;
- uint v_1 = tint_div_u32(x_31, 2u);
- uint v_2 = tint_mod_u32(x_33, 2u);
- uint v_3 = tint_mod_u32(x_35, 1u);
- atomicExchange(wg[v_1][v_2][v_3], 0u);
+ uint v = tint_div_u32(x_31, 2u);
+ uint v_1 = tint_mod_u32(x_33, 2u);
+ uint v_2 = tint_mod_u32(x_35, 1u);
+ atomicExchange(wg[v][v_1][v_2], 0u);
{
idx = (idx + 1u);
}
@@ -39,16 +38,16 @@
}
void compute_main_inner_1(uint local_invocation_index_1_param) {
{
- uint v_4 = 0u;
- v_4 = local_invocation_index_1_param;
+ uint v_3 = 0u;
+ v_3 = local_invocation_index_1_param;
while(true) {
- uint v_5 = v_4;
- if ((v_5 >= 6u)) {
+ uint v_4 = v_3;
+ if ((v_4 >= 6u)) {
break;
}
- atomicExchange(wg[(v_5 / 2u)][(v_5 % 2u)][0u], 0u);
+ atomicExchange(wg[(v_4 / 2u)][(v_4 % 2u)][0u], 0u);
{
- v_4 = (v_5 + 1u);
+ v_3 = (v_4 + 1u);
}
continue;
}
diff --git a/test/tint/builtins/atomicStore/array/arrays.spvasm.expected.ir.msl b/test/tint/builtins/atomicStore/array/arrays.spvasm.expected.ir.msl
index e14cb85..16b6bfa 100644
--- a/test/tint/builtins/atomicStore/array/arrays.spvasm.expected.ir.msl
+++ b/test/tint/builtins/atomicStore/array/arrays.spvasm.expected.ir.msl
@@ -26,8 +26,7 @@
};
uint tint_mod_u32(uint lhs, uint rhs) {
- uint const v = select(rhs, 1u, (rhs == 0u));
- return (lhs - ((lhs / v) * v));
+ return (lhs - ((lhs / select(rhs, 1u, (rhs == 0u))) * select(rhs, 1u, (rhs == 0u))));
}
uint tint_div_u32(uint lhs, uint rhs) {
@@ -46,9 +45,9 @@
uint const x_31 = idx;
uint const x_33 = idx;
uint const x_35 = idx;
- uint const v_1 = tint_div_u32(x_31, 2u);
- uint const v_2 = tint_mod_u32(x_33, 2u);
- atomic_store_explicit((&(*tint_module_vars.wg)[v_1][v_2][tint_mod_u32(x_35, 1u)]), 0u, memory_order_relaxed);
+ uint const v = tint_div_u32(x_31, 2u);
+ uint const v_1 = tint_mod_u32(x_33, 2u);
+ atomic_store_explicit((&(*tint_module_vars.wg)[v][v_1][tint_mod_u32(x_35, 1u)]), 0u, memory_order_relaxed);
{
idx = (idx + 1u);
}
@@ -66,17 +65,17 @@
void compute_main_inner_1(uint local_invocation_index_1_param, tint_module_vars_struct tint_module_vars) {
{
- uint v_3 = 0u;
- v_3 = local_invocation_index_1_param;
+ uint v_2 = 0u;
+ v_2 = local_invocation_index_1_param;
while(true) {
TINT_ISOLATE_UB(tint_volatile_false_1)
- uint const v_4 = v_3;
- if ((v_4 >= 6u)) {
+ uint const v_3 = v_2;
+ if ((v_3 >= 6u)) {
break;
}
- atomic_store_explicit((&(*tint_module_vars.wg)[(v_4 / 2u)][(v_4 % 2u)][0u]), 0u, memory_order_relaxed);
+ atomic_store_explicit((&(*tint_module_vars.wg)[(v_3 / 2u)][(v_3 % 2u)][0u]), 0u, memory_order_relaxed);
{
- v_3 = (v_4 + 1u);
+ v_2 = (v_3 + 1u);
}
continue;
}
@@ -86,8 +85,8 @@
compute_main_1(tint_module_vars);
}
-kernel void compute_main(uint local_invocation_index_1_param [[thread_index_in_threadgroup]], threadgroup tint_symbol_1* v_5 [[threadgroup(0)]]) {
+kernel void compute_main(uint local_invocation_index_1_param [[thread_index_in_threadgroup]], threadgroup tint_symbol_1* v_4 [[threadgroup(0)]]) {
thread uint local_invocation_index_1 = 0u;
- tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.local_invocation_index_1=(&local_invocation_index_1), .wg=(&(*v_5).tint_symbol)};
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.local_invocation_index_1=(&local_invocation_index_1), .wg=(&(*v_4).tint_symbol)};
compute_main_inner_1(local_invocation_index_1_param, tint_module_vars);
}
diff --git a/test/tint/builtins/extractBits/scalar/i32.spvasm.expected.glsl b/test/tint/builtins/extractBits/scalar/i32.spvasm.expected.glsl
index 80d615a..c8c2e6b 100644
--- a/test/tint/builtins/extractBits/scalar/i32.spvasm.expected.glsl
+++ b/test/tint/builtins/extractBits/scalar/i32.spvasm.expected.glsl
@@ -5,11 +5,10 @@
uint offset_1 = 0u;
uint count = 0u;
int v_1 = v;
- uint v_2 = count;
- uint v_3 = min(offset_1, 32u);
- uint v_4 = min(v_2, (32u - v_3));
- int v_5 = int(v_3);
- int x_14 = bitfieldExtract(v_1, v_5, int(v_4));
+ uint v_2 = min(offset_1, 32u);
+ uint v_3 = min(count, (32u - v_2));
+ int v_4 = int(v_2);
+ int x_14 = bitfieldExtract(v_1, v_4, int(v_3));
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
diff --git a/test/tint/builtins/extractBits/scalar/i32.spvasm.expected.ir.dxc.hlsl b/test/tint/builtins/extractBits/scalar/i32.spvasm.expected.ir.dxc.hlsl
index 9289cb0..e337922 100644
--- a/test/tint/builtins/extractBits/scalar/i32.spvasm.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/extractBits/scalar/i32.spvasm.expected.ir.dxc.hlsl
@@ -4,11 +4,10 @@
uint offset_1 = 0u;
uint count = 0u;
int v_1 = v;
- uint v_2 = count;
- uint v_3 = min(offset_1, 32u);
- uint v_4 = (32u - min(32u, (v_3 + v_2)));
- int v_5 = (((v_4 < 32u)) ? ((v_1 << uint(v_4))) : (int(0)));
- int x_14 = ((((v_4 + v_3) < 32u)) ? ((v_5 >> uint((v_4 + v_3)))) : (((v_5 >> 31u) >> 1u)));
+ uint v_2 = min(offset_1, 32u);
+ uint v_3 = (32u - min(32u, (v_2 + count)));
+ int v_4 = (((v_3 < 32u)) ? ((v_1 << uint(v_3))) : (int(0)));
+ int x_14 = ((((v_3 + v_2) < 32u)) ? ((v_4 >> uint((v_3 + v_2)))) : (((v_4 >> 31u) >> 1u)));
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/builtins/extractBits/scalar/i32.spvasm.expected.ir.fxc.hlsl b/test/tint/builtins/extractBits/scalar/i32.spvasm.expected.ir.fxc.hlsl
index 9289cb0..e337922 100644
--- a/test/tint/builtins/extractBits/scalar/i32.spvasm.expected.ir.fxc.hlsl
+++ b/test/tint/builtins/extractBits/scalar/i32.spvasm.expected.ir.fxc.hlsl
@@ -4,11 +4,10 @@
uint offset_1 = 0u;
uint count = 0u;
int v_1 = v;
- uint v_2 = count;
- uint v_3 = min(offset_1, 32u);
- uint v_4 = (32u - min(32u, (v_3 + v_2)));
- int v_5 = (((v_4 < 32u)) ? ((v_1 << uint(v_4))) : (int(0)));
- int x_14 = ((((v_4 + v_3) < 32u)) ? ((v_5 >> uint((v_4 + v_3)))) : (((v_5 >> 31u) >> 1u)));
+ uint v_2 = min(offset_1, 32u);
+ uint v_3 = (32u - min(32u, (v_2 + count)));
+ int v_4 = (((v_3 < 32u)) ? ((v_1 << uint(v_3))) : (int(0)));
+ int x_14 = ((((v_3 + v_2) < 32u)) ? ((v_4 >> uint((v_3 + v_2)))) : (((v_4 >> 31u) >> 1u)));
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/builtins/extractBits/scalar/i32.spvasm.expected.ir.msl b/test/tint/builtins/extractBits/scalar/i32.spvasm.expected.ir.msl
index a1adec8..4117282 100644
--- a/test/tint/builtins/extractBits/scalar/i32.spvasm.expected.ir.msl
+++ b/test/tint/builtins/extractBits/scalar/i32.spvasm.expected.ir.msl
@@ -5,10 +5,8 @@
int v = 0;
uint offset_1 = 0u;
uint count = 0u;
- int const v_1 = v;
- uint const v_2 = count;
- uint const v_3 = min(offset_1, 32u);
- int const x_14 = extract_bits(v_1, v_3, min(v_2, (32u - v_3)));
+ uint const v_1 = min(offset_1, 32u);
+ int const x_14 = extract_bits(v, v_1, min(count, (32u - v_1)));
}
kernel void f() {
diff --git a/test/tint/builtins/extractBits/scalar/u32.spvasm.expected.glsl b/test/tint/builtins/extractBits/scalar/u32.spvasm.expected.glsl
index 15d41ad..7437237 100644
--- a/test/tint/builtins/extractBits/scalar/u32.spvasm.expected.glsl
+++ b/test/tint/builtins/extractBits/scalar/u32.spvasm.expected.glsl
@@ -5,11 +5,10 @@
uint offset_1 = 0u;
uint count = 0u;
uint v_1 = v;
- uint v_2 = count;
- uint v_3 = min(offset_1, 32u);
- uint v_4 = min(v_2, (32u - v_3));
- int v_5 = int(v_3);
- uint x_11 = bitfieldExtract(v_1, v_5, int(v_4));
+ uint v_2 = min(offset_1, 32u);
+ uint v_3 = min(count, (32u - v_2));
+ int v_4 = int(v_2);
+ uint x_11 = bitfieldExtract(v_1, v_4, int(v_3));
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
diff --git a/test/tint/builtins/extractBits/scalar/u32.spvasm.expected.ir.dxc.hlsl b/test/tint/builtins/extractBits/scalar/u32.spvasm.expected.ir.dxc.hlsl
index accacc2..29dab62 100644
--- a/test/tint/builtins/extractBits/scalar/u32.spvasm.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/extractBits/scalar/u32.spvasm.expected.ir.dxc.hlsl
@@ -4,11 +4,10 @@
uint offset_1 = 0u;
uint count = 0u;
uint v_1 = v;
- uint v_2 = count;
- uint v_3 = min(offset_1, 32u);
- uint v_4 = (32u - min(32u, (v_3 + v_2)));
- uint v_5 = (((v_4 < 32u)) ? ((v_1 << uint(v_4))) : (0u));
- uint x_11 = ((((v_4 + v_3) < 32u)) ? ((v_5 >> uint((v_4 + v_3)))) : (((v_5 >> 31u) >> 1u)));
+ uint v_2 = min(offset_1, 32u);
+ uint v_3 = (32u - min(32u, (v_2 + count)));
+ uint v_4 = (((v_3 < 32u)) ? ((v_1 << uint(v_3))) : (0u));
+ uint x_11 = ((((v_3 + v_2) < 32u)) ? ((v_4 >> uint((v_3 + v_2)))) : (((v_4 >> 31u) >> 1u)));
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/builtins/extractBits/scalar/u32.spvasm.expected.ir.fxc.hlsl b/test/tint/builtins/extractBits/scalar/u32.spvasm.expected.ir.fxc.hlsl
index accacc2..29dab62 100644
--- a/test/tint/builtins/extractBits/scalar/u32.spvasm.expected.ir.fxc.hlsl
+++ b/test/tint/builtins/extractBits/scalar/u32.spvasm.expected.ir.fxc.hlsl
@@ -4,11 +4,10 @@
uint offset_1 = 0u;
uint count = 0u;
uint v_1 = v;
- uint v_2 = count;
- uint v_3 = min(offset_1, 32u);
- uint v_4 = (32u - min(32u, (v_3 + v_2)));
- uint v_5 = (((v_4 < 32u)) ? ((v_1 << uint(v_4))) : (0u));
- uint x_11 = ((((v_4 + v_3) < 32u)) ? ((v_5 >> uint((v_4 + v_3)))) : (((v_5 >> 31u) >> 1u)));
+ uint v_2 = min(offset_1, 32u);
+ uint v_3 = (32u - min(32u, (v_2 + count)));
+ uint v_4 = (((v_3 < 32u)) ? ((v_1 << uint(v_3))) : (0u));
+ uint x_11 = ((((v_3 + v_2) < 32u)) ? ((v_4 >> uint((v_3 + v_2)))) : (((v_4 >> 31u) >> 1u)));
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/builtins/extractBits/scalar/u32.spvasm.expected.ir.msl b/test/tint/builtins/extractBits/scalar/u32.spvasm.expected.ir.msl
index af4ff10..a5aac2e 100644
--- a/test/tint/builtins/extractBits/scalar/u32.spvasm.expected.ir.msl
+++ b/test/tint/builtins/extractBits/scalar/u32.spvasm.expected.ir.msl
@@ -5,10 +5,8 @@
uint v = 0u;
uint offset_1 = 0u;
uint count = 0u;
- uint const v_1 = v;
- uint const v_2 = count;
- uint const v_3 = min(offset_1, 32u);
- uint const x_11 = extract_bits(v_1, v_3, min(v_2, (32u - v_3)));
+ uint const v_1 = min(offset_1, 32u);
+ uint const x_11 = extract_bits(v, v_1, min(count, (32u - v_1)));
}
kernel void f() {
diff --git a/test/tint/builtins/extractBits/vec3/i32.spvasm.expected.glsl b/test/tint/builtins/extractBits/vec3/i32.spvasm.expected.glsl
index 8f7de87..01efa3f 100644
--- a/test/tint/builtins/extractBits/vec3/i32.spvasm.expected.glsl
+++ b/test/tint/builtins/extractBits/vec3/i32.spvasm.expected.glsl
@@ -5,11 +5,10 @@
uint offset_1 = 0u;
uint count = 0u;
ivec3 v_1 = v;
- uint v_2 = count;
- uint v_3 = min(offset_1, 32u);
- uint v_4 = min(v_2, (32u - v_3));
- int v_5 = int(v_3);
- ivec3 x_15 = bitfieldExtract(v_1, v_5, int(v_4));
+ uint v_2 = min(offset_1, 32u);
+ uint v_3 = min(count, (32u - v_2));
+ int v_4 = int(v_2);
+ ivec3 x_15 = bitfieldExtract(v_1, v_4, int(v_3));
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
diff --git a/test/tint/builtins/extractBits/vec3/i32.spvasm.expected.ir.dxc.hlsl b/test/tint/builtins/extractBits/vec3/i32.spvasm.expected.ir.dxc.hlsl
index 0ab0a97..25ecf9b 100644
--- a/test/tint/builtins/extractBits/vec3/i32.spvasm.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/extractBits/vec3/i32.spvasm.expected.ir.dxc.hlsl
@@ -4,11 +4,10 @@
uint offset_1 = 0u;
uint count = 0u;
int3 v_1 = v;
- uint v_2 = count;
- uint v_3 = min(offset_1, 32u);
- uint v_4 = (32u - min(32u, (v_3 + v_2)));
- int3 v_5 = (((v_4 < 32u)) ? ((v_1 << uint3((v_4).xxx))) : ((int(0)).xxx));
- int3 x_15 = ((((v_4 + v_3) < 32u)) ? ((v_5 >> uint3(((v_4 + v_3)).xxx))) : (((v_5 >> (31u).xxx) >> (1u).xxx)));
+ uint v_2 = min(offset_1, 32u);
+ uint v_3 = (32u - min(32u, (v_2 + count)));
+ int3 v_4 = (((v_3 < 32u)) ? ((v_1 << uint3((v_3).xxx))) : ((int(0)).xxx));
+ int3 x_15 = ((((v_3 + v_2) < 32u)) ? ((v_4 >> uint3(((v_3 + v_2)).xxx))) : (((v_4 >> (31u).xxx) >> (1u).xxx)));
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/builtins/extractBits/vec3/i32.spvasm.expected.ir.fxc.hlsl b/test/tint/builtins/extractBits/vec3/i32.spvasm.expected.ir.fxc.hlsl
index 0ab0a97..25ecf9b 100644
--- a/test/tint/builtins/extractBits/vec3/i32.spvasm.expected.ir.fxc.hlsl
+++ b/test/tint/builtins/extractBits/vec3/i32.spvasm.expected.ir.fxc.hlsl
@@ -4,11 +4,10 @@
uint offset_1 = 0u;
uint count = 0u;
int3 v_1 = v;
- uint v_2 = count;
- uint v_3 = min(offset_1, 32u);
- uint v_4 = (32u - min(32u, (v_3 + v_2)));
- int3 v_5 = (((v_4 < 32u)) ? ((v_1 << uint3((v_4).xxx))) : ((int(0)).xxx));
- int3 x_15 = ((((v_4 + v_3) < 32u)) ? ((v_5 >> uint3(((v_4 + v_3)).xxx))) : (((v_5 >> (31u).xxx) >> (1u).xxx)));
+ uint v_2 = min(offset_1, 32u);
+ uint v_3 = (32u - min(32u, (v_2 + count)));
+ int3 v_4 = (((v_3 < 32u)) ? ((v_1 << uint3((v_3).xxx))) : ((int(0)).xxx));
+ int3 x_15 = ((((v_3 + v_2) < 32u)) ? ((v_4 >> uint3(((v_3 + v_2)).xxx))) : (((v_4 >> (31u).xxx) >> (1u).xxx)));
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/builtins/extractBits/vec3/i32.spvasm.expected.ir.msl b/test/tint/builtins/extractBits/vec3/i32.spvasm.expected.ir.msl
index 82a103a..545b0b7 100644
--- a/test/tint/builtins/extractBits/vec3/i32.spvasm.expected.ir.msl
+++ b/test/tint/builtins/extractBits/vec3/i32.spvasm.expected.ir.msl
@@ -5,10 +5,8 @@
int3 v = int3(0);
uint offset_1 = 0u;
uint count = 0u;
- int3 const v_1 = v;
- uint const v_2 = count;
- uint const v_3 = min(offset_1, 32u);
- int3 const x_15 = extract_bits(v_1, v_3, min(v_2, (32u - v_3)));
+ uint const v_1 = min(offset_1, 32u);
+ int3 const x_15 = extract_bits(v, v_1, min(count, (32u - v_1)));
}
kernel void f() {
diff --git a/test/tint/builtins/extractBits/vec3/u32.spvasm.expected.glsl b/test/tint/builtins/extractBits/vec3/u32.spvasm.expected.glsl
index d8d5c5d..ffdc93a 100644
--- a/test/tint/builtins/extractBits/vec3/u32.spvasm.expected.glsl
+++ b/test/tint/builtins/extractBits/vec3/u32.spvasm.expected.glsl
@@ -5,11 +5,10 @@
uint offset_1 = 0u;
uint count = 0u;
uvec3 v_1 = v;
- uint v_2 = count;
- uint v_3 = min(offset_1, 32u);
- uint v_4 = min(v_2, (32u - v_3));
- int v_5 = int(v_3);
- uvec3 x_14 = bitfieldExtract(v_1, v_5, int(v_4));
+ uint v_2 = min(offset_1, 32u);
+ uint v_3 = min(count, (32u - v_2));
+ int v_4 = int(v_2);
+ uvec3 x_14 = bitfieldExtract(v_1, v_4, int(v_3));
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
diff --git a/test/tint/builtins/extractBits/vec3/u32.spvasm.expected.ir.dxc.hlsl b/test/tint/builtins/extractBits/vec3/u32.spvasm.expected.ir.dxc.hlsl
index d5f82b0..e6db29b 100644
--- a/test/tint/builtins/extractBits/vec3/u32.spvasm.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/extractBits/vec3/u32.spvasm.expected.ir.dxc.hlsl
@@ -4,11 +4,10 @@
uint offset_1 = 0u;
uint count = 0u;
uint3 v_1 = v;
- uint v_2 = count;
- uint v_3 = min(offset_1, 32u);
- uint v_4 = (32u - min(32u, (v_3 + v_2)));
- uint3 v_5 = (((v_4 < 32u)) ? ((v_1 << uint3((v_4).xxx))) : ((0u).xxx));
- uint3 x_14 = ((((v_4 + v_3) < 32u)) ? ((v_5 >> uint3(((v_4 + v_3)).xxx))) : (((v_5 >> (31u).xxx) >> (1u).xxx)));
+ uint v_2 = min(offset_1, 32u);
+ uint v_3 = (32u - min(32u, (v_2 + count)));
+ uint3 v_4 = (((v_3 < 32u)) ? ((v_1 << uint3((v_3).xxx))) : ((0u).xxx));
+ uint3 x_14 = ((((v_3 + v_2) < 32u)) ? ((v_4 >> uint3(((v_3 + v_2)).xxx))) : (((v_4 >> (31u).xxx) >> (1u).xxx)));
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/builtins/extractBits/vec3/u32.spvasm.expected.ir.fxc.hlsl b/test/tint/builtins/extractBits/vec3/u32.spvasm.expected.ir.fxc.hlsl
index d5f82b0..e6db29b 100644
--- a/test/tint/builtins/extractBits/vec3/u32.spvasm.expected.ir.fxc.hlsl
+++ b/test/tint/builtins/extractBits/vec3/u32.spvasm.expected.ir.fxc.hlsl
@@ -4,11 +4,10 @@
uint offset_1 = 0u;
uint count = 0u;
uint3 v_1 = v;
- uint v_2 = count;
- uint v_3 = min(offset_1, 32u);
- uint v_4 = (32u - min(32u, (v_3 + v_2)));
- uint3 v_5 = (((v_4 < 32u)) ? ((v_1 << uint3((v_4).xxx))) : ((0u).xxx));
- uint3 x_14 = ((((v_4 + v_3) < 32u)) ? ((v_5 >> uint3(((v_4 + v_3)).xxx))) : (((v_5 >> (31u).xxx) >> (1u).xxx)));
+ uint v_2 = min(offset_1, 32u);
+ uint v_3 = (32u - min(32u, (v_2 + count)));
+ uint3 v_4 = (((v_3 < 32u)) ? ((v_1 << uint3((v_3).xxx))) : ((0u).xxx));
+ uint3 x_14 = ((((v_3 + v_2) < 32u)) ? ((v_4 >> uint3(((v_3 + v_2)).xxx))) : (((v_4 >> (31u).xxx) >> (1u).xxx)));
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/builtins/extractBits/vec3/u32.spvasm.expected.ir.msl b/test/tint/builtins/extractBits/vec3/u32.spvasm.expected.ir.msl
index a81cb33..a43886d 100644
--- a/test/tint/builtins/extractBits/vec3/u32.spvasm.expected.ir.msl
+++ b/test/tint/builtins/extractBits/vec3/u32.spvasm.expected.ir.msl
@@ -5,10 +5,8 @@
uint3 v = uint3(0u);
uint offset_1 = 0u;
uint count = 0u;
- uint3 const v_1 = v;
- uint const v_2 = count;
- uint const v_3 = min(offset_1, 32u);
- uint3 const x_14 = extract_bits(v_1, v_3, min(v_2, (32u - v_3)));
+ uint const v_1 = min(offset_1, 32u);
+ uint3 const x_14 = extract_bits(v, v_1, min(count, (32u - v_1)));
}
kernel void f() {
diff --git a/test/tint/builtins/gen/literal/fwidthFine/523fdc.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/gen/literal/fwidthFine/523fdc.wgsl.expected.ir.dxc.hlsl
index 08e343b..00200a1 100644
--- a/test/tint/builtins/gen/literal/fwidthFine/523fdc.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/gen/literal/fwidthFine/523fdc.wgsl.expected.ir.dxc.hlsl
@@ -2,9 +2,7 @@
RWByteAddressBuffer prevent_dce : register(u0);
float3 fwidthFine_523fdc() {
float3 v = ddx_fine((1.0f).xxx);
- float3 v_1 = ddy_fine((1.0f).xxx);
- float3 v_2 = abs(v);
- float3 res = (v_2 + abs(v_1));
+ float3 res = (abs(v) + abs(ddy_fine((1.0f).xxx)));
return res;
}
diff --git a/test/tint/builtins/gen/literal/fwidthFine/523fdc.wgsl.expected.ir.fxc.hlsl b/test/tint/builtins/gen/literal/fwidthFine/523fdc.wgsl.expected.ir.fxc.hlsl
index 08e343b..00200a1 100644
--- a/test/tint/builtins/gen/literal/fwidthFine/523fdc.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/fwidthFine/523fdc.wgsl.expected.ir.fxc.hlsl
@@ -2,9 +2,7 @@
RWByteAddressBuffer prevent_dce : register(u0);
float3 fwidthFine_523fdc() {
float3 v = ddx_fine((1.0f).xxx);
- float3 v_1 = ddy_fine((1.0f).xxx);
- float3 v_2 = abs(v);
- float3 res = (v_2 + abs(v_1));
+ float3 res = (abs(v) + abs(ddy_fine((1.0f).xxx)));
return res;
}
diff --git a/test/tint/builtins/gen/literal/fwidthFine/523fdc.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/fwidthFine/523fdc.wgsl.expected.ir.msl
index 95de91b..e152f31 100644
--- a/test/tint/builtins/gen/literal/fwidthFine/523fdc.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/fwidthFine/523fdc.wgsl.expected.ir.msl
@@ -7,9 +7,7 @@
float3 fwidthFine_523fdc() {
float3 const v = dfdx(float3(1.0f));
- float3 const v_1 = dfdy(float3(1.0f));
- float3 const v_2 = abs(v);
- float3 res = (v_2 + abs(v_1));
+ float3 res = (abs(v) + abs(dfdy(float3(1.0f))));
return res;
}
diff --git a/test/tint/builtins/gen/literal/fwidthFine/68f4ef.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/gen/literal/fwidthFine/68f4ef.wgsl.expected.ir.dxc.hlsl
index ae515d1..02cdad0 100644
--- a/test/tint/builtins/gen/literal/fwidthFine/68f4ef.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/gen/literal/fwidthFine/68f4ef.wgsl.expected.ir.dxc.hlsl
@@ -2,9 +2,7 @@
RWByteAddressBuffer prevent_dce : register(u0);
float4 fwidthFine_68f4ef() {
float4 v = ddx_fine((1.0f).xxxx);
- float4 v_1 = ddy_fine((1.0f).xxxx);
- float4 v_2 = abs(v);
- float4 res = (v_2 + abs(v_1));
+ float4 res = (abs(v) + abs(ddy_fine((1.0f).xxxx)));
return res;
}
diff --git a/test/tint/builtins/gen/literal/fwidthFine/68f4ef.wgsl.expected.ir.fxc.hlsl b/test/tint/builtins/gen/literal/fwidthFine/68f4ef.wgsl.expected.ir.fxc.hlsl
index ae515d1..02cdad0 100644
--- a/test/tint/builtins/gen/literal/fwidthFine/68f4ef.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/fwidthFine/68f4ef.wgsl.expected.ir.fxc.hlsl
@@ -2,9 +2,7 @@
RWByteAddressBuffer prevent_dce : register(u0);
float4 fwidthFine_68f4ef() {
float4 v = ddx_fine((1.0f).xxxx);
- float4 v_1 = ddy_fine((1.0f).xxxx);
- float4 v_2 = abs(v);
- float4 res = (v_2 + abs(v_1));
+ float4 res = (abs(v) + abs(ddy_fine((1.0f).xxxx)));
return res;
}
diff --git a/test/tint/builtins/gen/literal/fwidthFine/68f4ef.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/fwidthFine/68f4ef.wgsl.expected.ir.msl
index ca34235..0be46b6 100644
--- a/test/tint/builtins/gen/literal/fwidthFine/68f4ef.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/fwidthFine/68f4ef.wgsl.expected.ir.msl
@@ -7,9 +7,7 @@
float4 fwidthFine_68f4ef() {
float4 const v = dfdx(float4(1.0f));
- float4 const v_1 = dfdy(float4(1.0f));
- float4 const v_2 = abs(v);
- float4 res = (v_2 + abs(v_1));
+ float4 res = (abs(v) + abs(dfdy(float4(1.0f))));
return res;
}
diff --git a/test/tint/builtins/gen/literal/fwidthFine/f1742d.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/gen/literal/fwidthFine/f1742d.wgsl.expected.ir.dxc.hlsl
index 7bdf7bd..b4b50be 100644
--- a/test/tint/builtins/gen/literal/fwidthFine/f1742d.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/gen/literal/fwidthFine/f1742d.wgsl.expected.ir.dxc.hlsl
@@ -2,9 +2,7 @@
RWByteAddressBuffer prevent_dce : register(u0);
float fwidthFine_f1742d() {
float v = ddx_fine(1.0f);
- float v_1 = ddy_fine(1.0f);
- float v_2 = abs(v);
- float res = (v_2 + abs(v_1));
+ float res = (abs(v) + abs(ddy_fine(1.0f)));
return res;
}
diff --git a/test/tint/builtins/gen/literal/fwidthFine/f1742d.wgsl.expected.ir.fxc.hlsl b/test/tint/builtins/gen/literal/fwidthFine/f1742d.wgsl.expected.ir.fxc.hlsl
index 7bdf7bd..b4b50be 100644
--- a/test/tint/builtins/gen/literal/fwidthFine/f1742d.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/fwidthFine/f1742d.wgsl.expected.ir.fxc.hlsl
@@ -2,9 +2,7 @@
RWByteAddressBuffer prevent_dce : register(u0);
float fwidthFine_f1742d() {
float v = ddx_fine(1.0f);
- float v_1 = ddy_fine(1.0f);
- float v_2 = abs(v);
- float res = (v_2 + abs(v_1));
+ float res = (abs(v) + abs(ddy_fine(1.0f)));
return res;
}
diff --git a/test/tint/builtins/gen/literal/fwidthFine/f1742d.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/fwidthFine/f1742d.wgsl.expected.ir.msl
index bc551de..f234bc7 100644
--- a/test/tint/builtins/gen/literal/fwidthFine/f1742d.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/fwidthFine/f1742d.wgsl.expected.ir.msl
@@ -7,9 +7,7 @@
float fwidthFine_f1742d() {
float const v = dfdx(1.0f);
- float const v_1 = dfdy(1.0f);
- float const v_2 = abs(v);
- float res = (v_2 + abs(v_1));
+ float res = (abs(v) + abs(dfdy(1.0f)));
return res;
}
diff --git a/test/tint/builtins/gen/literal/fwidthFine/ff6aa0.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/gen/literal/fwidthFine/ff6aa0.wgsl.expected.ir.dxc.hlsl
index 133b56c..41a34d8 100644
--- a/test/tint/builtins/gen/literal/fwidthFine/ff6aa0.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/gen/literal/fwidthFine/ff6aa0.wgsl.expected.ir.dxc.hlsl
@@ -2,9 +2,7 @@
RWByteAddressBuffer prevent_dce : register(u0);
float2 fwidthFine_ff6aa0() {
float2 v = ddx_fine((1.0f).xx);
- float2 v_1 = ddy_fine((1.0f).xx);
- float2 v_2 = abs(v);
- float2 res = (v_2 + abs(v_1));
+ float2 res = (abs(v) + abs(ddy_fine((1.0f).xx)));
return res;
}
diff --git a/test/tint/builtins/gen/literal/fwidthFine/ff6aa0.wgsl.expected.ir.fxc.hlsl b/test/tint/builtins/gen/literal/fwidthFine/ff6aa0.wgsl.expected.ir.fxc.hlsl
index 133b56c..41a34d8 100644
--- a/test/tint/builtins/gen/literal/fwidthFine/ff6aa0.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/fwidthFine/ff6aa0.wgsl.expected.ir.fxc.hlsl
@@ -2,9 +2,7 @@
RWByteAddressBuffer prevent_dce : register(u0);
float2 fwidthFine_ff6aa0() {
float2 v = ddx_fine((1.0f).xx);
- float2 v_1 = ddy_fine((1.0f).xx);
- float2 v_2 = abs(v);
- float2 res = (v_2 + abs(v_1));
+ float2 res = (abs(v) + abs(ddy_fine((1.0f).xx)));
return res;
}
diff --git a/test/tint/builtins/gen/literal/fwidthFine/ff6aa0.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/fwidthFine/ff6aa0.wgsl.expected.ir.msl
index 9ef44cb..063513c 100644
--- a/test/tint/builtins/gen/literal/fwidthFine/ff6aa0.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/fwidthFine/ff6aa0.wgsl.expected.ir.msl
@@ -7,9 +7,7 @@
float2 fwidthFine_ff6aa0() {
float2 const v = dfdx(float2(1.0f));
- float2 const v_1 = dfdy(float2(1.0f));
- float2 const v_2 = abs(v);
- float2 res = (v_2 + abs(v_1));
+ float2 res = (abs(v) + abs(dfdy(float2(1.0f))));
return res;
}
diff --git a/test/tint/builtins/gen/literal/subgroupBallot/1a8251.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/subgroupBallot/1a8251.wgsl.expected.ir.msl
index 65c71e1..fbf9f26 100644
--- a/test/tint/builtins/gen/literal/subgroupBallot/1a8251.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/subgroupBallot/1a8251.wgsl.expected.ir.msl
@@ -19,19 +19,15 @@
fragment void fragment_main(uint tint_subgroup_size [[threads_per_simdgroup]], device uint4* prevent_dce [[buffer(0)]]) {
thread uint2 tint_subgroup_size_mask = 0u;
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .tint_subgroup_size_mask=(&tint_subgroup_size_mask)};
- uint const v_1 = select((4294967295u >> (32u - tint_subgroup_size)), 4294967295u, (tint_subgroup_size > 32u));
- uint const v_2 = select(0u, (4294967295u >> (64u - tint_subgroup_size)), (tint_subgroup_size > 32u));
- (*tint_module_vars.tint_subgroup_size_mask)[0u] = v_1;
- (*tint_module_vars.tint_subgroup_size_mask)[1u] = v_2;
+ (*tint_module_vars.tint_subgroup_size_mask)[0u] = select((4294967295u >> (32u - tint_subgroup_size)), 4294967295u, (tint_subgroup_size > 32u));
+ (*tint_module_vars.tint_subgroup_size_mask)[1u] = select(0u, (4294967295u >> (64u - tint_subgroup_size)), (tint_subgroup_size > 32u));
(*tint_module_vars.prevent_dce) = subgroupBallot_1a8251(tint_module_vars);
}
kernel void compute_main(uint tint_subgroup_size [[threads_per_simdgroup]], device uint4* prevent_dce [[buffer(0)]]) {
thread uint2 tint_subgroup_size_mask = 0u;
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .tint_subgroup_size_mask=(&tint_subgroup_size_mask)};
- uint const v_3 = select((4294967295u >> (32u - tint_subgroup_size)), 4294967295u, (tint_subgroup_size > 32u));
- uint const v_4 = select(0u, (4294967295u >> (64u - tint_subgroup_size)), (tint_subgroup_size > 32u));
- (*tint_module_vars.tint_subgroup_size_mask)[0u] = v_3;
- (*tint_module_vars.tint_subgroup_size_mask)[1u] = v_4;
+ (*tint_module_vars.tint_subgroup_size_mask)[0u] = select((4294967295u >> (32u - tint_subgroup_size)), 4294967295u, (tint_subgroup_size > 32u));
+ (*tint_module_vars.tint_subgroup_size_mask)[1u] = select(0u, (4294967295u >> (64u - tint_subgroup_size)), (tint_subgroup_size > 32u));
(*tint_module_vars.prevent_dce) = subgroupBallot_1a8251(tint_module_vars);
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/00229f.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/00229f.wgsl.expected.ir.msl
index 79f41ef..35b3ba0 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/00229f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/00229f.wgsl.expected.ir.msl
@@ -17,9 +17,7 @@
};
uint3 textureDimensions_00229f(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint const v_1 = tint_module_vars.arg_0.get_height(0u);
- uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(0u));
+ uint3 res = uint3(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u), tint_module_vars.arg_0.get_depth(0u));
return res;
}
@@ -42,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texture3d<float, access::read> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_2.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_2.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/00348c.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/00348c.wgsl.expected.ir.msl
index 1f914e7..209abea 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/00348c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/00348c.wgsl.expected.ir.msl
@@ -17,8 +17,7 @@
};
uint2 textureDimensions_00348c(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width();
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height());
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(), tint_module_vars.arg_0.get_height());
return res;
}
@@ -41,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texture2d_ms<int, access::read> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/0276ec.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/0276ec.wgsl.expected.ir.msl
index dc83d4f..5620bf2 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/0276ec.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/0276ec.wgsl.expected.ir.msl
@@ -7,9 +7,7 @@
};
uint3 textureDimensions_0276ec(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint const v_1 = tint_module_vars.arg_0.get_height(0u);
- uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(0u));
+ uint3 res = uint3(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u), tint_module_vars.arg_0.get_depth(0u));
return res;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/029589.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/029589.wgsl.expected.ir.msl
index 2657fea..9c032ab 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/029589.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/029589.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_029589(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/03f81e.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/03f81e.wgsl.expected.ir.msl
index fdb8210..509ad2e 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/03f81e.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/03f81e.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_03f81e(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/07f1ba.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/07f1ba.wgsl.expected.ir.msl
index 5957c30..d8366ab 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/07f1ba.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/07f1ba.wgsl.expected.ir.msl
@@ -17,8 +17,7 @@
};
uint2 textureDimensions_07f1ba(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
@@ -41,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texture2d<float, access::read> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/088918.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/088918.wgsl.expected.ir.msl
index d210bd5..696e9d1 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/088918.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/088918.wgsl.expected.ir.msl
@@ -17,8 +17,7 @@
};
uint2 textureDimensions_088918(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
@@ -41,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texture2d<float, access::read> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/0890c6.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/0890c6.wgsl.expected.ir.msl
index 1a0f9e6..006c320 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/0890c6.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/0890c6.wgsl.expected.ir.msl
@@ -17,9 +17,7 @@
};
uint3 textureDimensions_0890c6(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(1u);
- uint const v_1 = tint_module_vars.arg_0.get_height(1u);
- uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(1u));
+ uint3 res = uint3(tint_module_vars.arg_0.get_width(1u), tint_module_vars.arg_0.get_height(1u), tint_module_vars.arg_0.get_depth(1u));
return res;
}
@@ -42,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texture3d<float, access::sample> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_2.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_2.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/08e371.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/08e371.wgsl.expected.ir.msl
index 692a4bc..0f0f9d5 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/08e371.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/08e371.wgsl.expected.ir.msl
@@ -17,8 +17,7 @@
};
uint2 textureDimensions_08e371(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
@@ -41,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texture2d<int, access::read> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/0973c9.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/0973c9.wgsl.expected.ir.msl
index 2935fb0..1e3906d 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/0973c9.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/0973c9.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_0973c9(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/0baa0d.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/0baa0d.wgsl.expected.ir.msl
index 8f2693a..db2edc0 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/0baa0d.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/0baa0d.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_0baa0d(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/0d4a7c.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/0d4a7c.wgsl.expected.ir.msl
index 2772f27..dbb71fd 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/0d4a7c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/0d4a7c.wgsl.expected.ir.msl
@@ -17,8 +17,7 @@
};
uint2 textureDimensions_0d4a7c(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
@@ -41,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texture2d<uint, access::read> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/0de70c.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/0de70c.wgsl.expected.ir.msl
index 6eaf722..5db8e91 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/0de70c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/0de70c.wgsl.expected.ir.msl
@@ -7,9 +7,7 @@
};
uint3 textureDimensions_0de70c(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint const v_1 = tint_module_vars.arg_0.get_height(0u);
- uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(0u));
+ uint3 res = uint3(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u), tint_module_vars.arg_0.get_depth(0u));
return res;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/0ff9a4.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/0ff9a4.wgsl.expected.ir.msl
index 449fbc5..9736f99 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/0ff9a4.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/0ff9a4.wgsl.expected.ir.msl
@@ -18,8 +18,7 @@
uint2 textureDimensions_0ff9a4(tint_module_vars_struct tint_module_vars) {
uint const v = uint(1);
- uint const v_1 = tint_module_vars.arg_0.get_width(v);
- uint2 res = uint2(v_1, tint_module_vars.arg_0.get_height(v));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(v), tint_module_vars.arg_0.get_height(v));
return res;
}
@@ -42,9 +41,9 @@
vertex vertex_main_outputs vertex_main(depthcube_array<float, access::sample> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_2.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_2.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v_1.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/135176.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/135176.wgsl.expected.ir.msl
index 6b88da2..39fc939 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/135176.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/135176.wgsl.expected.ir.msl
@@ -17,8 +17,7 @@
};
uint2 textureDimensions_135176(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
@@ -41,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/13f8db.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/13f8db.wgsl.expected.ir.msl
index d7c6a53..7e62ddc 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/13f8db.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/13f8db.wgsl.expected.ir.msl
@@ -17,8 +17,7 @@
};
uint2 textureDimensions_13f8db(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(1u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(1u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(1u), tint_module_vars.arg_0.get_height(1u));
return res;
}
@@ -41,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texture2d<float, access::sample> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/1417dd.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/1417dd.wgsl.expected.ir.msl
index 1663c42..7eb210c 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/1417dd.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/1417dd.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_1417dd(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/15aa17.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/15aa17.wgsl.expected.ir.msl
index 96a9291..2191b01 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/15aa17.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/15aa17.wgsl.expected.ir.msl
@@ -7,9 +7,7 @@
};
uint3 textureDimensions_15aa17(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint const v_1 = tint_module_vars.arg_0.get_height(0u);
- uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(0u));
+ uint3 res = uint3(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u), tint_module_vars.arg_0.get_depth(0u));
return res;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/15b577.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/15b577.wgsl.expected.ir.msl
index 1cc59bb..9dd8ad6 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/15b577.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/15b577.wgsl.expected.ir.msl
@@ -18,8 +18,7 @@
uint2 textureDimensions_15b577(tint_module_vars_struct tint_module_vars) {
uint const v = uint(1);
- uint const v_1 = tint_module_vars.arg_0.get_width(v);
- uint2 res = uint2(v_1, tint_module_vars.arg_0.get_height(v));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(v), tint_module_vars.arg_0.get_height(v));
return res;
}
@@ -42,9 +41,9 @@
vertex vertex_main_outputs vertex_main(texture2d<uint, access::sample> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_2.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_2.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v_1.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/18160d.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/18160d.wgsl.expected.ir.msl
index 3099d88..2a4e028 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/18160d.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/18160d.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_18160d(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/18f19f.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/18f19f.wgsl.expected.ir.msl
index ba0f617..b81208f 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/18f19f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/18f19f.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_18f19f(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/1a2be7.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/1a2be7.wgsl.expected.ir.msl
index 3e1d163..d5421e5 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/1a2be7.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/1a2be7.wgsl.expected.ir.msl
@@ -17,9 +17,7 @@
};
uint3 textureDimensions_1a2be7(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint const v_1 = tint_module_vars.arg_0.get_height(0u);
- uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(0u));
+ uint3 res = uint3(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u), tint_module_vars.arg_0.get_depth(0u));
return res;
}
@@ -42,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texture3d<int, access::sample> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_2.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_2.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/1b720f.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/1b720f.wgsl.expected.ir.msl
index a3f54b7..59acb39 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/1b720f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/1b720f.wgsl.expected.ir.msl
@@ -17,9 +17,7 @@
};
uint3 textureDimensions_1b720f(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint const v_1 = tint_module_vars.arg_0.get_height(0u);
- uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(0u));
+ uint3 res = uint3(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u), tint_module_vars.arg_0.get_depth(0u));
return res;
}
@@ -42,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texture3d<int, access::read> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_2.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_2.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/1bc428.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/1bc428.wgsl.expected.ir.msl
index b7f70c7..d7778b0 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/1bc428.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/1bc428.wgsl.expected.ir.msl
@@ -18,9 +18,7 @@
uint3 textureDimensions_1bc428(tint_module_vars_struct tint_module_vars) {
uint const v = uint(1);
- uint const v_1 = tint_module_vars.arg_0.get_width(v);
- uint const v_2 = tint_module_vars.arg_0.get_height(v);
- uint3 res = uint3(v_1, v_2, tint_module_vars.arg_0.get_depth(v));
+ uint3 res = uint3(tint_module_vars.arg_0.get_width(v), tint_module_vars.arg_0.get_height(v), tint_module_vars.arg_0.get_depth(v));
return res;
}
@@ -43,9 +41,9 @@
vertex vertex_main_outputs vertex_main(texture3d<float, access::sample> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_3 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_3.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_3.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v_1.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/1bd78c.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/1bd78c.wgsl.expected.ir.msl
index 3db5602..3583e9f 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/1bd78c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/1bd78c.wgsl.expected.ir.msl
@@ -18,8 +18,7 @@
uint2 textureDimensions_1bd78c(tint_module_vars_struct tint_module_vars) {
uint const v = uint(1);
- uint const v_1 = tint_module_vars.arg_0.get_width(v);
- uint2 res = uint2(v_1, tint_module_vars.arg_0.get_height(v));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(v), tint_module_vars.arg_0.get_height(v));
return res;
}
@@ -42,9 +41,9 @@
vertex vertex_main_outputs vertex_main(texture2d<float, access::sample> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_2.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_2.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v_1.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/1e4024.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/1e4024.wgsl.expected.ir.msl
index acdc94a..dcf5c13 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/1e4024.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/1e4024.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_1e4024(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/20eaad.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/20eaad.wgsl.expected.ir.msl
index 27dd3e5..fedadae 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/20eaad.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/20eaad.wgsl.expected.ir.msl
@@ -7,9 +7,7 @@
};
uint3 textureDimensions_20eaad(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint const v_1 = tint_module_vars.arg_0.get_height(0u);
- uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(0u));
+ uint3 res = uint3(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u), tint_module_vars.arg_0.get_depth(0u));
return res;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/224113.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/224113.wgsl.expected.ir.msl
index 1287d89..ba21deb 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/224113.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/224113.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_224113(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/22b5b6.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/22b5b6.wgsl.expected.ir.msl
index 985e2a7..63da12a 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/22b5b6.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/22b5b6.wgsl.expected.ir.msl
@@ -18,8 +18,7 @@
uint2 textureDimensions_22b5b6(tint_module_vars_struct tint_module_vars) {
uint const v = uint(1);
- uint const v_1 = tint_module_vars.arg_0.get_width(v);
- uint2 res = uint2(v_1, tint_module_vars.arg_0.get_height(v));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(v), tint_module_vars.arg_0.get_height(v));
return res;
}
@@ -42,9 +41,9 @@
vertex vertex_main_outputs vertex_main(texturecube_array<uint, access::sample> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_2.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_2.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v_1.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/24db07.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/24db07.wgsl.expected.ir.msl
index eabf071..19e027d 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/24db07.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/24db07.wgsl.expected.ir.msl
@@ -17,8 +17,7 @@
};
uint2 textureDimensions_24db07(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
@@ -41,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texture2d<float, access::sample> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/25d284.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/25d284.wgsl.expected.ir.msl
index 26f2ffe..30ab16b 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/25d284.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/25d284.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_25d284(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/2674d8.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/2674d8.wgsl.expected.ir.msl
index 2168dd3..f341aff 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/2674d8.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/2674d8.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_2674d8(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/268ddb.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/268ddb.wgsl.expected.ir.msl
index 014532b..f0729ed 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/268ddb.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/268ddb.wgsl.expected.ir.msl
@@ -17,9 +17,7 @@
};
uint3 textureDimensions_268ddb(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint const v_1 = tint_module_vars.arg_0.get_height(0u);
- uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(0u));
+ uint3 res = uint3(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u), tint_module_vars.arg_0.get_depth(0u));
return res;
}
@@ -42,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texture3d<uint, access::read> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_2.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_2.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/282978.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/282978.wgsl.expected.ir.msl
index 9738cb6..a16eaa8 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/282978.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/282978.wgsl.expected.ir.msl
@@ -7,9 +7,7 @@
};
uint3 textureDimensions_282978(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint const v_1 = tint_module_vars.arg_0.get_height(0u);
- uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(0u));
+ uint3 res = uint3(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u), tint_module_vars.arg_0.get_depth(0u));
return res;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/2a58b7.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/2a58b7.wgsl.expected.ir.msl
index 9c1f14b..0c80633 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/2a58b7.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/2a58b7.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_2a58b7(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/2e443d.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/2e443d.wgsl.expected.ir.msl
index 6bc2792..a8d1a02 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/2e443d.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/2e443d.wgsl.expected.ir.msl
@@ -18,8 +18,7 @@
uint2 textureDimensions_2e443d(tint_module_vars_struct tint_module_vars) {
uint const v = uint(1);
- uint const v_1 = tint_module_vars.arg_0.get_width(v);
- uint2 res = uint2(v_1, tint_module_vars.arg_0.get_height(v));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(v), tint_module_vars.arg_0.get_height(v));
return res;
}
@@ -42,9 +41,9 @@
vertex vertex_main_outputs vertex_main(texture2d<int, access::sample> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_2.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_2.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v_1.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/2fd2a4.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/2fd2a4.wgsl.expected.ir.msl
index f2737a6..98facd3 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/2fd2a4.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/2fd2a4.wgsl.expected.ir.msl
@@ -18,8 +18,7 @@
uint2 textureDimensions_2fd2a4(tint_module_vars_struct tint_module_vars) {
uint const v = uint(1);
- uint const v_1 = tint_module_vars.arg_0.get_width(v);
- uint2 res = uint2(v_1, tint_module_vars.arg_0.get_height(v));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(v), tint_module_vars.arg_0.get_height(v));
return res;
}
@@ -42,9 +41,9 @@
vertex vertex_main_outputs vertex_main(texture2d_array<float, access::sample> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_2.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_2.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v_1.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/2ff32a.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/2ff32a.wgsl.expected.ir.msl
index eac4d16..8024df4 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/2ff32a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/2ff32a.wgsl.expected.ir.msl
@@ -17,9 +17,7 @@
};
uint3 textureDimensions_2ff32a(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint const v_1 = tint_module_vars.arg_0.get_height(0u);
- uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(0u));
+ uint3 res = uint3(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u), tint_module_vars.arg_0.get_depth(0u));
return res;
}
@@ -42,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texture3d<float, access::read> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_2.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_2.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/305dd5.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/305dd5.wgsl.expected.ir.msl
index ea3e966..6965306 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/305dd5.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/305dd5.wgsl.expected.ir.msl
@@ -17,8 +17,7 @@
};
uint2 textureDimensions_305dd5(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
@@ -41,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/31799c.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/31799c.wgsl.expected.ir.msl
index 1311c87..deb0cdc 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/31799c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/31799c.wgsl.expected.ir.msl
@@ -7,9 +7,7 @@
};
uint3 textureDimensions_31799c(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint const v_1 = tint_module_vars.arg_0.get_height(0u);
- uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(0u));
+ uint3 res = uint3(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u), tint_module_vars.arg_0.get_depth(0u));
return res;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/31d00d.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/31d00d.wgsl.expected.ir.msl
index 6ea77d3..959d177 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/31d00d.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/31d00d.wgsl.expected.ir.msl
@@ -7,9 +7,7 @@
};
uint3 textureDimensions_31d00d(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint const v_1 = tint_module_vars.arg_0.get_height(0u);
- uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(0u));
+ uint3 res = uint3(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u), tint_module_vars.arg_0.get_depth(0u));
return res;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/325338.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/325338.wgsl.expected.ir.msl
index efb9edd..1454b85 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/325338.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/325338.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_325338(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/346fee.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/346fee.wgsl.expected.ir.msl
index 7ea759b..22f82e2 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/346fee.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/346fee.wgsl.expected.ir.msl
@@ -17,8 +17,7 @@
};
uint2 textureDimensions_346fee(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(1u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(1u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(1u), tint_module_vars.arg_0.get_height(1u));
return res;
}
@@ -41,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texturecube_array<uint, access::sample> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/35a7e5.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/35a7e5.wgsl.expected.ir.msl
index 4116634..329d48c 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/35a7e5.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/35a7e5.wgsl.expected.ir.msl
@@ -7,9 +7,7 @@
};
uint3 textureDimensions_35a7e5(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint const v_1 = tint_module_vars.arg_0.get_height(0u);
- uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(0u));
+ uint3 res = uint3(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u), tint_module_vars.arg_0.get_depth(0u));
return res;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/35ee69.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/35ee69.wgsl.expected.ir.msl
index 7be909e..2941ca9 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/35ee69.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/35ee69.wgsl.expected.ir.msl
@@ -7,9 +7,7 @@
};
uint3 textureDimensions_35ee69(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint const v_1 = tint_module_vars.arg_0.get_height(0u);
- uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(0u));
+ uint3 res = uint3(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u), tint_module_vars.arg_0.get_depth(0u));
return res;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/36eeb7.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/36eeb7.wgsl.expected.ir.msl
index 4c4d3c6..371e767 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/36eeb7.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/36eeb7.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_36eeb7(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/378a65.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/378a65.wgsl.expected.ir.msl
index e15f4ba..ab58240 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/378a65.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/378a65.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_378a65(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/382b16.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/382b16.wgsl.expected.ir.msl
index b82af83..7e6f60d 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/382b16.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/382b16.wgsl.expected.ir.msl
@@ -17,8 +17,7 @@
};
uint2 textureDimensions_382b16(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(1u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(1u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(1u), tint_module_vars.arg_0.get_height(1u));
return res;
}
@@ -41,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texturecube<float, access::sample> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/3834f8.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/3834f8.wgsl.expected.ir.msl
index ead2027..3534119 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/3834f8.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/3834f8.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_3834f8(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/38c9ca.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/38c9ca.wgsl.expected.ir.msl
index 2b81f43..64c867e 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/38c9ca.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/38c9ca.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_38c9ca(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/3963d0.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/3963d0.wgsl.expected.ir.msl
index 4339225..aec4dad 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/3963d0.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/3963d0.wgsl.expected.ir.msl
@@ -17,8 +17,7 @@
};
uint2 textureDimensions_3963d0(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(1u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(1u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(1u), tint_module_vars.arg_0.get_height(1u));
return res;
}
@@ -41,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texturecube_array<int, access::sample> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/397dab.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/397dab.wgsl.expected.ir.msl
index d234fd5..b4ad113 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/397dab.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/397dab.wgsl.expected.ir.msl
@@ -17,8 +17,7 @@
};
uint2 textureDimensions_397dab(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
@@ -41,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/3a5bb1.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/3a5bb1.wgsl.expected.ir.msl
index abb7c10..91b18ca 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/3a5bb1.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/3a5bb1.wgsl.expected.ir.msl
@@ -7,9 +7,7 @@
};
uint3 textureDimensions_3a5bb1(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint const v_1 = tint_module_vars.arg_0.get_height(0u);
- uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(0u));
+ uint3 res = uint3(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u), tint_module_vars.arg_0.get_depth(0u));
return res;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/3a7b69.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/3a7b69.wgsl.expected.ir.msl
index b530d91..f5df6e5 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/3a7b69.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/3a7b69.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_3a7b69(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/3b38f6.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/3b38f6.wgsl.expected.ir.msl
index 0f705da..d5e84bc 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/3b38f6.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/3b38f6.wgsl.expected.ir.msl
@@ -17,8 +17,7 @@
};
uint2 textureDimensions_3b38f6(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
@@ -41,9 +40,9 @@
vertex vertex_main_outputs vertex_main(depth2d<float, access::sample> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/3baab5.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/3baab5.wgsl.expected.ir.msl
index 10cfce9..7350592 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/3baab5.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/3baab5.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_3baab5(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/3bf12a.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/3bf12a.wgsl.expected.ir.msl
index 156005e..7e74b6d 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/3bf12a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/3bf12a.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_3bf12a(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/3c66f0.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/3c66f0.wgsl.expected.ir.msl
index c5639ea..b8a070d 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/3c66f0.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/3c66f0.wgsl.expected.ir.msl
@@ -18,8 +18,7 @@
uint2 textureDimensions_3c66f0(tint_module_vars_struct tint_module_vars) {
uint const v = uint(1);
- uint const v_1 = tint_module_vars.arg_0.get_width(v);
- uint2 res = uint2(v_1, tint_module_vars.arg_0.get_height(v));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(v), tint_module_vars.arg_0.get_height(v));
return res;
}
@@ -42,9 +41,9 @@
vertex vertex_main_outputs vertex_main(texturecube_array<int, access::sample> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_2.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_2.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v_1.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/3f3474.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/3f3474.wgsl.expected.ir.msl
index 9bffbee..b401d86 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/3f3474.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/3f3474.wgsl.expected.ir.msl
@@ -17,8 +17,7 @@
};
uint2 textureDimensions_3f3474(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width();
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height());
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(), tint_module_vars.arg_0.get_height());
return res;
}
@@ -41,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texture2d_ms<float, access::read> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/3fc3dc.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/3fc3dc.wgsl.expected.ir.msl
index d6ed905..d46e5c3 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/3fc3dc.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/3fc3dc.wgsl.expected.ir.msl
@@ -17,8 +17,7 @@
};
uint2 textureDimensions_3fc3dc(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(1u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(1u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(1u), tint_module_vars.arg_0.get_height(1u));
return res;
}
@@ -41,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texture2d_array<float, access::sample> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/3ff0a5.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/3ff0a5.wgsl.expected.ir.msl
index 7325844..3e1367d 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/3ff0a5.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/3ff0a5.wgsl.expected.ir.msl
@@ -17,8 +17,7 @@
};
uint2 textureDimensions_3ff0a5(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
@@ -41,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texture2d_array<int, access::read> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/40c671.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/40c671.wgsl.expected.ir.msl
index 0175af0..293a5c5 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/40c671.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/40c671.wgsl.expected.ir.msl
@@ -7,9 +7,7 @@
};
uint3 textureDimensions_40c671(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint const v_1 = tint_module_vars.arg_0.get_height(0u);
- uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(0u));
+ uint3 res = uint3(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u), tint_module_vars.arg_0.get_depth(0u));
return res;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/40da20.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/40da20.wgsl.expected.ir.msl
index 660a153..602b56e 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/40da20.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/40da20.wgsl.expected.ir.msl
@@ -17,8 +17,7 @@
};
uint2 textureDimensions_40da20(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
@@ -41,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texture2d<float, access::read> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/40ecf4.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/40ecf4.wgsl.expected.ir.msl
index 3783923..8f2c570 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/40ecf4.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/40ecf4.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_40ecf4(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/41545f.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/41545f.wgsl.expected.ir.msl
index ddc15a3..76e3b71 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/41545f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/41545f.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_41545f(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/423519.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/423519.wgsl.expected.ir.msl
index a8d70e0..7fa357e 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/423519.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/423519.wgsl.expected.ir.msl
@@ -17,9 +17,7 @@
};
uint3 textureDimensions_423519(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint const v_1 = tint_module_vars.arg_0.get_height(0u);
- uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(0u));
+ uint3 res = uint3(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u), tint_module_vars.arg_0.get_depth(0u));
return res;
}
@@ -42,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texture3d<uint, access::read> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_2.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_2.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/427f92.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/427f92.wgsl.expected.ir.msl
index 2726bd8..f4e7bb0 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/427f92.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/427f92.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_427f92(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/439651.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/439651.wgsl.expected.ir.msl
index 2c0d48b..8a6dc42 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/439651.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/439651.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_439651(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/445376.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/445376.wgsl.expected.ir.msl
index c27b2a06..c2800572 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/445376.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/445376.wgsl.expected.ir.msl
@@ -17,8 +17,7 @@
};
uint2 textureDimensions_445376(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
@@ -41,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texture2d_array<uint, access::sample> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/44b358.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/44b358.wgsl.expected.ir.msl
index 101b633..bb2d84e 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/44b358.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/44b358.wgsl.expected.ir.msl
@@ -7,9 +7,7 @@
};
uint3 textureDimensions_44b358(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint const v_1 = tint_module_vars.arg_0.get_height(0u);
- uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(0u));
+ uint3 res = uint3(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u), tint_module_vars.arg_0.get_depth(0u));
return res;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/452fc1.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/452fc1.wgsl.expected.ir.msl
index cc367e1..d9e1ac2 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/452fc1.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/452fc1.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_452fc1(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/46f0fc.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/46f0fc.wgsl.expected.ir.msl
index 4e1f4d1..605ba83 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/46f0fc.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/46f0fc.wgsl.expected.ir.msl
@@ -17,8 +17,7 @@
};
uint2 textureDimensions_46f0fc(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
@@ -41,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texture2d_array<float, access::sample> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/4716a4.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/4716a4.wgsl.expected.ir.msl
index db47d43..83c4f65 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/4716a4.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/4716a4.wgsl.expected.ir.msl
@@ -17,8 +17,7 @@
};
uint2 textureDimensions_4716a4(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
@@ -41,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texture2d_array<int, access::read> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/475c10.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/475c10.wgsl.expected.ir.msl
index 4459a94..fcc9e6b 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/475c10.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/475c10.wgsl.expected.ir.msl
@@ -17,9 +17,7 @@
};
uint3 textureDimensions_475c10(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint const v_1 = tint_module_vars.arg_0.get_height(0u);
- uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(0u));
+ uint3 res = uint3(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u), tint_module_vars.arg_0.get_depth(0u));
return res;
}
@@ -42,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texture3d<uint, access::read> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_2.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_2.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/49a067.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/49a067.wgsl.expected.ir.msl
index 5f1abc1..d9682ea 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/49a067.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/49a067.wgsl.expected.ir.msl
@@ -18,8 +18,7 @@
uint2 textureDimensions_49a067(tint_module_vars_struct tint_module_vars) {
uint const v = uint(1);
- uint const v_1 = tint_module_vars.arg_0.get_width(v);
- uint2 res = uint2(v_1, tint_module_vars.arg_0.get_height(v));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(v), tint_module_vars.arg_0.get_height(v));
return res;
}
@@ -42,9 +41,9 @@
vertex vertex_main_outputs vertex_main(texturecube<float, access::sample> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_2.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_2.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v_1.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/4acec7.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/4acec7.wgsl.expected.ir.msl
index 41b13b5..72c87bf 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/4acec7.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/4acec7.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_4acec7(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/4b26ef.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/4b26ef.wgsl.expected.ir.msl
index e8d0680..0e220b8 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/4b26ef.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/4b26ef.wgsl.expected.ir.msl
@@ -7,9 +7,7 @@
};
uint3 textureDimensions_4b26ef(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint const v_1 = tint_module_vars.arg_0.get_height(0u);
- uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(0u));
+ uint3 res = uint3(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u), tint_module_vars.arg_0.get_depth(0u));
return res;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/4be71b.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/4be71b.wgsl.expected.ir.msl
index 48bb73e..7c3b5b5 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/4be71b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/4be71b.wgsl.expected.ir.msl
@@ -17,8 +17,7 @@
};
uint2 textureDimensions_4be71b(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
@@ -41,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texture2d<uint, access::sample> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/4d1f71.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/4d1f71.wgsl.expected.ir.msl
index f4ab179..f2dfd4b 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/4d1f71.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/4d1f71.wgsl.expected.ir.msl
@@ -17,8 +17,7 @@
};
uint2 textureDimensions_4d1f71(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
@@ -41,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/4d27b3.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/4d27b3.wgsl.expected.ir.msl
index 5630add..af4f2b5 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/4d27b3.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/4d27b3.wgsl.expected.ir.msl
@@ -7,9 +7,7 @@
};
uint3 textureDimensions_4d27b3(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint const v_1 = tint_module_vars.arg_0.get_height(0u);
- uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(0u));
+ uint3 res = uint3(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u), tint_module_vars.arg_0.get_depth(0u));
return res;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/4df14c.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/4df14c.wgsl.expected.ir.msl
index e3d609c..a99947a 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/4df14c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/4df14c.wgsl.expected.ir.msl
@@ -7,9 +7,7 @@
};
uint3 textureDimensions_4df14c(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint const v_1 = tint_module_vars.arg_0.get_height(0u);
- uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(0u));
+ uint3 res = uint3(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u), tint_module_vars.arg_0.get_depth(0u));
return res;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/528c0e.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/528c0e.wgsl.expected.ir.msl
index 28b3f4e..2ea4f48 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/528c0e.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/528c0e.wgsl.expected.ir.msl
@@ -17,8 +17,7 @@
};
uint2 textureDimensions_528c0e(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(1u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(1u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(1u), tint_module_vars.arg_0.get_height(1u));
return res;
}
@@ -41,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texture2d_array<uint, access::sample> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/52cf60.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/52cf60.wgsl.expected.ir.msl
index f012616..cc024f1 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/52cf60.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/52cf60.wgsl.expected.ir.msl
@@ -17,8 +17,7 @@
};
uint2 textureDimensions_52cf60(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
@@ -41,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texture2d<float, access::read> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/534ef8.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/534ef8.wgsl.expected.ir.msl
index 1b691a8..0c45681 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/534ef8.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/534ef8.wgsl.expected.ir.msl
@@ -17,8 +17,7 @@
};
uint2 textureDimensions_534ef8(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
@@ -41,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texture2d<int, access::read> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/55fdeb.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/55fdeb.wgsl.expected.ir.msl
index 4f4f478..fa98e5d 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/55fdeb.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/55fdeb.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_55fdeb(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/578e75.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/578e75.wgsl.expected.ir.msl
index a1a81e5..49d9aa0 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/578e75.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/578e75.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_578e75(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/579eee.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/579eee.wgsl.expected.ir.msl
index 2f5010e..f5dd839 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/579eee.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/579eee.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_579eee(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/591981.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/591981.wgsl.expected.ir.msl
index fa1a433..12bf97a 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/591981.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/591981.wgsl.expected.ir.msl
@@ -7,9 +7,7 @@
};
uint3 textureDimensions_591981(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint const v_1 = tint_module_vars.arg_0.get_height(0u);
- uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(0u));
+ uint3 res = uint3(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u), tint_module_vars.arg_0.get_depth(0u));
return res;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/599ab5.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/599ab5.wgsl.expected.ir.msl
index 2c25b47..2e3c783 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/599ab5.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/599ab5.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_599ab5(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/5b4b10.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/5b4b10.wgsl.expected.ir.msl
index 891c4cb..22ade29 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/5b4b10.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/5b4b10.wgsl.expected.ir.msl
@@ -7,9 +7,7 @@
};
uint3 textureDimensions_5b4b10(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint const v_1 = tint_module_vars.arg_0.get_height(0u);
- uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(0u));
+ uint3 res = uint3(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u), tint_module_vars.arg_0.get_depth(0u));
return res;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/609d34.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/609d34.wgsl.expected.ir.msl
index 6fc2ca2..1b733d4 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/609d34.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/609d34.wgsl.expected.ir.msl
@@ -17,8 +17,7 @@
};
uint2 textureDimensions_609d34(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
@@ -41,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/617dc8.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/617dc8.wgsl.expected.ir.msl
index a11d1eb..f891b4d 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/617dc8.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/617dc8.wgsl.expected.ir.msl
@@ -7,9 +7,7 @@
};
uint3 textureDimensions_617dc8(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint const v_1 = tint_module_vars.arg_0.get_height(0u);
- uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(0u));
+ uint3 res = uint3(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u), tint_module_vars.arg_0.get_depth(0u));
return res;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/62cb5a.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/62cb5a.wgsl.expected.ir.msl
index ccf1c20..cd3f1b9 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/62cb5a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/62cb5a.wgsl.expected.ir.msl
@@ -17,8 +17,7 @@
};
uint2 textureDimensions_62cb5a(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
@@ -41,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texture2d_array<int, access::sample> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/62e7ae.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/62e7ae.wgsl.expected.ir.msl
index 29829fb..4e432f4 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/62e7ae.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/62e7ae.wgsl.expected.ir.msl
@@ -17,8 +17,7 @@
};
uint2 textureDimensions_62e7ae(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
@@ -41,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texture2d<uint, access::read> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/64dc74.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/64dc74.wgsl.expected.ir.msl
index d4cd939..3b74fe0 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/64dc74.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/64dc74.wgsl.expected.ir.msl
@@ -17,8 +17,7 @@
};
uint2 textureDimensions_64dc74(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(1u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(1u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(1u), tint_module_vars.arg_0.get_height(1u));
return res;
}
@@ -41,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texturecube<int, access::sample> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/674058.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/674058.wgsl.expected.ir.msl
index 0b33489..60970fc 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/674058.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/674058.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_674058(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/6dae40.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/6dae40.wgsl.expected.ir.msl
index 2f472db..e43a1b7 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/6dae40.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/6dae40.wgsl.expected.ir.msl
@@ -17,9 +17,7 @@
};
uint3 textureDimensions_6dae40(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint const v_1 = tint_module_vars.arg_0.get_height(0u);
- uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(0u));
+ uint3 res = uint3(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u), tint_module_vars.arg_0.get_depth(0u));
return res;
}
@@ -42,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texture3d<float, access::read> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_2.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_2.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/6dbef4.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/6dbef4.wgsl.expected.ir.msl
index 59e7418..f6e792c 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/6dbef4.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/6dbef4.wgsl.expected.ir.msl
@@ -17,9 +17,7 @@
};
uint3 textureDimensions_6dbef4(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint const v_1 = tint_module_vars.arg_0.get_height(0u);
- uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(0u));
+ uint3 res = uint3(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u), tint_module_vars.arg_0.get_depth(0u));
return res;
}
@@ -42,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texture3d<int, access::read> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_2.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_2.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/6e6c7a.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/6e6c7a.wgsl.expected.ir.msl
index 0755ff3..cab68f6 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/6e6c7a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/6e6c7a.wgsl.expected.ir.msl
@@ -17,9 +17,7 @@
};
uint3 textureDimensions_6e6c7a(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(1u);
- uint const v_1 = tint_module_vars.arg_0.get_height(1u);
- uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(1u));
+ uint3 res = uint3(tint_module_vars.arg_0.get_width(1u), tint_module_vars.arg_0.get_height(1u), tint_module_vars.arg_0.get_depth(1u));
return res;
}
@@ -42,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texture3d<uint, access::sample> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_2.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_2.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/6e72c5.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/6e72c5.wgsl.expected.ir.msl
index 92f2607..477667e 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/6e72c5.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/6e72c5.wgsl.expected.ir.msl
@@ -17,8 +17,7 @@
};
uint2 textureDimensions_6e72c5(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
@@ -41,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texture2d<float, access::read> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/6f1b5d.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/6f1b5d.wgsl.expected.ir.msl
index d99066b..d68a1d8 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/6f1b5d.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/6f1b5d.wgsl.expected.ir.msl
@@ -18,8 +18,7 @@
uint2 textureDimensions_6f1b5d(tint_module_vars_struct tint_module_vars) {
uint const v = uint(1);
- uint const v_1 = tint_module_vars.arg_0.get_width(v);
- uint2 res = uint2(v_1, tint_module_vars.arg_0.get_height(v));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(v), tint_module_vars.arg_0.get_height(v));
return res;
}
@@ -42,9 +41,9 @@
vertex vertex_main_outputs vertex_main(depth2d<float, access::sample> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_2.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_2.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v_1.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/70dd33.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/70dd33.wgsl.expected.ir.msl
index 762389e..c3cabe7 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/70dd33.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/70dd33.wgsl.expected.ir.msl
@@ -7,9 +7,7 @@
};
uint3 textureDimensions_70dd33(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint const v_1 = tint_module_vars.arg_0.get_height(0u);
- uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(0u));
+ uint3 res = uint3(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u), tint_module_vars.arg_0.get_depth(0u));
return res;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/715917.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/715917.wgsl.expected.ir.msl
index b8a42a3..fe40805 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/715917.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/715917.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_715917(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/7327fa.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/7327fa.wgsl.expected.ir.msl
index d53d2b3..a17f19a 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/7327fa.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/7327fa.wgsl.expected.ir.msl
@@ -17,8 +17,7 @@
};
uint2 textureDimensions_7327fa(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
@@ -41,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texture2d<float, access::read> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/756031.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/756031.wgsl.expected.ir.msl
index 282898a..34ceb4a 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/756031.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/756031.wgsl.expected.ir.msl
@@ -18,9 +18,7 @@
uint3 textureDimensions_756031(tint_module_vars_struct tint_module_vars) {
uint const v = uint(1);
- uint const v_1 = tint_module_vars.arg_0.get_width(v);
- uint const v_2 = tint_module_vars.arg_0.get_height(v);
- uint3 res = uint3(v_1, v_2, tint_module_vars.arg_0.get_depth(v));
+ uint3 res = uint3(tint_module_vars.arg_0.get_width(v), tint_module_vars.arg_0.get_height(v), tint_module_vars.arg_0.get_depth(v));
return res;
}
@@ -43,9 +41,9 @@
vertex vertex_main_outputs vertex_main(texture3d<int, access::sample> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_3 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_3.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_3.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v_1.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/756304.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/756304.wgsl.expected.ir.msl
index 9b06a7e..94e97cf 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/756304.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/756304.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_756304(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/790e57.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/790e57.wgsl.expected.ir.msl
index 563cd72..6deff5a 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/790e57.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/790e57.wgsl.expected.ir.msl
@@ -17,9 +17,7 @@
};
uint3 textureDimensions_790e57(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint const v_1 = tint_module_vars.arg_0.get_height(0u);
- uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(0u));
+ uint3 res = uint3(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u), tint_module_vars.arg_0.get_depth(0u));
return res;
}
@@ -42,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texture3d<int, access::read> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_2.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_2.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/795fbb.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/795fbb.wgsl.expected.ir.msl
index 479a000..f9c461c 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/795fbb.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/795fbb.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_795fbb(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/79d168.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/79d168.wgsl.expected.ir.msl
index 1d30ac1..247e563 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/79d168.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/79d168.wgsl.expected.ir.msl
@@ -18,8 +18,7 @@
uint2 textureDimensions_79d168(tint_module_vars_struct tint_module_vars) {
uint const v = uint(1);
- uint const v_1 = tint_module_vars.arg_0.get_width(v);
- uint2 res = uint2(v_1, tint_module_vars.arg_0.get_height(v));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(v), tint_module_vars.arg_0.get_height(v));
return res;
}
@@ -42,9 +41,9 @@
vertex vertex_main_outputs vertex_main(depthcube<float, access::sample> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_2.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_2.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v_1.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/7a3890.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/7a3890.wgsl.expected.ir.msl
index 5e311d4..5292b84f 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/7a3890.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/7a3890.wgsl.expected.ir.msl
@@ -17,9 +17,7 @@
};
uint3 textureDimensions_7a3890(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint const v_1 = tint_module_vars.arg_0.get_height(0u);
- uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(0u));
+ uint3 res = uint3(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u), tint_module_vars.arg_0.get_depth(0u));
return res;
}
@@ -42,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texture3d<uint, access::sample> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_2.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_2.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/7a9e30.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/7a9e30.wgsl.expected.ir.msl
index 473a8ca..943a700 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/7a9e30.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/7a9e30.wgsl.expected.ir.msl
@@ -17,8 +17,7 @@
};
uint2 textureDimensions_7a9e30(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
@@ -41,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texturecube<uint, access::sample> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/7c7c64.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/7c7c64.wgsl.expected.ir.msl
index 9695e7e..0377b76 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/7c7c64.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/7c7c64.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_7c7c64(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/7ea4b5.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/7ea4b5.wgsl.expected.ir.msl
index c4c5c2e..76c5df3 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/7ea4b5.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/7ea4b5.wgsl.expected.ir.msl
@@ -7,9 +7,7 @@
};
uint3 textureDimensions_7ea4b5(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint const v_1 = tint_module_vars.arg_0.get_height(0u);
- uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(0u));
+ uint3 res = uint3(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u), tint_module_vars.arg_0.get_depth(0u));
return res;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/7edb05.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/7edb05.wgsl.expected.ir.msl
index 5b4088b..3bf3057 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/7edb05.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/7edb05.wgsl.expected.ir.msl
@@ -17,8 +17,7 @@
};
uint2 textureDimensions_7edb05(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
@@ -41,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/8057cb.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/8057cb.wgsl.expected.ir.msl
index 690700c..399b473 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/8057cb.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/8057cb.wgsl.expected.ir.msl
@@ -17,9 +17,7 @@
};
uint3 textureDimensions_8057cb(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint const v_1 = tint_module_vars.arg_0.get_height(0u);
- uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(0u));
+ uint3 res = uint3(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u), tint_module_vars.arg_0.get_depth(0u));
return res;
}
@@ -42,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texture3d<float, access::read> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_2.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_2.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/8243a1.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/8243a1.wgsl.expected.ir.msl
index b3d6f22..aeea11c 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/8243a1.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/8243a1.wgsl.expected.ir.msl
@@ -7,9 +7,7 @@
};
uint3 textureDimensions_8243a1(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint const v_1 = tint_module_vars.arg_0.get_height(0u);
- uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(0u));
+ uint3 res = uint3(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u), tint_module_vars.arg_0.get_depth(0u));
return res;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/835f90.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/835f90.wgsl.expected.ir.msl
index 2e89dd5..ba9785a 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/835f90.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/835f90.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_835f90(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/867ead.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/867ead.wgsl.expected.ir.msl
index 30c602f..a5d3928 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/867ead.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/867ead.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_867ead(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/879b73.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/879b73.wgsl.expected.ir.msl
index 392cb64..18e3bd1 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/879b73.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/879b73.wgsl.expected.ir.msl
@@ -17,8 +17,7 @@
};
uint2 textureDimensions_879b73(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
@@ -41,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texturecube_array<float, access::sample> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/87b42d.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/87b42d.wgsl.expected.ir.msl
index 92e3ae7..5f9162b 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/87b42d.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/87b42d.wgsl.expected.ir.msl
@@ -17,8 +17,7 @@
};
uint2 textureDimensions_87b42d(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
@@ -41,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/881dd4.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/881dd4.wgsl.expected.ir.msl
index 032b293..a9e2f32 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/881dd4.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/881dd4.wgsl.expected.ir.msl
@@ -17,8 +17,7 @@
};
uint2 textureDimensions_881dd4(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
@@ -41,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/8a35f9.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/8a35f9.wgsl.expected.ir.msl
index c211043..5779c83 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/8a35f9.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/8a35f9.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_8a35f9(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/8af728.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/8af728.wgsl.expected.ir.msl
index 2466a59..3f69017 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/8af728.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/8af728.wgsl.expected.ir.msl
@@ -17,8 +17,7 @@
};
uint2 textureDimensions_8af728(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
@@ -41,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/8b9906.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/8b9906.wgsl.expected.ir.msl
index d7d16e2..8abe649 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/8b9906.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/8b9906.wgsl.expected.ir.msl
@@ -7,9 +7,7 @@
};
uint3 textureDimensions_8b9906(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint const v_1 = tint_module_vars.arg_0.get_height(0u);
- uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(0u));
+ uint3 res = uint3(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u), tint_module_vars.arg_0.get_depth(0u));
return res;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/8bd369.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/8bd369.wgsl.expected.ir.msl
index c0b8a1a..bc53331 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/8bd369.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/8bd369.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_8bd369(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/8e15f4.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/8e15f4.wgsl.expected.ir.msl
index 299c6ec..696defd 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/8e15f4.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/8e15f4.wgsl.expected.ir.msl
@@ -17,8 +17,7 @@
};
uint2 textureDimensions_8e15f4(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
@@ -41,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texture2d<uint, access::read> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/902179.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/902179.wgsl.expected.ir.msl
index b11de21..20aa789 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/902179.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/902179.wgsl.expected.ir.msl
@@ -7,9 +7,7 @@
};
uint3 textureDimensions_902179(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint const v_1 = tint_module_vars.arg_0.get_height(0u);
- uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(0u));
+ uint3 res = uint3(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u), tint_module_vars.arg_0.get_depth(0u));
return res;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/904b0f.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/904b0f.wgsl.expected.ir.msl
index e27ba6d..f853b9e 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/904b0f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/904b0f.wgsl.expected.ir.msl
@@ -17,8 +17,7 @@
};
uint2 textureDimensions_904b0f(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
@@ -41,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texture2d_array<int, access::read> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/90dd74.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/90dd74.wgsl.expected.ir.msl
index 02532a7..f4e64fc 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/90dd74.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/90dd74.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_90dd74(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/91e3b4.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/91e3b4.wgsl.expected.ir.msl
index 57d58ed..370a11f 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/91e3b4.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/91e3b4.wgsl.expected.ir.msl
@@ -7,9 +7,7 @@
};
uint3 textureDimensions_91e3b4(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint const v_1 = tint_module_vars.arg_0.get_height(0u);
- uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(0u));
+ uint3 res = uint3(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u), tint_module_vars.arg_0.get_depth(0u));
return res;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/9573f3.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/9573f3.wgsl.expected.ir.msl
index 1174f2c..a792efa 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/9573f3.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/9573f3.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_9573f3(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/98b2d3.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/98b2d3.wgsl.expected.ir.msl
index 8491445..c90fc44 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/98b2d3.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/98b2d3.wgsl.expected.ir.msl
@@ -17,8 +17,7 @@
};
uint2 textureDimensions_98b2d3(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
@@ -41,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texturecube_array<int, access::sample> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/991ea9.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/991ea9.wgsl.expected.ir.msl
index 2c0eba8..30f28ef 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/991ea9.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/991ea9.wgsl.expected.ir.msl
@@ -17,8 +17,7 @@
};
uint2 textureDimensions_991ea9(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(1u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(1u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(1u), tint_module_vars.arg_0.get_height(1u));
return res;
}
@@ -41,9 +40,9 @@
vertex vertex_main_outputs vertex_main(depth2d<float, access::sample> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/9b10a0.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/9b10a0.wgsl.expected.ir.msl
index 3426a05..e406d0b 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/9b10a0.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/9b10a0.wgsl.expected.ir.msl
@@ -17,8 +17,7 @@
};
uint2 textureDimensions_9b10a0(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
@@ -41,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/9b223b.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/9b223b.wgsl.expected.ir.msl
index 25ee267..0077624 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/9b223b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/9b223b.wgsl.expected.ir.msl
@@ -17,8 +17,7 @@
};
uint2 textureDimensions_9b223b(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
@@ -41,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texturecube<float, access::sample> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/9baf27.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/9baf27.wgsl.expected.ir.msl
index 391cdd3..f73f006 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/9baf27.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/9baf27.wgsl.expected.ir.msl
@@ -17,8 +17,7 @@
};
uint2 textureDimensions_9baf27(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(1u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(1u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(1u), tint_module_vars.arg_0.get_height(1u));
return res;
}
@@ -41,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texturecube<uint, access::sample> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/9cd4ca.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/9cd4ca.wgsl.expected.ir.msl
index 87bee8a..2d1361a 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/9cd4ca.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/9cd4ca.wgsl.expected.ir.msl
@@ -18,8 +18,7 @@
uint2 textureDimensions_9cd4ca(tint_module_vars_struct tint_module_vars) {
uint const v = uint(1);
- uint const v_1 = tint_module_vars.arg_0.get_width(v);
- uint2 res = uint2(v_1, tint_module_vars.arg_0.get_height(v));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(v), tint_module_vars.arg_0.get_height(v));
return res;
}
@@ -42,9 +41,9 @@
vertex vertex_main_outputs vertex_main(texturecube<uint, access::sample> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_2.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_2.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v_1.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/9cd8ad.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/9cd8ad.wgsl.expected.ir.msl
index ae59ca3..c779787 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/9cd8ad.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/9cd8ad.wgsl.expected.ir.msl
@@ -7,9 +7,7 @@
};
uint3 textureDimensions_9cd8ad(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint const v_1 = tint_module_vars.arg_0.get_height(0u);
- uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(0u));
+ uint3 res = uint3(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u), tint_module_vars.arg_0.get_depth(0u));
return res;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/9d0bac.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/9d0bac.wgsl.expected.ir.msl
index 11c4e88..6fa5071 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/9d0bac.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/9d0bac.wgsl.expected.ir.msl
@@ -17,8 +17,7 @@
};
uint2 textureDimensions_9d0bac(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
@@ -41,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texture2d<float, access::read> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/9dc27a.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/9dc27a.wgsl.expected.ir.msl
index 17ee0dd..1ae7a01 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/9dc27a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/9dc27a.wgsl.expected.ir.msl
@@ -17,8 +17,7 @@
};
uint2 textureDimensions_9dc27a(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
@@ -41,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/9e0794.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/9e0794.wgsl.expected.ir.msl
index 8d63fb8..842f12b 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/9e0794.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/9e0794.wgsl.expected.ir.msl
@@ -18,8 +18,7 @@
uint2 textureDimensions_9e0794(tint_module_vars_struct tint_module_vars) {
uint const v = uint(1);
- uint const v_1 = tint_module_vars.arg_0.get_width(v);
- uint2 res = uint2(v_1, tint_module_vars.arg_0.get_height(v));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(v), tint_module_vars.arg_0.get_height(v));
return res;
}
@@ -42,9 +41,9 @@
vertex vertex_main_outputs vertex_main(texture2d_array<uint, access::sample> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_2.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_2.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v_1.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/9fcc3b.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/9fcc3b.wgsl.expected.ir.msl
index fb3b71c..ac71dec 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/9fcc3b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/9fcc3b.wgsl.expected.ir.msl
@@ -17,8 +17,7 @@
};
uint2 textureDimensions_9fcc3b(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
@@ -41,9 +40,9 @@
vertex vertex_main_outputs vertex_main(depthcube_array<float, access::sample> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/a105a5.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/a105a5.wgsl.expected.ir.msl
index 348f77b..b2a6fc8 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/a105a5.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/a105a5.wgsl.expected.ir.msl
@@ -7,9 +7,7 @@
};
uint3 textureDimensions_a105a5(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint const v_1 = tint_module_vars.arg_0.get_height(0u);
- uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(0u));
+ uint3 res = uint3(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u), tint_module_vars.arg_0.get_depth(0u));
return res;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/a14386.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/a14386.wgsl.expected.ir.msl
index edfe9af..24d4e2c 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/a14386.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/a14386.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_a14386(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/a1598a.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/a1598a.wgsl.expected.ir.msl
index 9d2e4bb..7fd4e35 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/a1598a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/a1598a.wgsl.expected.ir.msl
@@ -17,8 +17,7 @@
};
uint2 textureDimensions_a1598a(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
@@ -41,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texturecube_array<uint, access::sample> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/a20ba2.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/a20ba2.wgsl.expected.ir.msl
index 666ad36..419bfae 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/a20ba2.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/a20ba2.wgsl.expected.ir.msl
@@ -7,9 +7,7 @@
};
uint3 textureDimensions_a20ba2(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint const v_1 = tint_module_vars.arg_0.get_height(0u);
- uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(0u));
+ uint3 res = uint3(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u), tint_module_vars.arg_0.get_depth(0u));
return res;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/a25d9b.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/a25d9b.wgsl.expected.ir.msl
index 4f425be..8ba62a3 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/a25d9b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/a25d9b.wgsl.expected.ir.msl
@@ -17,9 +17,7 @@
};
uint3 textureDimensions_a25d9b(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint const v_1 = tint_module_vars.arg_0.get_height(0u);
- uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(0u));
+ uint3 res = uint3(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u), tint_module_vars.arg_0.get_depth(0u));
return res;
}
@@ -42,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texture3d<float, access::read> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_2.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_2.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/a2ba5e.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/a2ba5e.wgsl.expected.ir.msl
index 00ceee2..54aa348 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/a2ba5e.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/a2ba5e.wgsl.expected.ir.msl
@@ -18,8 +18,7 @@
uint2 textureDimensions_a2ba5e(tint_module_vars_struct tint_module_vars) {
uint const v = uint(1);
- uint const v_1 = tint_module_vars.arg_0.get_width(v);
- uint2 res = uint2(v_1, tint_module_vars.arg_0.get_height(v));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(v), tint_module_vars.arg_0.get_height(v));
return res;
}
@@ -42,9 +41,9 @@
vertex vertex_main_outputs vertex_main(texturecube<int, access::sample> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_2.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_2.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v_1.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/a3ea91.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/a3ea91.wgsl.expected.ir.msl
index d3ac982a..8823e0c 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/a3ea91.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/a3ea91.wgsl.expected.ir.msl
@@ -17,9 +17,7 @@
};
uint3 textureDimensions_a3ea91(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint const v_1 = tint_module_vars.arg_0.get_height(0u);
- uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(0u));
+ uint3 res = uint3(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u), tint_module_vars.arg_0.get_depth(0u));
return res;
}
@@ -42,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texture3d<float, access::read> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_2.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_2.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/a48049.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/a48049.wgsl.expected.ir.msl
index ada2fb2..e5f7306 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/a48049.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/a48049.wgsl.expected.ir.msl
@@ -17,8 +17,7 @@
};
uint2 textureDimensions_a48049(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(1u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(1u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(1u), tint_module_vars.arg_0.get_height(1u));
return res;
}
@@ -41,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texture2d<int, access::sample> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/a4cd56.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/a4cd56.wgsl.expected.ir.msl
index c364f6b..2e9b5ec 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/a4cd56.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/a4cd56.wgsl.expected.ir.msl
@@ -17,8 +17,7 @@
};
uint2 textureDimensions_a4cd56(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
@@ -41,9 +40,9 @@
vertex vertex_main_outputs vertex_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/a65776.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/a65776.wgsl.expected.ir.msl
index bf2fb49..a4ee4e8 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/a65776.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/a65776.wgsl.expected.ir.msl
@@ -17,8 +17,7 @@
};
uint2 textureDimensions_a65776(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
@@ -41,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texture2d<int, access::read> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/aa4353.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/aa4353.wgsl.expected.ir.msl
index b5f0af5..b4a7a78 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/aa4353.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/aa4353.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_aa4353(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/ae4595.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/ae4595.wgsl.expected.ir.msl
index ce03f49..dc1c773 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/ae4595.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/ae4595.wgsl.expected.ir.msl
@@ -7,9 +7,7 @@
};
uint3 textureDimensions_ae4595(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint const v_1 = tint_module_vars.arg_0.get_height(0u);
- uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(0u));
+ uint3 res = uint3(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u), tint_module_vars.arg_0.get_depth(0u));
return res;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/af46ab.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/af46ab.wgsl.expected.ir.msl
index bbda3dc..330d6d1 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/af46ab.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/af46ab.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_af46ab(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/b16352.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/b16352.wgsl.expected.ir.msl
index c62fef1..3211e5a 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/b16352.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/b16352.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_b16352(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/b284b8.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/b284b8.wgsl.expected.ir.msl
index cac21d2..8ba605e 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/b284b8.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/b284b8.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_b284b8(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/b3ab5e.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/b3ab5e.wgsl.expected.ir.msl
index 6eb3fd0..6f1a7b05 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/b3ab5e.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/b3ab5e.wgsl.expected.ir.msl
@@ -18,8 +18,7 @@
uint2 textureDimensions_b3ab5e(tint_module_vars_struct tint_module_vars) {
uint const v = uint(1);
- uint const v_1 = tint_module_vars.arg_0.get_width(v);
- uint2 res = uint2(v_1, tint_module_vars.arg_0.get_height(v));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(v), tint_module_vars.arg_0.get_height(v));
return res;
}
@@ -42,9 +41,9 @@
vertex vertex_main_outputs vertex_main(texturecube_array<float, access::sample> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_2.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_2.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v_1.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/b56112.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/b56112.wgsl.expected.ir.msl
index 5fe07cc..2984f15 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/b56112.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/b56112.wgsl.expected.ir.msl
@@ -17,8 +17,7 @@
};
uint2 textureDimensions_b56112(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
@@ -41,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texture2d<uint, access::read> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/b5d68e.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/b5d68e.wgsl.expected.ir.msl
index 266d4d4..7db05e0 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/b5d68e.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/b5d68e.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_b5d68e(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/b6bbf4.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/b6bbf4.wgsl.expected.ir.msl
index f8702ea..40aa81d 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/b6bbf4.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/b6bbf4.wgsl.expected.ir.msl
@@ -17,9 +17,7 @@
};
uint3 textureDimensions_b6bbf4(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint const v_1 = tint_module_vars.arg_0.get_height(0u);
- uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(0u));
+ uint3 res = uint3(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u), tint_module_vars.arg_0.get_depth(0u));
return res;
}
@@ -42,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texture3d<uint, access::read> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_2.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_2.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/b8287f.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/b8287f.wgsl.expected.ir.msl
index 4267d89..659429a 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/b8287f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/b8287f.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_b8287f(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/bb95d9.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/bb95d9.wgsl.expected.ir.msl
index 5570234..c52d6b6 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/bb95d9.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/bb95d9.wgsl.expected.ir.msl
@@ -17,9 +17,7 @@
};
uint3 textureDimensions_bb95d9(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint const v_1 = tint_module_vars.arg_0.get_height(0u);
- uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(0u));
+ uint3 res = uint3(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u), tint_module_vars.arg_0.get_depth(0u));
return res;
}
@@ -42,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texture3d<float, access::sample> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_2.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_2.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/bbe285.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/bbe285.wgsl.expected.ir.msl
index 848bc4e..f2e1a00 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/bbe285.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/bbe285.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_bbe285(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/bc96f6.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/bc96f6.wgsl.expected.ir.msl
index 5dfb71b..786579e 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/bc96f6.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/bc96f6.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_bc96f6(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/bd94c8.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/bd94c8.wgsl.expected.ir.msl
index 5e9df27..3780279 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/bd94c8.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/bd94c8.wgsl.expected.ir.msl
@@ -17,8 +17,7 @@
};
uint2 textureDimensions_bd94c8(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(1u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(1u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(1u), tint_module_vars.arg_0.get_height(1u));
return res;
}
@@ -41,9 +40,9 @@
vertex vertex_main_outputs vertex_main(depthcube_array<float, access::sample> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/bec716.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/bec716.wgsl.expected.ir.msl
index 953363c..84516f2 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/bec716.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/bec716.wgsl.expected.ir.msl
@@ -17,9 +17,7 @@
};
uint3 textureDimensions_bec716(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint const v_1 = tint_module_vars.arg_0.get_height(0u);
- uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(0u));
+ uint3 res = uint3(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u), tint_module_vars.arg_0.get_depth(0u));
return res;
}
@@ -42,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texture3d<float, access::read> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_2.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_2.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/bf9170.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/bf9170.wgsl.expected.ir.msl
index d92d171..098135d 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/bf9170.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/bf9170.wgsl.expected.ir.msl
@@ -17,9 +17,7 @@
};
uint3 textureDimensions_bf9170(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint const v_1 = tint_module_vars.arg_0.get_height(0u);
- uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(0u));
+ uint3 res = uint3(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u), tint_module_vars.arg_0.get_depth(0u));
return res;
}
@@ -42,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texture3d<float, access::read> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_2.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_2.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/c1189e.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/c1189e.wgsl.expected.ir.msl
index c80849a..ba9eba4 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/c1189e.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/c1189e.wgsl.expected.ir.msl
@@ -17,8 +17,7 @@
};
uint2 textureDimensions_c1189e(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
@@ -41,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/c1dbf6.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/c1dbf6.wgsl.expected.ir.msl
index b8a5a97..8075370 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/c1dbf6.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/c1dbf6.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_c1dbf6(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/c2cdd3.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/c2cdd3.wgsl.expected.ir.msl
index 9d6d63a..802c733 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/c2cdd3.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/c2cdd3.wgsl.expected.ir.msl
@@ -17,8 +17,7 @@
};
uint2 textureDimensions_c2cdd3(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width();
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height());
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(), tint_module_vars.arg_0.get_height());
return res;
}
@@ -41,9 +40,9 @@
vertex vertex_main_outputs vertex_main(depth2d_ms<float, access::read> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/c44fc1.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/c44fc1.wgsl.expected.ir.msl
index 089dc08..36da347 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/c44fc1.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/c44fc1.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_c44fc1(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/c5a36e.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/c5a36e.wgsl.expected.ir.msl
index 67445d3..b575286 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/c5a36e.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/c5a36e.wgsl.expected.ir.msl
@@ -17,8 +17,7 @@
};
uint2 textureDimensions_c5a36e(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
@@ -41,9 +40,9 @@
vertex vertex_main_outputs vertex_main(depthcube<float, access::sample> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/c6b44c.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/c6b44c.wgsl.expected.ir.msl
index fbdaddb..f2d859e 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/c6b44c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/c6b44c.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_c6b44c(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/c82420.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/c82420.wgsl.expected.ir.msl
index 71e20ed8..d0cc9d8 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/c82420.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/c82420.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_c82420(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/c871f3.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/c871f3.wgsl.expected.ir.msl
index 1893fef..7dbd925 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/c871f3.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/c871f3.wgsl.expected.ir.msl
@@ -17,9 +17,7 @@
};
uint3 textureDimensions_c871f3(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(1u);
- uint const v_1 = tint_module_vars.arg_0.get_height(1u);
- uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(1u));
+ uint3 res = uint3(tint_module_vars.arg_0.get_width(1u), tint_module_vars.arg_0.get_height(1u), tint_module_vars.arg_0.get_depth(1u));
return res;
}
@@ -42,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texture3d<int, access::sample> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_2.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_2.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/ca10cc.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/ca10cc.wgsl.expected.ir.msl
index 8d4236e..6fba22a 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/ca10cc.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/ca10cc.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_ca10cc(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/cad3b7.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/cad3b7.wgsl.expected.ir.msl
index a36c42f..615845b 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/cad3b7.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/cad3b7.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_cad3b7(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/cc947b.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/cc947b.wgsl.expected.ir.msl
index 7241341..bb455c2 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/cc947b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/cc947b.wgsl.expected.ir.msl
@@ -7,9 +7,7 @@
};
uint3 textureDimensions_cc947b(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint const v_1 = tint_module_vars.arg_0.get_height(0u);
- uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(0u));
+ uint3 res = uint3(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u), tint_module_vars.arg_0.get_depth(0u));
return res;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/cd3033.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/cd3033.wgsl.expected.ir.msl
index c828c98..8091bd4 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/cd3033.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/cd3033.wgsl.expected.ir.msl
@@ -17,8 +17,7 @@
};
uint2 textureDimensions_cd3033(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
@@ -41,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texture2d_array<int, access::read> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/cdc6c9.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/cdc6c9.wgsl.expected.ir.dxc.hlsl
index e50d38e..466f94b 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/cdc6c9.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/gen/literal/textureDimensions/cdc6c9.wgsl.expected.ir.dxc.hlsl
@@ -53,56 +53,45 @@
}
float3x3 v_6(uint start_byte_offset) {
- float3 v_7 = asfloat(arg_0_params[(start_byte_offset / 16u)].xyz);
- float3 v_8 = asfloat(arg_0_params[((16u + start_byte_offset) / 16u)].xyz);
- return float3x3(v_7, v_8, asfloat(arg_0_params[((32u + start_byte_offset) / 16u)].xyz));
+ return float3x3(asfloat(arg_0_params[(start_byte_offset / 16u)].xyz), asfloat(arg_0_params[((16u + start_byte_offset) / 16u)].xyz), asfloat(arg_0_params[((32u + start_byte_offset) / 16u)].xyz));
}
-tint_GammaTransferParams v_9(uint start_byte_offset) {
- float v_10 = asfloat(arg_0_params[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]);
- float v_11 = asfloat(arg_0_params[((4u + start_byte_offset) / 16u)][(((4u + start_byte_offset) % 16u) / 4u)]);
- float v_12 = asfloat(arg_0_params[((8u + start_byte_offset) / 16u)][(((8u + start_byte_offset) % 16u) / 4u)]);
- float v_13 = asfloat(arg_0_params[((12u + start_byte_offset) / 16u)][(((12u + start_byte_offset) % 16u) / 4u)]);
- float v_14 = asfloat(arg_0_params[((16u + start_byte_offset) / 16u)][(((16u + start_byte_offset) % 16u) / 4u)]);
- float v_15 = asfloat(arg_0_params[((20u + start_byte_offset) / 16u)][(((20u + start_byte_offset) % 16u) / 4u)]);
- float v_16 = asfloat(arg_0_params[((24u + start_byte_offset) / 16u)][(((24u + start_byte_offset) % 16u) / 4u)]);
- tint_GammaTransferParams v_17 = {v_10, v_11, v_12, v_13, v_14, v_15, v_16, arg_0_params[((28u + start_byte_offset) / 16u)][(((28u + start_byte_offset) % 16u) / 4u)]};
- return v_17;
+tint_GammaTransferParams v_7(uint start_byte_offset) {
+ tint_GammaTransferParams v_8 = {asfloat(arg_0_params[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]), asfloat(arg_0_params[((4u + start_byte_offset) / 16u)][(((4u + start_byte_offset) % 16u) / 4u)]), asfloat(arg_0_params[((8u + start_byte_offset) / 16u)][(((8u + start_byte_offset) % 16u) / 4u)]), asfloat(arg_0_params[((12u + start_byte_offset) / 16u)][(((12u + start_byte_offset) % 16u) / 4u)]), asfloat(arg_0_params[((16u + start_byte_offset) / 16u)][(((16u + start_byte_offset) % 16u) / 4u)]), asfloat(arg_0_params[((20u + start_byte_offset) / 16u)][(((20u + start_byte_offset) % 16u) / 4u)]), asfloat(arg_0_params[((24u + start_byte_offset) / 16u)][(((24u + start_byte_offset) % 16u) / 4u)]), arg_0_params[((28u + start_byte_offset) / 16u)][(((28u + start_byte_offset) % 16u) / 4u)]};
+ return v_8;
}
-float3x4 v_18(uint start_byte_offset) {
- float4 v_19 = asfloat(arg_0_params[(start_byte_offset / 16u)]);
- float4 v_20 = asfloat(arg_0_params[((16u + start_byte_offset) / 16u)]);
- return float3x4(v_19, v_20, asfloat(arg_0_params[((32u + start_byte_offset) / 16u)]));
+float3x4 v_9(uint start_byte_offset) {
+ return float3x4(asfloat(arg_0_params[(start_byte_offset / 16u)]), asfloat(arg_0_params[((16u + start_byte_offset) / 16u)]), asfloat(arg_0_params[((32u + start_byte_offset) / 16u)]));
}
-tint_ExternalTextureParams v_21(uint start_byte_offset) {
- uint v_22 = arg_0_params[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)];
- uint v_23 = arg_0_params[((4u + start_byte_offset) / 16u)][(((4u + start_byte_offset) % 16u) / 4u)];
- float3x4 v_24 = v_18((16u + start_byte_offset));
- tint_GammaTransferParams v_25 = v_9((64u + start_byte_offset));
- tint_GammaTransferParams v_26 = v_9((96u + start_byte_offset));
- float3x3 v_27 = v_6((128u + start_byte_offset));
- float3x2 v_28 = v((176u + start_byte_offset));
- float3x2 v_29 = v((200u + start_byte_offset));
- uint4 v_30 = arg_0_params[((224u + start_byte_offset) / 16u)];
- float2 v_31 = asfloat(((((((224u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_30.zw) : (v_30.xy)));
- uint4 v_32 = arg_0_params[((232u + start_byte_offset) / 16u)];
- float2 v_33 = asfloat(((((((232u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_32.zw) : (v_32.xy)));
- uint4 v_34 = arg_0_params[((240u + start_byte_offset) / 16u)];
- float2 v_35 = asfloat(((((((240u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_34.zw) : (v_34.xy)));
- uint4 v_36 = arg_0_params[((248u + start_byte_offset) / 16u)];
- float2 v_37 = asfloat(((((((248u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_36.zw) : (v_36.xy)));
- uint4 v_38 = arg_0_params[((256u + start_byte_offset) / 16u)];
- uint2 v_39 = ((((((256u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_38.zw) : (v_38.xy));
- uint4 v_40 = arg_0_params[((264u + start_byte_offset) / 16u)];
- tint_ExternalTextureParams v_41 = {v_22, v_23, v_24, v_25, v_26, v_27, v_28, v_29, v_31, v_33, v_35, v_37, v_39, asfloat(((((((264u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_40.zw) : (v_40.xy)))};
- return v_41;
+tint_ExternalTextureParams v_10(uint start_byte_offset) {
+ uint v_11 = arg_0_params[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)];
+ uint v_12 = arg_0_params[((4u + start_byte_offset) / 16u)][(((4u + start_byte_offset) % 16u) / 4u)];
+ float3x4 v_13 = v_9((16u + start_byte_offset));
+ tint_GammaTransferParams v_14 = v_7((64u + start_byte_offset));
+ tint_GammaTransferParams v_15 = v_7((96u + start_byte_offset));
+ float3x3 v_16 = v_6((128u + start_byte_offset));
+ float3x2 v_17 = v((176u + start_byte_offset));
+ float3x2 v_18 = v((200u + start_byte_offset));
+ uint4 v_19 = arg_0_params[((224u + start_byte_offset) / 16u)];
+ float2 v_20 = asfloat(((((((224u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_19.zw) : (v_19.xy)));
+ uint4 v_21 = arg_0_params[((232u + start_byte_offset) / 16u)];
+ float2 v_22 = asfloat(((((((232u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_21.zw) : (v_21.xy)));
+ uint4 v_23 = arg_0_params[((240u + start_byte_offset) / 16u)];
+ float2 v_24 = asfloat(((((((240u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_23.zw) : (v_23.xy)));
+ uint4 v_25 = arg_0_params[((248u + start_byte_offset) / 16u)];
+ float2 v_26 = asfloat(((((((248u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_25.zw) : (v_25.xy)));
+ uint4 v_27 = arg_0_params[((256u + start_byte_offset) / 16u)];
+ uint2 v_28 = ((((((256u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_27.zw) : (v_27.xy));
+ uint4 v_29 = arg_0_params[((264u + start_byte_offset) / 16u)];
+ tint_ExternalTextureParams v_30 = {v_11, v_12, v_13, v_14, v_15, v_16, v_17, v_18, v_20, v_22, v_24, v_26, v_28, asfloat(((((((264u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_29.zw) : (v_29.xy)))};
+ return v_30;
}
uint2 textureDimensions_cdc6c9() {
- tint_ExternalTextureParams v_42 = v_21(0u);
- uint2 res = (v_42.visibleSize + (1u).xx);
+ tint_ExternalTextureParams v_31 = v_10(0u);
+ uint2 res = (v_31.visibleSize + (1u).xx);
return res;
}
@@ -119,13 +108,13 @@
VertexOutput tint_symbol = (VertexOutput)0;
tint_symbol.pos = (0.0f).xxxx;
tint_symbol.prevent_dce = textureDimensions_cdc6c9();
- VertexOutput v_43 = tint_symbol;
- return v_43;
+ VertexOutput v_32 = tint_symbol;
+ return v_32;
}
vertex_main_outputs vertex_main() {
- VertexOutput v_44 = vertex_main_inner();
- vertex_main_outputs v_45 = {v_44.prevent_dce, v_44.pos};
- return v_45;
+ VertexOutput v_33 = vertex_main_inner();
+ vertex_main_outputs v_34 = {v_33.prevent_dce, v_33.pos};
+ return v_34;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/cdc6c9.wgsl.expected.ir.fxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/cdc6c9.wgsl.expected.ir.fxc.hlsl
index e50d38e..466f94b 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/cdc6c9.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/textureDimensions/cdc6c9.wgsl.expected.ir.fxc.hlsl
@@ -53,56 +53,45 @@
}
float3x3 v_6(uint start_byte_offset) {
- float3 v_7 = asfloat(arg_0_params[(start_byte_offset / 16u)].xyz);
- float3 v_8 = asfloat(arg_0_params[((16u + start_byte_offset) / 16u)].xyz);
- return float3x3(v_7, v_8, asfloat(arg_0_params[((32u + start_byte_offset) / 16u)].xyz));
+ return float3x3(asfloat(arg_0_params[(start_byte_offset / 16u)].xyz), asfloat(arg_0_params[((16u + start_byte_offset) / 16u)].xyz), asfloat(arg_0_params[((32u + start_byte_offset) / 16u)].xyz));
}
-tint_GammaTransferParams v_9(uint start_byte_offset) {
- float v_10 = asfloat(arg_0_params[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]);
- float v_11 = asfloat(arg_0_params[((4u + start_byte_offset) / 16u)][(((4u + start_byte_offset) % 16u) / 4u)]);
- float v_12 = asfloat(arg_0_params[((8u + start_byte_offset) / 16u)][(((8u + start_byte_offset) % 16u) / 4u)]);
- float v_13 = asfloat(arg_0_params[((12u + start_byte_offset) / 16u)][(((12u + start_byte_offset) % 16u) / 4u)]);
- float v_14 = asfloat(arg_0_params[((16u + start_byte_offset) / 16u)][(((16u + start_byte_offset) % 16u) / 4u)]);
- float v_15 = asfloat(arg_0_params[((20u + start_byte_offset) / 16u)][(((20u + start_byte_offset) % 16u) / 4u)]);
- float v_16 = asfloat(arg_0_params[((24u + start_byte_offset) / 16u)][(((24u + start_byte_offset) % 16u) / 4u)]);
- tint_GammaTransferParams v_17 = {v_10, v_11, v_12, v_13, v_14, v_15, v_16, arg_0_params[((28u + start_byte_offset) / 16u)][(((28u + start_byte_offset) % 16u) / 4u)]};
- return v_17;
+tint_GammaTransferParams v_7(uint start_byte_offset) {
+ tint_GammaTransferParams v_8 = {asfloat(arg_0_params[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]), asfloat(arg_0_params[((4u + start_byte_offset) / 16u)][(((4u + start_byte_offset) % 16u) / 4u)]), asfloat(arg_0_params[((8u + start_byte_offset) / 16u)][(((8u + start_byte_offset) % 16u) / 4u)]), asfloat(arg_0_params[((12u + start_byte_offset) / 16u)][(((12u + start_byte_offset) % 16u) / 4u)]), asfloat(arg_0_params[((16u + start_byte_offset) / 16u)][(((16u + start_byte_offset) % 16u) / 4u)]), asfloat(arg_0_params[((20u + start_byte_offset) / 16u)][(((20u + start_byte_offset) % 16u) / 4u)]), asfloat(arg_0_params[((24u + start_byte_offset) / 16u)][(((24u + start_byte_offset) % 16u) / 4u)]), arg_0_params[((28u + start_byte_offset) / 16u)][(((28u + start_byte_offset) % 16u) / 4u)]};
+ return v_8;
}
-float3x4 v_18(uint start_byte_offset) {
- float4 v_19 = asfloat(arg_0_params[(start_byte_offset / 16u)]);
- float4 v_20 = asfloat(arg_0_params[((16u + start_byte_offset) / 16u)]);
- return float3x4(v_19, v_20, asfloat(arg_0_params[((32u + start_byte_offset) / 16u)]));
+float3x4 v_9(uint start_byte_offset) {
+ return float3x4(asfloat(arg_0_params[(start_byte_offset / 16u)]), asfloat(arg_0_params[((16u + start_byte_offset) / 16u)]), asfloat(arg_0_params[((32u + start_byte_offset) / 16u)]));
}
-tint_ExternalTextureParams v_21(uint start_byte_offset) {
- uint v_22 = arg_0_params[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)];
- uint v_23 = arg_0_params[((4u + start_byte_offset) / 16u)][(((4u + start_byte_offset) % 16u) / 4u)];
- float3x4 v_24 = v_18((16u + start_byte_offset));
- tint_GammaTransferParams v_25 = v_9((64u + start_byte_offset));
- tint_GammaTransferParams v_26 = v_9((96u + start_byte_offset));
- float3x3 v_27 = v_6((128u + start_byte_offset));
- float3x2 v_28 = v((176u + start_byte_offset));
- float3x2 v_29 = v((200u + start_byte_offset));
- uint4 v_30 = arg_0_params[((224u + start_byte_offset) / 16u)];
- float2 v_31 = asfloat(((((((224u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_30.zw) : (v_30.xy)));
- uint4 v_32 = arg_0_params[((232u + start_byte_offset) / 16u)];
- float2 v_33 = asfloat(((((((232u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_32.zw) : (v_32.xy)));
- uint4 v_34 = arg_0_params[((240u + start_byte_offset) / 16u)];
- float2 v_35 = asfloat(((((((240u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_34.zw) : (v_34.xy)));
- uint4 v_36 = arg_0_params[((248u + start_byte_offset) / 16u)];
- float2 v_37 = asfloat(((((((248u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_36.zw) : (v_36.xy)));
- uint4 v_38 = arg_0_params[((256u + start_byte_offset) / 16u)];
- uint2 v_39 = ((((((256u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_38.zw) : (v_38.xy));
- uint4 v_40 = arg_0_params[((264u + start_byte_offset) / 16u)];
- tint_ExternalTextureParams v_41 = {v_22, v_23, v_24, v_25, v_26, v_27, v_28, v_29, v_31, v_33, v_35, v_37, v_39, asfloat(((((((264u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_40.zw) : (v_40.xy)))};
- return v_41;
+tint_ExternalTextureParams v_10(uint start_byte_offset) {
+ uint v_11 = arg_0_params[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)];
+ uint v_12 = arg_0_params[((4u + start_byte_offset) / 16u)][(((4u + start_byte_offset) % 16u) / 4u)];
+ float3x4 v_13 = v_9((16u + start_byte_offset));
+ tint_GammaTransferParams v_14 = v_7((64u + start_byte_offset));
+ tint_GammaTransferParams v_15 = v_7((96u + start_byte_offset));
+ float3x3 v_16 = v_6((128u + start_byte_offset));
+ float3x2 v_17 = v((176u + start_byte_offset));
+ float3x2 v_18 = v((200u + start_byte_offset));
+ uint4 v_19 = arg_0_params[((224u + start_byte_offset) / 16u)];
+ float2 v_20 = asfloat(((((((224u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_19.zw) : (v_19.xy)));
+ uint4 v_21 = arg_0_params[((232u + start_byte_offset) / 16u)];
+ float2 v_22 = asfloat(((((((232u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_21.zw) : (v_21.xy)));
+ uint4 v_23 = arg_0_params[((240u + start_byte_offset) / 16u)];
+ float2 v_24 = asfloat(((((((240u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_23.zw) : (v_23.xy)));
+ uint4 v_25 = arg_0_params[((248u + start_byte_offset) / 16u)];
+ float2 v_26 = asfloat(((((((248u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_25.zw) : (v_25.xy)));
+ uint4 v_27 = arg_0_params[((256u + start_byte_offset) / 16u)];
+ uint2 v_28 = ((((((256u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_27.zw) : (v_27.xy));
+ uint4 v_29 = arg_0_params[((264u + start_byte_offset) / 16u)];
+ tint_ExternalTextureParams v_30 = {v_11, v_12, v_13, v_14, v_15, v_16, v_17, v_18, v_20, v_22, v_24, v_26, v_28, asfloat(((((((264u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_29.zw) : (v_29.xy)))};
+ return v_30;
}
uint2 textureDimensions_cdc6c9() {
- tint_ExternalTextureParams v_42 = v_21(0u);
- uint2 res = (v_42.visibleSize + (1u).xx);
+ tint_ExternalTextureParams v_31 = v_10(0u);
+ uint2 res = (v_31.visibleSize + (1u).xx);
return res;
}
@@ -119,13 +108,13 @@
VertexOutput tint_symbol = (VertexOutput)0;
tint_symbol.pos = (0.0f).xxxx;
tint_symbol.prevent_dce = textureDimensions_cdc6c9();
- VertexOutput v_43 = tint_symbol;
- return v_43;
+ VertexOutput v_32 = tint_symbol;
+ return v_32;
}
vertex_main_outputs vertex_main() {
- VertexOutput v_44 = vertex_main_inner();
- vertex_main_outputs v_45 = {v_44.prevent_dce, v_44.pos};
- return v_45;
+ VertexOutput v_33 = vertex_main_inner();
+ vertex_main_outputs v_34 = {v_33.prevent_dce, v_33.pos};
+ return v_34;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/cf2b50.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/cf2b50.wgsl.expected.ir.msl
index fd76068..1c31af1 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/cf2b50.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/cf2b50.wgsl.expected.ir.msl
@@ -17,8 +17,7 @@
};
uint2 textureDimensions_cf2b50(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(1u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(1u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(1u), tint_module_vars.arg_0.get_height(1u));
return res;
}
@@ -41,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texturecube_array<float, access::sample> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/d0778e.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/d0778e.wgsl.expected.ir.msl
index 0747899..df8fc6b 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/d0778e.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/d0778e.wgsl.expected.ir.msl
@@ -17,9 +17,7 @@
};
uint3 textureDimensions_d0778e(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint const v_1 = tint_module_vars.arg_0.get_height(0u);
- uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(0u));
+ uint3 res = uint3(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u), tint_module_vars.arg_0.get_depth(0u));
return res;
}
@@ -42,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texture3d<uint, access::read> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_2.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_2.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/d1b882.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/d1b882.wgsl.expected.ir.msl
index 5c65808..7fffe0c 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/d1b882.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/d1b882.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_d1b882(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/d3accd.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/d3accd.wgsl.expected.ir.msl
index ea2f0d7..7155c8a 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/d3accd.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/d3accd.wgsl.expected.ir.msl
@@ -17,8 +17,7 @@
};
uint2 textureDimensions_d3accd(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(1u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(1u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(1u), tint_module_vars.arg_0.get_height(1u));
return res;
}
@@ -41,9 +40,9 @@
vertex vertex_main_outputs vertex_main(depthcube<float, access::sample> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/d44ac3.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/d44ac3.wgsl.expected.ir.msl
index 2d9c6a9..47f5ee5 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/d44ac3.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/d44ac3.wgsl.expected.ir.msl
@@ -17,8 +17,7 @@
};
uint2 textureDimensions_d44ac3(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
@@ -41,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texture2d<float, access::read> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/d44dd1.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/d44dd1.wgsl.expected.ir.msl
index e21a8f6..c2b64e2 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/d44dd1.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/d44dd1.wgsl.expected.ir.msl
@@ -17,8 +17,7 @@
};
uint2 textureDimensions_d44dd1(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
@@ -41,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texture2d<uint, access::read> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/d63c28.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/d63c28.wgsl.expected.ir.msl
index ee1d879..acf909c 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/d63c28.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/d63c28.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_d63c28(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/d6f3cf.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/d6f3cf.wgsl.expected.ir.msl
index 83100b7..bcd3426 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/d6f3cf.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/d6f3cf.wgsl.expected.ir.msl
@@ -17,8 +17,7 @@
};
uint2 textureDimensions_d6f3cf(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
@@ -41,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texture2d<int, access::read> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/d8ba68.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/d8ba68.wgsl.expected.ir.msl
index 8c7338c..858a620 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/d8ba68.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/d8ba68.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_d8ba68(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/d8f887.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/d8f887.wgsl.expected.ir.msl
index d936b3b..a5d23e8 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/d8f887.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/d8f887.wgsl.expected.ir.msl
@@ -7,9 +7,7 @@
};
uint3 textureDimensions_d8f887(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint const v_1 = tint_module_vars.arg_0.get_height(0u);
- uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(0u));
+ uint3 res = uint3(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u), tint_module_vars.arg_0.get_depth(0u));
return res;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/daf0fe.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/daf0fe.wgsl.expected.ir.msl
index e05161c..e5d9e0c 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/daf0fe.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/daf0fe.wgsl.expected.ir.msl
@@ -17,8 +17,7 @@
};
uint2 textureDimensions_daf0fe(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
@@ -41,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/db7131.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/db7131.wgsl.expected.ir.msl
index aa7a762..26d0b88 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/db7131.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/db7131.wgsl.expected.ir.msl
@@ -17,9 +17,7 @@
};
uint3 textureDimensions_db7131(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint const v_1 = tint_module_vars.arg_0.get_height(0u);
- uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(0u));
+ uint3 res = uint3(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u), tint_module_vars.arg_0.get_depth(0u));
return res;
}
@@ -42,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texture3d<int, access::read> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_2.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_2.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/dc83ce.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/dc83ce.wgsl.expected.ir.msl
index 0f796c6..1d5bd19 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/dc83ce.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/dc83ce.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_dc83ce(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/deb3c0.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/deb3c0.wgsl.expected.ir.msl
index 5362354..48b2c49 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/deb3c0.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/deb3c0.wgsl.expected.ir.msl
@@ -7,9 +7,7 @@
};
uint3 textureDimensions_deb3c0(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint const v_1 = tint_module_vars.arg_0.get_height(0u);
- uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(0u));
+ uint3 res = uint3(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u), tint_module_vars.arg_0.get_depth(0u));
return res;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/dee461.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/dee461.wgsl.expected.ir.msl
index 8f9bd34..ac3cf4b 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/dee461.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/dee461.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_dee461(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/dfdc32.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/dfdc32.wgsl.expected.ir.msl
index e907853..efc7df4 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/dfdc32.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/dfdc32.wgsl.expected.ir.msl
@@ -18,8 +18,7 @@
uint2 textureDimensions_dfdc32(tint_module_vars_struct tint_module_vars) {
uint const v = uint(1);
- uint const v_1 = tint_module_vars.arg_0.get_width(v);
- uint2 res = uint2(v_1, tint_module_vars.arg_0.get_height(v));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(v), tint_module_vars.arg_0.get_height(v));
return res;
}
@@ -42,9 +41,9 @@
vertex vertex_main_outputs vertex_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_2.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_2.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v_1.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/e18a8b.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/e18a8b.wgsl.expected.ir.msl
index b7993b4..8ccb6b5 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/e18a8b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/e18a8b.wgsl.expected.ir.msl
@@ -17,8 +17,7 @@
};
uint2 textureDimensions_e18a8b(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(1u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(1u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(1u), tint_module_vars.arg_0.get_height(1u));
return res;
}
@@ -41,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texture2d<uint, access::sample> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/e4bfd2.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/e4bfd2.wgsl.expected.ir.msl
index df157ac..d00d51d 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/e4bfd2.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/e4bfd2.wgsl.expected.ir.msl
@@ -17,8 +17,7 @@
};
uint2 textureDimensions_e4bfd2(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width();
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height());
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(), tint_module_vars.arg_0.get_height());
return res;
}
@@ -41,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texture2d_ms<uint, access::read> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/e4e310.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/e4e310.wgsl.expected.ir.msl
index 1c3d867..513e365 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/e4e310.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/e4e310.wgsl.expected.ir.msl
@@ -17,8 +17,7 @@
};
uint2 textureDimensions_e4e310(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(1u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(1u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(1u), tint_module_vars.arg_0.get_height(1u));
return res;
}
@@ -41,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texture2d_array<int, access::sample> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/e4f021.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/e4f021.wgsl.expected.ir.msl
index 089db84..8090733 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/e4f021.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/e4f021.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_e4f021(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/e50eb8.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/e50eb8.wgsl.expected.ir.msl
index 1bf6d8f..898f9ca 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/e50eb8.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/e50eb8.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_e50eb8(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/e5a203.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/e5a203.wgsl.expected.ir.msl
index 02c25f3..8de23b4 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/e5a203.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/e5a203.wgsl.expected.ir.msl
@@ -18,9 +18,7 @@
uint3 textureDimensions_e5a203(tint_module_vars_struct tint_module_vars) {
uint const v = uint(1);
- uint const v_1 = tint_module_vars.arg_0.get_width(v);
- uint const v_2 = tint_module_vars.arg_0.get_height(v);
- uint3 res = uint3(v_1, v_2, tint_module_vars.arg_0.get_depth(v));
+ uint3 res = uint3(tint_module_vars.arg_0.get_width(v), tint_module_vars.arg_0.get_height(v), tint_module_vars.arg_0.get_depth(v));
return res;
}
@@ -43,9 +41,9 @@
vertex vertex_main_outputs vertex_main(texture3d<uint, access::sample> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_3 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_3.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_3.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v_1.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/e738f4.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/e738f4.wgsl.expected.ir.msl
index d911ffa..4cab686 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/e738f4.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/e738f4.wgsl.expected.ir.msl
@@ -7,9 +7,7 @@
};
uint3 textureDimensions_e738f4(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint const v_1 = tint_module_vars.arg_0.get_height(0u);
- uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(0u));
+ uint3 res = uint3(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u), tint_module_vars.arg_0.get_depth(0u));
return res;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/e824b6.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/e824b6.wgsl.expected.ir.msl
index 16d0da3..7b2711a 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/e824b6.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/e824b6.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_e824b6(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/e99308.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/e99308.wgsl.expected.ir.msl
index 96a8e48..3dfe8e9 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/e99308.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/e99308.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_e99308(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/eafe19.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/eafe19.wgsl.expected.ir.msl
index ac5c7d0..1e733f6 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/eafe19.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/eafe19.wgsl.expected.ir.msl
@@ -17,8 +17,7 @@
};
uint2 textureDimensions_eafe19(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(1u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(1u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(1u), tint_module_vars.arg_0.get_height(1u));
return res;
}
@@ -41,9 +40,9 @@
vertex vertex_main_outputs vertex_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/eb03b1.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/eb03b1.wgsl.expected.ir.msl
index 3fce652..cd86bff 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/eb03b1.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/eb03b1.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_eb03b1(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/eb10d6.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/eb10d6.wgsl.expected.ir.msl
index 3a560ae..7d4c8ae 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/eb10d6.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/eb10d6.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_eb10d6(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/eb9f4d.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/eb9f4d.wgsl.expected.ir.msl
index f45c04b..e8d2c88 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/eb9f4d.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/eb9f4d.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_eb9f4d(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/ed1030.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/ed1030.wgsl.expected.ir.msl
index 7873284..608e540 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/ed1030.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/ed1030.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_ed1030(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/ef2e58.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/ef2e58.wgsl.expected.ir.msl
index 79ce0da7..4f57f19 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/ef2e58.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/ef2e58.wgsl.expected.ir.msl
@@ -7,9 +7,7 @@
};
uint3 textureDimensions_ef2e58(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint const v_1 = tint_module_vars.arg_0.get_height(0u);
- uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(0u));
+ uint3 res = uint3(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u), tint_module_vars.arg_0.get_depth(0u));
return res;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/f3a2ac.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/f3a2ac.wgsl.expected.ir.msl
index dee0b81..b6d691e 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/f3a2ac.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/f3a2ac.wgsl.expected.ir.msl
@@ -7,9 +7,7 @@
};
uint3 textureDimensions_f3a2ac(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint const v_1 = tint_module_vars.arg_0.get_height(0u);
- uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(0u));
+ uint3 res = uint3(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u), tint_module_vars.arg_0.get_depth(0u));
return res;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/f4321c.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/f4321c.wgsl.expected.ir.msl
index ab46020..7b9bf79 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/f4321c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/f4321c.wgsl.expected.ir.msl
@@ -17,9 +17,7 @@
};
uint3 textureDimensions_f4321c(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint const v_1 = tint_module_vars.arg_0.get_height(0u);
- uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(0u));
+ uint3 res = uint3(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u), tint_module_vars.arg_0.get_depth(0u));
return res;
}
@@ -42,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texture3d<int, access::read> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_2.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_2.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/f48886.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/f48886.wgsl.expected.ir.msl
index 959c45a..d95905e 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/f48886.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/f48886.wgsl.expected.ir.msl
@@ -17,8 +17,7 @@
};
uint2 textureDimensions_f48886(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
@@ -41,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texture2d<int, access::read> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/f4e469.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/f4e469.wgsl.expected.ir.msl
index ce02a56..11908a2 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/f4e469.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/f4e469.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_f4e469(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/f55a94.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/f55a94.wgsl.expected.ir.msl
index 5f477a2..9bbecd5 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/f55a94.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/f55a94.wgsl.expected.ir.msl
@@ -7,9 +7,7 @@
};
uint3 textureDimensions_f55a94(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint const v_1 = tint_module_vars.arg_0.get_height(0u);
- uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(0u));
+ uint3 res = uint3(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u), tint_module_vars.arg_0.get_depth(0u));
return res;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/f626b3.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/f626b3.wgsl.expected.ir.msl
index b94bc98..20fac94 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/f626b3.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/f626b3.wgsl.expected.ir.msl
@@ -17,8 +17,7 @@
};
uint2 textureDimensions_f626b3(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
@@ -41,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texturecube<int, access::sample> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/f7bac5.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/f7bac5.wgsl.expected.ir.msl
index e7d0476..020c015 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/f7bac5.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/f7bac5.wgsl.expected.ir.msl
@@ -17,8 +17,7 @@
};
uint2 textureDimensions_f7bac5(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
@@ -41,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texture2d_array<int, access::read> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/f8522e.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/f8522e.wgsl.expected.ir.msl
index 39021b5..74c0a28 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/f8522e.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/f8522e.wgsl.expected.ir.msl
@@ -17,8 +17,7 @@
};
uint2 textureDimensions_f8522e(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
@@ -41,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texture2d<int, access::sample> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/f93ece.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/f93ece.wgsl.expected.ir.msl
index 84ced912..b7c9004 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/f93ece.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/f93ece.wgsl.expected.ir.msl
@@ -7,9 +7,7 @@
};
uint3 textureDimensions_f93ece(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint const v_1 = tint_module_vars.arg_0.get_height(0u);
- uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(0u));
+ uint3 res = uint3(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u), tint_module_vars.arg_0.get_depth(0u));
return res;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/f94e55.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/f94e55.wgsl.expected.ir.msl
index 6ad8bf1..e42bb1f 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/f94e55.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/f94e55.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_f94e55(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/fbb15a.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/fbb15a.wgsl.expected.ir.msl
index a841b86..dffa61c 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/fbb15a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/fbb15a.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_fbb15a(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/fdf6e9.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/fdf6e9.wgsl.expected.ir.msl
index c19a7cf..eb90256 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/fdf6e9.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/fdf6e9.wgsl.expected.ir.msl
@@ -18,8 +18,7 @@
uint2 textureDimensions_fdf6e9(tint_module_vars_struct tint_module_vars) {
uint const v = uint(1);
- uint const v_1 = tint_module_vars.arg_0.get_width(v);
- uint2 res = uint2(v_1, tint_module_vars.arg_0.get_height(v));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(v), tint_module_vars.arg_0.get_height(v));
return res;
}
@@ -42,9 +41,9 @@
vertex vertex_main_outputs vertex_main(texture2d_array<int, access::sample> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_2.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_2.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v_1.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/literal/textureLoad/1bfdfb.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/1bfdfb.wgsl.expected.glsl
index e26d058..64a6471 100644
--- a/test/tint/builtins/gen/literal/textureLoad/1bfdfb.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/literal/textureLoad/1bfdfb.wgsl.expected.glsl
@@ -71,42 +71,38 @@
uniform highp sampler2D arg_0_plane1;
vec3 tint_GammaCorrection(vec3 v, tint_GammaTransferParams params) {
vec3 v_3 = vec3(params.G);
- vec3 v_4 = vec3(params.D);
- vec3 v_5 = abs(v);
- vec3 v_6 = sign(v);
- bvec3 v_7 = lessThan(v_5, v_4);
- return mix((v_6 * (pow(((params.A * v_5) + params.B), v_3) + params.E)), (v_6 * ((params.C * v_5) + params.F)), v_7);
+ return mix((sign(v) * (pow(((params.A * abs(v)) + params.B), v_3) + params.E)), (sign(v) * ((params.C * abs(v)) + params.F)), lessThan(abs(v), vec3(params.D)));
}
vec4 tint_TextureLoadExternal(tint_ExternalTextureParams params, uvec2 coords) {
- vec2 v_8 = round((params.loadTransform * vec3(vec2(min(coords, params.visibleSize)), 1.0f)));
- uvec2 v_9 = uvec2(v_8);
- vec3 v_10 = vec3(0.0f);
- float v_11 = 0.0f;
+ vec2 v_4 = round((params.loadTransform * vec3(vec2(min(coords, params.visibleSize)), 1.0f)));
+ uvec2 v_5 = uvec2(v_4);
+ vec3 v_6 = vec3(0.0f);
+ float v_7 = 0.0f;
if ((params.numPlanes == 1u)) {
- ivec2 v_12 = ivec2(v_9);
- vec4 v_13 = texelFetch(arg_0_plane0, v_12, int(0u));
- v_10 = v_13.xyz;
- v_11 = v_13[3u];
+ ivec2 v_8 = ivec2(v_5);
+ vec4 v_9 = texelFetch(arg_0_plane0, v_8, int(0u));
+ v_6 = v_9.xyz;
+ v_7 = v_9[3u];
} else {
- ivec2 v_14 = ivec2(v_9);
- float v_15 = texelFetch(arg_0_plane0, v_14, int(0u))[0u];
- ivec2 v_16 = ivec2(uvec2((v_8 * params.plane1CoordFactor)));
- v_10 = (vec4(v_15, texelFetch(arg_0_plane1, v_16, int(0u)).xy, 1.0f) * params.yuvToRgbConversionMatrix);
- v_11 = 1.0f;
+ ivec2 v_10 = ivec2(v_5);
+ float v_11 = texelFetch(arg_0_plane0, v_10, int(0u))[0u];
+ ivec2 v_12 = ivec2(uvec2((v_4 * params.plane1CoordFactor)));
+ v_6 = (vec4(v_11, texelFetch(arg_0_plane1, v_12, int(0u)).xy, 1.0f) * params.yuvToRgbConversionMatrix);
+ v_7 = 1.0f;
}
- vec3 v_17 = v_10;
- vec3 v_18 = vec3(0.0f);
+ vec3 v_13 = v_6;
+ vec3 v_14 = vec3(0.0f);
if ((params.doYuvToRgbConversionOnly == 0u)) {
- v_18 = tint_GammaCorrection((params.gamutConversionMatrix * tint_GammaCorrection(v_17, params.gammaDecodeParams)), params.gammaEncodeParams);
+ v_14 = tint_GammaCorrection((params.gamutConversionMatrix * tint_GammaCorrection(v_13, params.gammaDecodeParams)), params.gammaEncodeParams);
} else {
- v_18 = v_17;
+ v_14 = v_13;
}
- return vec4(v_18, v_11);
+ return vec4(v_14, v_7);
}
tint_ExternalTextureParams tint_convert_tint_ExternalTextureParams(tint_ExternalTextureParams_std140 tint_input) {
- mat3 v_19 = mat3(tint_input.gamutConversionMatrix_col0, tint_input.gamutConversionMatrix_col1, tint_input.gamutConversionMatrix_col2);
- mat3x2 v_20 = mat3x2(tint_input.sampleTransform_col0, tint_input.sampleTransform_col1, tint_input.sampleTransform_col2);
- return tint_ExternalTextureParams(tint_input.numPlanes, tint_input.doYuvToRgbConversionOnly, tint_input.yuvToRgbConversionMatrix, tint_input.gammaDecodeParams, tint_input.gammaEncodeParams, v_19, v_20, mat3x2(tint_input.loadTransform_col0, tint_input.loadTransform_col1, tint_input.loadTransform_col2), tint_input.samplePlane0RectMin, tint_input.samplePlane0RectMax, tint_input.samplePlane1RectMin, tint_input.samplePlane1RectMax, tint_input.visibleSize, tint_input.plane1CoordFactor);
+ mat3 v_15 = mat3(tint_input.gamutConversionMatrix_col0, tint_input.gamutConversionMatrix_col1, tint_input.gamutConversionMatrix_col2);
+ mat3x2 v_16 = mat3x2(tint_input.sampleTransform_col0, tint_input.sampleTransform_col1, tint_input.sampleTransform_col2);
+ return tint_ExternalTextureParams(tint_input.numPlanes, tint_input.doYuvToRgbConversionOnly, tint_input.yuvToRgbConversionMatrix, tint_input.gammaDecodeParams, tint_input.gammaEncodeParams, v_15, v_16, mat3x2(tint_input.loadTransform_col0, tint_input.loadTransform_col1, tint_input.loadTransform_col2), tint_input.samplePlane0RectMin, tint_input.samplePlane0RectMax, tint_input.samplePlane1RectMin, tint_input.samplePlane1RectMax, tint_input.visibleSize, tint_input.plane1CoordFactor);
}
vec4 textureLoad_1bfdfb() {
vec4 res = tint_TextureLoadExternal(tint_convert_tint_ExternalTextureParams(v_2.inner), uvec2(1u));
@@ -186,42 +182,38 @@
uniform highp sampler2D arg_0_plane1;
vec3 tint_GammaCorrection(vec3 v, tint_GammaTransferParams params) {
vec3 v_3 = vec3(params.G);
- vec3 v_4 = vec3(params.D);
- vec3 v_5 = abs(v);
- vec3 v_6 = sign(v);
- bvec3 v_7 = lessThan(v_5, v_4);
- return mix((v_6 * (pow(((params.A * v_5) + params.B), v_3) + params.E)), (v_6 * ((params.C * v_5) + params.F)), v_7);
+ return mix((sign(v) * (pow(((params.A * abs(v)) + params.B), v_3) + params.E)), (sign(v) * ((params.C * abs(v)) + params.F)), lessThan(abs(v), vec3(params.D)));
}
vec4 tint_TextureLoadExternal(tint_ExternalTextureParams params, uvec2 coords) {
- vec2 v_8 = round((params.loadTransform * vec3(vec2(min(coords, params.visibleSize)), 1.0f)));
- uvec2 v_9 = uvec2(v_8);
- vec3 v_10 = vec3(0.0f);
- float v_11 = 0.0f;
+ vec2 v_4 = round((params.loadTransform * vec3(vec2(min(coords, params.visibleSize)), 1.0f)));
+ uvec2 v_5 = uvec2(v_4);
+ vec3 v_6 = vec3(0.0f);
+ float v_7 = 0.0f;
if ((params.numPlanes == 1u)) {
- ivec2 v_12 = ivec2(v_9);
- vec4 v_13 = texelFetch(arg_0_plane0, v_12, int(0u));
- v_10 = v_13.xyz;
- v_11 = v_13[3u];
+ ivec2 v_8 = ivec2(v_5);
+ vec4 v_9 = texelFetch(arg_0_plane0, v_8, int(0u));
+ v_6 = v_9.xyz;
+ v_7 = v_9[3u];
} else {
- ivec2 v_14 = ivec2(v_9);
- float v_15 = texelFetch(arg_0_plane0, v_14, int(0u))[0u];
- ivec2 v_16 = ivec2(uvec2((v_8 * params.plane1CoordFactor)));
- v_10 = (vec4(v_15, texelFetch(arg_0_plane1, v_16, int(0u)).xy, 1.0f) * params.yuvToRgbConversionMatrix);
- v_11 = 1.0f;
+ ivec2 v_10 = ivec2(v_5);
+ float v_11 = texelFetch(arg_0_plane0, v_10, int(0u))[0u];
+ ivec2 v_12 = ivec2(uvec2((v_4 * params.plane1CoordFactor)));
+ v_6 = (vec4(v_11, texelFetch(arg_0_plane1, v_12, int(0u)).xy, 1.0f) * params.yuvToRgbConversionMatrix);
+ v_7 = 1.0f;
}
- vec3 v_17 = v_10;
- vec3 v_18 = vec3(0.0f);
+ vec3 v_13 = v_6;
+ vec3 v_14 = vec3(0.0f);
if ((params.doYuvToRgbConversionOnly == 0u)) {
- v_18 = tint_GammaCorrection((params.gamutConversionMatrix * tint_GammaCorrection(v_17, params.gammaDecodeParams)), params.gammaEncodeParams);
+ v_14 = tint_GammaCorrection((params.gamutConversionMatrix * tint_GammaCorrection(v_13, params.gammaDecodeParams)), params.gammaEncodeParams);
} else {
- v_18 = v_17;
+ v_14 = v_13;
}
- return vec4(v_18, v_11);
+ return vec4(v_14, v_7);
}
tint_ExternalTextureParams tint_convert_tint_ExternalTextureParams(tint_ExternalTextureParams_std140 tint_input) {
- mat3 v_19 = mat3(tint_input.gamutConversionMatrix_col0, tint_input.gamutConversionMatrix_col1, tint_input.gamutConversionMatrix_col2);
- mat3x2 v_20 = mat3x2(tint_input.sampleTransform_col0, tint_input.sampleTransform_col1, tint_input.sampleTransform_col2);
- return tint_ExternalTextureParams(tint_input.numPlanes, tint_input.doYuvToRgbConversionOnly, tint_input.yuvToRgbConversionMatrix, tint_input.gammaDecodeParams, tint_input.gammaEncodeParams, v_19, v_20, mat3x2(tint_input.loadTransform_col0, tint_input.loadTransform_col1, tint_input.loadTransform_col2), tint_input.samplePlane0RectMin, tint_input.samplePlane0RectMax, tint_input.samplePlane1RectMin, tint_input.samplePlane1RectMax, tint_input.visibleSize, tint_input.plane1CoordFactor);
+ mat3 v_15 = mat3(tint_input.gamutConversionMatrix_col0, tint_input.gamutConversionMatrix_col1, tint_input.gamutConversionMatrix_col2);
+ mat3x2 v_16 = mat3x2(tint_input.sampleTransform_col0, tint_input.sampleTransform_col1, tint_input.sampleTransform_col2);
+ return tint_ExternalTextureParams(tint_input.numPlanes, tint_input.doYuvToRgbConversionOnly, tint_input.yuvToRgbConversionMatrix, tint_input.gammaDecodeParams, tint_input.gammaEncodeParams, v_15, v_16, mat3x2(tint_input.loadTransform_col0, tint_input.loadTransform_col1, tint_input.loadTransform_col2), tint_input.samplePlane0RectMin, tint_input.samplePlane0RectMax, tint_input.samplePlane1RectMin, tint_input.samplePlane1RectMax, tint_input.visibleSize, tint_input.plane1CoordFactor);
}
vec4 textureLoad_1bfdfb() {
vec4 res = tint_TextureLoadExternal(tint_convert_tint_ExternalTextureParams(v_2.inner), uvec2(1u));
@@ -304,42 +296,38 @@
layout(location = 0) flat out vec4 vertex_main_loc0_Output;
vec3 tint_GammaCorrection(vec3 v, tint_GammaTransferParams params) {
vec3 v_2 = vec3(params.G);
- vec3 v_3 = vec3(params.D);
- vec3 v_4 = abs(v);
- vec3 v_5 = sign(v);
- bvec3 v_6 = lessThan(v_4, v_3);
- return mix((v_5 * (pow(((params.A * v_4) + params.B), v_2) + params.E)), (v_5 * ((params.C * v_4) + params.F)), v_6);
+ return mix((sign(v) * (pow(((params.A * abs(v)) + params.B), v_2) + params.E)), (sign(v) * ((params.C * abs(v)) + params.F)), lessThan(abs(v), vec3(params.D)));
}
vec4 tint_TextureLoadExternal(tint_ExternalTextureParams params, uvec2 coords) {
- vec2 v_7 = round((params.loadTransform * vec3(vec2(min(coords, params.visibleSize)), 1.0f)));
- uvec2 v_8 = uvec2(v_7);
- vec3 v_9 = vec3(0.0f);
- float v_10 = 0.0f;
+ vec2 v_3 = round((params.loadTransform * vec3(vec2(min(coords, params.visibleSize)), 1.0f)));
+ uvec2 v_4 = uvec2(v_3);
+ vec3 v_5 = vec3(0.0f);
+ float v_6 = 0.0f;
if ((params.numPlanes == 1u)) {
- ivec2 v_11 = ivec2(v_8);
- vec4 v_12 = texelFetch(arg_0_plane0, v_11, int(0u));
- v_9 = v_12.xyz;
- v_10 = v_12[3u];
+ ivec2 v_7 = ivec2(v_4);
+ vec4 v_8 = texelFetch(arg_0_plane0, v_7, int(0u));
+ v_5 = v_8.xyz;
+ v_6 = v_8[3u];
} else {
- ivec2 v_13 = ivec2(v_8);
- float v_14 = texelFetch(arg_0_plane0, v_13, int(0u))[0u];
- ivec2 v_15 = ivec2(uvec2((v_7 * params.plane1CoordFactor)));
- v_9 = (vec4(v_14, texelFetch(arg_0_plane1, v_15, int(0u)).xy, 1.0f) * params.yuvToRgbConversionMatrix);
- v_10 = 1.0f;
+ ivec2 v_9 = ivec2(v_4);
+ float v_10 = texelFetch(arg_0_plane0, v_9, int(0u))[0u];
+ ivec2 v_11 = ivec2(uvec2((v_3 * params.plane1CoordFactor)));
+ v_5 = (vec4(v_10, texelFetch(arg_0_plane1, v_11, int(0u)).xy, 1.0f) * params.yuvToRgbConversionMatrix);
+ v_6 = 1.0f;
}
- vec3 v_16 = v_9;
- vec3 v_17 = vec3(0.0f);
+ vec3 v_12 = v_5;
+ vec3 v_13 = vec3(0.0f);
if ((params.doYuvToRgbConversionOnly == 0u)) {
- v_17 = tint_GammaCorrection((params.gamutConversionMatrix * tint_GammaCorrection(v_16, params.gammaDecodeParams)), params.gammaEncodeParams);
+ v_13 = tint_GammaCorrection((params.gamutConversionMatrix * tint_GammaCorrection(v_12, params.gammaDecodeParams)), params.gammaEncodeParams);
} else {
- v_17 = v_16;
+ v_13 = v_12;
}
- return vec4(v_17, v_10);
+ return vec4(v_13, v_6);
}
tint_ExternalTextureParams tint_convert_tint_ExternalTextureParams(tint_ExternalTextureParams_std140 tint_input) {
- mat3 v_18 = mat3(tint_input.gamutConversionMatrix_col0, tint_input.gamutConversionMatrix_col1, tint_input.gamutConversionMatrix_col2);
- mat3x2 v_19 = mat3x2(tint_input.sampleTransform_col0, tint_input.sampleTransform_col1, tint_input.sampleTransform_col2);
- return tint_ExternalTextureParams(tint_input.numPlanes, tint_input.doYuvToRgbConversionOnly, tint_input.yuvToRgbConversionMatrix, tint_input.gammaDecodeParams, tint_input.gammaEncodeParams, v_18, v_19, mat3x2(tint_input.loadTransform_col0, tint_input.loadTransform_col1, tint_input.loadTransform_col2), tint_input.samplePlane0RectMin, tint_input.samplePlane0RectMax, tint_input.samplePlane1RectMin, tint_input.samplePlane1RectMax, tint_input.visibleSize, tint_input.plane1CoordFactor);
+ mat3 v_14 = mat3(tint_input.gamutConversionMatrix_col0, tint_input.gamutConversionMatrix_col1, tint_input.gamutConversionMatrix_col2);
+ mat3x2 v_15 = mat3x2(tint_input.sampleTransform_col0, tint_input.sampleTransform_col1, tint_input.sampleTransform_col2);
+ return tint_ExternalTextureParams(tint_input.numPlanes, tint_input.doYuvToRgbConversionOnly, tint_input.yuvToRgbConversionMatrix, tint_input.gammaDecodeParams, tint_input.gammaEncodeParams, v_14, v_15, mat3x2(tint_input.loadTransform_col0, tint_input.loadTransform_col1, tint_input.loadTransform_col2), tint_input.samplePlane0RectMin, tint_input.samplePlane0RectMax, tint_input.samplePlane1RectMin, tint_input.samplePlane1RectMax, tint_input.visibleSize, tint_input.plane1CoordFactor);
}
vec4 textureLoad_1bfdfb() {
vec4 res = tint_TextureLoadExternal(tint_convert_tint_ExternalTextureParams(v_1.inner), uvec2(1u));
@@ -352,10 +340,10 @@
return tint_symbol;
}
void main() {
- VertexOutput v_20 = vertex_main_inner();
- gl_Position = v_20.pos;
+ VertexOutput v_16 = vertex_main_inner();
+ gl_Position = v_16.pos;
gl_Position[1u] = -(gl_Position.y);
gl_Position[2u] = ((2.0f * gl_Position.z) - gl_Position.w);
- vertex_main_loc0_Output = v_20.prevent_dce;
+ vertex_main_loc0_Output = v_16.prevent_dce;
gl_PointSize = 1.0f;
}
diff --git a/test/tint/builtins/gen/literal/textureLoad/1bfdfb.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/1bfdfb.wgsl.expected.ir.dxc.hlsl
index fbadc9a..eabab63 100644
--- a/test/tint/builtins/gen/literal/textureLoad/1bfdfb.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/gen/literal/textureLoad/1bfdfb.wgsl.expected.ir.dxc.hlsl
@@ -50,100 +50,88 @@
float3 tint_GammaCorrection(float3 v, tint_GammaTransferParams params) {
float3 v_1 = float3((params.G).xxx);
float3 v_2 = float3((params.D).xxx);
- float3 v_3 = abs(v);
- float3 v_4 = float3(sign(v));
- return (((v_3 < v_2)) ? ((v_4 * ((params.C * v_3) + params.F))) : ((v_4 * (pow(((params.A * v_3) + params.B), v_1) + params.E))));
+ float3 v_3 = float3(sign(v));
+ return (((abs(v) < v_2)) ? ((v_3 * ((params.C * abs(v)) + params.F))) : ((v_3 * (pow(((params.A * abs(v)) + params.B), v_1) + params.E))));
}
float4 tint_TextureLoadExternal(Texture2D<float4> plane_0, Texture2D<float4> plane_1, tint_ExternalTextureParams params, uint2 coords) {
- float2 v_5 = round(mul(float3(float2(min(coords, params.visibleSize)), 1.0f), params.loadTransform));
- uint2 v_6 = tint_v2f32_to_v2u32(v_5);
- float3 v_7 = (0.0f).xxx;
- float v_8 = 0.0f;
+ float2 v_4 = round(mul(float3(float2(min(coords, params.visibleSize)), 1.0f), params.loadTransform));
+ uint2 v_5 = tint_v2f32_to_v2u32(v_4);
+ float3 v_6 = (0.0f).xxx;
+ float v_7 = 0.0f;
if ((params.numPlanes == 1u)) {
- int2 v_9 = int2(v_6);
- float4 v_10 = float4(plane_0.Load(int3(v_9, int(0u))));
- v_7 = v_10.xyz;
- v_8 = v_10.w;
+ int2 v_8 = int2(v_5);
+ float4 v_9 = float4(plane_0.Load(int3(v_8, int(0u))));
+ v_6 = v_9.xyz;
+ v_7 = v_9.w;
} else {
- int2 v_11 = int2(v_6);
- float v_12 = float4(plane_0.Load(int3(v_11, int(0u)))).x;
- int2 v_13 = int2(tint_v2f32_to_v2u32((v_5 * params.plane1CoordFactor)));
- v_7 = mul(params.yuvToRgbConversionMatrix, float4(v_12, float4(plane_1.Load(int3(v_13, int(0u)))).xy, 1.0f));
- v_8 = 1.0f;
+ int2 v_10 = int2(v_5);
+ float v_11 = float4(plane_0.Load(int3(v_10, int(0u)))).x;
+ int2 v_12 = int2(tint_v2f32_to_v2u32((v_4 * params.plane1CoordFactor)));
+ v_6 = mul(params.yuvToRgbConversionMatrix, float4(v_11, float4(plane_1.Load(int3(v_12, int(0u)))).xy, 1.0f));
+ v_7 = 1.0f;
}
- float3 v_14 = v_7;
- float3 v_15 = (0.0f).xxx;
+ float3 v_13 = v_6;
+ float3 v_14 = (0.0f).xxx;
if ((params.doYuvToRgbConversionOnly == 0u)) {
- tint_GammaTransferParams v_16 = params.gammaDecodeParams;
- tint_GammaTransferParams v_17 = params.gammaEncodeParams;
- v_15 = tint_GammaCorrection(mul(tint_GammaCorrection(v_14, v_16), params.gamutConversionMatrix), v_17);
+ tint_GammaTransferParams v_15 = params.gammaDecodeParams;
+ tint_GammaTransferParams v_16 = params.gammaEncodeParams;
+ v_14 = tint_GammaCorrection(mul(tint_GammaCorrection(v_13, v_15), params.gamutConversionMatrix), v_16);
} else {
- v_15 = v_14;
+ v_14 = v_13;
}
- return float4(v_15, v_8);
+ return float4(v_14, v_7);
}
-float3x2 v_18(uint start_byte_offset) {
- uint4 v_19 = arg_0_params[(start_byte_offset / 16u)];
- float2 v_20 = asfloat((((((start_byte_offset % 16u) / 4u) == 2u)) ? (v_19.zw) : (v_19.xy)));
- uint4 v_21 = arg_0_params[((8u + start_byte_offset) / 16u)];
- float2 v_22 = asfloat(((((((8u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_21.zw) : (v_21.xy)));
- uint4 v_23 = arg_0_params[((16u + start_byte_offset) / 16u)];
- return float3x2(v_20, v_22, asfloat(((((((16u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_23.zw) : (v_23.xy))));
+float3x2 v_17(uint start_byte_offset) {
+ uint4 v_18 = arg_0_params[(start_byte_offset / 16u)];
+ float2 v_19 = asfloat((((((start_byte_offset % 16u) / 4u) == 2u)) ? (v_18.zw) : (v_18.xy)));
+ uint4 v_20 = arg_0_params[((8u + start_byte_offset) / 16u)];
+ float2 v_21 = asfloat(((((((8u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_20.zw) : (v_20.xy)));
+ uint4 v_22 = arg_0_params[((16u + start_byte_offset) / 16u)];
+ return float3x2(v_19, v_21, asfloat(((((((16u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_22.zw) : (v_22.xy))));
}
-float3x3 v_24(uint start_byte_offset) {
- float3 v_25 = asfloat(arg_0_params[(start_byte_offset / 16u)].xyz);
- float3 v_26 = asfloat(arg_0_params[((16u + start_byte_offset) / 16u)].xyz);
- return float3x3(v_25, v_26, asfloat(arg_0_params[((32u + start_byte_offset) / 16u)].xyz));
+float3x3 v_23(uint start_byte_offset) {
+ return float3x3(asfloat(arg_0_params[(start_byte_offset / 16u)].xyz), asfloat(arg_0_params[((16u + start_byte_offset) / 16u)].xyz), asfloat(arg_0_params[((32u + start_byte_offset) / 16u)].xyz));
}
-tint_GammaTransferParams v_27(uint start_byte_offset) {
- float v_28 = asfloat(arg_0_params[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]);
- float v_29 = asfloat(arg_0_params[((4u + start_byte_offset) / 16u)][(((4u + start_byte_offset) % 16u) / 4u)]);
- float v_30 = asfloat(arg_0_params[((8u + start_byte_offset) / 16u)][(((8u + start_byte_offset) % 16u) / 4u)]);
- float v_31 = asfloat(arg_0_params[((12u + start_byte_offset) / 16u)][(((12u + start_byte_offset) % 16u) / 4u)]);
- float v_32 = asfloat(arg_0_params[((16u + start_byte_offset) / 16u)][(((16u + start_byte_offset) % 16u) / 4u)]);
- float v_33 = asfloat(arg_0_params[((20u + start_byte_offset) / 16u)][(((20u + start_byte_offset) % 16u) / 4u)]);
- float v_34 = asfloat(arg_0_params[((24u + start_byte_offset) / 16u)][(((24u + start_byte_offset) % 16u) / 4u)]);
- tint_GammaTransferParams v_35 = {v_28, v_29, v_30, v_31, v_32, v_33, v_34, arg_0_params[((28u + start_byte_offset) / 16u)][(((28u + start_byte_offset) % 16u) / 4u)]};
- return v_35;
+tint_GammaTransferParams v_24(uint start_byte_offset) {
+ tint_GammaTransferParams v_25 = {asfloat(arg_0_params[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]), asfloat(arg_0_params[((4u + start_byte_offset) / 16u)][(((4u + start_byte_offset) % 16u) / 4u)]), asfloat(arg_0_params[((8u + start_byte_offset) / 16u)][(((8u + start_byte_offset) % 16u) / 4u)]), asfloat(arg_0_params[((12u + start_byte_offset) / 16u)][(((12u + start_byte_offset) % 16u) / 4u)]), asfloat(arg_0_params[((16u + start_byte_offset) / 16u)][(((16u + start_byte_offset) % 16u) / 4u)]), asfloat(arg_0_params[((20u + start_byte_offset) / 16u)][(((20u + start_byte_offset) % 16u) / 4u)]), asfloat(arg_0_params[((24u + start_byte_offset) / 16u)][(((24u + start_byte_offset) % 16u) / 4u)]), arg_0_params[((28u + start_byte_offset) / 16u)][(((28u + start_byte_offset) % 16u) / 4u)]};
+ return v_25;
}
-float3x4 v_36(uint start_byte_offset) {
- float4 v_37 = asfloat(arg_0_params[(start_byte_offset / 16u)]);
- float4 v_38 = asfloat(arg_0_params[((16u + start_byte_offset) / 16u)]);
- return float3x4(v_37, v_38, asfloat(arg_0_params[((32u + start_byte_offset) / 16u)]));
+float3x4 v_26(uint start_byte_offset) {
+ return float3x4(asfloat(arg_0_params[(start_byte_offset / 16u)]), asfloat(arg_0_params[((16u + start_byte_offset) / 16u)]), asfloat(arg_0_params[((32u + start_byte_offset) / 16u)]));
}
-tint_ExternalTextureParams v_39(uint start_byte_offset) {
- uint v_40 = arg_0_params[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)];
- uint v_41 = arg_0_params[((4u + start_byte_offset) / 16u)][(((4u + start_byte_offset) % 16u) / 4u)];
- float3x4 v_42 = v_36((16u + start_byte_offset));
- tint_GammaTransferParams v_43 = v_27((64u + start_byte_offset));
- tint_GammaTransferParams v_44 = v_27((96u + start_byte_offset));
- float3x3 v_45 = v_24((128u + start_byte_offset));
- float3x2 v_46 = v_18((176u + start_byte_offset));
- float3x2 v_47 = v_18((200u + start_byte_offset));
- uint4 v_48 = arg_0_params[((224u + start_byte_offset) / 16u)];
- float2 v_49 = asfloat(((((((224u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_48.zw) : (v_48.xy)));
- uint4 v_50 = arg_0_params[((232u + start_byte_offset) / 16u)];
- float2 v_51 = asfloat(((((((232u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_50.zw) : (v_50.xy)));
- uint4 v_52 = arg_0_params[((240u + start_byte_offset) / 16u)];
- float2 v_53 = asfloat(((((((240u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_52.zw) : (v_52.xy)));
- uint4 v_54 = arg_0_params[((248u + start_byte_offset) / 16u)];
- float2 v_55 = asfloat(((((((248u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_54.zw) : (v_54.xy)));
- uint4 v_56 = arg_0_params[((256u + start_byte_offset) / 16u)];
- uint2 v_57 = ((((((256u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_56.zw) : (v_56.xy));
- uint4 v_58 = arg_0_params[((264u + start_byte_offset) / 16u)];
- tint_ExternalTextureParams v_59 = {v_40, v_41, v_42, v_43, v_44, v_45, v_46, v_47, v_49, v_51, v_53, v_55, v_57, asfloat(((((((264u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_58.zw) : (v_58.xy)))};
- return v_59;
+tint_ExternalTextureParams v_27(uint start_byte_offset) {
+ uint v_28 = arg_0_params[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)];
+ uint v_29 = arg_0_params[((4u + start_byte_offset) / 16u)][(((4u + start_byte_offset) % 16u) / 4u)];
+ float3x4 v_30 = v_26((16u + start_byte_offset));
+ tint_GammaTransferParams v_31 = v_24((64u + start_byte_offset));
+ tint_GammaTransferParams v_32 = v_24((96u + start_byte_offset));
+ float3x3 v_33 = v_23((128u + start_byte_offset));
+ float3x2 v_34 = v_17((176u + start_byte_offset));
+ float3x2 v_35 = v_17((200u + start_byte_offset));
+ uint4 v_36 = arg_0_params[((224u + start_byte_offset) / 16u)];
+ float2 v_37 = asfloat(((((((224u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_36.zw) : (v_36.xy)));
+ uint4 v_38 = arg_0_params[((232u + start_byte_offset) / 16u)];
+ float2 v_39 = asfloat(((((((232u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_38.zw) : (v_38.xy)));
+ uint4 v_40 = arg_0_params[((240u + start_byte_offset) / 16u)];
+ float2 v_41 = asfloat(((((((240u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_40.zw) : (v_40.xy)));
+ uint4 v_42 = arg_0_params[((248u + start_byte_offset) / 16u)];
+ float2 v_43 = asfloat(((((((248u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_42.zw) : (v_42.xy)));
+ uint4 v_44 = arg_0_params[((256u + start_byte_offset) / 16u)];
+ uint2 v_45 = ((((((256u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_44.zw) : (v_44.xy));
+ uint4 v_46 = arg_0_params[((264u + start_byte_offset) / 16u)];
+ tint_ExternalTextureParams v_47 = {v_28, v_29, v_30, v_31, v_32, v_33, v_34, v_35, v_37, v_39, v_41, v_43, v_45, asfloat(((((((264u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_46.zw) : (v_46.xy)))};
+ return v_47;
}
float4 textureLoad_1bfdfb() {
- tint_ExternalTextureParams v_60 = v_39(0u);
- float4 res = tint_TextureLoadExternal(arg_0_plane0, arg_0_plane1, v_60, (1u).xx);
+ tint_ExternalTextureParams v_48 = v_27(0u);
+ float4 res = tint_TextureLoadExternal(arg_0_plane0, arg_0_plane1, v_48, (1u).xx);
return res;
}
@@ -160,13 +148,13 @@
VertexOutput tint_symbol = (VertexOutput)0;
tint_symbol.pos = (0.0f).xxxx;
tint_symbol.prevent_dce = textureLoad_1bfdfb();
- VertexOutput v_61 = tint_symbol;
- return v_61;
+ VertexOutput v_49 = tint_symbol;
+ return v_49;
}
vertex_main_outputs vertex_main() {
- VertexOutput v_62 = vertex_main_inner();
- vertex_main_outputs v_63 = {v_62.prevent_dce, v_62.pos};
- return v_63;
+ VertexOutput v_50 = vertex_main_inner();
+ vertex_main_outputs v_51 = {v_50.prevent_dce, v_50.pos};
+ return v_51;
}
diff --git a/test/tint/builtins/gen/literal/textureLoad/1bfdfb.wgsl.expected.ir.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/1bfdfb.wgsl.expected.ir.fxc.hlsl
index fbadc9a..eabab63 100644
--- a/test/tint/builtins/gen/literal/textureLoad/1bfdfb.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/textureLoad/1bfdfb.wgsl.expected.ir.fxc.hlsl
@@ -50,100 +50,88 @@
float3 tint_GammaCorrection(float3 v, tint_GammaTransferParams params) {
float3 v_1 = float3((params.G).xxx);
float3 v_2 = float3((params.D).xxx);
- float3 v_3 = abs(v);
- float3 v_4 = float3(sign(v));
- return (((v_3 < v_2)) ? ((v_4 * ((params.C * v_3) + params.F))) : ((v_4 * (pow(((params.A * v_3) + params.B), v_1) + params.E))));
+ float3 v_3 = float3(sign(v));
+ return (((abs(v) < v_2)) ? ((v_3 * ((params.C * abs(v)) + params.F))) : ((v_3 * (pow(((params.A * abs(v)) + params.B), v_1) + params.E))));
}
float4 tint_TextureLoadExternal(Texture2D<float4> plane_0, Texture2D<float4> plane_1, tint_ExternalTextureParams params, uint2 coords) {
- float2 v_5 = round(mul(float3(float2(min(coords, params.visibleSize)), 1.0f), params.loadTransform));
- uint2 v_6 = tint_v2f32_to_v2u32(v_5);
- float3 v_7 = (0.0f).xxx;
- float v_8 = 0.0f;
+ float2 v_4 = round(mul(float3(float2(min(coords, params.visibleSize)), 1.0f), params.loadTransform));
+ uint2 v_5 = tint_v2f32_to_v2u32(v_4);
+ float3 v_6 = (0.0f).xxx;
+ float v_7 = 0.0f;
if ((params.numPlanes == 1u)) {
- int2 v_9 = int2(v_6);
- float4 v_10 = float4(plane_0.Load(int3(v_9, int(0u))));
- v_7 = v_10.xyz;
- v_8 = v_10.w;
+ int2 v_8 = int2(v_5);
+ float4 v_9 = float4(plane_0.Load(int3(v_8, int(0u))));
+ v_6 = v_9.xyz;
+ v_7 = v_9.w;
} else {
- int2 v_11 = int2(v_6);
- float v_12 = float4(plane_0.Load(int3(v_11, int(0u)))).x;
- int2 v_13 = int2(tint_v2f32_to_v2u32((v_5 * params.plane1CoordFactor)));
- v_7 = mul(params.yuvToRgbConversionMatrix, float4(v_12, float4(plane_1.Load(int3(v_13, int(0u)))).xy, 1.0f));
- v_8 = 1.0f;
+ int2 v_10 = int2(v_5);
+ float v_11 = float4(plane_0.Load(int3(v_10, int(0u)))).x;
+ int2 v_12 = int2(tint_v2f32_to_v2u32((v_4 * params.plane1CoordFactor)));
+ v_6 = mul(params.yuvToRgbConversionMatrix, float4(v_11, float4(plane_1.Load(int3(v_12, int(0u)))).xy, 1.0f));
+ v_7 = 1.0f;
}
- float3 v_14 = v_7;
- float3 v_15 = (0.0f).xxx;
+ float3 v_13 = v_6;
+ float3 v_14 = (0.0f).xxx;
if ((params.doYuvToRgbConversionOnly == 0u)) {
- tint_GammaTransferParams v_16 = params.gammaDecodeParams;
- tint_GammaTransferParams v_17 = params.gammaEncodeParams;
- v_15 = tint_GammaCorrection(mul(tint_GammaCorrection(v_14, v_16), params.gamutConversionMatrix), v_17);
+ tint_GammaTransferParams v_15 = params.gammaDecodeParams;
+ tint_GammaTransferParams v_16 = params.gammaEncodeParams;
+ v_14 = tint_GammaCorrection(mul(tint_GammaCorrection(v_13, v_15), params.gamutConversionMatrix), v_16);
} else {
- v_15 = v_14;
+ v_14 = v_13;
}
- return float4(v_15, v_8);
+ return float4(v_14, v_7);
}
-float3x2 v_18(uint start_byte_offset) {
- uint4 v_19 = arg_0_params[(start_byte_offset / 16u)];
- float2 v_20 = asfloat((((((start_byte_offset % 16u) / 4u) == 2u)) ? (v_19.zw) : (v_19.xy)));
- uint4 v_21 = arg_0_params[((8u + start_byte_offset) / 16u)];
- float2 v_22 = asfloat(((((((8u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_21.zw) : (v_21.xy)));
- uint4 v_23 = arg_0_params[((16u + start_byte_offset) / 16u)];
- return float3x2(v_20, v_22, asfloat(((((((16u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_23.zw) : (v_23.xy))));
+float3x2 v_17(uint start_byte_offset) {
+ uint4 v_18 = arg_0_params[(start_byte_offset / 16u)];
+ float2 v_19 = asfloat((((((start_byte_offset % 16u) / 4u) == 2u)) ? (v_18.zw) : (v_18.xy)));
+ uint4 v_20 = arg_0_params[((8u + start_byte_offset) / 16u)];
+ float2 v_21 = asfloat(((((((8u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_20.zw) : (v_20.xy)));
+ uint4 v_22 = arg_0_params[((16u + start_byte_offset) / 16u)];
+ return float3x2(v_19, v_21, asfloat(((((((16u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_22.zw) : (v_22.xy))));
}
-float3x3 v_24(uint start_byte_offset) {
- float3 v_25 = asfloat(arg_0_params[(start_byte_offset / 16u)].xyz);
- float3 v_26 = asfloat(arg_0_params[((16u + start_byte_offset) / 16u)].xyz);
- return float3x3(v_25, v_26, asfloat(arg_0_params[((32u + start_byte_offset) / 16u)].xyz));
+float3x3 v_23(uint start_byte_offset) {
+ return float3x3(asfloat(arg_0_params[(start_byte_offset / 16u)].xyz), asfloat(arg_0_params[((16u + start_byte_offset) / 16u)].xyz), asfloat(arg_0_params[((32u + start_byte_offset) / 16u)].xyz));
}
-tint_GammaTransferParams v_27(uint start_byte_offset) {
- float v_28 = asfloat(arg_0_params[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]);
- float v_29 = asfloat(arg_0_params[((4u + start_byte_offset) / 16u)][(((4u + start_byte_offset) % 16u) / 4u)]);
- float v_30 = asfloat(arg_0_params[((8u + start_byte_offset) / 16u)][(((8u + start_byte_offset) % 16u) / 4u)]);
- float v_31 = asfloat(arg_0_params[((12u + start_byte_offset) / 16u)][(((12u + start_byte_offset) % 16u) / 4u)]);
- float v_32 = asfloat(arg_0_params[((16u + start_byte_offset) / 16u)][(((16u + start_byte_offset) % 16u) / 4u)]);
- float v_33 = asfloat(arg_0_params[((20u + start_byte_offset) / 16u)][(((20u + start_byte_offset) % 16u) / 4u)]);
- float v_34 = asfloat(arg_0_params[((24u + start_byte_offset) / 16u)][(((24u + start_byte_offset) % 16u) / 4u)]);
- tint_GammaTransferParams v_35 = {v_28, v_29, v_30, v_31, v_32, v_33, v_34, arg_0_params[((28u + start_byte_offset) / 16u)][(((28u + start_byte_offset) % 16u) / 4u)]};
- return v_35;
+tint_GammaTransferParams v_24(uint start_byte_offset) {
+ tint_GammaTransferParams v_25 = {asfloat(arg_0_params[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]), asfloat(arg_0_params[((4u + start_byte_offset) / 16u)][(((4u + start_byte_offset) % 16u) / 4u)]), asfloat(arg_0_params[((8u + start_byte_offset) / 16u)][(((8u + start_byte_offset) % 16u) / 4u)]), asfloat(arg_0_params[((12u + start_byte_offset) / 16u)][(((12u + start_byte_offset) % 16u) / 4u)]), asfloat(arg_0_params[((16u + start_byte_offset) / 16u)][(((16u + start_byte_offset) % 16u) / 4u)]), asfloat(arg_0_params[((20u + start_byte_offset) / 16u)][(((20u + start_byte_offset) % 16u) / 4u)]), asfloat(arg_0_params[((24u + start_byte_offset) / 16u)][(((24u + start_byte_offset) % 16u) / 4u)]), arg_0_params[((28u + start_byte_offset) / 16u)][(((28u + start_byte_offset) % 16u) / 4u)]};
+ return v_25;
}
-float3x4 v_36(uint start_byte_offset) {
- float4 v_37 = asfloat(arg_0_params[(start_byte_offset / 16u)]);
- float4 v_38 = asfloat(arg_0_params[((16u + start_byte_offset) / 16u)]);
- return float3x4(v_37, v_38, asfloat(arg_0_params[((32u + start_byte_offset) / 16u)]));
+float3x4 v_26(uint start_byte_offset) {
+ return float3x4(asfloat(arg_0_params[(start_byte_offset / 16u)]), asfloat(arg_0_params[((16u + start_byte_offset) / 16u)]), asfloat(arg_0_params[((32u + start_byte_offset) / 16u)]));
}
-tint_ExternalTextureParams v_39(uint start_byte_offset) {
- uint v_40 = arg_0_params[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)];
- uint v_41 = arg_0_params[((4u + start_byte_offset) / 16u)][(((4u + start_byte_offset) % 16u) / 4u)];
- float3x4 v_42 = v_36((16u + start_byte_offset));
- tint_GammaTransferParams v_43 = v_27((64u + start_byte_offset));
- tint_GammaTransferParams v_44 = v_27((96u + start_byte_offset));
- float3x3 v_45 = v_24((128u + start_byte_offset));
- float3x2 v_46 = v_18((176u + start_byte_offset));
- float3x2 v_47 = v_18((200u + start_byte_offset));
- uint4 v_48 = arg_0_params[((224u + start_byte_offset) / 16u)];
- float2 v_49 = asfloat(((((((224u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_48.zw) : (v_48.xy)));
- uint4 v_50 = arg_0_params[((232u + start_byte_offset) / 16u)];
- float2 v_51 = asfloat(((((((232u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_50.zw) : (v_50.xy)));
- uint4 v_52 = arg_0_params[((240u + start_byte_offset) / 16u)];
- float2 v_53 = asfloat(((((((240u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_52.zw) : (v_52.xy)));
- uint4 v_54 = arg_0_params[((248u + start_byte_offset) / 16u)];
- float2 v_55 = asfloat(((((((248u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_54.zw) : (v_54.xy)));
- uint4 v_56 = arg_0_params[((256u + start_byte_offset) / 16u)];
- uint2 v_57 = ((((((256u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_56.zw) : (v_56.xy));
- uint4 v_58 = arg_0_params[((264u + start_byte_offset) / 16u)];
- tint_ExternalTextureParams v_59 = {v_40, v_41, v_42, v_43, v_44, v_45, v_46, v_47, v_49, v_51, v_53, v_55, v_57, asfloat(((((((264u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_58.zw) : (v_58.xy)))};
- return v_59;
+tint_ExternalTextureParams v_27(uint start_byte_offset) {
+ uint v_28 = arg_0_params[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)];
+ uint v_29 = arg_0_params[((4u + start_byte_offset) / 16u)][(((4u + start_byte_offset) % 16u) / 4u)];
+ float3x4 v_30 = v_26((16u + start_byte_offset));
+ tint_GammaTransferParams v_31 = v_24((64u + start_byte_offset));
+ tint_GammaTransferParams v_32 = v_24((96u + start_byte_offset));
+ float3x3 v_33 = v_23((128u + start_byte_offset));
+ float3x2 v_34 = v_17((176u + start_byte_offset));
+ float3x2 v_35 = v_17((200u + start_byte_offset));
+ uint4 v_36 = arg_0_params[((224u + start_byte_offset) / 16u)];
+ float2 v_37 = asfloat(((((((224u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_36.zw) : (v_36.xy)));
+ uint4 v_38 = arg_0_params[((232u + start_byte_offset) / 16u)];
+ float2 v_39 = asfloat(((((((232u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_38.zw) : (v_38.xy)));
+ uint4 v_40 = arg_0_params[((240u + start_byte_offset) / 16u)];
+ float2 v_41 = asfloat(((((((240u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_40.zw) : (v_40.xy)));
+ uint4 v_42 = arg_0_params[((248u + start_byte_offset) / 16u)];
+ float2 v_43 = asfloat(((((((248u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_42.zw) : (v_42.xy)));
+ uint4 v_44 = arg_0_params[((256u + start_byte_offset) / 16u)];
+ uint2 v_45 = ((((((256u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_44.zw) : (v_44.xy));
+ uint4 v_46 = arg_0_params[((264u + start_byte_offset) / 16u)];
+ tint_ExternalTextureParams v_47 = {v_28, v_29, v_30, v_31, v_32, v_33, v_34, v_35, v_37, v_39, v_41, v_43, v_45, asfloat(((((((264u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_46.zw) : (v_46.xy)))};
+ return v_47;
}
float4 textureLoad_1bfdfb() {
- tint_ExternalTextureParams v_60 = v_39(0u);
- float4 res = tint_TextureLoadExternal(arg_0_plane0, arg_0_plane1, v_60, (1u).xx);
+ tint_ExternalTextureParams v_48 = v_27(0u);
+ float4 res = tint_TextureLoadExternal(arg_0_plane0, arg_0_plane1, v_48, (1u).xx);
return res;
}
@@ -160,13 +148,13 @@
VertexOutput tint_symbol = (VertexOutput)0;
tint_symbol.pos = (0.0f).xxxx;
tint_symbol.prevent_dce = textureLoad_1bfdfb();
- VertexOutput v_61 = tint_symbol;
- return v_61;
+ VertexOutput v_49 = tint_symbol;
+ return v_49;
}
vertex_main_outputs vertex_main() {
- VertexOutput v_62 = vertex_main_inner();
- vertex_main_outputs v_63 = {v_62.prevent_dce, v_62.pos};
- return v_63;
+ VertexOutput v_50 = vertex_main_inner();
+ vertex_main_outputs v_51 = {v_50.prevent_dce, v_50.pos};
+ return v_51;
}
diff --git a/test/tint/builtins/gen/literal/textureLoad/1bfdfb.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/1bfdfb.wgsl.expected.ir.msl
index cf66d50..01ce135 100644
--- a/test/tint/builtins/gen/literal/textureLoad/1bfdfb.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/1bfdfb.wgsl.expected.ir.msl
@@ -83,47 +83,44 @@
float3 tint_GammaCorrection(float3 v, tint_GammaTransferParams params) {
float3 const v_1 = float3(params.G);
- float3 const v_2 = float3(params.D);
- float3 const v_3 = abs(v);
- float3 const v_4 = sign(v);
- return select((v_4 * (powr(((params.A * v_3) + params.B), v_1) + params.E)), (v_4 * ((params.C * v_3) + params.F)), (v_3 < v_2));
+ return select((sign(v) * (powr(((params.A * abs(v)) + params.B), v_1) + params.E)), (sign(v) * ((params.C * abs(v)) + params.F)), (abs(v) < float3(params.D)));
}
float4 tint_TextureLoadExternal(texture2d<float, access::sample> plane_0, texture2d<float, access::sample> plane_1, tint_ExternalTextureParams params, uint2 coords) {
- float2 const v_5 = rint((params.loadTransform * float3(float2(min(coords, params.visibleSize)), 1.0f)));
- uint2 const v_6 = uint2(v_5);
- float3 v_7 = 0.0f;
- float v_8 = 0.0f;
+ float2 const v_2 = rint((params.loadTransform * float3(float2(min(coords, params.visibleSize)), 1.0f)));
+ uint2 const v_3 = uint2(v_2);
+ float3 v_4 = 0.0f;
+ float v_5 = 0.0f;
if ((params.numPlanes == 1u)) {
- float4 const v_9 = plane_0.read(v_6, 0u);
- v_7 = v_9.xyz;
- v_8 = v_9[3u];
+ float4 const v_6 = plane_0.read(v_3, 0u);
+ v_4 = v_6.xyz;
+ v_5 = v_6[3u];
} else {
- float const v_10 = plane_0.read(v_6, 0u)[0u];
- v_7 = (float4(v_10, plane_1.read(uint2((v_5 * params.plane1CoordFactor)), 0u).xy, 1.0f) * params.yuvToRgbConversionMatrix);
- v_8 = 1.0f;
+ float const v_7 = plane_0.read(v_3, 0u)[0u];
+ v_4 = (float4(v_7, plane_1.read(uint2((v_2 * params.plane1CoordFactor)), 0u).xy, 1.0f) * params.yuvToRgbConversionMatrix);
+ v_5 = 1.0f;
}
- float3 const v_11 = v_7;
- float3 v_12 = 0.0f;
+ float3 const v_8 = v_4;
+ float3 v_9 = 0.0f;
if ((params.doYuvToRgbConversionOnly == 0u)) {
- v_12 = tint_GammaCorrection((params.gamutConversionMatrix * tint_GammaCorrection(v_11, params.gammaDecodeParams)), params.gammaEncodeParams);
+ v_9 = tint_GammaCorrection((params.gamutConversionMatrix * tint_GammaCorrection(v_8, params.gammaDecodeParams)), params.gammaEncodeParams);
} else {
- v_12 = v_11;
+ v_9 = v_8;
}
- return float4(v_12, v_8);
+ return float4(v_9, v_5);
}
tint_ExternalTextureParams tint_load_struct_packed_vec3(const constant tint_ExternalTextureParams_packed_vec3* const from) {
- uint const v_13 = (*from).numPlanes;
- uint const v_14 = (*from).doYuvToRgbConversionOnly;
- float3x4 const v_15 = (*from).yuvToRgbConversionMatrix;
- tint_GammaTransferParams const v_16 = (*from).gammaDecodeParams;
- tint_GammaTransferParams const v_17 = (*from).gammaEncodeParams;
- tint_array<tint_packed_vec3_f32_array_element, 3> const v_18 = (*from).gamutConversionMatrix;
- float3 const v_19 = float3(v_18[0u].packed);
- float3 const v_20 = float3(v_18[1u].packed);
- float3x3 const v_21 = float3x3(v_19, v_20, float3(v_18[2u].packed));
- return tint_ExternalTextureParams{.numPlanes=v_13, .doYuvToRgbConversionOnly=v_14, .yuvToRgbConversionMatrix=v_15, .gammaDecodeParams=v_16, .gammaEncodeParams=v_17, .gamutConversionMatrix=v_21, .sampleTransform=(*from).sampleTransform, .loadTransform=(*from).loadTransform, .samplePlane0RectMin=(*from).samplePlane0RectMin, .samplePlane0RectMax=(*from).samplePlane0RectMax, .samplePlane1RectMin=(*from).samplePlane1RectMin, .samplePlane1RectMax=(*from).samplePlane1RectMax, .visibleSize=(*from).visibleSize, .plane1CoordFactor=(*from).plane1CoordFactor};
+ uint const v_10 = (*from).numPlanes;
+ uint const v_11 = (*from).doYuvToRgbConversionOnly;
+ float3x4 const v_12 = (*from).yuvToRgbConversionMatrix;
+ tint_GammaTransferParams const v_13 = (*from).gammaDecodeParams;
+ tint_GammaTransferParams const v_14 = (*from).gammaEncodeParams;
+ tint_array<tint_packed_vec3_f32_array_element, 3> const v_15 = (*from).gamutConversionMatrix;
+ float3 const v_16 = float3(v_15[0u].packed);
+ float3 const v_17 = float3(v_15[1u].packed);
+ float3x3 const v_18 = float3x3(v_16, v_17, float3(v_15[2u].packed));
+ return tint_ExternalTextureParams{.numPlanes=v_10, .doYuvToRgbConversionOnly=v_11, .yuvToRgbConversionMatrix=v_12, .gammaDecodeParams=v_13, .gammaEncodeParams=v_14, .gamutConversionMatrix=v_18, .sampleTransform=(*from).sampleTransform, .loadTransform=(*from).loadTransform, .samplePlane0RectMin=(*from).samplePlane0RectMin, .samplePlane0RectMax=(*from).samplePlane0RectMax, .samplePlane1RectMin=(*from).samplePlane1RectMin, .samplePlane1RectMax=(*from).samplePlane1RectMax, .visibleSize=(*from).visibleSize, .plane1CoordFactor=(*from).plane1CoordFactor};
}
float4 textureLoad_1bfdfb(tint_module_vars_struct tint_module_vars) {
@@ -150,9 +147,9 @@
vertex vertex_main_outputs vertex_main(texture2d<float, access::sample> arg_0_plane0 [[texture(0)]], texture2d<float, access::sample> arg_0_plane1 [[texture(1)]], const constant tint_ExternalTextureParams_packed_vec3* arg_0_params [[buffer(2)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0_plane0=arg_0_plane0, .arg_0_plane1=arg_0_plane1, .arg_0_params=arg_0_params};
- VertexOutput const v_22 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v_19 = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_22.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_22.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v_19.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v_19.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/literal/textureLoad/8acf41.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/8acf41.wgsl.expected.glsl
index e2f3f66..0d091a3 100644
--- a/test/tint/builtins/gen/literal/textureLoad/8acf41.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/literal/textureLoad/8acf41.wgsl.expected.glsl
@@ -71,46 +71,42 @@
uniform highp sampler2D arg_0_plane1;
vec3 tint_GammaCorrection(vec3 v, tint_GammaTransferParams params) {
vec3 v_3 = vec3(params.G);
- vec3 v_4 = vec3(params.D);
- vec3 v_5 = abs(v);
- vec3 v_6 = sign(v);
- bvec3 v_7 = lessThan(v_5, v_4);
- return mix((v_6 * (pow(((params.A * v_5) + params.B), v_3) + params.E)), (v_6 * ((params.C * v_5) + params.F)), v_7);
+ return mix((sign(v) * (pow(((params.A * abs(v)) + params.B), v_3) + params.E)), (sign(v) * ((params.C * abs(v)) + params.F)), lessThan(abs(v), vec3(params.D)));
}
vec4 tint_TextureLoadExternal(tint_ExternalTextureParams params, uvec2 coords) {
- vec2 v_8 = round((params.loadTransform * vec3(vec2(min(coords, params.visibleSize)), 1.0f)));
- uvec2 v_9 = uvec2(v_8);
- vec3 v_10 = vec3(0.0f);
- float v_11 = 0.0f;
+ vec2 v_4 = round((params.loadTransform * vec3(vec2(min(coords, params.visibleSize)), 1.0f)));
+ uvec2 v_5 = uvec2(v_4);
+ vec3 v_6 = vec3(0.0f);
+ float v_7 = 0.0f;
if ((params.numPlanes == 1u)) {
- ivec2 v_12 = ivec2(v_9);
- vec4 v_13 = texelFetch(arg_0_plane0, v_12, int(0u));
- v_10 = v_13.xyz;
- v_11 = v_13[3u];
+ ivec2 v_8 = ivec2(v_5);
+ vec4 v_9 = texelFetch(arg_0_plane0, v_8, int(0u));
+ v_6 = v_9.xyz;
+ v_7 = v_9[3u];
} else {
- ivec2 v_14 = ivec2(v_9);
- float v_15 = texelFetch(arg_0_plane0, v_14, int(0u))[0u];
- ivec2 v_16 = ivec2(uvec2((v_8 * params.plane1CoordFactor)));
- v_10 = (vec4(v_15, texelFetch(arg_0_plane1, v_16, int(0u)).xy, 1.0f) * params.yuvToRgbConversionMatrix);
- v_11 = 1.0f;
+ ivec2 v_10 = ivec2(v_5);
+ float v_11 = texelFetch(arg_0_plane0, v_10, int(0u))[0u];
+ ivec2 v_12 = ivec2(uvec2((v_4 * params.plane1CoordFactor)));
+ v_6 = (vec4(v_11, texelFetch(arg_0_plane1, v_12, int(0u)).xy, 1.0f) * params.yuvToRgbConversionMatrix);
+ v_7 = 1.0f;
}
- vec3 v_17 = v_10;
- vec3 v_18 = vec3(0.0f);
+ vec3 v_13 = v_6;
+ vec3 v_14 = vec3(0.0f);
if ((params.doYuvToRgbConversionOnly == 0u)) {
- v_18 = tint_GammaCorrection((params.gamutConversionMatrix * tint_GammaCorrection(v_17, params.gammaDecodeParams)), params.gammaEncodeParams);
+ v_14 = tint_GammaCorrection((params.gamutConversionMatrix * tint_GammaCorrection(v_13, params.gammaDecodeParams)), params.gammaEncodeParams);
} else {
- v_18 = v_17;
+ v_14 = v_13;
}
- return vec4(v_18, v_11);
+ return vec4(v_14, v_7);
}
tint_ExternalTextureParams tint_convert_tint_ExternalTextureParams(tint_ExternalTextureParams_std140 tint_input) {
- mat3 v_19 = mat3(tint_input.gamutConversionMatrix_col0, tint_input.gamutConversionMatrix_col1, tint_input.gamutConversionMatrix_col2);
- mat3x2 v_20 = mat3x2(tint_input.sampleTransform_col0, tint_input.sampleTransform_col1, tint_input.sampleTransform_col2);
- return tint_ExternalTextureParams(tint_input.numPlanes, tint_input.doYuvToRgbConversionOnly, tint_input.yuvToRgbConversionMatrix, tint_input.gammaDecodeParams, tint_input.gammaEncodeParams, v_19, v_20, mat3x2(tint_input.loadTransform_col0, tint_input.loadTransform_col1, tint_input.loadTransform_col2), tint_input.samplePlane0RectMin, tint_input.samplePlane0RectMax, tint_input.samplePlane1RectMin, tint_input.samplePlane1RectMax, tint_input.visibleSize, tint_input.plane1CoordFactor);
+ mat3 v_15 = mat3(tint_input.gamutConversionMatrix_col0, tint_input.gamutConversionMatrix_col1, tint_input.gamutConversionMatrix_col2);
+ mat3x2 v_16 = mat3x2(tint_input.sampleTransform_col0, tint_input.sampleTransform_col1, tint_input.sampleTransform_col2);
+ return tint_ExternalTextureParams(tint_input.numPlanes, tint_input.doYuvToRgbConversionOnly, tint_input.yuvToRgbConversionMatrix, tint_input.gammaDecodeParams, tint_input.gammaEncodeParams, v_15, v_16, mat3x2(tint_input.loadTransform_col0, tint_input.loadTransform_col1, tint_input.loadTransform_col2), tint_input.samplePlane0RectMin, tint_input.samplePlane0RectMax, tint_input.samplePlane1RectMin, tint_input.samplePlane1RectMax, tint_input.visibleSize, tint_input.plane1CoordFactor);
}
vec4 textureLoad_8acf41() {
- tint_ExternalTextureParams v_21 = tint_convert_tint_ExternalTextureParams(v_2.inner);
- vec4 res = tint_TextureLoadExternal(v_21, uvec2(ivec2(1)));
+ tint_ExternalTextureParams v_17 = tint_convert_tint_ExternalTextureParams(v_2.inner);
+ vec4 res = tint_TextureLoadExternal(v_17, uvec2(ivec2(1)));
return res;
}
void main() {
@@ -187,46 +183,42 @@
uniform highp sampler2D arg_0_plane1;
vec3 tint_GammaCorrection(vec3 v, tint_GammaTransferParams params) {
vec3 v_3 = vec3(params.G);
- vec3 v_4 = vec3(params.D);
- vec3 v_5 = abs(v);
- vec3 v_6 = sign(v);
- bvec3 v_7 = lessThan(v_5, v_4);
- return mix((v_6 * (pow(((params.A * v_5) + params.B), v_3) + params.E)), (v_6 * ((params.C * v_5) + params.F)), v_7);
+ return mix((sign(v) * (pow(((params.A * abs(v)) + params.B), v_3) + params.E)), (sign(v) * ((params.C * abs(v)) + params.F)), lessThan(abs(v), vec3(params.D)));
}
vec4 tint_TextureLoadExternal(tint_ExternalTextureParams params, uvec2 coords) {
- vec2 v_8 = round((params.loadTransform * vec3(vec2(min(coords, params.visibleSize)), 1.0f)));
- uvec2 v_9 = uvec2(v_8);
- vec3 v_10 = vec3(0.0f);
- float v_11 = 0.0f;
+ vec2 v_4 = round((params.loadTransform * vec3(vec2(min(coords, params.visibleSize)), 1.0f)));
+ uvec2 v_5 = uvec2(v_4);
+ vec3 v_6 = vec3(0.0f);
+ float v_7 = 0.0f;
if ((params.numPlanes == 1u)) {
- ivec2 v_12 = ivec2(v_9);
- vec4 v_13 = texelFetch(arg_0_plane0, v_12, int(0u));
- v_10 = v_13.xyz;
- v_11 = v_13[3u];
+ ivec2 v_8 = ivec2(v_5);
+ vec4 v_9 = texelFetch(arg_0_plane0, v_8, int(0u));
+ v_6 = v_9.xyz;
+ v_7 = v_9[3u];
} else {
- ivec2 v_14 = ivec2(v_9);
- float v_15 = texelFetch(arg_0_plane0, v_14, int(0u))[0u];
- ivec2 v_16 = ivec2(uvec2((v_8 * params.plane1CoordFactor)));
- v_10 = (vec4(v_15, texelFetch(arg_0_plane1, v_16, int(0u)).xy, 1.0f) * params.yuvToRgbConversionMatrix);
- v_11 = 1.0f;
+ ivec2 v_10 = ivec2(v_5);
+ float v_11 = texelFetch(arg_0_plane0, v_10, int(0u))[0u];
+ ivec2 v_12 = ivec2(uvec2((v_4 * params.plane1CoordFactor)));
+ v_6 = (vec4(v_11, texelFetch(arg_0_plane1, v_12, int(0u)).xy, 1.0f) * params.yuvToRgbConversionMatrix);
+ v_7 = 1.0f;
}
- vec3 v_17 = v_10;
- vec3 v_18 = vec3(0.0f);
+ vec3 v_13 = v_6;
+ vec3 v_14 = vec3(0.0f);
if ((params.doYuvToRgbConversionOnly == 0u)) {
- v_18 = tint_GammaCorrection((params.gamutConversionMatrix * tint_GammaCorrection(v_17, params.gammaDecodeParams)), params.gammaEncodeParams);
+ v_14 = tint_GammaCorrection((params.gamutConversionMatrix * tint_GammaCorrection(v_13, params.gammaDecodeParams)), params.gammaEncodeParams);
} else {
- v_18 = v_17;
+ v_14 = v_13;
}
- return vec4(v_18, v_11);
+ return vec4(v_14, v_7);
}
tint_ExternalTextureParams tint_convert_tint_ExternalTextureParams(tint_ExternalTextureParams_std140 tint_input) {
- mat3 v_19 = mat3(tint_input.gamutConversionMatrix_col0, tint_input.gamutConversionMatrix_col1, tint_input.gamutConversionMatrix_col2);
- mat3x2 v_20 = mat3x2(tint_input.sampleTransform_col0, tint_input.sampleTransform_col1, tint_input.sampleTransform_col2);
- return tint_ExternalTextureParams(tint_input.numPlanes, tint_input.doYuvToRgbConversionOnly, tint_input.yuvToRgbConversionMatrix, tint_input.gammaDecodeParams, tint_input.gammaEncodeParams, v_19, v_20, mat3x2(tint_input.loadTransform_col0, tint_input.loadTransform_col1, tint_input.loadTransform_col2), tint_input.samplePlane0RectMin, tint_input.samplePlane0RectMax, tint_input.samplePlane1RectMin, tint_input.samplePlane1RectMax, tint_input.visibleSize, tint_input.plane1CoordFactor);
+ mat3 v_15 = mat3(tint_input.gamutConversionMatrix_col0, tint_input.gamutConversionMatrix_col1, tint_input.gamutConversionMatrix_col2);
+ mat3x2 v_16 = mat3x2(tint_input.sampleTransform_col0, tint_input.sampleTransform_col1, tint_input.sampleTransform_col2);
+ return tint_ExternalTextureParams(tint_input.numPlanes, tint_input.doYuvToRgbConversionOnly, tint_input.yuvToRgbConversionMatrix, tint_input.gammaDecodeParams, tint_input.gammaEncodeParams, v_15, v_16, mat3x2(tint_input.loadTransform_col0, tint_input.loadTransform_col1, tint_input.loadTransform_col2), tint_input.samplePlane0RectMin, tint_input.samplePlane0RectMax, tint_input.samplePlane1RectMin, tint_input.samplePlane1RectMax, tint_input.visibleSize, tint_input.plane1CoordFactor);
}
vec4 textureLoad_8acf41() {
- tint_ExternalTextureParams v_21 = tint_convert_tint_ExternalTextureParams(v_2.inner);
- vec4 res = tint_TextureLoadExternal(v_21, uvec2(ivec2(1)));
+ tint_ExternalTextureParams v_17 = tint_convert_tint_ExternalTextureParams(v_2.inner);
+ vec4 res = tint_TextureLoadExternal(v_17, uvec2(ivec2(1)));
return res;
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
@@ -306,46 +298,42 @@
layout(location = 0) flat out vec4 vertex_main_loc0_Output;
vec3 tint_GammaCorrection(vec3 v, tint_GammaTransferParams params) {
vec3 v_2 = vec3(params.G);
- vec3 v_3 = vec3(params.D);
- vec3 v_4 = abs(v);
- vec3 v_5 = sign(v);
- bvec3 v_6 = lessThan(v_4, v_3);
- return mix((v_5 * (pow(((params.A * v_4) + params.B), v_2) + params.E)), (v_5 * ((params.C * v_4) + params.F)), v_6);
+ return mix((sign(v) * (pow(((params.A * abs(v)) + params.B), v_2) + params.E)), (sign(v) * ((params.C * abs(v)) + params.F)), lessThan(abs(v), vec3(params.D)));
}
vec4 tint_TextureLoadExternal(tint_ExternalTextureParams params, uvec2 coords) {
- vec2 v_7 = round((params.loadTransform * vec3(vec2(min(coords, params.visibleSize)), 1.0f)));
- uvec2 v_8 = uvec2(v_7);
- vec3 v_9 = vec3(0.0f);
- float v_10 = 0.0f;
+ vec2 v_3 = round((params.loadTransform * vec3(vec2(min(coords, params.visibleSize)), 1.0f)));
+ uvec2 v_4 = uvec2(v_3);
+ vec3 v_5 = vec3(0.0f);
+ float v_6 = 0.0f;
if ((params.numPlanes == 1u)) {
- ivec2 v_11 = ivec2(v_8);
- vec4 v_12 = texelFetch(arg_0_plane0, v_11, int(0u));
- v_9 = v_12.xyz;
- v_10 = v_12[3u];
+ ivec2 v_7 = ivec2(v_4);
+ vec4 v_8 = texelFetch(arg_0_plane0, v_7, int(0u));
+ v_5 = v_8.xyz;
+ v_6 = v_8[3u];
} else {
- ivec2 v_13 = ivec2(v_8);
- float v_14 = texelFetch(arg_0_plane0, v_13, int(0u))[0u];
- ivec2 v_15 = ivec2(uvec2((v_7 * params.plane1CoordFactor)));
- v_9 = (vec4(v_14, texelFetch(arg_0_plane1, v_15, int(0u)).xy, 1.0f) * params.yuvToRgbConversionMatrix);
- v_10 = 1.0f;
+ ivec2 v_9 = ivec2(v_4);
+ float v_10 = texelFetch(arg_0_plane0, v_9, int(0u))[0u];
+ ivec2 v_11 = ivec2(uvec2((v_3 * params.plane1CoordFactor)));
+ v_5 = (vec4(v_10, texelFetch(arg_0_plane1, v_11, int(0u)).xy, 1.0f) * params.yuvToRgbConversionMatrix);
+ v_6 = 1.0f;
}
- vec3 v_16 = v_9;
- vec3 v_17 = vec3(0.0f);
+ vec3 v_12 = v_5;
+ vec3 v_13 = vec3(0.0f);
if ((params.doYuvToRgbConversionOnly == 0u)) {
- v_17 = tint_GammaCorrection((params.gamutConversionMatrix * tint_GammaCorrection(v_16, params.gammaDecodeParams)), params.gammaEncodeParams);
+ v_13 = tint_GammaCorrection((params.gamutConversionMatrix * tint_GammaCorrection(v_12, params.gammaDecodeParams)), params.gammaEncodeParams);
} else {
- v_17 = v_16;
+ v_13 = v_12;
}
- return vec4(v_17, v_10);
+ return vec4(v_13, v_6);
}
tint_ExternalTextureParams tint_convert_tint_ExternalTextureParams(tint_ExternalTextureParams_std140 tint_input) {
- mat3 v_18 = mat3(tint_input.gamutConversionMatrix_col0, tint_input.gamutConversionMatrix_col1, tint_input.gamutConversionMatrix_col2);
- mat3x2 v_19 = mat3x2(tint_input.sampleTransform_col0, tint_input.sampleTransform_col1, tint_input.sampleTransform_col2);
- return tint_ExternalTextureParams(tint_input.numPlanes, tint_input.doYuvToRgbConversionOnly, tint_input.yuvToRgbConversionMatrix, tint_input.gammaDecodeParams, tint_input.gammaEncodeParams, v_18, v_19, mat3x2(tint_input.loadTransform_col0, tint_input.loadTransform_col1, tint_input.loadTransform_col2), tint_input.samplePlane0RectMin, tint_input.samplePlane0RectMax, tint_input.samplePlane1RectMin, tint_input.samplePlane1RectMax, tint_input.visibleSize, tint_input.plane1CoordFactor);
+ mat3 v_14 = mat3(tint_input.gamutConversionMatrix_col0, tint_input.gamutConversionMatrix_col1, tint_input.gamutConversionMatrix_col2);
+ mat3x2 v_15 = mat3x2(tint_input.sampleTransform_col0, tint_input.sampleTransform_col1, tint_input.sampleTransform_col2);
+ return tint_ExternalTextureParams(tint_input.numPlanes, tint_input.doYuvToRgbConversionOnly, tint_input.yuvToRgbConversionMatrix, tint_input.gammaDecodeParams, tint_input.gammaEncodeParams, v_14, v_15, mat3x2(tint_input.loadTransform_col0, tint_input.loadTransform_col1, tint_input.loadTransform_col2), tint_input.samplePlane0RectMin, tint_input.samplePlane0RectMax, tint_input.samplePlane1RectMin, tint_input.samplePlane1RectMax, tint_input.visibleSize, tint_input.plane1CoordFactor);
}
vec4 textureLoad_8acf41() {
- tint_ExternalTextureParams v_20 = tint_convert_tint_ExternalTextureParams(v_1.inner);
- vec4 res = tint_TextureLoadExternal(v_20, uvec2(ivec2(1)));
+ tint_ExternalTextureParams v_16 = tint_convert_tint_ExternalTextureParams(v_1.inner);
+ vec4 res = tint_TextureLoadExternal(v_16, uvec2(ivec2(1)));
return res;
}
VertexOutput vertex_main_inner() {
@@ -355,10 +343,10 @@
return tint_symbol;
}
void main() {
- VertexOutput v_21 = vertex_main_inner();
- gl_Position = v_21.pos;
+ VertexOutput v_17 = vertex_main_inner();
+ gl_Position = v_17.pos;
gl_Position[1u] = -(gl_Position.y);
gl_Position[2u] = ((2.0f * gl_Position.z) - gl_Position.w);
- vertex_main_loc0_Output = v_21.prevent_dce;
+ vertex_main_loc0_Output = v_17.prevent_dce;
gl_PointSize = 1.0f;
}
diff --git a/test/tint/builtins/gen/literal/textureLoad/8acf41.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/8acf41.wgsl.expected.ir.dxc.hlsl
index c61ebf7..4f8fc7d 100644
--- a/test/tint/builtins/gen/literal/textureLoad/8acf41.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/gen/literal/textureLoad/8acf41.wgsl.expected.ir.dxc.hlsl
@@ -50,100 +50,88 @@
float3 tint_GammaCorrection(float3 v, tint_GammaTransferParams params) {
float3 v_1 = float3((params.G).xxx);
float3 v_2 = float3((params.D).xxx);
- float3 v_3 = abs(v);
- float3 v_4 = float3(sign(v));
- return (((v_3 < v_2)) ? ((v_4 * ((params.C * v_3) + params.F))) : ((v_4 * (pow(((params.A * v_3) + params.B), v_1) + params.E))));
+ float3 v_3 = float3(sign(v));
+ return (((abs(v) < v_2)) ? ((v_3 * ((params.C * abs(v)) + params.F))) : ((v_3 * (pow(((params.A * abs(v)) + params.B), v_1) + params.E))));
}
float4 tint_TextureLoadExternal(Texture2D<float4> plane_0, Texture2D<float4> plane_1, tint_ExternalTextureParams params, uint2 coords) {
- float2 v_5 = round(mul(float3(float2(min(coords, params.visibleSize)), 1.0f), params.loadTransform));
- uint2 v_6 = tint_v2f32_to_v2u32(v_5);
- float3 v_7 = (0.0f).xxx;
- float v_8 = 0.0f;
+ float2 v_4 = round(mul(float3(float2(min(coords, params.visibleSize)), 1.0f), params.loadTransform));
+ uint2 v_5 = tint_v2f32_to_v2u32(v_4);
+ float3 v_6 = (0.0f).xxx;
+ float v_7 = 0.0f;
if ((params.numPlanes == 1u)) {
- int2 v_9 = int2(v_6);
- float4 v_10 = float4(plane_0.Load(int3(v_9, int(0u))));
- v_7 = v_10.xyz;
- v_8 = v_10.w;
+ int2 v_8 = int2(v_5);
+ float4 v_9 = float4(plane_0.Load(int3(v_8, int(0u))));
+ v_6 = v_9.xyz;
+ v_7 = v_9.w;
} else {
- int2 v_11 = int2(v_6);
- float v_12 = float4(plane_0.Load(int3(v_11, int(0u)))).x;
- int2 v_13 = int2(tint_v2f32_to_v2u32((v_5 * params.plane1CoordFactor)));
- v_7 = mul(params.yuvToRgbConversionMatrix, float4(v_12, float4(plane_1.Load(int3(v_13, int(0u)))).xy, 1.0f));
- v_8 = 1.0f;
+ int2 v_10 = int2(v_5);
+ float v_11 = float4(plane_0.Load(int3(v_10, int(0u)))).x;
+ int2 v_12 = int2(tint_v2f32_to_v2u32((v_4 * params.plane1CoordFactor)));
+ v_6 = mul(params.yuvToRgbConversionMatrix, float4(v_11, float4(plane_1.Load(int3(v_12, int(0u)))).xy, 1.0f));
+ v_7 = 1.0f;
}
- float3 v_14 = v_7;
- float3 v_15 = (0.0f).xxx;
+ float3 v_13 = v_6;
+ float3 v_14 = (0.0f).xxx;
if ((params.doYuvToRgbConversionOnly == 0u)) {
- tint_GammaTransferParams v_16 = params.gammaDecodeParams;
- tint_GammaTransferParams v_17 = params.gammaEncodeParams;
- v_15 = tint_GammaCorrection(mul(tint_GammaCorrection(v_14, v_16), params.gamutConversionMatrix), v_17);
+ tint_GammaTransferParams v_15 = params.gammaDecodeParams;
+ tint_GammaTransferParams v_16 = params.gammaEncodeParams;
+ v_14 = tint_GammaCorrection(mul(tint_GammaCorrection(v_13, v_15), params.gamutConversionMatrix), v_16);
} else {
- v_15 = v_14;
+ v_14 = v_13;
}
- return float4(v_15, v_8);
+ return float4(v_14, v_7);
}
-float3x2 v_18(uint start_byte_offset) {
- uint4 v_19 = arg_0_params[(start_byte_offset / 16u)];
- float2 v_20 = asfloat((((((start_byte_offset % 16u) / 4u) == 2u)) ? (v_19.zw) : (v_19.xy)));
- uint4 v_21 = arg_0_params[((8u + start_byte_offset) / 16u)];
- float2 v_22 = asfloat(((((((8u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_21.zw) : (v_21.xy)));
- uint4 v_23 = arg_0_params[((16u + start_byte_offset) / 16u)];
- return float3x2(v_20, v_22, asfloat(((((((16u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_23.zw) : (v_23.xy))));
+float3x2 v_17(uint start_byte_offset) {
+ uint4 v_18 = arg_0_params[(start_byte_offset / 16u)];
+ float2 v_19 = asfloat((((((start_byte_offset % 16u) / 4u) == 2u)) ? (v_18.zw) : (v_18.xy)));
+ uint4 v_20 = arg_0_params[((8u + start_byte_offset) / 16u)];
+ float2 v_21 = asfloat(((((((8u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_20.zw) : (v_20.xy)));
+ uint4 v_22 = arg_0_params[((16u + start_byte_offset) / 16u)];
+ return float3x2(v_19, v_21, asfloat(((((((16u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_22.zw) : (v_22.xy))));
}
-float3x3 v_24(uint start_byte_offset) {
- float3 v_25 = asfloat(arg_0_params[(start_byte_offset / 16u)].xyz);
- float3 v_26 = asfloat(arg_0_params[((16u + start_byte_offset) / 16u)].xyz);
- return float3x3(v_25, v_26, asfloat(arg_0_params[((32u + start_byte_offset) / 16u)].xyz));
+float3x3 v_23(uint start_byte_offset) {
+ return float3x3(asfloat(arg_0_params[(start_byte_offset / 16u)].xyz), asfloat(arg_0_params[((16u + start_byte_offset) / 16u)].xyz), asfloat(arg_0_params[((32u + start_byte_offset) / 16u)].xyz));
}
-tint_GammaTransferParams v_27(uint start_byte_offset) {
- float v_28 = asfloat(arg_0_params[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]);
- float v_29 = asfloat(arg_0_params[((4u + start_byte_offset) / 16u)][(((4u + start_byte_offset) % 16u) / 4u)]);
- float v_30 = asfloat(arg_0_params[((8u + start_byte_offset) / 16u)][(((8u + start_byte_offset) % 16u) / 4u)]);
- float v_31 = asfloat(arg_0_params[((12u + start_byte_offset) / 16u)][(((12u + start_byte_offset) % 16u) / 4u)]);
- float v_32 = asfloat(arg_0_params[((16u + start_byte_offset) / 16u)][(((16u + start_byte_offset) % 16u) / 4u)]);
- float v_33 = asfloat(arg_0_params[((20u + start_byte_offset) / 16u)][(((20u + start_byte_offset) % 16u) / 4u)]);
- float v_34 = asfloat(arg_0_params[((24u + start_byte_offset) / 16u)][(((24u + start_byte_offset) % 16u) / 4u)]);
- tint_GammaTransferParams v_35 = {v_28, v_29, v_30, v_31, v_32, v_33, v_34, arg_0_params[((28u + start_byte_offset) / 16u)][(((28u + start_byte_offset) % 16u) / 4u)]};
- return v_35;
+tint_GammaTransferParams v_24(uint start_byte_offset) {
+ tint_GammaTransferParams v_25 = {asfloat(arg_0_params[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]), asfloat(arg_0_params[((4u + start_byte_offset) / 16u)][(((4u + start_byte_offset) % 16u) / 4u)]), asfloat(arg_0_params[((8u + start_byte_offset) / 16u)][(((8u + start_byte_offset) % 16u) / 4u)]), asfloat(arg_0_params[((12u + start_byte_offset) / 16u)][(((12u + start_byte_offset) % 16u) / 4u)]), asfloat(arg_0_params[((16u + start_byte_offset) / 16u)][(((16u + start_byte_offset) % 16u) / 4u)]), asfloat(arg_0_params[((20u + start_byte_offset) / 16u)][(((20u + start_byte_offset) % 16u) / 4u)]), asfloat(arg_0_params[((24u + start_byte_offset) / 16u)][(((24u + start_byte_offset) % 16u) / 4u)]), arg_0_params[((28u + start_byte_offset) / 16u)][(((28u + start_byte_offset) % 16u) / 4u)]};
+ return v_25;
}
-float3x4 v_36(uint start_byte_offset) {
- float4 v_37 = asfloat(arg_0_params[(start_byte_offset / 16u)]);
- float4 v_38 = asfloat(arg_0_params[((16u + start_byte_offset) / 16u)]);
- return float3x4(v_37, v_38, asfloat(arg_0_params[((32u + start_byte_offset) / 16u)]));
+float3x4 v_26(uint start_byte_offset) {
+ return float3x4(asfloat(arg_0_params[(start_byte_offset / 16u)]), asfloat(arg_0_params[((16u + start_byte_offset) / 16u)]), asfloat(arg_0_params[((32u + start_byte_offset) / 16u)]));
}
-tint_ExternalTextureParams v_39(uint start_byte_offset) {
- uint v_40 = arg_0_params[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)];
- uint v_41 = arg_0_params[((4u + start_byte_offset) / 16u)][(((4u + start_byte_offset) % 16u) / 4u)];
- float3x4 v_42 = v_36((16u + start_byte_offset));
- tint_GammaTransferParams v_43 = v_27((64u + start_byte_offset));
- tint_GammaTransferParams v_44 = v_27((96u + start_byte_offset));
- float3x3 v_45 = v_24((128u + start_byte_offset));
- float3x2 v_46 = v_18((176u + start_byte_offset));
- float3x2 v_47 = v_18((200u + start_byte_offset));
- uint4 v_48 = arg_0_params[((224u + start_byte_offset) / 16u)];
- float2 v_49 = asfloat(((((((224u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_48.zw) : (v_48.xy)));
- uint4 v_50 = arg_0_params[((232u + start_byte_offset) / 16u)];
- float2 v_51 = asfloat(((((((232u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_50.zw) : (v_50.xy)));
- uint4 v_52 = arg_0_params[((240u + start_byte_offset) / 16u)];
- float2 v_53 = asfloat(((((((240u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_52.zw) : (v_52.xy)));
- uint4 v_54 = arg_0_params[((248u + start_byte_offset) / 16u)];
- float2 v_55 = asfloat(((((((248u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_54.zw) : (v_54.xy)));
- uint4 v_56 = arg_0_params[((256u + start_byte_offset) / 16u)];
- uint2 v_57 = ((((((256u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_56.zw) : (v_56.xy));
- uint4 v_58 = arg_0_params[((264u + start_byte_offset) / 16u)];
- tint_ExternalTextureParams v_59 = {v_40, v_41, v_42, v_43, v_44, v_45, v_46, v_47, v_49, v_51, v_53, v_55, v_57, asfloat(((((((264u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_58.zw) : (v_58.xy)))};
- return v_59;
+tint_ExternalTextureParams v_27(uint start_byte_offset) {
+ uint v_28 = arg_0_params[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)];
+ uint v_29 = arg_0_params[((4u + start_byte_offset) / 16u)][(((4u + start_byte_offset) % 16u) / 4u)];
+ float3x4 v_30 = v_26((16u + start_byte_offset));
+ tint_GammaTransferParams v_31 = v_24((64u + start_byte_offset));
+ tint_GammaTransferParams v_32 = v_24((96u + start_byte_offset));
+ float3x3 v_33 = v_23((128u + start_byte_offset));
+ float3x2 v_34 = v_17((176u + start_byte_offset));
+ float3x2 v_35 = v_17((200u + start_byte_offset));
+ uint4 v_36 = arg_0_params[((224u + start_byte_offset) / 16u)];
+ float2 v_37 = asfloat(((((((224u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_36.zw) : (v_36.xy)));
+ uint4 v_38 = arg_0_params[((232u + start_byte_offset) / 16u)];
+ float2 v_39 = asfloat(((((((232u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_38.zw) : (v_38.xy)));
+ uint4 v_40 = arg_0_params[((240u + start_byte_offset) / 16u)];
+ float2 v_41 = asfloat(((((((240u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_40.zw) : (v_40.xy)));
+ uint4 v_42 = arg_0_params[((248u + start_byte_offset) / 16u)];
+ float2 v_43 = asfloat(((((((248u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_42.zw) : (v_42.xy)));
+ uint4 v_44 = arg_0_params[((256u + start_byte_offset) / 16u)];
+ uint2 v_45 = ((((((256u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_44.zw) : (v_44.xy));
+ uint4 v_46 = arg_0_params[((264u + start_byte_offset) / 16u)];
+ tint_ExternalTextureParams v_47 = {v_28, v_29, v_30, v_31, v_32, v_33, v_34, v_35, v_37, v_39, v_41, v_43, v_45, asfloat(((((((264u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_46.zw) : (v_46.xy)))};
+ return v_47;
}
float4 textureLoad_8acf41() {
- tint_ExternalTextureParams v_60 = v_39(0u);
- float4 res = tint_TextureLoadExternal(arg_0_plane0, arg_0_plane1, v_60, uint2((int(1)).xx));
+ tint_ExternalTextureParams v_48 = v_27(0u);
+ float4 res = tint_TextureLoadExternal(arg_0_plane0, arg_0_plane1, v_48, uint2((int(1)).xx));
return res;
}
@@ -160,13 +148,13 @@
VertexOutput tint_symbol = (VertexOutput)0;
tint_symbol.pos = (0.0f).xxxx;
tint_symbol.prevent_dce = textureLoad_8acf41();
- VertexOutput v_61 = tint_symbol;
- return v_61;
+ VertexOutput v_49 = tint_symbol;
+ return v_49;
}
vertex_main_outputs vertex_main() {
- VertexOutput v_62 = vertex_main_inner();
- vertex_main_outputs v_63 = {v_62.prevent_dce, v_62.pos};
- return v_63;
+ VertexOutput v_50 = vertex_main_inner();
+ vertex_main_outputs v_51 = {v_50.prevent_dce, v_50.pos};
+ return v_51;
}
diff --git a/test/tint/builtins/gen/literal/textureLoad/8acf41.wgsl.expected.ir.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/8acf41.wgsl.expected.ir.fxc.hlsl
index c61ebf7..4f8fc7d 100644
--- a/test/tint/builtins/gen/literal/textureLoad/8acf41.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/textureLoad/8acf41.wgsl.expected.ir.fxc.hlsl
@@ -50,100 +50,88 @@
float3 tint_GammaCorrection(float3 v, tint_GammaTransferParams params) {
float3 v_1 = float3((params.G).xxx);
float3 v_2 = float3((params.D).xxx);
- float3 v_3 = abs(v);
- float3 v_4 = float3(sign(v));
- return (((v_3 < v_2)) ? ((v_4 * ((params.C * v_3) + params.F))) : ((v_4 * (pow(((params.A * v_3) + params.B), v_1) + params.E))));
+ float3 v_3 = float3(sign(v));
+ return (((abs(v) < v_2)) ? ((v_3 * ((params.C * abs(v)) + params.F))) : ((v_3 * (pow(((params.A * abs(v)) + params.B), v_1) + params.E))));
}
float4 tint_TextureLoadExternal(Texture2D<float4> plane_0, Texture2D<float4> plane_1, tint_ExternalTextureParams params, uint2 coords) {
- float2 v_5 = round(mul(float3(float2(min(coords, params.visibleSize)), 1.0f), params.loadTransform));
- uint2 v_6 = tint_v2f32_to_v2u32(v_5);
- float3 v_7 = (0.0f).xxx;
- float v_8 = 0.0f;
+ float2 v_4 = round(mul(float3(float2(min(coords, params.visibleSize)), 1.0f), params.loadTransform));
+ uint2 v_5 = tint_v2f32_to_v2u32(v_4);
+ float3 v_6 = (0.0f).xxx;
+ float v_7 = 0.0f;
if ((params.numPlanes == 1u)) {
- int2 v_9 = int2(v_6);
- float4 v_10 = float4(plane_0.Load(int3(v_9, int(0u))));
- v_7 = v_10.xyz;
- v_8 = v_10.w;
+ int2 v_8 = int2(v_5);
+ float4 v_9 = float4(plane_0.Load(int3(v_8, int(0u))));
+ v_6 = v_9.xyz;
+ v_7 = v_9.w;
} else {
- int2 v_11 = int2(v_6);
- float v_12 = float4(plane_0.Load(int3(v_11, int(0u)))).x;
- int2 v_13 = int2(tint_v2f32_to_v2u32((v_5 * params.plane1CoordFactor)));
- v_7 = mul(params.yuvToRgbConversionMatrix, float4(v_12, float4(plane_1.Load(int3(v_13, int(0u)))).xy, 1.0f));
- v_8 = 1.0f;
+ int2 v_10 = int2(v_5);
+ float v_11 = float4(plane_0.Load(int3(v_10, int(0u)))).x;
+ int2 v_12 = int2(tint_v2f32_to_v2u32((v_4 * params.plane1CoordFactor)));
+ v_6 = mul(params.yuvToRgbConversionMatrix, float4(v_11, float4(plane_1.Load(int3(v_12, int(0u)))).xy, 1.0f));
+ v_7 = 1.0f;
}
- float3 v_14 = v_7;
- float3 v_15 = (0.0f).xxx;
+ float3 v_13 = v_6;
+ float3 v_14 = (0.0f).xxx;
if ((params.doYuvToRgbConversionOnly == 0u)) {
- tint_GammaTransferParams v_16 = params.gammaDecodeParams;
- tint_GammaTransferParams v_17 = params.gammaEncodeParams;
- v_15 = tint_GammaCorrection(mul(tint_GammaCorrection(v_14, v_16), params.gamutConversionMatrix), v_17);
+ tint_GammaTransferParams v_15 = params.gammaDecodeParams;
+ tint_GammaTransferParams v_16 = params.gammaEncodeParams;
+ v_14 = tint_GammaCorrection(mul(tint_GammaCorrection(v_13, v_15), params.gamutConversionMatrix), v_16);
} else {
- v_15 = v_14;
+ v_14 = v_13;
}
- return float4(v_15, v_8);
+ return float4(v_14, v_7);
}
-float3x2 v_18(uint start_byte_offset) {
- uint4 v_19 = arg_0_params[(start_byte_offset / 16u)];
- float2 v_20 = asfloat((((((start_byte_offset % 16u) / 4u) == 2u)) ? (v_19.zw) : (v_19.xy)));
- uint4 v_21 = arg_0_params[((8u + start_byte_offset) / 16u)];
- float2 v_22 = asfloat(((((((8u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_21.zw) : (v_21.xy)));
- uint4 v_23 = arg_0_params[((16u + start_byte_offset) / 16u)];
- return float3x2(v_20, v_22, asfloat(((((((16u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_23.zw) : (v_23.xy))));
+float3x2 v_17(uint start_byte_offset) {
+ uint4 v_18 = arg_0_params[(start_byte_offset / 16u)];
+ float2 v_19 = asfloat((((((start_byte_offset % 16u) / 4u) == 2u)) ? (v_18.zw) : (v_18.xy)));
+ uint4 v_20 = arg_0_params[((8u + start_byte_offset) / 16u)];
+ float2 v_21 = asfloat(((((((8u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_20.zw) : (v_20.xy)));
+ uint4 v_22 = arg_0_params[((16u + start_byte_offset) / 16u)];
+ return float3x2(v_19, v_21, asfloat(((((((16u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_22.zw) : (v_22.xy))));
}
-float3x3 v_24(uint start_byte_offset) {
- float3 v_25 = asfloat(arg_0_params[(start_byte_offset / 16u)].xyz);
- float3 v_26 = asfloat(arg_0_params[((16u + start_byte_offset) / 16u)].xyz);
- return float3x3(v_25, v_26, asfloat(arg_0_params[((32u + start_byte_offset) / 16u)].xyz));
+float3x3 v_23(uint start_byte_offset) {
+ return float3x3(asfloat(arg_0_params[(start_byte_offset / 16u)].xyz), asfloat(arg_0_params[((16u + start_byte_offset) / 16u)].xyz), asfloat(arg_0_params[((32u + start_byte_offset) / 16u)].xyz));
}
-tint_GammaTransferParams v_27(uint start_byte_offset) {
- float v_28 = asfloat(arg_0_params[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]);
- float v_29 = asfloat(arg_0_params[((4u + start_byte_offset) / 16u)][(((4u + start_byte_offset) % 16u) / 4u)]);
- float v_30 = asfloat(arg_0_params[((8u + start_byte_offset) / 16u)][(((8u + start_byte_offset) % 16u) / 4u)]);
- float v_31 = asfloat(arg_0_params[((12u + start_byte_offset) / 16u)][(((12u + start_byte_offset) % 16u) / 4u)]);
- float v_32 = asfloat(arg_0_params[((16u + start_byte_offset) / 16u)][(((16u + start_byte_offset) % 16u) / 4u)]);
- float v_33 = asfloat(arg_0_params[((20u + start_byte_offset) / 16u)][(((20u + start_byte_offset) % 16u) / 4u)]);
- float v_34 = asfloat(arg_0_params[((24u + start_byte_offset) / 16u)][(((24u + start_byte_offset) % 16u) / 4u)]);
- tint_GammaTransferParams v_35 = {v_28, v_29, v_30, v_31, v_32, v_33, v_34, arg_0_params[((28u + start_byte_offset) / 16u)][(((28u + start_byte_offset) % 16u) / 4u)]};
- return v_35;
+tint_GammaTransferParams v_24(uint start_byte_offset) {
+ tint_GammaTransferParams v_25 = {asfloat(arg_0_params[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]), asfloat(arg_0_params[((4u + start_byte_offset) / 16u)][(((4u + start_byte_offset) % 16u) / 4u)]), asfloat(arg_0_params[((8u + start_byte_offset) / 16u)][(((8u + start_byte_offset) % 16u) / 4u)]), asfloat(arg_0_params[((12u + start_byte_offset) / 16u)][(((12u + start_byte_offset) % 16u) / 4u)]), asfloat(arg_0_params[((16u + start_byte_offset) / 16u)][(((16u + start_byte_offset) % 16u) / 4u)]), asfloat(arg_0_params[((20u + start_byte_offset) / 16u)][(((20u + start_byte_offset) % 16u) / 4u)]), asfloat(arg_0_params[((24u + start_byte_offset) / 16u)][(((24u + start_byte_offset) % 16u) / 4u)]), arg_0_params[((28u + start_byte_offset) / 16u)][(((28u + start_byte_offset) % 16u) / 4u)]};
+ return v_25;
}
-float3x4 v_36(uint start_byte_offset) {
- float4 v_37 = asfloat(arg_0_params[(start_byte_offset / 16u)]);
- float4 v_38 = asfloat(arg_0_params[((16u + start_byte_offset) / 16u)]);
- return float3x4(v_37, v_38, asfloat(arg_0_params[((32u + start_byte_offset) / 16u)]));
+float3x4 v_26(uint start_byte_offset) {
+ return float3x4(asfloat(arg_0_params[(start_byte_offset / 16u)]), asfloat(arg_0_params[((16u + start_byte_offset) / 16u)]), asfloat(arg_0_params[((32u + start_byte_offset) / 16u)]));
}
-tint_ExternalTextureParams v_39(uint start_byte_offset) {
- uint v_40 = arg_0_params[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)];
- uint v_41 = arg_0_params[((4u + start_byte_offset) / 16u)][(((4u + start_byte_offset) % 16u) / 4u)];
- float3x4 v_42 = v_36((16u + start_byte_offset));
- tint_GammaTransferParams v_43 = v_27((64u + start_byte_offset));
- tint_GammaTransferParams v_44 = v_27((96u + start_byte_offset));
- float3x3 v_45 = v_24((128u + start_byte_offset));
- float3x2 v_46 = v_18((176u + start_byte_offset));
- float3x2 v_47 = v_18((200u + start_byte_offset));
- uint4 v_48 = arg_0_params[((224u + start_byte_offset) / 16u)];
- float2 v_49 = asfloat(((((((224u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_48.zw) : (v_48.xy)));
- uint4 v_50 = arg_0_params[((232u + start_byte_offset) / 16u)];
- float2 v_51 = asfloat(((((((232u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_50.zw) : (v_50.xy)));
- uint4 v_52 = arg_0_params[((240u + start_byte_offset) / 16u)];
- float2 v_53 = asfloat(((((((240u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_52.zw) : (v_52.xy)));
- uint4 v_54 = arg_0_params[((248u + start_byte_offset) / 16u)];
- float2 v_55 = asfloat(((((((248u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_54.zw) : (v_54.xy)));
- uint4 v_56 = arg_0_params[((256u + start_byte_offset) / 16u)];
- uint2 v_57 = ((((((256u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_56.zw) : (v_56.xy));
- uint4 v_58 = arg_0_params[((264u + start_byte_offset) / 16u)];
- tint_ExternalTextureParams v_59 = {v_40, v_41, v_42, v_43, v_44, v_45, v_46, v_47, v_49, v_51, v_53, v_55, v_57, asfloat(((((((264u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_58.zw) : (v_58.xy)))};
- return v_59;
+tint_ExternalTextureParams v_27(uint start_byte_offset) {
+ uint v_28 = arg_0_params[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)];
+ uint v_29 = arg_0_params[((4u + start_byte_offset) / 16u)][(((4u + start_byte_offset) % 16u) / 4u)];
+ float3x4 v_30 = v_26((16u + start_byte_offset));
+ tint_GammaTransferParams v_31 = v_24((64u + start_byte_offset));
+ tint_GammaTransferParams v_32 = v_24((96u + start_byte_offset));
+ float3x3 v_33 = v_23((128u + start_byte_offset));
+ float3x2 v_34 = v_17((176u + start_byte_offset));
+ float3x2 v_35 = v_17((200u + start_byte_offset));
+ uint4 v_36 = arg_0_params[((224u + start_byte_offset) / 16u)];
+ float2 v_37 = asfloat(((((((224u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_36.zw) : (v_36.xy)));
+ uint4 v_38 = arg_0_params[((232u + start_byte_offset) / 16u)];
+ float2 v_39 = asfloat(((((((232u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_38.zw) : (v_38.xy)));
+ uint4 v_40 = arg_0_params[((240u + start_byte_offset) / 16u)];
+ float2 v_41 = asfloat(((((((240u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_40.zw) : (v_40.xy)));
+ uint4 v_42 = arg_0_params[((248u + start_byte_offset) / 16u)];
+ float2 v_43 = asfloat(((((((248u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_42.zw) : (v_42.xy)));
+ uint4 v_44 = arg_0_params[((256u + start_byte_offset) / 16u)];
+ uint2 v_45 = ((((((256u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_44.zw) : (v_44.xy));
+ uint4 v_46 = arg_0_params[((264u + start_byte_offset) / 16u)];
+ tint_ExternalTextureParams v_47 = {v_28, v_29, v_30, v_31, v_32, v_33, v_34, v_35, v_37, v_39, v_41, v_43, v_45, asfloat(((((((264u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_46.zw) : (v_46.xy)))};
+ return v_47;
}
float4 textureLoad_8acf41() {
- tint_ExternalTextureParams v_60 = v_39(0u);
- float4 res = tint_TextureLoadExternal(arg_0_plane0, arg_0_plane1, v_60, uint2((int(1)).xx));
+ tint_ExternalTextureParams v_48 = v_27(0u);
+ float4 res = tint_TextureLoadExternal(arg_0_plane0, arg_0_plane1, v_48, uint2((int(1)).xx));
return res;
}
@@ -160,13 +148,13 @@
VertexOutput tint_symbol = (VertexOutput)0;
tint_symbol.pos = (0.0f).xxxx;
tint_symbol.prevent_dce = textureLoad_8acf41();
- VertexOutput v_61 = tint_symbol;
- return v_61;
+ VertexOutput v_49 = tint_symbol;
+ return v_49;
}
vertex_main_outputs vertex_main() {
- VertexOutput v_62 = vertex_main_inner();
- vertex_main_outputs v_63 = {v_62.prevent_dce, v_62.pos};
- return v_63;
+ VertexOutput v_50 = vertex_main_inner();
+ vertex_main_outputs v_51 = {v_50.prevent_dce, v_50.pos};
+ return v_51;
}
diff --git a/test/tint/builtins/gen/literal/textureLoad/8acf41.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/8acf41.wgsl.expected.ir.msl
index 0a7f13e..8853b37 100644
--- a/test/tint/builtins/gen/literal/textureLoad/8acf41.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/8acf41.wgsl.expected.ir.msl
@@ -83,52 +83,49 @@
float3 tint_GammaCorrection(float3 v, tint_GammaTransferParams params) {
float3 const v_1 = float3(params.G);
- float3 const v_2 = float3(params.D);
- float3 const v_3 = abs(v);
- float3 const v_4 = sign(v);
- return select((v_4 * (powr(((params.A * v_3) + params.B), v_1) + params.E)), (v_4 * ((params.C * v_3) + params.F)), (v_3 < v_2));
+ return select((sign(v) * (powr(((params.A * abs(v)) + params.B), v_1) + params.E)), (sign(v) * ((params.C * abs(v)) + params.F)), (abs(v) < float3(params.D)));
}
float4 tint_TextureLoadExternal(texture2d<float, access::sample> plane_0, texture2d<float, access::sample> plane_1, tint_ExternalTextureParams params, uint2 coords) {
- float2 const v_5 = rint((params.loadTransform * float3(float2(min(coords, params.visibleSize)), 1.0f)));
- uint2 const v_6 = uint2(v_5);
- float3 v_7 = 0.0f;
- float v_8 = 0.0f;
+ float2 const v_2 = rint((params.loadTransform * float3(float2(min(coords, params.visibleSize)), 1.0f)));
+ uint2 const v_3 = uint2(v_2);
+ float3 v_4 = 0.0f;
+ float v_5 = 0.0f;
if ((params.numPlanes == 1u)) {
- float4 const v_9 = plane_0.read(v_6, 0u);
- v_7 = v_9.xyz;
- v_8 = v_9[3u];
+ float4 const v_6 = plane_0.read(v_3, 0u);
+ v_4 = v_6.xyz;
+ v_5 = v_6[3u];
} else {
- float const v_10 = plane_0.read(v_6, 0u)[0u];
- v_7 = (float4(v_10, plane_1.read(uint2((v_5 * params.plane1CoordFactor)), 0u).xy, 1.0f) * params.yuvToRgbConversionMatrix);
- v_8 = 1.0f;
+ float const v_7 = plane_0.read(v_3, 0u)[0u];
+ v_4 = (float4(v_7, plane_1.read(uint2((v_2 * params.plane1CoordFactor)), 0u).xy, 1.0f) * params.yuvToRgbConversionMatrix);
+ v_5 = 1.0f;
}
- float3 const v_11 = v_7;
- float3 v_12 = 0.0f;
+ float3 const v_8 = v_4;
+ float3 v_9 = 0.0f;
if ((params.doYuvToRgbConversionOnly == 0u)) {
- v_12 = tint_GammaCorrection((params.gamutConversionMatrix * tint_GammaCorrection(v_11, params.gammaDecodeParams)), params.gammaEncodeParams);
+ v_9 = tint_GammaCorrection((params.gamutConversionMatrix * tint_GammaCorrection(v_8, params.gammaDecodeParams)), params.gammaEncodeParams);
} else {
- v_12 = v_11;
+ v_9 = v_8;
}
- return float4(v_12, v_8);
+ return float4(v_9, v_5);
}
tint_ExternalTextureParams tint_load_struct_packed_vec3(const constant tint_ExternalTextureParams_packed_vec3* const from) {
- uint const v_13 = (*from).numPlanes;
- uint const v_14 = (*from).doYuvToRgbConversionOnly;
- float3x4 const v_15 = (*from).yuvToRgbConversionMatrix;
- tint_GammaTransferParams const v_16 = (*from).gammaDecodeParams;
- tint_GammaTransferParams const v_17 = (*from).gammaEncodeParams;
- tint_array<tint_packed_vec3_f32_array_element, 3> const v_18 = (*from).gamutConversionMatrix;
- float3 const v_19 = float3(v_18[0u].packed);
- float3 const v_20 = float3(v_18[1u].packed);
- float3x3 const v_21 = float3x3(v_19, v_20, float3(v_18[2u].packed));
- return tint_ExternalTextureParams{.numPlanes=v_13, .doYuvToRgbConversionOnly=v_14, .yuvToRgbConversionMatrix=v_15, .gammaDecodeParams=v_16, .gammaEncodeParams=v_17, .gamutConversionMatrix=v_21, .sampleTransform=(*from).sampleTransform, .loadTransform=(*from).loadTransform, .samplePlane0RectMin=(*from).samplePlane0RectMin, .samplePlane0RectMax=(*from).samplePlane0RectMax, .samplePlane1RectMin=(*from).samplePlane1RectMin, .samplePlane1RectMax=(*from).samplePlane1RectMax, .visibleSize=(*from).visibleSize, .plane1CoordFactor=(*from).plane1CoordFactor};
+ uint const v_10 = (*from).numPlanes;
+ uint const v_11 = (*from).doYuvToRgbConversionOnly;
+ float3x4 const v_12 = (*from).yuvToRgbConversionMatrix;
+ tint_GammaTransferParams const v_13 = (*from).gammaDecodeParams;
+ tint_GammaTransferParams const v_14 = (*from).gammaEncodeParams;
+ tint_array<tint_packed_vec3_f32_array_element, 3> const v_15 = (*from).gamutConversionMatrix;
+ float3 const v_16 = float3(v_15[0u].packed);
+ float3 const v_17 = float3(v_15[1u].packed);
+ float3x3 const v_18 = float3x3(v_16, v_17, float3(v_15[2u].packed));
+ return tint_ExternalTextureParams{.numPlanes=v_10, .doYuvToRgbConversionOnly=v_11, .yuvToRgbConversionMatrix=v_12, .gammaDecodeParams=v_13, .gammaEncodeParams=v_14, .gamutConversionMatrix=v_18, .sampleTransform=(*from).sampleTransform, .loadTransform=(*from).loadTransform, .samplePlane0RectMin=(*from).samplePlane0RectMin, .samplePlane0RectMax=(*from).samplePlane0RectMax, .samplePlane1RectMin=(*from).samplePlane1RectMin, .samplePlane1RectMax=(*from).samplePlane1RectMax, .visibleSize=(*from).visibleSize, .plane1CoordFactor=(*from).plane1CoordFactor};
}
float4 textureLoad_8acf41(tint_module_vars_struct tint_module_vars) {
- tint_ExternalTextureParams const v_22 = tint_load_struct_packed_vec3(tint_module_vars.arg_0_params);
- float4 res = tint_TextureLoadExternal(tint_module_vars.arg_0_plane0, tint_module_vars.arg_0_plane1, v_22, uint2(int2(1)));
+ tint_ExternalTextureParams const v_19 = tint_load_struct_packed_vec3(tint_module_vars.arg_0_params);
+ float4 res = tint_TextureLoadExternal(tint_module_vars.arg_0_plane0, tint_module_vars.arg_0_plane1, v_19, uint2(int2(1)));
return res;
}
@@ -151,9 +148,9 @@
vertex vertex_main_outputs vertex_main(texture2d<float, access::sample> arg_0_plane0 [[texture(0)]], texture2d<float, access::sample> arg_0_plane1 [[texture(1)]], const constant tint_ExternalTextureParams_packed_vec3* arg_0_params [[buffer(2)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0_plane0=arg_0_plane0, .arg_0_plane1=arg_0_plane1, .arg_0_params=arg_0_params};
- VertexOutput const v_23 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v_20 = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_23.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_23.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v_20.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v_20.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.glsl
index 77cf7b3..54a983e 100644
--- a/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.glsl
@@ -71,40 +71,34 @@
uniform highp sampler2D arg_0_plane1_arg_1;
vec3 tint_GammaCorrection(vec3 v, tint_GammaTransferParams params) {
vec3 v_3 = vec3(params.G);
- vec3 v_4 = vec3(params.D);
- vec3 v_5 = abs(v);
- vec3 v_6 = sign(v);
- bvec3 v_7 = lessThan(v_5, v_4);
- return mix((v_6 * (pow(((params.A * v_5) + params.B), v_3) + params.E)), (v_6 * ((params.C * v_5) + params.F)), v_7);
+ return mix((sign(v) * (pow(((params.A * abs(v)) + params.B), v_3) + params.E)), (sign(v) * ((params.C * abs(v)) + params.F)), lessThan(abs(v), vec3(params.D)));
}
vec4 tint_TextureSampleExternal(tint_ExternalTextureParams params, vec2 coords) {
- vec2 v_8 = (params.sampleTransform * vec3(coords, 1.0f));
- vec2 v_9 = clamp(v_8, params.samplePlane0RectMin, params.samplePlane0RectMax);
- vec3 v_10 = vec3(0.0f);
- float v_11 = 0.0f;
+ vec2 v_4 = (params.sampleTransform * vec3(coords, 1.0f));
+ vec3 v_5 = vec3(0.0f);
+ float v_6 = 0.0f;
if ((params.numPlanes == 1u)) {
- vec4 v_12 = textureLod(arg_0_plane0_arg_1, v_9, float(0.0f));
- v_10 = v_12.xyz;
- v_11 = v_12[3u];
+ vec4 v_7 = textureLod(arg_0_plane0_arg_1, clamp(v_4, params.samplePlane0RectMin, params.samplePlane0RectMax), float(0.0f));
+ v_5 = v_7.xyz;
+ v_6 = v_7[3u];
} else {
- float v_13 = textureLod(arg_0_plane0_arg_1, v_9, float(0.0f))[0u];
- vec2 v_14 = clamp(v_8, params.samplePlane1RectMin, params.samplePlane1RectMax);
- v_10 = (vec4(v_13, textureLod(arg_0_plane1_arg_1, v_14, float(0.0f)).xy, 1.0f) * params.yuvToRgbConversionMatrix);
- v_11 = 1.0f;
+ float v_8 = textureLod(arg_0_plane0_arg_1, clamp(v_4, params.samplePlane0RectMin, params.samplePlane0RectMax), float(0.0f))[0u];
+ v_5 = (vec4(v_8, textureLod(arg_0_plane1_arg_1, clamp(v_4, params.samplePlane1RectMin, params.samplePlane1RectMax), float(0.0f)).xy, 1.0f) * params.yuvToRgbConversionMatrix);
+ v_6 = 1.0f;
}
- vec3 v_15 = v_10;
- vec3 v_16 = vec3(0.0f);
+ vec3 v_9 = v_5;
+ vec3 v_10 = vec3(0.0f);
if ((params.doYuvToRgbConversionOnly == 0u)) {
- v_16 = tint_GammaCorrection((params.gamutConversionMatrix * tint_GammaCorrection(v_15, params.gammaDecodeParams)), params.gammaEncodeParams);
+ v_10 = tint_GammaCorrection((params.gamutConversionMatrix * tint_GammaCorrection(v_9, params.gammaDecodeParams)), params.gammaEncodeParams);
} else {
- v_16 = v_15;
+ v_10 = v_9;
}
- return vec4(v_16, v_11);
+ return vec4(v_10, v_6);
}
tint_ExternalTextureParams tint_convert_tint_ExternalTextureParams(tint_ExternalTextureParams_std140 tint_input) {
- mat3 v_17 = mat3(tint_input.gamutConversionMatrix_col0, tint_input.gamutConversionMatrix_col1, tint_input.gamutConversionMatrix_col2);
- mat3x2 v_18 = mat3x2(tint_input.sampleTransform_col0, tint_input.sampleTransform_col1, tint_input.sampleTransform_col2);
- return tint_ExternalTextureParams(tint_input.numPlanes, tint_input.doYuvToRgbConversionOnly, tint_input.yuvToRgbConversionMatrix, tint_input.gammaDecodeParams, tint_input.gammaEncodeParams, v_17, v_18, mat3x2(tint_input.loadTransform_col0, tint_input.loadTransform_col1, tint_input.loadTransform_col2), tint_input.samplePlane0RectMin, tint_input.samplePlane0RectMax, tint_input.samplePlane1RectMin, tint_input.samplePlane1RectMax, tint_input.visibleSize, tint_input.plane1CoordFactor);
+ mat3 v_11 = mat3(tint_input.gamutConversionMatrix_col0, tint_input.gamutConversionMatrix_col1, tint_input.gamutConversionMatrix_col2);
+ mat3x2 v_12 = mat3x2(tint_input.sampleTransform_col0, tint_input.sampleTransform_col1, tint_input.sampleTransform_col2);
+ return tint_ExternalTextureParams(tint_input.numPlanes, tint_input.doYuvToRgbConversionOnly, tint_input.yuvToRgbConversionMatrix, tint_input.gammaDecodeParams, tint_input.gammaEncodeParams, v_11, v_12, mat3x2(tint_input.loadTransform_col0, tint_input.loadTransform_col1, tint_input.loadTransform_col2), tint_input.samplePlane0RectMin, tint_input.samplePlane0RectMax, tint_input.samplePlane1RectMin, tint_input.samplePlane1RectMax, tint_input.visibleSize, tint_input.plane1CoordFactor);
}
vec4 textureSampleBaseClampToEdge_7c04e6() {
vec4 res = tint_TextureSampleExternal(tint_convert_tint_ExternalTextureParams(v_2.inner), vec2(1.0f));
@@ -184,40 +178,34 @@
uniform highp sampler2D arg_0_plane1_arg_1;
vec3 tint_GammaCorrection(vec3 v, tint_GammaTransferParams params) {
vec3 v_3 = vec3(params.G);
- vec3 v_4 = vec3(params.D);
- vec3 v_5 = abs(v);
- vec3 v_6 = sign(v);
- bvec3 v_7 = lessThan(v_5, v_4);
- return mix((v_6 * (pow(((params.A * v_5) + params.B), v_3) + params.E)), (v_6 * ((params.C * v_5) + params.F)), v_7);
+ return mix((sign(v) * (pow(((params.A * abs(v)) + params.B), v_3) + params.E)), (sign(v) * ((params.C * abs(v)) + params.F)), lessThan(abs(v), vec3(params.D)));
}
vec4 tint_TextureSampleExternal(tint_ExternalTextureParams params, vec2 coords) {
- vec2 v_8 = (params.sampleTransform * vec3(coords, 1.0f));
- vec2 v_9 = clamp(v_8, params.samplePlane0RectMin, params.samplePlane0RectMax);
- vec3 v_10 = vec3(0.0f);
- float v_11 = 0.0f;
+ vec2 v_4 = (params.sampleTransform * vec3(coords, 1.0f));
+ vec3 v_5 = vec3(0.0f);
+ float v_6 = 0.0f;
if ((params.numPlanes == 1u)) {
- vec4 v_12 = textureLod(arg_0_plane0_arg_1, v_9, float(0.0f));
- v_10 = v_12.xyz;
- v_11 = v_12[3u];
+ vec4 v_7 = textureLod(arg_0_plane0_arg_1, clamp(v_4, params.samplePlane0RectMin, params.samplePlane0RectMax), float(0.0f));
+ v_5 = v_7.xyz;
+ v_6 = v_7[3u];
} else {
- float v_13 = textureLod(arg_0_plane0_arg_1, v_9, float(0.0f))[0u];
- vec2 v_14 = clamp(v_8, params.samplePlane1RectMin, params.samplePlane1RectMax);
- v_10 = (vec4(v_13, textureLod(arg_0_plane1_arg_1, v_14, float(0.0f)).xy, 1.0f) * params.yuvToRgbConversionMatrix);
- v_11 = 1.0f;
+ float v_8 = textureLod(arg_0_plane0_arg_1, clamp(v_4, params.samplePlane0RectMin, params.samplePlane0RectMax), float(0.0f))[0u];
+ v_5 = (vec4(v_8, textureLod(arg_0_plane1_arg_1, clamp(v_4, params.samplePlane1RectMin, params.samplePlane1RectMax), float(0.0f)).xy, 1.0f) * params.yuvToRgbConversionMatrix);
+ v_6 = 1.0f;
}
- vec3 v_15 = v_10;
- vec3 v_16 = vec3(0.0f);
+ vec3 v_9 = v_5;
+ vec3 v_10 = vec3(0.0f);
if ((params.doYuvToRgbConversionOnly == 0u)) {
- v_16 = tint_GammaCorrection((params.gamutConversionMatrix * tint_GammaCorrection(v_15, params.gammaDecodeParams)), params.gammaEncodeParams);
+ v_10 = tint_GammaCorrection((params.gamutConversionMatrix * tint_GammaCorrection(v_9, params.gammaDecodeParams)), params.gammaEncodeParams);
} else {
- v_16 = v_15;
+ v_10 = v_9;
}
- return vec4(v_16, v_11);
+ return vec4(v_10, v_6);
}
tint_ExternalTextureParams tint_convert_tint_ExternalTextureParams(tint_ExternalTextureParams_std140 tint_input) {
- mat3 v_17 = mat3(tint_input.gamutConversionMatrix_col0, tint_input.gamutConversionMatrix_col1, tint_input.gamutConversionMatrix_col2);
- mat3x2 v_18 = mat3x2(tint_input.sampleTransform_col0, tint_input.sampleTransform_col1, tint_input.sampleTransform_col2);
- return tint_ExternalTextureParams(tint_input.numPlanes, tint_input.doYuvToRgbConversionOnly, tint_input.yuvToRgbConversionMatrix, tint_input.gammaDecodeParams, tint_input.gammaEncodeParams, v_17, v_18, mat3x2(tint_input.loadTransform_col0, tint_input.loadTransform_col1, tint_input.loadTransform_col2), tint_input.samplePlane0RectMin, tint_input.samplePlane0RectMax, tint_input.samplePlane1RectMin, tint_input.samplePlane1RectMax, tint_input.visibleSize, tint_input.plane1CoordFactor);
+ mat3 v_11 = mat3(tint_input.gamutConversionMatrix_col0, tint_input.gamutConversionMatrix_col1, tint_input.gamutConversionMatrix_col2);
+ mat3x2 v_12 = mat3x2(tint_input.sampleTransform_col0, tint_input.sampleTransform_col1, tint_input.sampleTransform_col2);
+ return tint_ExternalTextureParams(tint_input.numPlanes, tint_input.doYuvToRgbConversionOnly, tint_input.yuvToRgbConversionMatrix, tint_input.gammaDecodeParams, tint_input.gammaEncodeParams, v_11, v_12, mat3x2(tint_input.loadTransform_col0, tint_input.loadTransform_col1, tint_input.loadTransform_col2), tint_input.samplePlane0RectMin, tint_input.samplePlane0RectMax, tint_input.samplePlane1RectMin, tint_input.samplePlane1RectMax, tint_input.visibleSize, tint_input.plane1CoordFactor);
}
vec4 textureSampleBaseClampToEdge_7c04e6() {
vec4 res = tint_TextureSampleExternal(tint_convert_tint_ExternalTextureParams(v_2.inner), vec2(1.0f));
@@ -300,40 +288,34 @@
layout(location = 0) flat out vec4 vertex_main_loc0_Output;
vec3 tint_GammaCorrection(vec3 v, tint_GammaTransferParams params) {
vec3 v_2 = vec3(params.G);
- vec3 v_3 = vec3(params.D);
- vec3 v_4 = abs(v);
- vec3 v_5 = sign(v);
- bvec3 v_6 = lessThan(v_4, v_3);
- return mix((v_5 * (pow(((params.A * v_4) + params.B), v_2) + params.E)), (v_5 * ((params.C * v_4) + params.F)), v_6);
+ return mix((sign(v) * (pow(((params.A * abs(v)) + params.B), v_2) + params.E)), (sign(v) * ((params.C * abs(v)) + params.F)), lessThan(abs(v), vec3(params.D)));
}
vec4 tint_TextureSampleExternal(tint_ExternalTextureParams params, vec2 coords) {
- vec2 v_7 = (params.sampleTransform * vec3(coords, 1.0f));
- vec2 v_8 = clamp(v_7, params.samplePlane0RectMin, params.samplePlane0RectMax);
- vec3 v_9 = vec3(0.0f);
- float v_10 = 0.0f;
+ vec2 v_3 = (params.sampleTransform * vec3(coords, 1.0f));
+ vec3 v_4 = vec3(0.0f);
+ float v_5 = 0.0f;
if ((params.numPlanes == 1u)) {
- vec4 v_11 = textureLod(arg_0_plane0_arg_1, v_8, float(0.0f));
- v_9 = v_11.xyz;
- v_10 = v_11[3u];
+ vec4 v_6 = textureLod(arg_0_plane0_arg_1, clamp(v_3, params.samplePlane0RectMin, params.samplePlane0RectMax), float(0.0f));
+ v_4 = v_6.xyz;
+ v_5 = v_6[3u];
} else {
- float v_12 = textureLod(arg_0_plane0_arg_1, v_8, float(0.0f))[0u];
- vec2 v_13 = clamp(v_7, params.samplePlane1RectMin, params.samplePlane1RectMax);
- v_9 = (vec4(v_12, textureLod(arg_0_plane1_arg_1, v_13, float(0.0f)).xy, 1.0f) * params.yuvToRgbConversionMatrix);
- v_10 = 1.0f;
+ float v_7 = textureLod(arg_0_plane0_arg_1, clamp(v_3, params.samplePlane0RectMin, params.samplePlane0RectMax), float(0.0f))[0u];
+ v_4 = (vec4(v_7, textureLod(arg_0_plane1_arg_1, clamp(v_3, params.samplePlane1RectMin, params.samplePlane1RectMax), float(0.0f)).xy, 1.0f) * params.yuvToRgbConversionMatrix);
+ v_5 = 1.0f;
}
- vec3 v_14 = v_9;
- vec3 v_15 = vec3(0.0f);
+ vec3 v_8 = v_4;
+ vec3 v_9 = vec3(0.0f);
if ((params.doYuvToRgbConversionOnly == 0u)) {
- v_15 = tint_GammaCorrection((params.gamutConversionMatrix * tint_GammaCorrection(v_14, params.gammaDecodeParams)), params.gammaEncodeParams);
+ v_9 = tint_GammaCorrection((params.gamutConversionMatrix * tint_GammaCorrection(v_8, params.gammaDecodeParams)), params.gammaEncodeParams);
} else {
- v_15 = v_14;
+ v_9 = v_8;
}
- return vec4(v_15, v_10);
+ return vec4(v_9, v_5);
}
tint_ExternalTextureParams tint_convert_tint_ExternalTextureParams(tint_ExternalTextureParams_std140 tint_input) {
- mat3 v_16 = mat3(tint_input.gamutConversionMatrix_col0, tint_input.gamutConversionMatrix_col1, tint_input.gamutConversionMatrix_col2);
- mat3x2 v_17 = mat3x2(tint_input.sampleTransform_col0, tint_input.sampleTransform_col1, tint_input.sampleTransform_col2);
- return tint_ExternalTextureParams(tint_input.numPlanes, tint_input.doYuvToRgbConversionOnly, tint_input.yuvToRgbConversionMatrix, tint_input.gammaDecodeParams, tint_input.gammaEncodeParams, v_16, v_17, mat3x2(tint_input.loadTransform_col0, tint_input.loadTransform_col1, tint_input.loadTransform_col2), tint_input.samplePlane0RectMin, tint_input.samplePlane0RectMax, tint_input.samplePlane1RectMin, tint_input.samplePlane1RectMax, tint_input.visibleSize, tint_input.plane1CoordFactor);
+ mat3 v_10 = mat3(tint_input.gamutConversionMatrix_col0, tint_input.gamutConversionMatrix_col1, tint_input.gamutConversionMatrix_col2);
+ mat3x2 v_11 = mat3x2(tint_input.sampleTransform_col0, tint_input.sampleTransform_col1, tint_input.sampleTransform_col2);
+ return tint_ExternalTextureParams(tint_input.numPlanes, tint_input.doYuvToRgbConversionOnly, tint_input.yuvToRgbConversionMatrix, tint_input.gammaDecodeParams, tint_input.gammaEncodeParams, v_10, v_11, mat3x2(tint_input.loadTransform_col0, tint_input.loadTransform_col1, tint_input.loadTransform_col2), tint_input.samplePlane0RectMin, tint_input.samplePlane0RectMax, tint_input.samplePlane1RectMin, tint_input.samplePlane1RectMax, tint_input.visibleSize, tint_input.plane1CoordFactor);
}
vec4 textureSampleBaseClampToEdge_7c04e6() {
vec4 res = tint_TextureSampleExternal(tint_convert_tint_ExternalTextureParams(v_1.inner), vec2(1.0f));
@@ -346,10 +328,10 @@
return tint_symbol;
}
void main() {
- VertexOutput v_18 = vertex_main_inner();
- gl_Position = v_18.pos;
+ VertexOutput v_12 = vertex_main_inner();
+ gl_Position = v_12.pos;
gl_Position[1u] = -(gl_Position.y);
gl_Position[2u] = ((2.0f * gl_Position.z) - gl_Position.w);
- vertex_main_loc0_Output = v_18.prevent_dce;
+ vertex_main_loc0_Output = v_12.prevent_dce;
gl_PointSize = 1.0f;
}
diff --git a/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.ir.dxc.hlsl
index 3f4ffd3..015c302 100644
--- a/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.ir.dxc.hlsl
@@ -47,98 +47,84 @@
float3 tint_GammaCorrection(float3 v, tint_GammaTransferParams params) {
float3 v_1 = float3((params.G).xxx);
float3 v_2 = float3((params.D).xxx);
- float3 v_3 = abs(v);
- float3 v_4 = float3(sign(v));
- return (((v_3 < v_2)) ? ((v_4 * ((params.C * v_3) + params.F))) : ((v_4 * (pow(((params.A * v_3) + params.B), v_1) + params.E))));
+ float3 v_3 = float3(sign(v));
+ return (((abs(v) < v_2)) ? ((v_3 * ((params.C * abs(v)) + params.F))) : ((v_3 * (pow(((params.A * abs(v)) + params.B), v_1) + params.E))));
}
float4 tint_TextureSampleExternal(Texture2D<float4> plane_0, Texture2D<float4> plane_1, tint_ExternalTextureParams params, SamplerState tint_sampler, float2 coords) {
- float2 v_5 = mul(float3(coords, 1.0f), params.sampleTransform);
- float2 v_6 = clamp(v_5, params.samplePlane0RectMin, params.samplePlane0RectMax);
- float3 v_7 = (0.0f).xxx;
- float v_8 = 0.0f;
+ float2 v_4 = mul(float3(coords, 1.0f), params.sampleTransform);
+ float3 v_5 = (0.0f).xxx;
+ float v_6 = 0.0f;
if ((params.numPlanes == 1u)) {
- float4 v_9 = plane_0.SampleLevel(tint_sampler, v_6, float(0.0f));
- v_7 = v_9.xyz;
- v_8 = v_9.w;
+ float4 v_7 = plane_0.SampleLevel(tint_sampler, clamp(v_4, params.samplePlane0RectMin, params.samplePlane0RectMax), float(0.0f));
+ v_5 = v_7.xyz;
+ v_6 = v_7.w;
} else {
- float v_10 = plane_0.SampleLevel(tint_sampler, v_6, float(0.0f)).x;
- float2 v_11 = clamp(v_5, params.samplePlane1RectMin, params.samplePlane1RectMax);
- v_7 = mul(params.yuvToRgbConversionMatrix, float4(v_10, plane_1.SampleLevel(tint_sampler, v_11, float(0.0f)).xy, 1.0f));
- v_8 = 1.0f;
+ float v_8 = plane_0.SampleLevel(tint_sampler, clamp(v_4, params.samplePlane0RectMin, params.samplePlane0RectMax), float(0.0f)).x;
+ v_5 = mul(params.yuvToRgbConversionMatrix, float4(v_8, plane_1.SampleLevel(tint_sampler, clamp(v_4, params.samplePlane1RectMin, params.samplePlane1RectMax), float(0.0f)).xy, 1.0f));
+ v_6 = 1.0f;
}
- float3 v_12 = v_7;
- float3 v_13 = (0.0f).xxx;
+ float3 v_9 = v_5;
+ float3 v_10 = (0.0f).xxx;
if ((params.doYuvToRgbConversionOnly == 0u)) {
- tint_GammaTransferParams v_14 = params.gammaDecodeParams;
- tint_GammaTransferParams v_15 = params.gammaEncodeParams;
- v_13 = tint_GammaCorrection(mul(tint_GammaCorrection(v_12, v_14), params.gamutConversionMatrix), v_15);
+ tint_GammaTransferParams v_11 = params.gammaDecodeParams;
+ tint_GammaTransferParams v_12 = params.gammaEncodeParams;
+ v_10 = tint_GammaCorrection(mul(tint_GammaCorrection(v_9, v_11), params.gamutConversionMatrix), v_12);
} else {
- v_13 = v_12;
+ v_10 = v_9;
}
- return float4(v_13, v_8);
+ return float4(v_10, v_6);
}
-float3x2 v_16(uint start_byte_offset) {
- uint4 v_17 = arg_0_params[(start_byte_offset / 16u)];
- float2 v_18 = asfloat((((((start_byte_offset % 16u) / 4u) == 2u)) ? (v_17.zw) : (v_17.xy)));
- uint4 v_19 = arg_0_params[((8u + start_byte_offset) / 16u)];
- float2 v_20 = asfloat(((((((8u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_19.zw) : (v_19.xy)));
- uint4 v_21 = arg_0_params[((16u + start_byte_offset) / 16u)];
- return float3x2(v_18, v_20, asfloat(((((((16u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_21.zw) : (v_21.xy))));
+float3x2 v_13(uint start_byte_offset) {
+ uint4 v_14 = arg_0_params[(start_byte_offset / 16u)];
+ float2 v_15 = asfloat((((((start_byte_offset % 16u) / 4u) == 2u)) ? (v_14.zw) : (v_14.xy)));
+ uint4 v_16 = arg_0_params[((8u + start_byte_offset) / 16u)];
+ float2 v_17 = asfloat(((((((8u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_16.zw) : (v_16.xy)));
+ uint4 v_18 = arg_0_params[((16u + start_byte_offset) / 16u)];
+ return float3x2(v_15, v_17, asfloat(((((((16u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_18.zw) : (v_18.xy))));
}
-float3x3 v_22(uint start_byte_offset) {
- float3 v_23 = asfloat(arg_0_params[(start_byte_offset / 16u)].xyz);
- float3 v_24 = asfloat(arg_0_params[((16u + start_byte_offset) / 16u)].xyz);
- return float3x3(v_23, v_24, asfloat(arg_0_params[((32u + start_byte_offset) / 16u)].xyz));
+float3x3 v_19(uint start_byte_offset) {
+ return float3x3(asfloat(arg_0_params[(start_byte_offset / 16u)].xyz), asfloat(arg_0_params[((16u + start_byte_offset) / 16u)].xyz), asfloat(arg_0_params[((32u + start_byte_offset) / 16u)].xyz));
}
-tint_GammaTransferParams v_25(uint start_byte_offset) {
- float v_26 = asfloat(arg_0_params[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]);
- float v_27 = asfloat(arg_0_params[((4u + start_byte_offset) / 16u)][(((4u + start_byte_offset) % 16u) / 4u)]);
- float v_28 = asfloat(arg_0_params[((8u + start_byte_offset) / 16u)][(((8u + start_byte_offset) % 16u) / 4u)]);
- float v_29 = asfloat(arg_0_params[((12u + start_byte_offset) / 16u)][(((12u + start_byte_offset) % 16u) / 4u)]);
- float v_30 = asfloat(arg_0_params[((16u + start_byte_offset) / 16u)][(((16u + start_byte_offset) % 16u) / 4u)]);
- float v_31 = asfloat(arg_0_params[((20u + start_byte_offset) / 16u)][(((20u + start_byte_offset) % 16u) / 4u)]);
- float v_32 = asfloat(arg_0_params[((24u + start_byte_offset) / 16u)][(((24u + start_byte_offset) % 16u) / 4u)]);
- tint_GammaTransferParams v_33 = {v_26, v_27, v_28, v_29, v_30, v_31, v_32, arg_0_params[((28u + start_byte_offset) / 16u)][(((28u + start_byte_offset) % 16u) / 4u)]};
- return v_33;
+tint_GammaTransferParams v_20(uint start_byte_offset) {
+ tint_GammaTransferParams v_21 = {asfloat(arg_0_params[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]), asfloat(arg_0_params[((4u + start_byte_offset) / 16u)][(((4u + start_byte_offset) % 16u) / 4u)]), asfloat(arg_0_params[((8u + start_byte_offset) / 16u)][(((8u + start_byte_offset) % 16u) / 4u)]), asfloat(arg_0_params[((12u + start_byte_offset) / 16u)][(((12u + start_byte_offset) % 16u) / 4u)]), asfloat(arg_0_params[((16u + start_byte_offset) / 16u)][(((16u + start_byte_offset) % 16u) / 4u)]), asfloat(arg_0_params[((20u + start_byte_offset) / 16u)][(((20u + start_byte_offset) % 16u) / 4u)]), asfloat(arg_0_params[((24u + start_byte_offset) / 16u)][(((24u + start_byte_offset) % 16u) / 4u)]), arg_0_params[((28u + start_byte_offset) / 16u)][(((28u + start_byte_offset) % 16u) / 4u)]};
+ return v_21;
}
-float3x4 v_34(uint start_byte_offset) {
- float4 v_35 = asfloat(arg_0_params[(start_byte_offset / 16u)]);
- float4 v_36 = asfloat(arg_0_params[((16u + start_byte_offset) / 16u)]);
- return float3x4(v_35, v_36, asfloat(arg_0_params[((32u + start_byte_offset) / 16u)]));
+float3x4 v_22(uint start_byte_offset) {
+ return float3x4(asfloat(arg_0_params[(start_byte_offset / 16u)]), asfloat(arg_0_params[((16u + start_byte_offset) / 16u)]), asfloat(arg_0_params[((32u + start_byte_offset) / 16u)]));
}
-tint_ExternalTextureParams v_37(uint start_byte_offset) {
- uint v_38 = arg_0_params[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)];
- uint v_39 = arg_0_params[((4u + start_byte_offset) / 16u)][(((4u + start_byte_offset) % 16u) / 4u)];
- float3x4 v_40 = v_34((16u + start_byte_offset));
- tint_GammaTransferParams v_41 = v_25((64u + start_byte_offset));
- tint_GammaTransferParams v_42 = v_25((96u + start_byte_offset));
- float3x3 v_43 = v_22((128u + start_byte_offset));
- float3x2 v_44 = v_16((176u + start_byte_offset));
- float3x2 v_45 = v_16((200u + start_byte_offset));
- uint4 v_46 = arg_0_params[((224u + start_byte_offset) / 16u)];
- float2 v_47 = asfloat(((((((224u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_46.zw) : (v_46.xy)));
- uint4 v_48 = arg_0_params[((232u + start_byte_offset) / 16u)];
- float2 v_49 = asfloat(((((((232u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_48.zw) : (v_48.xy)));
- uint4 v_50 = arg_0_params[((240u + start_byte_offset) / 16u)];
- float2 v_51 = asfloat(((((((240u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_50.zw) : (v_50.xy)));
- uint4 v_52 = arg_0_params[((248u + start_byte_offset) / 16u)];
- float2 v_53 = asfloat(((((((248u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_52.zw) : (v_52.xy)));
- uint4 v_54 = arg_0_params[((256u + start_byte_offset) / 16u)];
- uint2 v_55 = ((((((256u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_54.zw) : (v_54.xy));
- uint4 v_56 = arg_0_params[((264u + start_byte_offset) / 16u)];
- tint_ExternalTextureParams v_57 = {v_38, v_39, v_40, v_41, v_42, v_43, v_44, v_45, v_47, v_49, v_51, v_53, v_55, asfloat(((((((264u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_56.zw) : (v_56.xy)))};
- return v_57;
+tint_ExternalTextureParams v_23(uint start_byte_offset) {
+ uint v_24 = arg_0_params[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)];
+ uint v_25 = arg_0_params[((4u + start_byte_offset) / 16u)][(((4u + start_byte_offset) % 16u) / 4u)];
+ float3x4 v_26 = v_22((16u + start_byte_offset));
+ tint_GammaTransferParams v_27 = v_20((64u + start_byte_offset));
+ tint_GammaTransferParams v_28 = v_20((96u + start_byte_offset));
+ float3x3 v_29 = v_19((128u + start_byte_offset));
+ float3x2 v_30 = v_13((176u + start_byte_offset));
+ float3x2 v_31 = v_13((200u + start_byte_offset));
+ uint4 v_32 = arg_0_params[((224u + start_byte_offset) / 16u)];
+ float2 v_33 = asfloat(((((((224u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_32.zw) : (v_32.xy)));
+ uint4 v_34 = arg_0_params[((232u + start_byte_offset) / 16u)];
+ float2 v_35 = asfloat(((((((232u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_34.zw) : (v_34.xy)));
+ uint4 v_36 = arg_0_params[((240u + start_byte_offset) / 16u)];
+ float2 v_37 = asfloat(((((((240u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_36.zw) : (v_36.xy)));
+ uint4 v_38 = arg_0_params[((248u + start_byte_offset) / 16u)];
+ float2 v_39 = asfloat(((((((248u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_38.zw) : (v_38.xy)));
+ uint4 v_40 = arg_0_params[((256u + start_byte_offset) / 16u)];
+ uint2 v_41 = ((((((256u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_40.zw) : (v_40.xy));
+ uint4 v_42 = arg_0_params[((264u + start_byte_offset) / 16u)];
+ tint_ExternalTextureParams v_43 = {v_24, v_25, v_26, v_27, v_28, v_29, v_30, v_31, v_33, v_35, v_37, v_39, v_41, asfloat(((((((264u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_42.zw) : (v_42.xy)))};
+ return v_43;
}
float4 textureSampleBaseClampToEdge_7c04e6() {
- tint_ExternalTextureParams v_58 = v_37(0u);
- float4 res = tint_TextureSampleExternal(arg_0_plane0, arg_0_plane1, v_58, arg_1, (1.0f).xx);
+ tint_ExternalTextureParams v_44 = v_23(0u);
+ float4 res = tint_TextureSampleExternal(arg_0_plane0, arg_0_plane1, v_44, arg_1, (1.0f).xx);
return res;
}
@@ -155,13 +141,13 @@
VertexOutput tint_symbol = (VertexOutput)0;
tint_symbol.pos = (0.0f).xxxx;
tint_symbol.prevent_dce = textureSampleBaseClampToEdge_7c04e6();
- VertexOutput v_59 = tint_symbol;
- return v_59;
+ VertexOutput v_45 = tint_symbol;
+ return v_45;
}
vertex_main_outputs vertex_main() {
- VertexOutput v_60 = vertex_main_inner();
- vertex_main_outputs v_61 = {v_60.prevent_dce, v_60.pos};
- return v_61;
+ VertexOutput v_46 = vertex_main_inner();
+ vertex_main_outputs v_47 = {v_46.prevent_dce, v_46.pos};
+ return v_47;
}
diff --git a/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.ir.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.ir.fxc.hlsl
index 3f4ffd3..015c302 100644
--- a/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.ir.fxc.hlsl
@@ -47,98 +47,84 @@
float3 tint_GammaCorrection(float3 v, tint_GammaTransferParams params) {
float3 v_1 = float3((params.G).xxx);
float3 v_2 = float3((params.D).xxx);
- float3 v_3 = abs(v);
- float3 v_4 = float3(sign(v));
- return (((v_3 < v_2)) ? ((v_4 * ((params.C * v_3) + params.F))) : ((v_4 * (pow(((params.A * v_3) + params.B), v_1) + params.E))));
+ float3 v_3 = float3(sign(v));
+ return (((abs(v) < v_2)) ? ((v_3 * ((params.C * abs(v)) + params.F))) : ((v_3 * (pow(((params.A * abs(v)) + params.B), v_1) + params.E))));
}
float4 tint_TextureSampleExternal(Texture2D<float4> plane_0, Texture2D<float4> plane_1, tint_ExternalTextureParams params, SamplerState tint_sampler, float2 coords) {
- float2 v_5 = mul(float3(coords, 1.0f), params.sampleTransform);
- float2 v_6 = clamp(v_5, params.samplePlane0RectMin, params.samplePlane0RectMax);
- float3 v_7 = (0.0f).xxx;
- float v_8 = 0.0f;
+ float2 v_4 = mul(float3(coords, 1.0f), params.sampleTransform);
+ float3 v_5 = (0.0f).xxx;
+ float v_6 = 0.0f;
if ((params.numPlanes == 1u)) {
- float4 v_9 = plane_0.SampleLevel(tint_sampler, v_6, float(0.0f));
- v_7 = v_9.xyz;
- v_8 = v_9.w;
+ float4 v_7 = plane_0.SampleLevel(tint_sampler, clamp(v_4, params.samplePlane0RectMin, params.samplePlane0RectMax), float(0.0f));
+ v_5 = v_7.xyz;
+ v_6 = v_7.w;
} else {
- float v_10 = plane_0.SampleLevel(tint_sampler, v_6, float(0.0f)).x;
- float2 v_11 = clamp(v_5, params.samplePlane1RectMin, params.samplePlane1RectMax);
- v_7 = mul(params.yuvToRgbConversionMatrix, float4(v_10, plane_1.SampleLevel(tint_sampler, v_11, float(0.0f)).xy, 1.0f));
- v_8 = 1.0f;
+ float v_8 = plane_0.SampleLevel(tint_sampler, clamp(v_4, params.samplePlane0RectMin, params.samplePlane0RectMax), float(0.0f)).x;
+ v_5 = mul(params.yuvToRgbConversionMatrix, float4(v_8, plane_1.SampleLevel(tint_sampler, clamp(v_4, params.samplePlane1RectMin, params.samplePlane1RectMax), float(0.0f)).xy, 1.0f));
+ v_6 = 1.0f;
}
- float3 v_12 = v_7;
- float3 v_13 = (0.0f).xxx;
+ float3 v_9 = v_5;
+ float3 v_10 = (0.0f).xxx;
if ((params.doYuvToRgbConversionOnly == 0u)) {
- tint_GammaTransferParams v_14 = params.gammaDecodeParams;
- tint_GammaTransferParams v_15 = params.gammaEncodeParams;
- v_13 = tint_GammaCorrection(mul(tint_GammaCorrection(v_12, v_14), params.gamutConversionMatrix), v_15);
+ tint_GammaTransferParams v_11 = params.gammaDecodeParams;
+ tint_GammaTransferParams v_12 = params.gammaEncodeParams;
+ v_10 = tint_GammaCorrection(mul(tint_GammaCorrection(v_9, v_11), params.gamutConversionMatrix), v_12);
} else {
- v_13 = v_12;
+ v_10 = v_9;
}
- return float4(v_13, v_8);
+ return float4(v_10, v_6);
}
-float3x2 v_16(uint start_byte_offset) {
- uint4 v_17 = arg_0_params[(start_byte_offset / 16u)];
- float2 v_18 = asfloat((((((start_byte_offset % 16u) / 4u) == 2u)) ? (v_17.zw) : (v_17.xy)));
- uint4 v_19 = arg_0_params[((8u + start_byte_offset) / 16u)];
- float2 v_20 = asfloat(((((((8u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_19.zw) : (v_19.xy)));
- uint4 v_21 = arg_0_params[((16u + start_byte_offset) / 16u)];
- return float3x2(v_18, v_20, asfloat(((((((16u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_21.zw) : (v_21.xy))));
+float3x2 v_13(uint start_byte_offset) {
+ uint4 v_14 = arg_0_params[(start_byte_offset / 16u)];
+ float2 v_15 = asfloat((((((start_byte_offset % 16u) / 4u) == 2u)) ? (v_14.zw) : (v_14.xy)));
+ uint4 v_16 = arg_0_params[((8u + start_byte_offset) / 16u)];
+ float2 v_17 = asfloat(((((((8u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_16.zw) : (v_16.xy)));
+ uint4 v_18 = arg_0_params[((16u + start_byte_offset) / 16u)];
+ return float3x2(v_15, v_17, asfloat(((((((16u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_18.zw) : (v_18.xy))));
}
-float3x3 v_22(uint start_byte_offset) {
- float3 v_23 = asfloat(arg_0_params[(start_byte_offset / 16u)].xyz);
- float3 v_24 = asfloat(arg_0_params[((16u + start_byte_offset) / 16u)].xyz);
- return float3x3(v_23, v_24, asfloat(arg_0_params[((32u + start_byte_offset) / 16u)].xyz));
+float3x3 v_19(uint start_byte_offset) {
+ return float3x3(asfloat(arg_0_params[(start_byte_offset / 16u)].xyz), asfloat(arg_0_params[((16u + start_byte_offset) / 16u)].xyz), asfloat(arg_0_params[((32u + start_byte_offset) / 16u)].xyz));
}
-tint_GammaTransferParams v_25(uint start_byte_offset) {
- float v_26 = asfloat(arg_0_params[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]);
- float v_27 = asfloat(arg_0_params[((4u + start_byte_offset) / 16u)][(((4u + start_byte_offset) % 16u) / 4u)]);
- float v_28 = asfloat(arg_0_params[((8u + start_byte_offset) / 16u)][(((8u + start_byte_offset) % 16u) / 4u)]);
- float v_29 = asfloat(arg_0_params[((12u + start_byte_offset) / 16u)][(((12u + start_byte_offset) % 16u) / 4u)]);
- float v_30 = asfloat(arg_0_params[((16u + start_byte_offset) / 16u)][(((16u + start_byte_offset) % 16u) / 4u)]);
- float v_31 = asfloat(arg_0_params[((20u + start_byte_offset) / 16u)][(((20u + start_byte_offset) % 16u) / 4u)]);
- float v_32 = asfloat(arg_0_params[((24u + start_byte_offset) / 16u)][(((24u + start_byte_offset) % 16u) / 4u)]);
- tint_GammaTransferParams v_33 = {v_26, v_27, v_28, v_29, v_30, v_31, v_32, arg_0_params[((28u + start_byte_offset) / 16u)][(((28u + start_byte_offset) % 16u) / 4u)]};
- return v_33;
+tint_GammaTransferParams v_20(uint start_byte_offset) {
+ tint_GammaTransferParams v_21 = {asfloat(arg_0_params[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]), asfloat(arg_0_params[((4u + start_byte_offset) / 16u)][(((4u + start_byte_offset) % 16u) / 4u)]), asfloat(arg_0_params[((8u + start_byte_offset) / 16u)][(((8u + start_byte_offset) % 16u) / 4u)]), asfloat(arg_0_params[((12u + start_byte_offset) / 16u)][(((12u + start_byte_offset) % 16u) / 4u)]), asfloat(arg_0_params[((16u + start_byte_offset) / 16u)][(((16u + start_byte_offset) % 16u) / 4u)]), asfloat(arg_0_params[((20u + start_byte_offset) / 16u)][(((20u + start_byte_offset) % 16u) / 4u)]), asfloat(arg_0_params[((24u + start_byte_offset) / 16u)][(((24u + start_byte_offset) % 16u) / 4u)]), arg_0_params[((28u + start_byte_offset) / 16u)][(((28u + start_byte_offset) % 16u) / 4u)]};
+ return v_21;
}
-float3x4 v_34(uint start_byte_offset) {
- float4 v_35 = asfloat(arg_0_params[(start_byte_offset / 16u)]);
- float4 v_36 = asfloat(arg_0_params[((16u + start_byte_offset) / 16u)]);
- return float3x4(v_35, v_36, asfloat(arg_0_params[((32u + start_byte_offset) / 16u)]));
+float3x4 v_22(uint start_byte_offset) {
+ return float3x4(asfloat(arg_0_params[(start_byte_offset / 16u)]), asfloat(arg_0_params[((16u + start_byte_offset) / 16u)]), asfloat(arg_0_params[((32u + start_byte_offset) / 16u)]));
}
-tint_ExternalTextureParams v_37(uint start_byte_offset) {
- uint v_38 = arg_0_params[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)];
- uint v_39 = arg_0_params[((4u + start_byte_offset) / 16u)][(((4u + start_byte_offset) % 16u) / 4u)];
- float3x4 v_40 = v_34((16u + start_byte_offset));
- tint_GammaTransferParams v_41 = v_25((64u + start_byte_offset));
- tint_GammaTransferParams v_42 = v_25((96u + start_byte_offset));
- float3x3 v_43 = v_22((128u + start_byte_offset));
- float3x2 v_44 = v_16((176u + start_byte_offset));
- float3x2 v_45 = v_16((200u + start_byte_offset));
- uint4 v_46 = arg_0_params[((224u + start_byte_offset) / 16u)];
- float2 v_47 = asfloat(((((((224u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_46.zw) : (v_46.xy)));
- uint4 v_48 = arg_0_params[((232u + start_byte_offset) / 16u)];
- float2 v_49 = asfloat(((((((232u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_48.zw) : (v_48.xy)));
- uint4 v_50 = arg_0_params[((240u + start_byte_offset) / 16u)];
- float2 v_51 = asfloat(((((((240u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_50.zw) : (v_50.xy)));
- uint4 v_52 = arg_0_params[((248u + start_byte_offset) / 16u)];
- float2 v_53 = asfloat(((((((248u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_52.zw) : (v_52.xy)));
- uint4 v_54 = arg_0_params[((256u + start_byte_offset) / 16u)];
- uint2 v_55 = ((((((256u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_54.zw) : (v_54.xy));
- uint4 v_56 = arg_0_params[((264u + start_byte_offset) / 16u)];
- tint_ExternalTextureParams v_57 = {v_38, v_39, v_40, v_41, v_42, v_43, v_44, v_45, v_47, v_49, v_51, v_53, v_55, asfloat(((((((264u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_56.zw) : (v_56.xy)))};
- return v_57;
+tint_ExternalTextureParams v_23(uint start_byte_offset) {
+ uint v_24 = arg_0_params[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)];
+ uint v_25 = arg_0_params[((4u + start_byte_offset) / 16u)][(((4u + start_byte_offset) % 16u) / 4u)];
+ float3x4 v_26 = v_22((16u + start_byte_offset));
+ tint_GammaTransferParams v_27 = v_20((64u + start_byte_offset));
+ tint_GammaTransferParams v_28 = v_20((96u + start_byte_offset));
+ float3x3 v_29 = v_19((128u + start_byte_offset));
+ float3x2 v_30 = v_13((176u + start_byte_offset));
+ float3x2 v_31 = v_13((200u + start_byte_offset));
+ uint4 v_32 = arg_0_params[((224u + start_byte_offset) / 16u)];
+ float2 v_33 = asfloat(((((((224u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_32.zw) : (v_32.xy)));
+ uint4 v_34 = arg_0_params[((232u + start_byte_offset) / 16u)];
+ float2 v_35 = asfloat(((((((232u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_34.zw) : (v_34.xy)));
+ uint4 v_36 = arg_0_params[((240u + start_byte_offset) / 16u)];
+ float2 v_37 = asfloat(((((((240u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_36.zw) : (v_36.xy)));
+ uint4 v_38 = arg_0_params[((248u + start_byte_offset) / 16u)];
+ float2 v_39 = asfloat(((((((248u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_38.zw) : (v_38.xy)));
+ uint4 v_40 = arg_0_params[((256u + start_byte_offset) / 16u)];
+ uint2 v_41 = ((((((256u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_40.zw) : (v_40.xy));
+ uint4 v_42 = arg_0_params[((264u + start_byte_offset) / 16u)];
+ tint_ExternalTextureParams v_43 = {v_24, v_25, v_26, v_27, v_28, v_29, v_30, v_31, v_33, v_35, v_37, v_39, v_41, asfloat(((((((264u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_42.zw) : (v_42.xy)))};
+ return v_43;
}
float4 textureSampleBaseClampToEdge_7c04e6() {
- tint_ExternalTextureParams v_58 = v_37(0u);
- float4 res = tint_TextureSampleExternal(arg_0_plane0, arg_0_plane1, v_58, arg_1, (1.0f).xx);
+ tint_ExternalTextureParams v_44 = v_23(0u);
+ float4 res = tint_TextureSampleExternal(arg_0_plane0, arg_0_plane1, v_44, arg_1, (1.0f).xx);
return res;
}
@@ -155,13 +141,13 @@
VertexOutput tint_symbol = (VertexOutput)0;
tint_symbol.pos = (0.0f).xxxx;
tint_symbol.prevent_dce = textureSampleBaseClampToEdge_7c04e6();
- VertexOutput v_59 = tint_symbol;
- return v_59;
+ VertexOutput v_45 = tint_symbol;
+ return v_45;
}
vertex_main_outputs vertex_main() {
- VertexOutput v_60 = vertex_main_inner();
- vertex_main_outputs v_61 = {v_60.prevent_dce, v_60.pos};
- return v_61;
+ VertexOutput v_46 = vertex_main_inner();
+ vertex_main_outputs v_47 = {v_46.prevent_dce, v_46.pos};
+ return v_47;
}
diff --git a/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.ir.msl
index 2c7271f..35fcf1b 100644
--- a/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.ir.msl
@@ -84,48 +84,43 @@
float3 tint_GammaCorrection(float3 v, tint_GammaTransferParams params) {
float3 const v_1 = float3(params.G);
- float3 const v_2 = float3(params.D);
- float3 const v_3 = abs(v);
- float3 const v_4 = sign(v);
- return select((v_4 * (powr(((params.A * v_3) + params.B), v_1) + params.E)), (v_4 * ((params.C * v_3) + params.F)), (v_3 < v_2));
+ return select((sign(v) * (powr(((params.A * abs(v)) + params.B), v_1) + params.E)), (sign(v) * ((params.C * abs(v)) + params.F)), (abs(v) < float3(params.D)));
}
float4 tint_TextureSampleExternal(texture2d<float, access::sample> plane_0, texture2d<float, access::sample> plane_1, tint_ExternalTextureParams params, sampler tint_sampler, float2 coords) {
- float2 const v_5 = (params.sampleTransform * float3(coords, 1.0f));
- float2 const v_6 = clamp(v_5, params.samplePlane0RectMin, params.samplePlane0RectMax);
- float3 v_7 = 0.0f;
- float v_8 = 0.0f;
+ float2 const v_2 = (params.sampleTransform * float3(coords, 1.0f));
+ float3 v_3 = 0.0f;
+ float v_4 = 0.0f;
if ((params.numPlanes == 1u)) {
- float4 const v_9 = plane_0.sample(tint_sampler, v_6, level(0.0f));
- v_7 = v_9.xyz;
- v_8 = v_9[3u];
+ float4 const v_5 = plane_0.sample(tint_sampler, clamp(v_2, params.samplePlane0RectMin, params.samplePlane0RectMax), level(0.0f));
+ v_3 = v_5.xyz;
+ v_4 = v_5[3u];
} else {
- float const v_10 = plane_0.sample(tint_sampler, v_6, level(0.0f))[0u];
- float2 const v_11 = clamp(v_5, params.samplePlane1RectMin, params.samplePlane1RectMax);
- v_7 = (float4(v_10, plane_1.sample(tint_sampler, v_11, level(0.0f)).xy, 1.0f) * params.yuvToRgbConversionMatrix);
- v_8 = 1.0f;
+ float const v_6 = plane_0.sample(tint_sampler, clamp(v_2, params.samplePlane0RectMin, params.samplePlane0RectMax), level(0.0f))[0u];
+ v_3 = (float4(v_6, plane_1.sample(tint_sampler, clamp(v_2, params.samplePlane1RectMin, params.samplePlane1RectMax), level(0.0f)).xy, 1.0f) * params.yuvToRgbConversionMatrix);
+ v_4 = 1.0f;
}
- float3 const v_12 = v_7;
- float3 v_13 = 0.0f;
+ float3 const v_7 = v_3;
+ float3 v_8 = 0.0f;
if ((params.doYuvToRgbConversionOnly == 0u)) {
- v_13 = tint_GammaCorrection((params.gamutConversionMatrix * tint_GammaCorrection(v_12, params.gammaDecodeParams)), params.gammaEncodeParams);
+ v_8 = tint_GammaCorrection((params.gamutConversionMatrix * tint_GammaCorrection(v_7, params.gammaDecodeParams)), params.gammaEncodeParams);
} else {
- v_13 = v_12;
+ v_8 = v_7;
}
- return float4(v_13, v_8);
+ return float4(v_8, v_4);
}
tint_ExternalTextureParams tint_load_struct_packed_vec3(const constant tint_ExternalTextureParams_packed_vec3* const from) {
- uint const v_14 = (*from).numPlanes;
- uint const v_15 = (*from).doYuvToRgbConversionOnly;
- float3x4 const v_16 = (*from).yuvToRgbConversionMatrix;
- tint_GammaTransferParams const v_17 = (*from).gammaDecodeParams;
- tint_GammaTransferParams const v_18 = (*from).gammaEncodeParams;
- tint_array<tint_packed_vec3_f32_array_element, 3> const v_19 = (*from).gamutConversionMatrix;
- float3 const v_20 = float3(v_19[0u].packed);
- float3 const v_21 = float3(v_19[1u].packed);
- float3x3 const v_22 = float3x3(v_20, v_21, float3(v_19[2u].packed));
- return tint_ExternalTextureParams{.numPlanes=v_14, .doYuvToRgbConversionOnly=v_15, .yuvToRgbConversionMatrix=v_16, .gammaDecodeParams=v_17, .gammaEncodeParams=v_18, .gamutConversionMatrix=v_22, .sampleTransform=(*from).sampleTransform, .loadTransform=(*from).loadTransform, .samplePlane0RectMin=(*from).samplePlane0RectMin, .samplePlane0RectMax=(*from).samplePlane0RectMax, .samplePlane1RectMin=(*from).samplePlane1RectMin, .samplePlane1RectMax=(*from).samplePlane1RectMax, .visibleSize=(*from).visibleSize, .plane1CoordFactor=(*from).plane1CoordFactor};
+ uint const v_9 = (*from).numPlanes;
+ uint const v_10 = (*from).doYuvToRgbConversionOnly;
+ float3x4 const v_11 = (*from).yuvToRgbConversionMatrix;
+ tint_GammaTransferParams const v_12 = (*from).gammaDecodeParams;
+ tint_GammaTransferParams const v_13 = (*from).gammaEncodeParams;
+ tint_array<tint_packed_vec3_f32_array_element, 3> const v_14 = (*from).gamutConversionMatrix;
+ float3 const v_15 = float3(v_14[0u].packed);
+ float3 const v_16 = float3(v_14[1u].packed);
+ float3x3 const v_17 = float3x3(v_15, v_16, float3(v_14[2u].packed));
+ return tint_ExternalTextureParams{.numPlanes=v_9, .doYuvToRgbConversionOnly=v_10, .yuvToRgbConversionMatrix=v_11, .gammaDecodeParams=v_12, .gammaEncodeParams=v_13, .gamutConversionMatrix=v_17, .sampleTransform=(*from).sampleTransform, .loadTransform=(*from).loadTransform, .samplePlane0RectMin=(*from).samplePlane0RectMin, .samplePlane0RectMax=(*from).samplePlane0RectMax, .samplePlane1RectMin=(*from).samplePlane1RectMin, .samplePlane1RectMax=(*from).samplePlane1RectMax, .visibleSize=(*from).visibleSize, .plane1CoordFactor=(*from).plane1CoordFactor};
}
float4 textureSampleBaseClampToEdge_7c04e6(tint_module_vars_struct tint_module_vars) {
@@ -152,9 +147,9 @@
vertex vertex_main_outputs vertex_main(texture2d<float, access::sample> arg_0_plane0 [[texture(0)]], texture2d<float, access::sample> arg_0_plane1 [[texture(1)]], const constant tint_ExternalTextureParams_packed_vec3* arg_0_params [[buffer(2)]], sampler arg_1 [[sampler(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0_plane0=arg_0_plane0, .arg_0_plane1=arg_0_plane1, .arg_0_params=arg_0_params, .arg_1=arg_1};
- VertexOutput const v_23 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v_18 = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_23.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_23.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v_18.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v_18.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/9ca02c.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/9ca02c.wgsl.expected.glsl
index f930bd3..c42e721 100644
--- a/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/9ca02c.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/9ca02c.wgsl.expected.glsl
@@ -9,8 +9,7 @@
uniform highp sampler2D arg_0_arg_1;
vec4 textureSampleBaseClampToEdge_9ca02c() {
vec2 v_1 = (vec2(0.5f) / vec2(uvec2(textureSize(arg_0_arg_1, 0))));
- vec2 v_2 = clamp(vec2(1.0f), v_1, (vec2(1.0f) - v_1));
- vec4 res = textureLod(arg_0_arg_1, v_2, float(0.0f));
+ vec4 res = textureLod(arg_0_arg_1, clamp(vec2(1.0f), v_1, (vec2(1.0f) - v_1)), float(0.0f));
return res;
}
void main() {
@@ -25,8 +24,7 @@
uniform highp sampler2D arg_0_arg_1;
vec4 textureSampleBaseClampToEdge_9ca02c() {
vec2 v_1 = (vec2(0.5f) / vec2(uvec2(textureSize(arg_0_arg_1, 0))));
- vec2 v_2 = clamp(vec2(1.0f), v_1, (vec2(1.0f) - v_1));
- vec4 res = textureLod(arg_0_arg_1, v_2, float(0.0f));
+ vec4 res = textureLod(arg_0_arg_1, clamp(vec2(1.0f), v_1, (vec2(1.0f) - v_1)), float(0.0f));
return res;
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
@@ -45,8 +43,7 @@
layout(location = 0) flat out vec4 vertex_main_loc0_Output;
vec4 textureSampleBaseClampToEdge_9ca02c() {
vec2 v = (vec2(0.5f) / vec2(uvec2(textureSize(arg_0_arg_1, 0))));
- vec2 v_1 = clamp(vec2(1.0f), v, (vec2(1.0f) - v));
- vec4 res = textureLod(arg_0_arg_1, v_1, float(0.0f));
+ vec4 res = textureLod(arg_0_arg_1, clamp(vec2(1.0f), v, (vec2(1.0f) - v)), float(0.0f));
return res;
}
VertexOutput vertex_main_inner() {
@@ -56,10 +53,10 @@
return tint_symbol;
}
void main() {
- VertexOutput v_2 = vertex_main_inner();
- gl_Position = v_2.pos;
+ VertexOutput v_1 = vertex_main_inner();
+ gl_Position = v_1.pos;
gl_Position[1u] = -(gl_Position.y);
gl_Position[2u] = ((2.0f * gl_Position.z) - gl_Position.w);
- vertex_main_loc0_Output = v_2.prevent_dce;
+ vertex_main_loc0_Output = v_1.prevent_dce;
gl_PointSize = 1.0f;
}
diff --git a/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/9ca02c.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/9ca02c.wgsl.expected.ir.dxc.hlsl
index 6ebf8f6..96321d4 100644
--- a/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/9ca02c.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/9ca02c.wgsl.expected.ir.dxc.hlsl
@@ -16,8 +16,7 @@
uint2 v = (0u).xx;
arg_0.GetDimensions(v.x, v.y);
float2 v_1 = ((0.5f).xx / float2(v));
- float2 v_2 = clamp((1.0f).xx, v_1, ((1.0f).xx - v_1));
- float4 res = arg_0.SampleLevel(arg_1, v_2, float(0.0f));
+ float4 res = arg_0.SampleLevel(arg_1, clamp((1.0f).xx, v_1, ((1.0f).xx - v_1)), float(0.0f));
return res;
}
@@ -34,13 +33,13 @@
VertexOutput tint_symbol = (VertexOutput)0;
tint_symbol.pos = (0.0f).xxxx;
tint_symbol.prevent_dce = textureSampleBaseClampToEdge_9ca02c();
- VertexOutput v_3 = tint_symbol;
- return v_3;
+ VertexOutput v_2 = tint_symbol;
+ return v_2;
}
vertex_main_outputs vertex_main() {
- VertexOutput v_4 = vertex_main_inner();
- vertex_main_outputs v_5 = {v_4.prevent_dce, v_4.pos};
- return v_5;
+ VertexOutput v_3 = vertex_main_inner();
+ vertex_main_outputs v_4 = {v_3.prevent_dce, v_3.pos};
+ return v_4;
}
diff --git a/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/9ca02c.wgsl.expected.ir.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/9ca02c.wgsl.expected.ir.fxc.hlsl
index 6ebf8f6..96321d4 100644
--- a/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/9ca02c.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/9ca02c.wgsl.expected.ir.fxc.hlsl
@@ -16,8 +16,7 @@
uint2 v = (0u).xx;
arg_0.GetDimensions(v.x, v.y);
float2 v_1 = ((0.5f).xx / float2(v));
- float2 v_2 = clamp((1.0f).xx, v_1, ((1.0f).xx - v_1));
- float4 res = arg_0.SampleLevel(arg_1, v_2, float(0.0f));
+ float4 res = arg_0.SampleLevel(arg_1, clamp((1.0f).xx, v_1, ((1.0f).xx - v_1)), float(0.0f));
return res;
}
@@ -34,13 +33,13 @@
VertexOutput tint_symbol = (VertexOutput)0;
tint_symbol.pos = (0.0f).xxxx;
tint_symbol.prevent_dce = textureSampleBaseClampToEdge_9ca02c();
- VertexOutput v_3 = tint_symbol;
- return v_3;
+ VertexOutput v_2 = tint_symbol;
+ return v_2;
}
vertex_main_outputs vertex_main() {
- VertexOutput v_4 = vertex_main_inner();
- vertex_main_outputs v_5 = {v_4.prevent_dce, v_4.pos};
- return v_5;
+ VertexOutput v_3 = vertex_main_inner();
+ vertex_main_outputs v_4 = {v_3.prevent_dce, v_3.pos};
+ return v_4;
}
diff --git a/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/9ca02c.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/9ca02c.wgsl.expected.ir.msl
index f8a1925..548b805 100644
--- a/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/9ca02c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/9ca02c.wgsl.expected.ir.msl
@@ -18,10 +18,8 @@
};
float4 textureSampleBaseClampToEdge_9ca02c(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- float2 const v_1 = (float2(0.5f) / float2(uint2(v, tint_module_vars.arg_0.get_height(0u))));
- float2 const v_2 = clamp(float2(1.0f), v_1, (float2(1.0f) - v_1));
- float4 res = tint_module_vars.arg_0.sample(tint_module_vars.arg_1, v_2, level(0.0f));
+ float2 const v = (float2(0.5f) / float2(uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u))));
+ float4 res = tint_module_vars.arg_0.sample(tint_module_vars.arg_1, clamp(float2(1.0f), v, (float2(1.0f) - v)), level(0.0f));
return res;
}
@@ -44,9 +42,9 @@
vertex vertex_main_outputs vertex_main(texture2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1};
- VertexOutput const v_3 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_3.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_3.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v_1.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/literal/textureSampleBias/1c707e.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSampleBias/1c707e.wgsl.expected.glsl
index 8413fda..f58de06 100644
--- a/test/tint/builtins/gen/literal/textureSampleBias/1c707e.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/literal/textureSampleBias/1c707e.wgsl.expected.glsl
@@ -8,8 +8,7 @@
} v;
uniform highp sampler2DArray arg_0_arg_1;
vec4 textureSampleBias_1c707e() {
- float v_1 = clamp(1.0f, -16.0f, 15.9899997711181640625f);
- vec4 res = texture(arg_0_arg_1, vec3(vec2(1.0f), float(1u)), v_1);
+ vec4 res = texture(arg_0_arg_1, vec3(vec2(1.0f), float(1u)), clamp(1.0f, -16.0f, 15.9899997711181640625f));
return res;
}
void main() {
diff --git a/test/tint/builtins/gen/literal/textureSampleBias/1c707e.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleBias/1c707e.wgsl.expected.ir.dxc.hlsl
index 24bab18..62cfcf3 100644
--- a/test/tint/builtins/gen/literal/textureSampleBias/1c707e.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/gen/literal/textureSampleBias/1c707e.wgsl.expected.ir.dxc.hlsl
@@ -3,8 +3,7 @@
Texture2DArray<float4> arg_0 : register(t0, space1);
SamplerState arg_1 : register(s1, space1);
float4 textureSampleBias_1c707e() {
- float v = clamp(1.0f, -16.0f, 15.9899997711181640625f);
- float4 res = arg_0.SampleBias(arg_1, float3((1.0f).xx, float(1u)), v);
+ float4 res = arg_0.SampleBias(arg_1, float3((1.0f).xx, float(1u)), clamp(1.0f, -16.0f, 15.9899997711181640625f));
return res;
}
diff --git a/test/tint/builtins/gen/literal/textureSampleBias/1c707e.wgsl.expected.ir.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleBias/1c707e.wgsl.expected.ir.fxc.hlsl
index 24bab18..62cfcf3 100644
--- a/test/tint/builtins/gen/literal/textureSampleBias/1c707e.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/textureSampleBias/1c707e.wgsl.expected.ir.fxc.hlsl
@@ -3,8 +3,7 @@
Texture2DArray<float4> arg_0 : register(t0, space1);
SamplerState arg_1 : register(s1, space1);
float4 textureSampleBias_1c707e() {
- float v = clamp(1.0f, -16.0f, 15.9899997711181640625f);
- float4 res = arg_0.SampleBias(arg_1, float3((1.0f).xx, float(1u)), v);
+ float4 res = arg_0.SampleBias(arg_1, float3((1.0f).xx, float(1u)), clamp(1.0f, -16.0f, 15.9899997711181640625f));
return res;
}
diff --git a/test/tint/builtins/gen/literal/textureSampleBias/80e579.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSampleBias/80e579.wgsl.expected.glsl
index 86e2fd2..4868f98 100644
--- a/test/tint/builtins/gen/literal/textureSampleBias/80e579.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/literal/textureSampleBias/80e579.wgsl.expected.glsl
@@ -8,8 +8,7 @@
} v;
uniform highp sampler2DArray arg_0_arg_1;
vec4 textureSampleBias_80e579() {
- float v_1 = clamp(1.0f, -16.0f, 15.9899997711181640625f);
- vec4 res = texture(arg_0_arg_1, vec3(vec2(1.0f), float(1)), v_1);
+ vec4 res = texture(arg_0_arg_1, vec3(vec2(1.0f), float(1)), clamp(1.0f, -16.0f, 15.9899997711181640625f));
return res;
}
void main() {
diff --git a/test/tint/builtins/gen/literal/textureSampleBias/80e579.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleBias/80e579.wgsl.expected.ir.dxc.hlsl
index a725e32..f4f7fa4 100644
--- a/test/tint/builtins/gen/literal/textureSampleBias/80e579.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/gen/literal/textureSampleBias/80e579.wgsl.expected.ir.dxc.hlsl
@@ -3,8 +3,7 @@
Texture2DArray<float4> arg_0 : register(t0, space1);
SamplerState arg_1 : register(s1, space1);
float4 textureSampleBias_80e579() {
- float v = clamp(1.0f, -16.0f, 15.9899997711181640625f);
- float4 res = arg_0.SampleBias(arg_1, float3((1.0f).xx, float(int(1))), v);
+ float4 res = arg_0.SampleBias(arg_1, float3((1.0f).xx, float(int(1))), clamp(1.0f, -16.0f, 15.9899997711181640625f));
return res;
}
diff --git a/test/tint/builtins/gen/literal/textureSampleBias/80e579.wgsl.expected.ir.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleBias/80e579.wgsl.expected.ir.fxc.hlsl
index a725e32..f4f7fa4 100644
--- a/test/tint/builtins/gen/literal/textureSampleBias/80e579.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/textureSampleBias/80e579.wgsl.expected.ir.fxc.hlsl
@@ -3,8 +3,7 @@
Texture2DArray<float4> arg_0 : register(t0, space1);
SamplerState arg_1 : register(s1, space1);
float4 textureSampleBias_80e579() {
- float v = clamp(1.0f, -16.0f, 15.9899997711181640625f);
- float4 res = arg_0.SampleBias(arg_1, float3((1.0f).xx, float(int(1))), v);
+ float4 res = arg_0.SampleBias(arg_1, float3((1.0f).xx, float(int(1))), clamp(1.0f, -16.0f, 15.9899997711181640625f));
return res;
}
diff --git a/test/tint/builtins/gen/literal/textureSampleBias/80e579.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureSampleBias/80e579.wgsl.expected.ir.msl
index 86ce71d..b4e21c1 100644
--- a/test/tint/builtins/gen/literal/textureSampleBias/80e579.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureSampleBias/80e579.wgsl.expected.ir.msl
@@ -8,8 +8,7 @@
};
float4 textureSampleBias_80e579(tint_module_vars_struct tint_module_vars) {
- bias const v = bias(clamp(1.0f, -16.0f, 15.9899997711181640625f));
- float4 res = tint_module_vars.arg_0.sample(tint_module_vars.arg_1, float2(1.0f), max(1, 0), v);
+ float4 res = tint_module_vars.arg_0.sample(tint_module_vars.arg_1, float2(1.0f), max(1, 0), bias(clamp(1.0f, -16.0f, 15.9899997711181640625f)));
return res;
}
diff --git a/test/tint/builtins/gen/literal/textureSampleBias/87915c.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSampleBias/87915c.wgsl.expected.glsl
index 40b8a92..7d421a4 100644
--- a/test/tint/builtins/gen/literal/textureSampleBias/87915c.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/literal/textureSampleBias/87915c.wgsl.expected.glsl
@@ -8,8 +8,7 @@
} v;
uniform highp sampler2DArray arg_0_arg_1;
vec4 textureSampleBias_87915c() {
- float v_1 = clamp(1.0f, -16.0f, 15.9899997711181640625f);
- vec4 res = textureOffset(arg_0_arg_1, vec3(vec2(1.0f), float(1u)), ivec2(1), v_1);
+ vec4 res = textureOffset(arg_0_arg_1, vec3(vec2(1.0f), float(1u)), ivec2(1), clamp(1.0f, -16.0f, 15.9899997711181640625f));
return res;
}
void main() {
diff --git a/test/tint/builtins/gen/literal/textureSampleBias/87915c.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleBias/87915c.wgsl.expected.ir.dxc.hlsl
index 11706fd..aec8611 100644
--- a/test/tint/builtins/gen/literal/textureSampleBias/87915c.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/gen/literal/textureSampleBias/87915c.wgsl.expected.ir.dxc.hlsl
@@ -3,8 +3,7 @@
Texture2DArray<float4> arg_0 : register(t0, space1);
SamplerState arg_1 : register(s1, space1);
float4 textureSampleBias_87915c() {
- float v = clamp(1.0f, -16.0f, 15.9899997711181640625f);
- float4 res = arg_0.SampleBias(arg_1, float3((1.0f).xx, float(1u)), v, (int(1)).xx);
+ float4 res = arg_0.SampleBias(arg_1, float3((1.0f).xx, float(1u)), clamp(1.0f, -16.0f, 15.9899997711181640625f), (int(1)).xx);
return res;
}
diff --git a/test/tint/builtins/gen/literal/textureSampleBias/87915c.wgsl.expected.ir.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleBias/87915c.wgsl.expected.ir.fxc.hlsl
index 11706fd..aec8611 100644
--- a/test/tint/builtins/gen/literal/textureSampleBias/87915c.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/textureSampleBias/87915c.wgsl.expected.ir.fxc.hlsl
@@ -3,8 +3,7 @@
Texture2DArray<float4> arg_0 : register(t0, space1);
SamplerState arg_1 : register(s1, space1);
float4 textureSampleBias_87915c() {
- float v = clamp(1.0f, -16.0f, 15.9899997711181640625f);
- float4 res = arg_0.SampleBias(arg_1, float3((1.0f).xx, float(1u)), v, (int(1)).xx);
+ float4 res = arg_0.SampleBias(arg_1, float3((1.0f).xx, float(1u)), clamp(1.0f, -16.0f, 15.9899997711181640625f), (int(1)).xx);
return res;
}
diff --git a/test/tint/builtins/gen/literal/textureSampleBias/9dbb51.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSampleBias/9dbb51.wgsl.expected.glsl
index 4d09aa9..fe43b711 100644
--- a/test/tint/builtins/gen/literal/textureSampleBias/9dbb51.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/literal/textureSampleBias/9dbb51.wgsl.expected.glsl
@@ -8,8 +8,7 @@
} v;
uniform highp sampler2DArray arg_0_arg_1;
vec4 textureSampleBias_9dbb51() {
- float v_1 = clamp(1.0f, -16.0f, 15.9899997711181640625f);
- vec4 res = textureOffset(arg_0_arg_1, vec3(vec2(1.0f), float(1)), ivec2(1), v_1);
+ vec4 res = textureOffset(arg_0_arg_1, vec3(vec2(1.0f), float(1)), ivec2(1), clamp(1.0f, -16.0f, 15.9899997711181640625f));
return res;
}
void main() {
diff --git a/test/tint/builtins/gen/literal/textureSampleBias/9dbb51.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleBias/9dbb51.wgsl.expected.ir.dxc.hlsl
index 5b23918..27145de 100644
--- a/test/tint/builtins/gen/literal/textureSampleBias/9dbb51.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/gen/literal/textureSampleBias/9dbb51.wgsl.expected.ir.dxc.hlsl
@@ -3,8 +3,7 @@
Texture2DArray<float4> arg_0 : register(t0, space1);
SamplerState arg_1 : register(s1, space1);
float4 textureSampleBias_9dbb51() {
- float v = clamp(1.0f, -16.0f, 15.9899997711181640625f);
- float4 res = arg_0.SampleBias(arg_1, float3((1.0f).xx, float(int(1))), v, (int(1)).xx);
+ float4 res = arg_0.SampleBias(arg_1, float3((1.0f).xx, float(int(1))), clamp(1.0f, -16.0f, 15.9899997711181640625f), (int(1)).xx);
return res;
}
diff --git a/test/tint/builtins/gen/literal/textureSampleBias/9dbb51.wgsl.expected.ir.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleBias/9dbb51.wgsl.expected.ir.fxc.hlsl
index 5b23918..27145de 100644
--- a/test/tint/builtins/gen/literal/textureSampleBias/9dbb51.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/textureSampleBias/9dbb51.wgsl.expected.ir.fxc.hlsl
@@ -3,8 +3,7 @@
Texture2DArray<float4> arg_0 : register(t0, space1);
SamplerState arg_1 : register(s1, space1);
float4 textureSampleBias_9dbb51() {
- float v = clamp(1.0f, -16.0f, 15.9899997711181640625f);
- float4 res = arg_0.SampleBias(arg_1, float3((1.0f).xx, float(int(1))), v, (int(1)).xx);
+ float4 res = arg_0.SampleBias(arg_1, float3((1.0f).xx, float(int(1))), clamp(1.0f, -16.0f, 15.9899997711181640625f), (int(1)).xx);
return res;
}
diff --git a/test/tint/builtins/gen/literal/textureSampleBias/9dbb51.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureSampleBias/9dbb51.wgsl.expected.ir.msl
index 4cee582..00d8855 100644
--- a/test/tint/builtins/gen/literal/textureSampleBias/9dbb51.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureSampleBias/9dbb51.wgsl.expected.ir.msl
@@ -8,8 +8,7 @@
};
float4 textureSampleBias_9dbb51(tint_module_vars_struct tint_module_vars) {
- bias const v = bias(clamp(1.0f, -16.0f, 15.9899997711181640625f));
- float4 res = tint_module_vars.arg_0.sample(tint_module_vars.arg_1, float2(1.0f), max(1, 0), v, int2(1));
+ float4 res = tint_module_vars.arg_0.sample(tint_module_vars.arg_1, float2(1.0f), max(1, 0), bias(clamp(1.0f, -16.0f, 15.9899997711181640625f)), int2(1));
return res;
}
diff --git a/test/tint/builtins/gen/literal/textureSampleBias/c6953d.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSampleBias/c6953d.wgsl.expected.glsl
index ac22f82..dc6c591 100644
--- a/test/tint/builtins/gen/literal/textureSampleBias/c6953d.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/literal/textureSampleBias/c6953d.wgsl.expected.glsl
@@ -8,8 +8,7 @@
} v;
uniform highp samplerCubeArray arg_0_arg_1;
vec4 textureSampleBias_c6953d() {
- float v_1 = clamp(1.0f, -16.0f, 15.9899997711181640625f);
- vec4 res = texture(arg_0_arg_1, vec4(vec3(1.0f), float(1u)), v_1);
+ vec4 res = texture(arg_0_arg_1, vec4(vec3(1.0f), float(1u)), clamp(1.0f, -16.0f, 15.9899997711181640625f));
return res;
}
void main() {
diff --git a/test/tint/builtins/gen/literal/textureSampleBias/c6953d.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleBias/c6953d.wgsl.expected.ir.dxc.hlsl
index aff9eb8..b66455b 100644
--- a/test/tint/builtins/gen/literal/textureSampleBias/c6953d.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/gen/literal/textureSampleBias/c6953d.wgsl.expected.ir.dxc.hlsl
@@ -3,8 +3,7 @@
TextureCubeArray<float4> arg_0 : register(t0, space1);
SamplerState arg_1 : register(s1, space1);
float4 textureSampleBias_c6953d() {
- float v = clamp(1.0f, -16.0f, 15.9899997711181640625f);
- float4 res = arg_0.SampleBias(arg_1, float4((1.0f).xxx, float(1u)), v);
+ float4 res = arg_0.SampleBias(arg_1, float4((1.0f).xxx, float(1u)), clamp(1.0f, -16.0f, 15.9899997711181640625f));
return res;
}
diff --git a/test/tint/builtins/gen/literal/textureSampleBias/c6953d.wgsl.expected.ir.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleBias/c6953d.wgsl.expected.ir.fxc.hlsl
index aff9eb8..b66455b 100644
--- a/test/tint/builtins/gen/literal/textureSampleBias/c6953d.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/textureSampleBias/c6953d.wgsl.expected.ir.fxc.hlsl
@@ -3,8 +3,7 @@
TextureCubeArray<float4> arg_0 : register(t0, space1);
SamplerState arg_1 : register(s1, space1);
float4 textureSampleBias_c6953d() {
- float v = clamp(1.0f, -16.0f, 15.9899997711181640625f);
- float4 res = arg_0.SampleBias(arg_1, float4((1.0f).xxx, float(1u)), v);
+ float4 res = arg_0.SampleBias(arg_1, float4((1.0f).xxx, float(1u)), clamp(1.0f, -16.0f, 15.9899997711181640625f));
return res;
}
diff --git a/test/tint/builtins/gen/literal/textureSampleBias/eed7c4.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSampleBias/eed7c4.wgsl.expected.glsl
index 7cb50ed..94d3c27 100644
--- a/test/tint/builtins/gen/literal/textureSampleBias/eed7c4.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/literal/textureSampleBias/eed7c4.wgsl.expected.glsl
@@ -8,8 +8,7 @@
} v;
uniform highp samplerCubeArray arg_0_arg_1;
vec4 textureSampleBias_eed7c4() {
- float v_1 = clamp(1.0f, -16.0f, 15.9899997711181640625f);
- vec4 res = texture(arg_0_arg_1, vec4(vec3(1.0f), float(1)), v_1);
+ vec4 res = texture(arg_0_arg_1, vec4(vec3(1.0f), float(1)), clamp(1.0f, -16.0f, 15.9899997711181640625f));
return res;
}
void main() {
diff --git a/test/tint/builtins/gen/literal/textureSampleBias/eed7c4.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleBias/eed7c4.wgsl.expected.ir.dxc.hlsl
index 3500cde..8015e89 100644
--- a/test/tint/builtins/gen/literal/textureSampleBias/eed7c4.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/gen/literal/textureSampleBias/eed7c4.wgsl.expected.ir.dxc.hlsl
@@ -3,8 +3,7 @@
TextureCubeArray<float4> arg_0 : register(t0, space1);
SamplerState arg_1 : register(s1, space1);
float4 textureSampleBias_eed7c4() {
- float v = clamp(1.0f, -16.0f, 15.9899997711181640625f);
- float4 res = arg_0.SampleBias(arg_1, float4((1.0f).xxx, float(int(1))), v);
+ float4 res = arg_0.SampleBias(arg_1, float4((1.0f).xxx, float(int(1))), clamp(1.0f, -16.0f, 15.9899997711181640625f));
return res;
}
diff --git a/test/tint/builtins/gen/literal/textureSampleBias/eed7c4.wgsl.expected.ir.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleBias/eed7c4.wgsl.expected.ir.fxc.hlsl
index 3500cde..8015e89 100644
--- a/test/tint/builtins/gen/literal/textureSampleBias/eed7c4.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/textureSampleBias/eed7c4.wgsl.expected.ir.fxc.hlsl
@@ -3,8 +3,7 @@
TextureCubeArray<float4> arg_0 : register(t0, space1);
SamplerState arg_1 : register(s1, space1);
float4 textureSampleBias_eed7c4() {
- float v = clamp(1.0f, -16.0f, 15.9899997711181640625f);
- float4 res = arg_0.SampleBias(arg_1, float4((1.0f).xxx, float(int(1))), v);
+ float4 res = arg_0.SampleBias(arg_1, float4((1.0f).xxx, float(int(1))), clamp(1.0f, -16.0f, 15.9899997711181640625f));
return res;
}
diff --git a/test/tint/builtins/gen/literal/textureSampleBias/eed7c4.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureSampleBias/eed7c4.wgsl.expected.ir.msl
index fc89a09..88d29cd 100644
--- a/test/tint/builtins/gen/literal/textureSampleBias/eed7c4.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureSampleBias/eed7c4.wgsl.expected.ir.msl
@@ -8,8 +8,7 @@
};
float4 textureSampleBias_eed7c4(tint_module_vars_struct tint_module_vars) {
- bias const v = bias(clamp(1.0f, -16.0f, 15.9899997711181640625f));
- float4 res = tint_module_vars.arg_0.sample(tint_module_vars.arg_1, float3(1.0f), max(1, 0), v);
+ float4 res = tint_module_vars.arg_0.sample(tint_module_vars.arg_1, float3(1.0f), max(1, 0), bias(clamp(1.0f, -16.0f, 15.9899997711181640625f)));
return res;
}
diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/1116ed.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/1116ed.wgsl.expected.ir.msl
index a97573e..5be5ea4 100644
--- a/test/tint/builtins/gen/literal/textureSampleCompareLevel/1116ed.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/1116ed.wgsl.expected.ir.msl
@@ -18,8 +18,7 @@
};
float textureSampleCompareLevel_1116ed(tint_module_vars_struct tint_module_vars) {
- level const v = level(0u);
- float res = tint_module_vars.arg_0.sample_compare(tint_module_vars.arg_1, float2(1.0f), max(1, 0), 1.0f, v);
+ float res = tint_module_vars.arg_0.sample_compare(tint_module_vars.arg_1, float2(1.0f), max(1, 0), 1.0f, level(0u));
return res;
}
@@ -42,9 +41,9 @@
vertex vertex_main_outputs vertex_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/4cf3a2.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/4cf3a2.wgsl.expected.ir.msl
index 37f9af7..1245b42 100644
--- a/test/tint/builtins/gen/literal/textureSampleCompareLevel/4cf3a2.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/4cf3a2.wgsl.expected.ir.msl
@@ -18,8 +18,7 @@
};
float textureSampleCompareLevel_4cf3a2(tint_module_vars_struct tint_module_vars) {
- level const v = level(0u);
- float res = tint_module_vars.arg_0.sample_compare(tint_module_vars.arg_1, float3(1.0f), max(1, 0), 1.0f, v);
+ float res = tint_module_vars.arg_0.sample_compare(tint_module_vars.arg_1, float3(1.0f), max(1, 0), 1.0f, level(0u));
return res;
}
@@ -42,9 +41,9 @@
vertex vertex_main_outputs vertex_main(depthcube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/b6e47c.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/b6e47c.wgsl.expected.ir.msl
index 3bec2e0..9e1d56d 100644
--- a/test/tint/builtins/gen/literal/textureSampleCompareLevel/b6e47c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/b6e47c.wgsl.expected.ir.msl
@@ -18,8 +18,7 @@
};
float textureSampleCompareLevel_b6e47c(tint_module_vars_struct tint_module_vars) {
- level const v = level(0u);
- float res = tint_module_vars.arg_0.sample_compare(tint_module_vars.arg_1, float2(1.0f), max(1, 0), 1.0f, v, int2(1));
+ float res = tint_module_vars.arg_0.sample_compare(tint_module_vars.arg_1, float2(1.0f), max(1, 0), 1.0f, level(0u), int2(1));
return res;
}
@@ -42,9 +41,9 @@
vertex vertex_main_outputs vertex_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/2ecd8f.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureSampleGrad/2ecd8f.wgsl.expected.ir.msl
index 708287d..9df99b6 100644
--- a/test/tint/builtins/gen/literal/textureSampleGrad/2ecd8f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureSampleGrad/2ecd8f.wgsl.expected.ir.msl
@@ -18,8 +18,7 @@
};
float4 textureSampleGrad_2ecd8f(tint_module_vars_struct tint_module_vars) {
- gradient2d const v = gradient2d(float2(1.0f), float2(1.0f));
- float4 res = tint_module_vars.arg_0.sample(tint_module_vars.arg_1, float2(1.0f), max(1, 0), v);
+ float4 res = tint_module_vars.arg_0.sample(tint_module_vars.arg_1, float2(1.0f), max(1, 0), gradient2d(float2(1.0f), float2(1.0f)));
return res;
}
@@ -42,9 +41,9 @@
vertex vertex_main_outputs vertex_main(texture2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/d65515.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureSampleGrad/d65515.wgsl.expected.ir.msl
index 69fd594..8257718 100644
--- a/test/tint/builtins/gen/literal/textureSampleGrad/d65515.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureSampleGrad/d65515.wgsl.expected.ir.msl
@@ -18,8 +18,7 @@
};
float4 textureSampleGrad_d65515(tint_module_vars_struct tint_module_vars) {
- gradient2d const v = gradient2d(float2(1.0f), float2(1.0f));
- float4 res = tint_module_vars.arg_0.sample(tint_module_vars.arg_1, float2(1.0f), max(1, 0), v, int2(1));
+ float4 res = tint_module_vars.arg_0.sample(tint_module_vars.arg_1, float2(1.0f), max(1, 0), gradient2d(float2(1.0f), float2(1.0f)), int2(1));
return res;
}
@@ -42,9 +41,9 @@
vertex vertex_main_outputs vertex_main(texture2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/e383db.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureSampleGrad/e383db.wgsl.expected.ir.msl
index ca2d5c2..6eb49cd 100644
--- a/test/tint/builtins/gen/literal/textureSampleGrad/e383db.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureSampleGrad/e383db.wgsl.expected.ir.msl
@@ -18,8 +18,7 @@
};
float4 textureSampleGrad_e383db(tint_module_vars_struct tint_module_vars) {
- gradientcube const v = gradientcube(float3(1.0f), float3(1.0f));
- float4 res = tint_module_vars.arg_0.sample(tint_module_vars.arg_1, float3(1.0f), max(1, 0), v);
+ float4 res = tint_module_vars.arg_0.sample(tint_module_vars.arg_1, float3(1.0f), max(1, 0), gradientcube(float3(1.0f), float3(1.0f)));
return res;
}
@@ -42,9 +41,9 @@
vertex vertex_main_outputs vertex_main(texturecube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/0bdd9a.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureSampleLevel/0bdd9a.wgsl.expected.ir.msl
index a425176..12c3182 100644
--- a/test/tint/builtins/gen/literal/textureSampleLevel/0bdd9a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/0bdd9a.wgsl.expected.ir.msl
@@ -18,8 +18,7 @@
};
float4 textureSampleLevel_0bdd9a(tint_module_vars_struct tint_module_vars) {
- level const v = level(1.0f);
- float4 res = tint_module_vars.arg_0.sample(tint_module_vars.arg_1, float3(1.0f), max(1, 0), v);
+ float4 res = tint_module_vars.arg_0.sample(tint_module_vars.arg_1, float3(1.0f), max(1, 0), level(1.0f));
return res;
}
@@ -42,9 +41,9 @@
vertex vertex_main_outputs vertex_main(texturecube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/1bf73e.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureSampleLevel/1bf73e.wgsl.expected.ir.msl
index 23b792f..279fa51 100644
--- a/test/tint/builtins/gen/literal/textureSampleLevel/1bf73e.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/1bf73e.wgsl.expected.ir.msl
@@ -18,8 +18,7 @@
};
float textureSampleLevel_1bf73e(tint_module_vars_struct tint_module_vars) {
- level const v = level(1);
- float res = tint_module_vars.arg_0.sample(tint_module_vars.arg_1, float2(1.0f), max(1, 0), v);
+ float res = tint_module_vars.arg_0.sample(tint_module_vars.arg_1, float2(1.0f), max(1, 0), level(1));
return res;
}
@@ -42,9 +41,9 @@
vertex vertex_main_outputs vertex_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/2974eb.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureSampleLevel/2974eb.wgsl.expected.ir.msl
index 26b37b1..c0e089a 100644
--- a/test/tint/builtins/gen/literal/textureSampleLevel/2974eb.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/2974eb.wgsl.expected.ir.msl
@@ -18,8 +18,7 @@
};
float textureSampleLevel_2974eb(tint_module_vars_struct tint_module_vars) {
- level const v = level(1u);
- float res = tint_module_vars.arg_0.sample(tint_module_vars.arg_1, float2(1.0f), max(1, 0), v);
+ float res = tint_module_vars.arg_0.sample(tint_module_vars.arg_1, float2(1.0f), max(1, 0), level(1u));
return res;
}
@@ -42,9 +41,9 @@
vertex vertex_main_outputs vertex_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/302be4.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureSampleLevel/302be4.wgsl.expected.ir.msl
index 6f3a979..afa7b37 100644
--- a/test/tint/builtins/gen/literal/textureSampleLevel/302be4.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/302be4.wgsl.expected.ir.msl
@@ -18,8 +18,7 @@
};
float4 textureSampleLevel_302be4(tint_module_vars_struct tint_module_vars) {
- level const v = level(1.0f);
- float4 res = tint_module_vars.arg_0.sample(tint_module_vars.arg_1, float2(1.0f), max(1, 0), v);
+ float4 res = tint_module_vars.arg_0.sample(tint_module_vars.arg_1, float2(1.0f), max(1, 0), level(1.0f));
return res;
}
@@ -42,9 +41,9 @@
vertex vertex_main_outputs vertex_main(texture2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/36780e.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureSampleLevel/36780e.wgsl.expected.ir.msl
index 38f59a0..0e6da99 100644
--- a/test/tint/builtins/gen/literal/textureSampleLevel/36780e.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/36780e.wgsl.expected.ir.msl
@@ -18,8 +18,7 @@
};
float textureSampleLevel_36780e(tint_module_vars_struct tint_module_vars) {
- level const v = level(1);
- float res = tint_module_vars.arg_0.sample(tint_module_vars.arg_1, float2(1.0f), max(1, 0), v, int2(1));
+ float res = tint_module_vars.arg_0.sample(tint_module_vars.arg_1, float2(1.0f), max(1, 0), level(1), int2(1));
return res;
}
@@ -42,9 +41,9 @@
vertex vertex_main_outputs vertex_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/36f0d3.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureSampleLevel/36f0d3.wgsl.expected.ir.msl
index c4e509e..54d8d91 100644
--- a/test/tint/builtins/gen/literal/textureSampleLevel/36f0d3.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/36f0d3.wgsl.expected.ir.msl
@@ -18,8 +18,7 @@
};
float textureSampleLevel_36f0d3(tint_module_vars_struct tint_module_vars) {
- level const v = level(1u);
- float res = tint_module_vars.arg_0.sample(tint_module_vars.arg_1, float2(1.0f), max(1, 0), v, int2(1));
+ float res = tint_module_vars.arg_0.sample(tint_module_vars.arg_1, float2(1.0f), max(1, 0), level(1u), int2(1));
return res;
}
@@ -42,9 +41,9 @@
vertex vertex_main_outputs vertex_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/a12142.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureSampleLevel/a12142.wgsl.expected.ir.msl
index d8d2810..822117d 100644
--- a/test/tint/builtins/gen/literal/textureSampleLevel/a12142.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/a12142.wgsl.expected.ir.msl
@@ -18,8 +18,7 @@
};
float textureSampleLevel_a12142(tint_module_vars_struct tint_module_vars) {
- level const v = level(1u);
- float res = tint_module_vars.arg_0.sample(tint_module_vars.arg_1, float3(1.0f), max(1, 0), v);
+ float res = tint_module_vars.arg_0.sample(tint_module_vars.arg_1, float3(1.0f), max(1, 0), level(1u));
return res;
}
@@ -42,9 +41,9 @@
vertex vertex_main_outputs vertex_main(depthcube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/ae5e39.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureSampleLevel/ae5e39.wgsl.expected.ir.msl
index ab734fd..4bff649 100644
--- a/test/tint/builtins/gen/literal/textureSampleLevel/ae5e39.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/ae5e39.wgsl.expected.ir.msl
@@ -18,8 +18,7 @@
};
float textureSampleLevel_ae5e39(tint_module_vars_struct tint_module_vars) {
- level const v = level(1);
- float res = tint_module_vars.arg_0.sample(tint_module_vars.arg_1, float3(1.0f), max(1, 0), v);
+ float res = tint_module_vars.arg_0.sample(tint_module_vars.arg_1, float3(1.0f), max(1, 0), level(1));
return res;
}
@@ -42,9 +41,9 @@
vertex vertex_main_outputs vertex_main(depthcube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/b7c55c.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureSampleLevel/b7c55c.wgsl.expected.ir.msl
index 958a697..42e74ba 100644
--- a/test/tint/builtins/gen/literal/textureSampleLevel/b7c55c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureSampleLevel/b7c55c.wgsl.expected.ir.msl
@@ -18,8 +18,7 @@
};
float4 textureSampleLevel_b7c55c(tint_module_vars_struct tint_module_vars) {
- level const v = level(1.0f);
- float4 res = tint_module_vars.arg_0.sample(tint_module_vars.arg_1, float2(1.0f), max(1, 0), v, int2(1));
+ float4 res = tint_module_vars.arg_0.sample(tint_module_vars.arg_1, float2(1.0f), max(1, 0), level(1.0f), int2(1));
return res;
}
@@ -42,9 +41,9 @@
vertex vertex_main_outputs vertex_main(texture2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/bitcast/214f23.wgsl.expected.glsl b/test/tint/builtins/gen/var/bitcast/214f23.wgsl.expected.glsl
index 8eec1b0..a4f5a02 100644
--- a/test/tint/builtins/gen/var/bitcast/214f23.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/bitcast/214f23.wgsl.expected.glsl
@@ -8,8 +8,7 @@
ivec2 inner;
} v;
ivec2 tint_bitcast_from_f16(f16vec4 src) {
- uint v_1 = packFloat2x16(src.xy);
- return ivec2(uvec2(v_1, packFloat2x16(src.zw)));
+ return ivec2(uvec2(packFloat2x16(src.xy), packFloat2x16(src.zw)));
}
ivec2 bitcast_214f23() {
f16vec4 arg_0 = f16vec4(1.0hf);
@@ -27,8 +26,7 @@
ivec2 inner;
} v;
ivec2 tint_bitcast_from_f16(f16vec4 src) {
- uint v_1 = packFloat2x16(src.xy);
- return ivec2(uvec2(v_1, packFloat2x16(src.zw)));
+ return ivec2(uvec2(packFloat2x16(src.xy), packFloat2x16(src.zw)));
}
ivec2 bitcast_214f23() {
f16vec4 arg_0 = f16vec4(1.0hf);
@@ -50,8 +48,7 @@
layout(location = 0) flat out ivec2 vertex_main_loc0_Output;
ivec2 tint_bitcast_from_f16(f16vec4 src) {
- uint v = packFloat2x16(src.xy);
- return ivec2(uvec2(v, packFloat2x16(src.zw)));
+ return ivec2(uvec2(packFloat2x16(src.xy), packFloat2x16(src.zw)));
}
ivec2 bitcast_214f23() {
f16vec4 arg_0 = f16vec4(1.0hf);
@@ -65,10 +62,10 @@
return tint_symbol;
}
void main() {
- VertexOutput v_1 = vertex_main_inner();
- gl_Position = v_1.pos;
+ VertexOutput v = vertex_main_inner();
+ gl_Position = v.pos;
gl_Position[1u] = -(gl_Position.y);
gl_Position[2u] = ((2.0f * gl_Position.z) - gl_Position.w);
- vertex_main_loc0_Output = v_1.prevent_dce;
+ vertex_main_loc0_Output = v.prevent_dce;
gl_PointSize = 1.0f;
}
diff --git a/test/tint/builtins/gen/var/bitcast/2a6e58.wgsl.expected.glsl b/test/tint/builtins/gen/var/bitcast/2a6e58.wgsl.expected.glsl
index 56fd777..3cc1eec 100644
--- a/test/tint/builtins/gen/var/bitcast/2a6e58.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/bitcast/2a6e58.wgsl.expected.glsl
@@ -8,8 +8,7 @@
vec2 inner;
} v;
vec2 tint_bitcast_from_f16(f16vec4 src) {
- uint v_1 = packFloat2x16(src.xy);
- return uintBitsToFloat(uvec2(v_1, packFloat2x16(src.zw)));
+ return uintBitsToFloat(uvec2(packFloat2x16(src.xy), packFloat2x16(src.zw)));
}
vec2 bitcast_2a6e58() {
f16vec4 arg_0 = f16vec4(1.0hf);
@@ -27,8 +26,7 @@
vec2 inner;
} v;
vec2 tint_bitcast_from_f16(f16vec4 src) {
- uint v_1 = packFloat2x16(src.xy);
- return uintBitsToFloat(uvec2(v_1, packFloat2x16(src.zw)));
+ return uintBitsToFloat(uvec2(packFloat2x16(src.xy), packFloat2x16(src.zw)));
}
vec2 bitcast_2a6e58() {
f16vec4 arg_0 = f16vec4(1.0hf);
@@ -50,8 +48,7 @@
layout(location = 0) flat out vec2 vertex_main_loc0_Output;
vec2 tint_bitcast_from_f16(f16vec4 src) {
- uint v = packFloat2x16(src.xy);
- return uintBitsToFloat(uvec2(v, packFloat2x16(src.zw)));
+ return uintBitsToFloat(uvec2(packFloat2x16(src.xy), packFloat2x16(src.zw)));
}
vec2 bitcast_2a6e58() {
f16vec4 arg_0 = f16vec4(1.0hf);
@@ -65,10 +62,10 @@
return tint_symbol;
}
void main() {
- VertexOutput v_1 = vertex_main_inner();
- gl_Position = v_1.pos;
+ VertexOutput v = vertex_main_inner();
+ gl_Position = v.pos;
gl_Position[1u] = -(gl_Position.y);
gl_Position[2u] = ((2.0f * gl_Position.z) - gl_Position.w);
- vertex_main_loc0_Output = v_1.prevent_dce;
+ vertex_main_loc0_Output = v.prevent_dce;
gl_PointSize = 1.0f;
}
diff --git a/test/tint/builtins/gen/var/bitcast/429d64.wgsl.expected.glsl b/test/tint/builtins/gen/var/bitcast/429d64.wgsl.expected.glsl
index a776ec1..73a4b0f 100644
--- a/test/tint/builtins/gen/var/bitcast/429d64.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/bitcast/429d64.wgsl.expected.glsl
@@ -8,9 +8,7 @@
f16vec4 inner;
} v;
f16vec4 tint_bitcast_to_f16(vec2 src) {
- uvec2 v_1 = floatBitsToUint(src);
- f16vec2 v_2 = unpackFloat2x16(v_1.x);
- return f16vec4(v_2, unpackFloat2x16(v_1.y));
+ return f16vec4(unpackFloat2x16(floatBitsToUint(src).x), unpackFloat2x16(floatBitsToUint(src).y));
}
f16vec4 bitcast_429d64() {
vec2 arg_0 = vec2(1.0f);
@@ -28,9 +26,7 @@
f16vec4 inner;
} v;
f16vec4 tint_bitcast_to_f16(vec2 src) {
- uvec2 v_1 = floatBitsToUint(src);
- f16vec2 v_2 = unpackFloat2x16(v_1.x);
- return f16vec4(v_2, unpackFloat2x16(v_1.y));
+ return f16vec4(unpackFloat2x16(floatBitsToUint(src).x), unpackFloat2x16(floatBitsToUint(src).y));
}
f16vec4 bitcast_429d64() {
vec2 arg_0 = vec2(1.0f);
@@ -52,9 +48,7 @@
layout(location = 0) flat out f16vec4 vertex_main_loc0_Output;
f16vec4 tint_bitcast_to_f16(vec2 src) {
- uvec2 v = floatBitsToUint(src);
- f16vec2 v_1 = unpackFloat2x16(v.x);
- return f16vec4(v_1, unpackFloat2x16(v.y));
+ return f16vec4(unpackFloat2x16(floatBitsToUint(src).x), unpackFloat2x16(floatBitsToUint(src).y));
}
f16vec4 bitcast_429d64() {
vec2 arg_0 = vec2(1.0f);
@@ -68,10 +62,10 @@
return tint_symbol;
}
void main() {
- VertexOutput v_2 = vertex_main_inner();
- gl_Position = v_2.pos;
+ VertexOutput v = vertex_main_inner();
+ gl_Position = v.pos;
gl_Position[1u] = -(gl_Position.y);
gl_Position[2u] = ((2.0f * gl_Position.z) - gl_Position.w);
- vertex_main_loc0_Output = v_2.prevent_dce;
+ vertex_main_loc0_Output = v.prevent_dce;
gl_PointSize = 1.0f;
}
diff --git a/test/tint/builtins/gen/var/bitcast/71c92a.wgsl.expected.glsl b/test/tint/builtins/gen/var/bitcast/71c92a.wgsl.expected.glsl
index e0ca3e7..ef0209b 100644
--- a/test/tint/builtins/gen/var/bitcast/71c92a.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/bitcast/71c92a.wgsl.expected.glsl
@@ -9,8 +9,7 @@
} v;
f16vec4 tint_bitcast_to_f16(ivec2 src) {
uvec2 v_1 = uvec2(src);
- f16vec2 v_2 = unpackFloat2x16(v_1.x);
- return f16vec4(v_2, unpackFloat2x16(v_1.y));
+ return f16vec4(unpackFloat2x16(v_1.x), unpackFloat2x16(v_1.y));
}
f16vec4 bitcast_71c92a() {
ivec2 arg_0 = ivec2(1);
@@ -29,8 +28,7 @@
} v;
f16vec4 tint_bitcast_to_f16(ivec2 src) {
uvec2 v_1 = uvec2(src);
- f16vec2 v_2 = unpackFloat2x16(v_1.x);
- return f16vec4(v_2, unpackFloat2x16(v_1.y));
+ return f16vec4(unpackFloat2x16(v_1.x), unpackFloat2x16(v_1.y));
}
f16vec4 bitcast_71c92a() {
ivec2 arg_0 = ivec2(1);
@@ -53,8 +51,7 @@
layout(location = 0) flat out f16vec4 vertex_main_loc0_Output;
f16vec4 tint_bitcast_to_f16(ivec2 src) {
uvec2 v = uvec2(src);
- f16vec2 v_1 = unpackFloat2x16(v.x);
- return f16vec4(v_1, unpackFloat2x16(v.y));
+ return f16vec4(unpackFloat2x16(v.x), unpackFloat2x16(v.y));
}
f16vec4 bitcast_71c92a() {
ivec2 arg_0 = ivec2(1);
@@ -68,10 +65,10 @@
return tint_symbol;
}
void main() {
- VertexOutput v_2 = vertex_main_inner();
- gl_Position = v_2.pos;
+ VertexOutput v_1 = vertex_main_inner();
+ gl_Position = v_1.pos;
gl_Position[1u] = -(gl_Position.y);
gl_Position[2u] = ((2.0f * gl_Position.z) - gl_Position.w);
- vertex_main_loc0_Output = v_2.prevent_dce;
+ vertex_main_loc0_Output = v_1.prevent_dce;
gl_PointSize = 1.0f;
}
diff --git a/test/tint/builtins/gen/var/bitcast/81c5f5.wgsl.expected.glsl b/test/tint/builtins/gen/var/bitcast/81c5f5.wgsl.expected.glsl
index 4c9ace9..1a6edfc 100644
--- a/test/tint/builtins/gen/var/bitcast/81c5f5.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/bitcast/81c5f5.wgsl.expected.glsl
@@ -8,8 +8,7 @@
uvec2 inner;
} v;
uvec2 tint_bitcast_from_f16(f16vec4 src) {
- uint v_1 = packFloat2x16(src.xy);
- return uvec2(uvec2(v_1, packFloat2x16(src.zw)));
+ return uvec2(uvec2(packFloat2x16(src.xy), packFloat2x16(src.zw)));
}
uvec2 bitcast_81c5f5() {
f16vec4 arg_0 = f16vec4(1.0hf);
@@ -27,8 +26,7 @@
uvec2 inner;
} v;
uvec2 tint_bitcast_from_f16(f16vec4 src) {
- uint v_1 = packFloat2x16(src.xy);
- return uvec2(uvec2(v_1, packFloat2x16(src.zw)));
+ return uvec2(uvec2(packFloat2x16(src.xy), packFloat2x16(src.zw)));
}
uvec2 bitcast_81c5f5() {
f16vec4 arg_0 = f16vec4(1.0hf);
@@ -50,8 +48,7 @@
layout(location = 0) flat out uvec2 vertex_main_loc0_Output;
uvec2 tint_bitcast_from_f16(f16vec4 src) {
- uint v = packFloat2x16(src.xy);
- return uvec2(uvec2(v, packFloat2x16(src.zw)));
+ return uvec2(uvec2(packFloat2x16(src.xy), packFloat2x16(src.zw)));
}
uvec2 bitcast_81c5f5() {
f16vec4 arg_0 = f16vec4(1.0hf);
@@ -65,10 +62,10 @@
return tint_symbol;
}
void main() {
- VertexOutput v_1 = vertex_main_inner();
- gl_Position = v_1.pos;
+ VertexOutput v = vertex_main_inner();
+ gl_Position = v.pos;
gl_Position[1u] = -(gl_Position.y);
gl_Position[2u] = ((2.0f * gl_Position.z) - gl_Position.w);
- vertex_main_loc0_Output = v_1.prevent_dce;
+ vertex_main_loc0_Output = v.prevent_dce;
gl_PointSize = 1.0f;
}
diff --git a/test/tint/builtins/gen/var/bitcast/bc3994.wgsl.expected.glsl b/test/tint/builtins/gen/var/bitcast/bc3994.wgsl.expected.glsl
index 4e0820c..2b8997c 100644
--- a/test/tint/builtins/gen/var/bitcast/bc3994.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/bitcast/bc3994.wgsl.expected.glsl
@@ -9,8 +9,7 @@
} v;
f16vec4 tint_bitcast_to_f16(uvec2 src) {
uvec2 v_1 = uvec2(src);
- f16vec2 v_2 = unpackFloat2x16(v_1.x);
- return f16vec4(v_2, unpackFloat2x16(v_1.y));
+ return f16vec4(unpackFloat2x16(v_1.x), unpackFloat2x16(v_1.y));
}
f16vec4 bitcast_bc3994() {
uvec2 arg_0 = uvec2(1u);
@@ -29,8 +28,7 @@
} v;
f16vec4 tint_bitcast_to_f16(uvec2 src) {
uvec2 v_1 = uvec2(src);
- f16vec2 v_2 = unpackFloat2x16(v_1.x);
- return f16vec4(v_2, unpackFloat2x16(v_1.y));
+ return f16vec4(unpackFloat2x16(v_1.x), unpackFloat2x16(v_1.y));
}
f16vec4 bitcast_bc3994() {
uvec2 arg_0 = uvec2(1u);
@@ -53,8 +51,7 @@
layout(location = 0) flat out f16vec4 vertex_main_loc0_Output;
f16vec4 tint_bitcast_to_f16(uvec2 src) {
uvec2 v = uvec2(src);
- f16vec2 v_1 = unpackFloat2x16(v.x);
- return f16vec4(v_1, unpackFloat2x16(v.y));
+ return f16vec4(unpackFloat2x16(v.x), unpackFloat2x16(v.y));
}
f16vec4 bitcast_bc3994() {
uvec2 arg_0 = uvec2(1u);
@@ -68,10 +65,10 @@
return tint_symbol;
}
void main() {
- VertexOutput v_2 = vertex_main_inner();
- gl_Position = v_2.pos;
+ VertexOutput v_1 = vertex_main_inner();
+ gl_Position = v_1.pos;
gl_Position[1u] = -(gl_Position.y);
gl_Position[2u] = ((2.0f * gl_Position.z) - gl_Position.w);
- vertex_main_loc0_Output = v_2.prevent_dce;
+ vertex_main_loc0_Output = v_1.prevent_dce;
gl_PointSize = 1.0f;
}
diff --git a/test/tint/builtins/gen/var/clamp/1a32e3.wgsl.expected.glsl b/test/tint/builtins/gen/var/clamp/1a32e3.wgsl.expected.glsl
index 3348329..769b500 100644
--- a/test/tint/builtins/gen/var/clamp/1a32e3.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/clamp/1a32e3.wgsl.expected.glsl
@@ -10,8 +10,7 @@
ivec4 arg_0 = ivec4(1);
ivec4 arg_1 = ivec4(1);
ivec4 arg_2 = ivec4(1);
- ivec4 v_1 = arg_2;
- ivec4 res = min(max(arg_0, arg_1), v_1);
+ ivec4 res = min(max(arg_0, arg_1), arg_2);
return res;
}
void main() {
@@ -27,8 +26,7 @@
ivec4 arg_0 = ivec4(1);
ivec4 arg_1 = ivec4(1);
ivec4 arg_2 = ivec4(1);
- ivec4 v_1 = arg_2;
- ivec4 res = min(max(arg_0, arg_1), v_1);
+ ivec4 res = min(max(arg_0, arg_1), arg_2);
return res;
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
@@ -48,8 +46,7 @@
ivec4 arg_0 = ivec4(1);
ivec4 arg_1 = ivec4(1);
ivec4 arg_2 = ivec4(1);
- ivec4 v = arg_2;
- ivec4 res = min(max(arg_0, arg_1), v);
+ ivec4 res = min(max(arg_0, arg_1), arg_2);
return res;
}
VertexOutput vertex_main_inner() {
@@ -59,10 +56,10 @@
return tint_symbol;
}
void main() {
- VertexOutput v_1 = vertex_main_inner();
- gl_Position = v_1.pos;
+ VertexOutput v = vertex_main_inner();
+ gl_Position = v.pos;
gl_Position[1u] = -(gl_Position.y);
gl_Position[2u] = ((2.0f * gl_Position.z) - gl_Position.w);
- vertex_main_loc0_Output = v_1.prevent_dce;
+ vertex_main_loc0_Output = v.prevent_dce;
gl_PointSize = 1.0f;
}
diff --git a/test/tint/builtins/gen/var/clamp/1a32e3.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/gen/var/clamp/1a32e3.wgsl.expected.ir.dxc.hlsl
index a5bd48c..0a6c22d 100644
--- a/test/tint/builtins/gen/var/clamp/1a32e3.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/gen/var/clamp/1a32e3.wgsl.expected.ir.dxc.hlsl
@@ -14,8 +14,7 @@
int4 arg_0 = (int(1)).xxxx;
int4 arg_1 = (int(1)).xxxx;
int4 arg_2 = (int(1)).xxxx;
- int4 v = arg_2;
- int4 res = min(max(arg_0, arg_1), v);
+ int4 res = min(max(arg_0, arg_1), arg_2);
return res;
}
@@ -32,13 +31,13 @@
VertexOutput tint_symbol = (VertexOutput)0;
tint_symbol.pos = (0.0f).xxxx;
tint_symbol.prevent_dce = clamp_1a32e3();
- VertexOutput v_1 = tint_symbol;
- return v_1;
+ VertexOutput v = tint_symbol;
+ return v;
}
vertex_main_outputs vertex_main() {
- VertexOutput v_2 = vertex_main_inner();
- vertex_main_outputs v_3 = {v_2.prevent_dce, v_2.pos};
- return v_3;
+ VertexOutput v_1 = vertex_main_inner();
+ vertex_main_outputs v_2 = {v_1.prevent_dce, v_1.pos};
+ return v_2;
}
diff --git a/test/tint/builtins/gen/var/clamp/1a32e3.wgsl.expected.ir.fxc.hlsl b/test/tint/builtins/gen/var/clamp/1a32e3.wgsl.expected.ir.fxc.hlsl
index a5bd48c..0a6c22d 100644
--- a/test/tint/builtins/gen/var/clamp/1a32e3.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/builtins/gen/var/clamp/1a32e3.wgsl.expected.ir.fxc.hlsl
@@ -14,8 +14,7 @@
int4 arg_0 = (int(1)).xxxx;
int4 arg_1 = (int(1)).xxxx;
int4 arg_2 = (int(1)).xxxx;
- int4 v = arg_2;
- int4 res = min(max(arg_0, arg_1), v);
+ int4 res = min(max(arg_0, arg_1), arg_2);
return res;
}
@@ -32,13 +31,13 @@
VertexOutput tint_symbol = (VertexOutput)0;
tint_symbol.pos = (0.0f).xxxx;
tint_symbol.prevent_dce = clamp_1a32e3();
- VertexOutput v_1 = tint_symbol;
- return v_1;
+ VertexOutput v = tint_symbol;
+ return v;
}
vertex_main_outputs vertex_main() {
- VertexOutput v_2 = vertex_main_inner();
- vertex_main_outputs v_3 = {v_2.prevent_dce, v_2.pos};
- return v_3;
+ VertexOutput v_1 = vertex_main_inner();
+ vertex_main_outputs v_2 = {v_1.prevent_dce, v_1.pos};
+ return v_2;
}
diff --git a/test/tint/builtins/gen/var/clamp/1a32e3.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/clamp/1a32e3.wgsl.expected.ir.msl
index 9e4eeba..a195377 100644
--- a/test/tint/builtins/gen/var/clamp/1a32e3.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/clamp/1a32e3.wgsl.expected.ir.msl
@@ -19,8 +19,7 @@
int4 arg_0 = int4(1);
int4 arg_1 = int4(1);
int4 arg_2 = int4(1);
- int4 const v = arg_2;
- int4 res = min(max(arg_0, arg_1), v);
+ int4 res = min(max(arg_0, arg_1), arg_2);
return res;
}
@@ -42,9 +41,9 @@
}
vertex vertex_main_outputs vertex_main() {
- VertexOutput const v_1 = vertex_main_inner();
+ VertexOutput const v = vertex_main_inner();
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/clamp/548fc7.wgsl.expected.glsl b/test/tint/builtins/gen/var/clamp/548fc7.wgsl.expected.glsl
index 4475550..447ceb1 100644
--- a/test/tint/builtins/gen/var/clamp/548fc7.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/clamp/548fc7.wgsl.expected.glsl
@@ -10,8 +10,7 @@
uvec3 arg_0 = uvec3(1u);
uvec3 arg_1 = uvec3(1u);
uvec3 arg_2 = uvec3(1u);
- uvec3 v_1 = arg_2;
- uvec3 res = min(max(arg_0, arg_1), v_1);
+ uvec3 res = min(max(arg_0, arg_1), arg_2);
return res;
}
void main() {
@@ -27,8 +26,7 @@
uvec3 arg_0 = uvec3(1u);
uvec3 arg_1 = uvec3(1u);
uvec3 arg_2 = uvec3(1u);
- uvec3 v_1 = arg_2;
- uvec3 res = min(max(arg_0, arg_1), v_1);
+ uvec3 res = min(max(arg_0, arg_1), arg_2);
return res;
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
@@ -48,8 +46,7 @@
uvec3 arg_0 = uvec3(1u);
uvec3 arg_1 = uvec3(1u);
uvec3 arg_2 = uvec3(1u);
- uvec3 v = arg_2;
- uvec3 res = min(max(arg_0, arg_1), v);
+ uvec3 res = min(max(arg_0, arg_1), arg_2);
return res;
}
VertexOutput vertex_main_inner() {
@@ -59,10 +56,10 @@
return tint_symbol;
}
void main() {
- VertexOutput v_1 = vertex_main_inner();
- gl_Position = v_1.pos;
+ VertexOutput v = vertex_main_inner();
+ gl_Position = v.pos;
gl_Position[1u] = -(gl_Position.y);
gl_Position[2u] = ((2.0f * gl_Position.z) - gl_Position.w);
- vertex_main_loc0_Output = v_1.prevent_dce;
+ vertex_main_loc0_Output = v.prevent_dce;
gl_PointSize = 1.0f;
}
diff --git a/test/tint/builtins/gen/var/clamp/548fc7.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/gen/var/clamp/548fc7.wgsl.expected.ir.dxc.hlsl
index 8a8de76..bc573c9 100644
--- a/test/tint/builtins/gen/var/clamp/548fc7.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/gen/var/clamp/548fc7.wgsl.expected.ir.dxc.hlsl
@@ -14,8 +14,7 @@
uint3 arg_0 = (1u).xxx;
uint3 arg_1 = (1u).xxx;
uint3 arg_2 = (1u).xxx;
- uint3 v = arg_2;
- uint3 res = min(max(arg_0, arg_1), v);
+ uint3 res = min(max(arg_0, arg_1), arg_2);
return res;
}
@@ -32,13 +31,13 @@
VertexOutput tint_symbol = (VertexOutput)0;
tint_symbol.pos = (0.0f).xxxx;
tint_symbol.prevent_dce = clamp_548fc7();
- VertexOutput v_1 = tint_symbol;
- return v_1;
+ VertexOutput v = tint_symbol;
+ return v;
}
vertex_main_outputs vertex_main() {
- VertexOutput v_2 = vertex_main_inner();
- vertex_main_outputs v_3 = {v_2.prevent_dce, v_2.pos};
- return v_3;
+ VertexOutput v_1 = vertex_main_inner();
+ vertex_main_outputs v_2 = {v_1.prevent_dce, v_1.pos};
+ return v_2;
}
diff --git a/test/tint/builtins/gen/var/clamp/548fc7.wgsl.expected.ir.fxc.hlsl b/test/tint/builtins/gen/var/clamp/548fc7.wgsl.expected.ir.fxc.hlsl
index 8a8de76..bc573c9 100644
--- a/test/tint/builtins/gen/var/clamp/548fc7.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/builtins/gen/var/clamp/548fc7.wgsl.expected.ir.fxc.hlsl
@@ -14,8 +14,7 @@
uint3 arg_0 = (1u).xxx;
uint3 arg_1 = (1u).xxx;
uint3 arg_2 = (1u).xxx;
- uint3 v = arg_2;
- uint3 res = min(max(arg_0, arg_1), v);
+ uint3 res = min(max(arg_0, arg_1), arg_2);
return res;
}
@@ -32,13 +31,13 @@
VertexOutput tint_symbol = (VertexOutput)0;
tint_symbol.pos = (0.0f).xxxx;
tint_symbol.prevent_dce = clamp_548fc7();
- VertexOutput v_1 = tint_symbol;
- return v_1;
+ VertexOutput v = tint_symbol;
+ return v;
}
vertex_main_outputs vertex_main() {
- VertexOutput v_2 = vertex_main_inner();
- vertex_main_outputs v_3 = {v_2.prevent_dce, v_2.pos};
- return v_3;
+ VertexOutput v_1 = vertex_main_inner();
+ vertex_main_outputs v_2 = {v_1.prevent_dce, v_1.pos};
+ return v_2;
}
diff --git a/test/tint/builtins/gen/var/clamp/548fc7.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/clamp/548fc7.wgsl.expected.ir.msl
index e29941b..fbe6aed 100644
--- a/test/tint/builtins/gen/var/clamp/548fc7.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/clamp/548fc7.wgsl.expected.ir.msl
@@ -19,8 +19,7 @@
uint3 arg_0 = uint3(1u);
uint3 arg_1 = uint3(1u);
uint3 arg_2 = uint3(1u);
- uint3 const v = arg_2;
- uint3 res = min(max(arg_0, arg_1), v);
+ uint3 res = min(max(arg_0, arg_1), arg_2);
return res;
}
@@ -42,9 +41,9 @@
}
vertex vertex_main_outputs vertex_main() {
- VertexOutput const v_1 = vertex_main_inner();
+ VertexOutput const v = vertex_main_inner();
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/clamp/5f0819.wgsl.expected.glsl b/test/tint/builtins/gen/var/clamp/5f0819.wgsl.expected.glsl
index b878005..3ddf1b0 100644
--- a/test/tint/builtins/gen/var/clamp/5f0819.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/clamp/5f0819.wgsl.expected.glsl
@@ -10,8 +10,7 @@
ivec3 arg_0 = ivec3(1);
ivec3 arg_1 = ivec3(1);
ivec3 arg_2 = ivec3(1);
- ivec3 v_1 = arg_2;
- ivec3 res = min(max(arg_0, arg_1), v_1);
+ ivec3 res = min(max(arg_0, arg_1), arg_2);
return res;
}
void main() {
@@ -27,8 +26,7 @@
ivec3 arg_0 = ivec3(1);
ivec3 arg_1 = ivec3(1);
ivec3 arg_2 = ivec3(1);
- ivec3 v_1 = arg_2;
- ivec3 res = min(max(arg_0, arg_1), v_1);
+ ivec3 res = min(max(arg_0, arg_1), arg_2);
return res;
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
@@ -48,8 +46,7 @@
ivec3 arg_0 = ivec3(1);
ivec3 arg_1 = ivec3(1);
ivec3 arg_2 = ivec3(1);
- ivec3 v = arg_2;
- ivec3 res = min(max(arg_0, arg_1), v);
+ ivec3 res = min(max(arg_0, arg_1), arg_2);
return res;
}
VertexOutput vertex_main_inner() {
@@ -59,10 +56,10 @@
return tint_symbol;
}
void main() {
- VertexOutput v_1 = vertex_main_inner();
- gl_Position = v_1.pos;
+ VertexOutput v = vertex_main_inner();
+ gl_Position = v.pos;
gl_Position[1u] = -(gl_Position.y);
gl_Position[2u] = ((2.0f * gl_Position.z) - gl_Position.w);
- vertex_main_loc0_Output = v_1.prevent_dce;
+ vertex_main_loc0_Output = v.prevent_dce;
gl_PointSize = 1.0f;
}
diff --git a/test/tint/builtins/gen/var/clamp/5f0819.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/gen/var/clamp/5f0819.wgsl.expected.ir.dxc.hlsl
index 05a4e2f..7cc1035 100644
--- a/test/tint/builtins/gen/var/clamp/5f0819.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/gen/var/clamp/5f0819.wgsl.expected.ir.dxc.hlsl
@@ -14,8 +14,7 @@
int3 arg_0 = (int(1)).xxx;
int3 arg_1 = (int(1)).xxx;
int3 arg_2 = (int(1)).xxx;
- int3 v = arg_2;
- int3 res = min(max(arg_0, arg_1), v);
+ int3 res = min(max(arg_0, arg_1), arg_2);
return res;
}
@@ -32,13 +31,13 @@
VertexOutput tint_symbol = (VertexOutput)0;
tint_symbol.pos = (0.0f).xxxx;
tint_symbol.prevent_dce = clamp_5f0819();
- VertexOutput v_1 = tint_symbol;
- return v_1;
+ VertexOutput v = tint_symbol;
+ return v;
}
vertex_main_outputs vertex_main() {
- VertexOutput v_2 = vertex_main_inner();
- vertex_main_outputs v_3 = {v_2.prevent_dce, v_2.pos};
- return v_3;
+ VertexOutput v_1 = vertex_main_inner();
+ vertex_main_outputs v_2 = {v_1.prevent_dce, v_1.pos};
+ return v_2;
}
diff --git a/test/tint/builtins/gen/var/clamp/5f0819.wgsl.expected.ir.fxc.hlsl b/test/tint/builtins/gen/var/clamp/5f0819.wgsl.expected.ir.fxc.hlsl
index 05a4e2f..7cc1035 100644
--- a/test/tint/builtins/gen/var/clamp/5f0819.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/builtins/gen/var/clamp/5f0819.wgsl.expected.ir.fxc.hlsl
@@ -14,8 +14,7 @@
int3 arg_0 = (int(1)).xxx;
int3 arg_1 = (int(1)).xxx;
int3 arg_2 = (int(1)).xxx;
- int3 v = arg_2;
- int3 res = min(max(arg_0, arg_1), v);
+ int3 res = min(max(arg_0, arg_1), arg_2);
return res;
}
@@ -32,13 +31,13 @@
VertexOutput tint_symbol = (VertexOutput)0;
tint_symbol.pos = (0.0f).xxxx;
tint_symbol.prevent_dce = clamp_5f0819();
- VertexOutput v_1 = tint_symbol;
- return v_1;
+ VertexOutput v = tint_symbol;
+ return v;
}
vertex_main_outputs vertex_main() {
- VertexOutput v_2 = vertex_main_inner();
- vertex_main_outputs v_3 = {v_2.prevent_dce, v_2.pos};
- return v_3;
+ VertexOutput v_1 = vertex_main_inner();
+ vertex_main_outputs v_2 = {v_1.prevent_dce, v_1.pos};
+ return v_2;
}
diff --git a/test/tint/builtins/gen/var/clamp/5f0819.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/clamp/5f0819.wgsl.expected.ir.msl
index 3895adc..0721d53 100644
--- a/test/tint/builtins/gen/var/clamp/5f0819.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/clamp/5f0819.wgsl.expected.ir.msl
@@ -19,8 +19,7 @@
int3 arg_0 = int3(1);
int3 arg_1 = int3(1);
int3 arg_2 = int3(1);
- int3 const v = arg_2;
- int3 res = min(max(arg_0, arg_1), v);
+ int3 res = min(max(arg_0, arg_1), arg_2);
return res;
}
@@ -42,9 +41,9 @@
}
vertex vertex_main_outputs vertex_main() {
- VertexOutput const v_1 = vertex_main_inner();
+ VertexOutput const v = vertex_main_inner();
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/clamp/6c1749.wgsl.expected.glsl b/test/tint/builtins/gen/var/clamp/6c1749.wgsl.expected.glsl
index d14814c..5416657 100644
--- a/test/tint/builtins/gen/var/clamp/6c1749.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/clamp/6c1749.wgsl.expected.glsl
@@ -10,8 +10,7 @@
ivec2 arg_0 = ivec2(1);
ivec2 arg_1 = ivec2(1);
ivec2 arg_2 = ivec2(1);
- ivec2 v_1 = arg_2;
- ivec2 res = min(max(arg_0, arg_1), v_1);
+ ivec2 res = min(max(arg_0, arg_1), arg_2);
return res;
}
void main() {
@@ -27,8 +26,7 @@
ivec2 arg_0 = ivec2(1);
ivec2 arg_1 = ivec2(1);
ivec2 arg_2 = ivec2(1);
- ivec2 v_1 = arg_2;
- ivec2 res = min(max(arg_0, arg_1), v_1);
+ ivec2 res = min(max(arg_0, arg_1), arg_2);
return res;
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
@@ -48,8 +46,7 @@
ivec2 arg_0 = ivec2(1);
ivec2 arg_1 = ivec2(1);
ivec2 arg_2 = ivec2(1);
- ivec2 v = arg_2;
- ivec2 res = min(max(arg_0, arg_1), v);
+ ivec2 res = min(max(arg_0, arg_1), arg_2);
return res;
}
VertexOutput vertex_main_inner() {
@@ -59,10 +56,10 @@
return tint_symbol;
}
void main() {
- VertexOutput v_1 = vertex_main_inner();
- gl_Position = v_1.pos;
+ VertexOutput v = vertex_main_inner();
+ gl_Position = v.pos;
gl_Position[1u] = -(gl_Position.y);
gl_Position[2u] = ((2.0f * gl_Position.z) - gl_Position.w);
- vertex_main_loc0_Output = v_1.prevent_dce;
+ vertex_main_loc0_Output = v.prevent_dce;
gl_PointSize = 1.0f;
}
diff --git a/test/tint/builtins/gen/var/clamp/6c1749.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/gen/var/clamp/6c1749.wgsl.expected.ir.dxc.hlsl
index 7b491af..b14b9d4 100644
--- a/test/tint/builtins/gen/var/clamp/6c1749.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/gen/var/clamp/6c1749.wgsl.expected.ir.dxc.hlsl
@@ -14,8 +14,7 @@
int2 arg_0 = (int(1)).xx;
int2 arg_1 = (int(1)).xx;
int2 arg_2 = (int(1)).xx;
- int2 v = arg_2;
- int2 res = min(max(arg_0, arg_1), v);
+ int2 res = min(max(arg_0, arg_1), arg_2);
return res;
}
@@ -32,13 +31,13 @@
VertexOutput tint_symbol = (VertexOutput)0;
tint_symbol.pos = (0.0f).xxxx;
tint_symbol.prevent_dce = clamp_6c1749();
- VertexOutput v_1 = tint_symbol;
- return v_1;
+ VertexOutput v = tint_symbol;
+ return v;
}
vertex_main_outputs vertex_main() {
- VertexOutput v_2 = vertex_main_inner();
- vertex_main_outputs v_3 = {v_2.prevent_dce, v_2.pos};
- return v_3;
+ VertexOutput v_1 = vertex_main_inner();
+ vertex_main_outputs v_2 = {v_1.prevent_dce, v_1.pos};
+ return v_2;
}
diff --git a/test/tint/builtins/gen/var/clamp/6c1749.wgsl.expected.ir.fxc.hlsl b/test/tint/builtins/gen/var/clamp/6c1749.wgsl.expected.ir.fxc.hlsl
index 7b491af..b14b9d4 100644
--- a/test/tint/builtins/gen/var/clamp/6c1749.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/builtins/gen/var/clamp/6c1749.wgsl.expected.ir.fxc.hlsl
@@ -14,8 +14,7 @@
int2 arg_0 = (int(1)).xx;
int2 arg_1 = (int(1)).xx;
int2 arg_2 = (int(1)).xx;
- int2 v = arg_2;
- int2 res = min(max(arg_0, arg_1), v);
+ int2 res = min(max(arg_0, arg_1), arg_2);
return res;
}
@@ -32,13 +31,13 @@
VertexOutput tint_symbol = (VertexOutput)0;
tint_symbol.pos = (0.0f).xxxx;
tint_symbol.prevent_dce = clamp_6c1749();
- VertexOutput v_1 = tint_symbol;
- return v_1;
+ VertexOutput v = tint_symbol;
+ return v;
}
vertex_main_outputs vertex_main() {
- VertexOutput v_2 = vertex_main_inner();
- vertex_main_outputs v_3 = {v_2.prevent_dce, v_2.pos};
- return v_3;
+ VertexOutput v_1 = vertex_main_inner();
+ vertex_main_outputs v_2 = {v_1.prevent_dce, v_1.pos};
+ return v_2;
}
diff --git a/test/tint/builtins/gen/var/clamp/6c1749.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/clamp/6c1749.wgsl.expected.ir.msl
index 4252018..0f63b29 100644
--- a/test/tint/builtins/gen/var/clamp/6c1749.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/clamp/6c1749.wgsl.expected.ir.msl
@@ -19,8 +19,7 @@
int2 arg_0 = int2(1);
int2 arg_1 = int2(1);
int2 arg_2 = int2(1);
- int2 const v = arg_2;
- int2 res = min(max(arg_0, arg_1), v);
+ int2 res = min(max(arg_0, arg_1), arg_2);
return res;
}
@@ -42,9 +41,9 @@
}
vertex vertex_main_outputs vertex_main() {
- VertexOutput const v_1 = vertex_main_inner();
+ VertexOutput const v = vertex_main_inner();
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/clamp/7706d7.wgsl.expected.glsl b/test/tint/builtins/gen/var/clamp/7706d7.wgsl.expected.glsl
index d06763f..3c65dfc 100644
--- a/test/tint/builtins/gen/var/clamp/7706d7.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/clamp/7706d7.wgsl.expected.glsl
@@ -10,8 +10,7 @@
uvec2 arg_0 = uvec2(1u);
uvec2 arg_1 = uvec2(1u);
uvec2 arg_2 = uvec2(1u);
- uvec2 v_1 = arg_2;
- uvec2 res = min(max(arg_0, arg_1), v_1);
+ uvec2 res = min(max(arg_0, arg_1), arg_2);
return res;
}
void main() {
@@ -27,8 +26,7 @@
uvec2 arg_0 = uvec2(1u);
uvec2 arg_1 = uvec2(1u);
uvec2 arg_2 = uvec2(1u);
- uvec2 v_1 = arg_2;
- uvec2 res = min(max(arg_0, arg_1), v_1);
+ uvec2 res = min(max(arg_0, arg_1), arg_2);
return res;
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
@@ -48,8 +46,7 @@
uvec2 arg_0 = uvec2(1u);
uvec2 arg_1 = uvec2(1u);
uvec2 arg_2 = uvec2(1u);
- uvec2 v = arg_2;
- uvec2 res = min(max(arg_0, arg_1), v);
+ uvec2 res = min(max(arg_0, arg_1), arg_2);
return res;
}
VertexOutput vertex_main_inner() {
@@ -59,10 +56,10 @@
return tint_symbol;
}
void main() {
- VertexOutput v_1 = vertex_main_inner();
- gl_Position = v_1.pos;
+ VertexOutput v = vertex_main_inner();
+ gl_Position = v.pos;
gl_Position[1u] = -(gl_Position.y);
gl_Position[2u] = ((2.0f * gl_Position.z) - gl_Position.w);
- vertex_main_loc0_Output = v_1.prevent_dce;
+ vertex_main_loc0_Output = v.prevent_dce;
gl_PointSize = 1.0f;
}
diff --git a/test/tint/builtins/gen/var/clamp/7706d7.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/gen/var/clamp/7706d7.wgsl.expected.ir.dxc.hlsl
index 1e5ce91..52dbdda 100644
--- a/test/tint/builtins/gen/var/clamp/7706d7.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/gen/var/clamp/7706d7.wgsl.expected.ir.dxc.hlsl
@@ -14,8 +14,7 @@
uint2 arg_0 = (1u).xx;
uint2 arg_1 = (1u).xx;
uint2 arg_2 = (1u).xx;
- uint2 v = arg_2;
- uint2 res = min(max(arg_0, arg_1), v);
+ uint2 res = min(max(arg_0, arg_1), arg_2);
return res;
}
@@ -32,13 +31,13 @@
VertexOutput tint_symbol = (VertexOutput)0;
tint_symbol.pos = (0.0f).xxxx;
tint_symbol.prevent_dce = clamp_7706d7();
- VertexOutput v_1 = tint_symbol;
- return v_1;
+ VertexOutput v = tint_symbol;
+ return v;
}
vertex_main_outputs vertex_main() {
- VertexOutput v_2 = vertex_main_inner();
- vertex_main_outputs v_3 = {v_2.prevent_dce, v_2.pos};
- return v_3;
+ VertexOutput v_1 = vertex_main_inner();
+ vertex_main_outputs v_2 = {v_1.prevent_dce, v_1.pos};
+ return v_2;
}
diff --git a/test/tint/builtins/gen/var/clamp/7706d7.wgsl.expected.ir.fxc.hlsl b/test/tint/builtins/gen/var/clamp/7706d7.wgsl.expected.ir.fxc.hlsl
index 1e5ce91..52dbdda 100644
--- a/test/tint/builtins/gen/var/clamp/7706d7.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/builtins/gen/var/clamp/7706d7.wgsl.expected.ir.fxc.hlsl
@@ -14,8 +14,7 @@
uint2 arg_0 = (1u).xx;
uint2 arg_1 = (1u).xx;
uint2 arg_2 = (1u).xx;
- uint2 v = arg_2;
- uint2 res = min(max(arg_0, arg_1), v);
+ uint2 res = min(max(arg_0, arg_1), arg_2);
return res;
}
@@ -32,13 +31,13 @@
VertexOutput tint_symbol = (VertexOutput)0;
tint_symbol.pos = (0.0f).xxxx;
tint_symbol.prevent_dce = clamp_7706d7();
- VertexOutput v_1 = tint_symbol;
- return v_1;
+ VertexOutput v = tint_symbol;
+ return v;
}
vertex_main_outputs vertex_main() {
- VertexOutput v_2 = vertex_main_inner();
- vertex_main_outputs v_3 = {v_2.prevent_dce, v_2.pos};
- return v_3;
+ VertexOutput v_1 = vertex_main_inner();
+ vertex_main_outputs v_2 = {v_1.prevent_dce, v_1.pos};
+ return v_2;
}
diff --git a/test/tint/builtins/gen/var/clamp/7706d7.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/clamp/7706d7.wgsl.expected.ir.msl
index 6b184c3..7f4be6d 100644
--- a/test/tint/builtins/gen/var/clamp/7706d7.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/clamp/7706d7.wgsl.expected.ir.msl
@@ -19,8 +19,7 @@
uint2 arg_0 = uint2(1u);
uint2 arg_1 = uint2(1u);
uint2 arg_2 = uint2(1u);
- uint2 const v = arg_2;
- uint2 res = min(max(arg_0, arg_1), v);
+ uint2 res = min(max(arg_0, arg_1), arg_2);
return res;
}
@@ -42,9 +41,9 @@
}
vertex vertex_main_outputs vertex_main() {
- VertexOutput const v_1 = vertex_main_inner();
+ VertexOutput const v = vertex_main_inner();
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/clamp/a2de25.wgsl.expected.glsl b/test/tint/builtins/gen/var/clamp/a2de25.wgsl.expected.glsl
index 29ee83ca..757b994 100644
--- a/test/tint/builtins/gen/var/clamp/a2de25.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/clamp/a2de25.wgsl.expected.glsl
@@ -10,8 +10,7 @@
uint arg_0 = 1u;
uint arg_1 = 1u;
uint arg_2 = 1u;
- uint v_1 = arg_2;
- uint res = min(max(arg_0, arg_1), v_1);
+ uint res = min(max(arg_0, arg_1), arg_2);
return res;
}
void main() {
@@ -27,8 +26,7 @@
uint arg_0 = 1u;
uint arg_1 = 1u;
uint arg_2 = 1u;
- uint v_1 = arg_2;
- uint res = min(max(arg_0, arg_1), v_1);
+ uint res = min(max(arg_0, arg_1), arg_2);
return res;
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
@@ -48,8 +46,7 @@
uint arg_0 = 1u;
uint arg_1 = 1u;
uint arg_2 = 1u;
- uint v = arg_2;
- uint res = min(max(arg_0, arg_1), v);
+ uint res = min(max(arg_0, arg_1), arg_2);
return res;
}
VertexOutput vertex_main_inner() {
@@ -59,10 +56,10 @@
return tint_symbol;
}
void main() {
- VertexOutput v_1 = vertex_main_inner();
- gl_Position = v_1.pos;
+ VertexOutput v = vertex_main_inner();
+ gl_Position = v.pos;
gl_Position[1u] = -(gl_Position.y);
gl_Position[2u] = ((2.0f * gl_Position.z) - gl_Position.w);
- vertex_main_loc0_Output = v_1.prevent_dce;
+ vertex_main_loc0_Output = v.prevent_dce;
gl_PointSize = 1.0f;
}
diff --git a/test/tint/builtins/gen/var/clamp/a2de25.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/gen/var/clamp/a2de25.wgsl.expected.ir.dxc.hlsl
index c231dcd..601dd79 100644
--- a/test/tint/builtins/gen/var/clamp/a2de25.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/gen/var/clamp/a2de25.wgsl.expected.ir.dxc.hlsl
@@ -14,8 +14,7 @@
uint arg_0 = 1u;
uint arg_1 = 1u;
uint arg_2 = 1u;
- uint v = arg_2;
- uint res = min(max(arg_0, arg_1), v);
+ uint res = min(max(arg_0, arg_1), arg_2);
return res;
}
@@ -32,13 +31,13 @@
VertexOutput tint_symbol = (VertexOutput)0;
tint_symbol.pos = (0.0f).xxxx;
tint_symbol.prevent_dce = clamp_a2de25();
- VertexOutput v_1 = tint_symbol;
- return v_1;
+ VertexOutput v = tint_symbol;
+ return v;
}
vertex_main_outputs vertex_main() {
- VertexOutput v_2 = vertex_main_inner();
- vertex_main_outputs v_3 = {v_2.prevent_dce, v_2.pos};
- return v_3;
+ VertexOutput v_1 = vertex_main_inner();
+ vertex_main_outputs v_2 = {v_1.prevent_dce, v_1.pos};
+ return v_2;
}
diff --git a/test/tint/builtins/gen/var/clamp/a2de25.wgsl.expected.ir.fxc.hlsl b/test/tint/builtins/gen/var/clamp/a2de25.wgsl.expected.ir.fxc.hlsl
index c231dcd..601dd79 100644
--- a/test/tint/builtins/gen/var/clamp/a2de25.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/builtins/gen/var/clamp/a2de25.wgsl.expected.ir.fxc.hlsl
@@ -14,8 +14,7 @@
uint arg_0 = 1u;
uint arg_1 = 1u;
uint arg_2 = 1u;
- uint v = arg_2;
- uint res = min(max(arg_0, arg_1), v);
+ uint res = min(max(arg_0, arg_1), arg_2);
return res;
}
@@ -32,13 +31,13 @@
VertexOutput tint_symbol = (VertexOutput)0;
tint_symbol.pos = (0.0f).xxxx;
tint_symbol.prevent_dce = clamp_a2de25();
- VertexOutput v_1 = tint_symbol;
- return v_1;
+ VertexOutput v = tint_symbol;
+ return v;
}
vertex_main_outputs vertex_main() {
- VertexOutput v_2 = vertex_main_inner();
- vertex_main_outputs v_3 = {v_2.prevent_dce, v_2.pos};
- return v_3;
+ VertexOutput v_1 = vertex_main_inner();
+ vertex_main_outputs v_2 = {v_1.prevent_dce, v_1.pos};
+ return v_2;
}
diff --git a/test/tint/builtins/gen/var/clamp/a2de25.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/clamp/a2de25.wgsl.expected.ir.msl
index 6682ea7..9515251 100644
--- a/test/tint/builtins/gen/var/clamp/a2de25.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/clamp/a2de25.wgsl.expected.ir.msl
@@ -19,8 +19,7 @@
uint arg_0 = 1u;
uint arg_1 = 1u;
uint arg_2 = 1u;
- uint const v = arg_2;
- uint res = min(max(arg_0, arg_1), v);
+ uint res = min(max(arg_0, arg_1), arg_2);
return res;
}
@@ -42,9 +41,9 @@
}
vertex vertex_main_outputs vertex_main() {
- VertexOutput const v_1 = vertex_main_inner();
+ VertexOutput const v = vertex_main_inner();
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/clamp/b07c65.wgsl.expected.glsl b/test/tint/builtins/gen/var/clamp/b07c65.wgsl.expected.glsl
index 80c133c..084e8a5 100644
--- a/test/tint/builtins/gen/var/clamp/b07c65.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/clamp/b07c65.wgsl.expected.glsl
@@ -10,8 +10,7 @@
int arg_0 = 1;
int arg_1 = 1;
int arg_2 = 1;
- int v_1 = arg_2;
- int res = min(max(arg_0, arg_1), v_1);
+ int res = min(max(arg_0, arg_1), arg_2);
return res;
}
void main() {
@@ -27,8 +26,7 @@
int arg_0 = 1;
int arg_1 = 1;
int arg_2 = 1;
- int v_1 = arg_2;
- int res = min(max(arg_0, arg_1), v_1);
+ int res = min(max(arg_0, arg_1), arg_2);
return res;
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
@@ -48,8 +46,7 @@
int arg_0 = 1;
int arg_1 = 1;
int arg_2 = 1;
- int v = arg_2;
- int res = min(max(arg_0, arg_1), v);
+ int res = min(max(arg_0, arg_1), arg_2);
return res;
}
VertexOutput vertex_main_inner() {
@@ -59,10 +56,10 @@
return tint_symbol;
}
void main() {
- VertexOutput v_1 = vertex_main_inner();
- gl_Position = v_1.pos;
+ VertexOutput v = vertex_main_inner();
+ gl_Position = v.pos;
gl_Position[1u] = -(gl_Position.y);
gl_Position[2u] = ((2.0f * gl_Position.z) - gl_Position.w);
- vertex_main_loc0_Output = v_1.prevent_dce;
+ vertex_main_loc0_Output = v.prevent_dce;
gl_PointSize = 1.0f;
}
diff --git a/test/tint/builtins/gen/var/clamp/b07c65.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/gen/var/clamp/b07c65.wgsl.expected.ir.dxc.hlsl
index 51f5b39..a09987e 100644
--- a/test/tint/builtins/gen/var/clamp/b07c65.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/gen/var/clamp/b07c65.wgsl.expected.ir.dxc.hlsl
@@ -14,8 +14,7 @@
int arg_0 = int(1);
int arg_1 = int(1);
int arg_2 = int(1);
- int v = arg_2;
- int res = min(max(arg_0, arg_1), v);
+ int res = min(max(arg_0, arg_1), arg_2);
return res;
}
@@ -32,13 +31,13 @@
VertexOutput tint_symbol = (VertexOutput)0;
tint_symbol.pos = (0.0f).xxxx;
tint_symbol.prevent_dce = clamp_b07c65();
- VertexOutput v_1 = tint_symbol;
- return v_1;
+ VertexOutput v = tint_symbol;
+ return v;
}
vertex_main_outputs vertex_main() {
- VertexOutput v_2 = vertex_main_inner();
- vertex_main_outputs v_3 = {v_2.prevent_dce, v_2.pos};
- return v_3;
+ VertexOutput v_1 = vertex_main_inner();
+ vertex_main_outputs v_2 = {v_1.prevent_dce, v_1.pos};
+ return v_2;
}
diff --git a/test/tint/builtins/gen/var/clamp/b07c65.wgsl.expected.ir.fxc.hlsl b/test/tint/builtins/gen/var/clamp/b07c65.wgsl.expected.ir.fxc.hlsl
index 51f5b39..a09987e 100644
--- a/test/tint/builtins/gen/var/clamp/b07c65.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/builtins/gen/var/clamp/b07c65.wgsl.expected.ir.fxc.hlsl
@@ -14,8 +14,7 @@
int arg_0 = int(1);
int arg_1 = int(1);
int arg_2 = int(1);
- int v = arg_2;
- int res = min(max(arg_0, arg_1), v);
+ int res = min(max(arg_0, arg_1), arg_2);
return res;
}
@@ -32,13 +31,13 @@
VertexOutput tint_symbol = (VertexOutput)0;
tint_symbol.pos = (0.0f).xxxx;
tint_symbol.prevent_dce = clamp_b07c65();
- VertexOutput v_1 = tint_symbol;
- return v_1;
+ VertexOutput v = tint_symbol;
+ return v;
}
vertex_main_outputs vertex_main() {
- VertexOutput v_2 = vertex_main_inner();
- vertex_main_outputs v_3 = {v_2.prevent_dce, v_2.pos};
- return v_3;
+ VertexOutput v_1 = vertex_main_inner();
+ vertex_main_outputs v_2 = {v_1.prevent_dce, v_1.pos};
+ return v_2;
}
diff --git a/test/tint/builtins/gen/var/clamp/b07c65.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/clamp/b07c65.wgsl.expected.ir.msl
index 6de53aa..4e3b92b 100644
--- a/test/tint/builtins/gen/var/clamp/b07c65.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/clamp/b07c65.wgsl.expected.ir.msl
@@ -19,8 +19,7 @@
int arg_0 = 1;
int arg_1 = 1;
int arg_2 = 1;
- int const v = arg_2;
- int res = min(max(arg_0, arg_1), v);
+ int res = min(max(arg_0, arg_1), arg_2);
return res;
}
@@ -42,9 +41,9 @@
}
vertex vertex_main_outputs vertex_main() {
- VertexOutput const v_1 = vertex_main_inner();
+ VertexOutput const v = vertex_main_inner();
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/clamp/bd43ce.wgsl.expected.glsl b/test/tint/builtins/gen/var/clamp/bd43ce.wgsl.expected.glsl
index 4dbc870..4ea3866 100644
--- a/test/tint/builtins/gen/var/clamp/bd43ce.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/clamp/bd43ce.wgsl.expected.glsl
@@ -10,8 +10,7 @@
uvec4 arg_0 = uvec4(1u);
uvec4 arg_1 = uvec4(1u);
uvec4 arg_2 = uvec4(1u);
- uvec4 v_1 = arg_2;
- uvec4 res = min(max(arg_0, arg_1), v_1);
+ uvec4 res = min(max(arg_0, arg_1), arg_2);
return res;
}
void main() {
@@ -27,8 +26,7 @@
uvec4 arg_0 = uvec4(1u);
uvec4 arg_1 = uvec4(1u);
uvec4 arg_2 = uvec4(1u);
- uvec4 v_1 = arg_2;
- uvec4 res = min(max(arg_0, arg_1), v_1);
+ uvec4 res = min(max(arg_0, arg_1), arg_2);
return res;
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
@@ -48,8 +46,7 @@
uvec4 arg_0 = uvec4(1u);
uvec4 arg_1 = uvec4(1u);
uvec4 arg_2 = uvec4(1u);
- uvec4 v = arg_2;
- uvec4 res = min(max(arg_0, arg_1), v);
+ uvec4 res = min(max(arg_0, arg_1), arg_2);
return res;
}
VertexOutput vertex_main_inner() {
@@ -59,10 +56,10 @@
return tint_symbol;
}
void main() {
- VertexOutput v_1 = vertex_main_inner();
- gl_Position = v_1.pos;
+ VertexOutput v = vertex_main_inner();
+ gl_Position = v.pos;
gl_Position[1u] = -(gl_Position.y);
gl_Position[2u] = ((2.0f * gl_Position.z) - gl_Position.w);
- vertex_main_loc0_Output = v_1.prevent_dce;
+ vertex_main_loc0_Output = v.prevent_dce;
gl_PointSize = 1.0f;
}
diff --git a/test/tint/builtins/gen/var/clamp/bd43ce.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/gen/var/clamp/bd43ce.wgsl.expected.ir.dxc.hlsl
index 7e90e4e..e14127e 100644
--- a/test/tint/builtins/gen/var/clamp/bd43ce.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/gen/var/clamp/bd43ce.wgsl.expected.ir.dxc.hlsl
@@ -14,8 +14,7 @@
uint4 arg_0 = (1u).xxxx;
uint4 arg_1 = (1u).xxxx;
uint4 arg_2 = (1u).xxxx;
- uint4 v = arg_2;
- uint4 res = min(max(arg_0, arg_1), v);
+ uint4 res = min(max(arg_0, arg_1), arg_2);
return res;
}
@@ -32,13 +31,13 @@
VertexOutput tint_symbol = (VertexOutput)0;
tint_symbol.pos = (0.0f).xxxx;
tint_symbol.prevent_dce = clamp_bd43ce();
- VertexOutput v_1 = tint_symbol;
- return v_1;
+ VertexOutput v = tint_symbol;
+ return v;
}
vertex_main_outputs vertex_main() {
- VertexOutput v_2 = vertex_main_inner();
- vertex_main_outputs v_3 = {v_2.prevent_dce, v_2.pos};
- return v_3;
+ VertexOutput v_1 = vertex_main_inner();
+ vertex_main_outputs v_2 = {v_1.prevent_dce, v_1.pos};
+ return v_2;
}
diff --git a/test/tint/builtins/gen/var/clamp/bd43ce.wgsl.expected.ir.fxc.hlsl b/test/tint/builtins/gen/var/clamp/bd43ce.wgsl.expected.ir.fxc.hlsl
index 7e90e4e..e14127e 100644
--- a/test/tint/builtins/gen/var/clamp/bd43ce.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/builtins/gen/var/clamp/bd43ce.wgsl.expected.ir.fxc.hlsl
@@ -14,8 +14,7 @@
uint4 arg_0 = (1u).xxxx;
uint4 arg_1 = (1u).xxxx;
uint4 arg_2 = (1u).xxxx;
- uint4 v = arg_2;
- uint4 res = min(max(arg_0, arg_1), v);
+ uint4 res = min(max(arg_0, arg_1), arg_2);
return res;
}
@@ -32,13 +31,13 @@
VertexOutput tint_symbol = (VertexOutput)0;
tint_symbol.pos = (0.0f).xxxx;
tint_symbol.prevent_dce = clamp_bd43ce();
- VertexOutput v_1 = tint_symbol;
- return v_1;
+ VertexOutput v = tint_symbol;
+ return v;
}
vertex_main_outputs vertex_main() {
- VertexOutput v_2 = vertex_main_inner();
- vertex_main_outputs v_3 = {v_2.prevent_dce, v_2.pos};
- return v_3;
+ VertexOutput v_1 = vertex_main_inner();
+ vertex_main_outputs v_2 = {v_1.prevent_dce, v_1.pos};
+ return v_2;
}
diff --git a/test/tint/builtins/gen/var/clamp/bd43ce.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/clamp/bd43ce.wgsl.expected.ir.msl
index 3b10691..2e42ff8 100644
--- a/test/tint/builtins/gen/var/clamp/bd43ce.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/clamp/bd43ce.wgsl.expected.ir.msl
@@ -19,8 +19,7 @@
uint4 arg_0 = uint4(1u);
uint4 arg_1 = uint4(1u);
uint4 arg_2 = uint4(1u);
- uint4 const v = arg_2;
- uint4 res = min(max(arg_0, arg_1), v);
+ uint4 res = min(max(arg_0, arg_1), arg_2);
return res;
}
@@ -42,9 +41,9 @@
}
vertex vertex_main_outputs vertex_main() {
- VertexOutput const v_1 = vertex_main_inner();
+ VertexOutput const v = vertex_main_inner();
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/countLeadingZeros/208d46.wgsl.expected.glsl b/test/tint/builtins/gen/var/countLeadingZeros/208d46.wgsl.expected.glsl
index c6886fe..f41bcd5 100644
--- a/test/tint/builtins/gen/var/countLeadingZeros/208d46.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/countLeadingZeros/208d46.wgsl.expected.glsl
@@ -9,13 +9,7 @@
uint countLeadingZeros_208d46() {
uint arg_0 = 1u;
uint v_1 = arg_0;
- uint v_2 = mix(0u, 16u, (v_1 <= 65535u));
- uint v_3 = mix(0u, 8u, ((v_1 << v_2) <= 16777215u));
- uint v_4 = mix(0u, 4u, (((v_1 << v_2) << v_3) <= 268435455u));
- uint v_5 = mix(0u, 2u, ((((v_1 << v_2) << v_3) << v_4) <= 1073741823u));
- uint v_6 = mix(0u, 1u, (((((v_1 << v_2) << v_3) << v_4) << v_5) <= 2147483647u));
- uint v_7 = mix(0u, 1u, (((((v_1 << v_2) << v_3) << v_4) << v_5) == 0u));
- uint res = ((v_2 | (v_3 | (v_4 | (v_5 | (v_6 | v_7))))) + v_7);
+ uint res = ((mix(0u, 16u, (v_1 <= 65535u)) | (mix(0u, 8u, ((v_1 << mix(0u, 16u, (v_1 <= 65535u))) <= 16777215u)) | (mix(0u, 4u, (((v_1 << mix(0u, 16u, (v_1 <= 65535u))) << mix(0u, 8u, ((v_1 << mix(0u, 16u, (v_1 <= 65535u))) <= 16777215u))) <= 268435455u)) | (mix(0u, 2u, ((((v_1 << mix(0u, 16u, (v_1 <= 65535u))) << mix(0u, 8u, ((v_1 << mix(0u, 16u, (v_1 <= 65535u))) <= 16777215u))) << mix(0u, 4u, (((v_1 << mix(0u, 16u, (v_1 <= 65535u))) << mix(0u, 8u, ((v_1 << mix(0u, 16u, (v_1 <= 65535u))) <= 16777215u))) <= 268435455u))) <= 1073741823u)) | (mix(0u, 1u, (((((v_1 << mix(0u, 16u, (v_1 <= 65535u))) << mix(0u, 8u, ((v_1 << mix(0u, 16u, (v_1 <= 65535u))) <= 16777215u))) << mix(0u, 4u, (((v_1 << mix(0u, 16u, (v_1 <= 65535u))) << mix(0u, 8u, ((v_1 << mix(0u, 16u, (v_1 <= 65535u))) <= 16777215u))) <= 268435455u))) << mix(0u, 2u, ((((v_1 << mix(0u, 16u, (v_1 <= 65535u))) << mix(0u, 8u, ((v_1 << mix(0u, 16u, (v_1 <= 65535u))) <= 16777215u))) << mix(0u, 4u, (((v_1 << mix(0u, 16u, (v_1 <= 65535u))) << mix(0u, 8u, ((v_1 << mix(0u, 16u, (v_1 <= 65535u))) <= 16777215u))) <= 268435455u))) <= 1073741823u))) <= 2147483647u)) | mix(0u, 1u, (((((v_1 << mix(0u, 16u, (v_1 <= 65535u))) << mix(0u, 8u, ((v_1 << mix(0u, 16u, (v_1 <= 65535u))) <= 16777215u))) << mix(0u, 4u, (((v_1 << mix(0u, 16u, (v_1 <= 65535u))) << mix(0u, 8u, ((v_1 << mix(0u, 16u, (v_1 <= 65535u))) <= 16777215u))) <= 268435455u))) << mix(0u, 2u, ((((v_1 << mix(0u, 16u, (v_1 <= 65535u))) << mix(0u, 8u, ((v_1 << mix(0u, 16u, (v_1 <= 65535u))) <= 16777215u))) << mix(0u, 4u, (((v_1 << mix(0u, 16u, (v_1 <= 65535u))) << mix(0u, 8u, ((v_1 << mix(0u, 16u, (v_1 <= 65535u))) <= 16777215u))) <= 268435455u))) <= 1073741823u))) == 0u))))))) + mix(0u, 1u, (((((v_1 << mix(0u, 16u, (v_1 <= 65535u))) << mix(0u, 8u, ((v_1 << mix(0u, 16u, (v_1 <= 65535u))) <= 16777215u))) << mix(0u, 4u, (((v_1 << mix(0u, 16u, (v_1 <= 65535u))) << mix(0u, 8u, ((v_1 << mix(0u, 16u, (v_1 <= 65535u))) <= 16777215u))) <= 268435455u))) << mix(0u, 2u, ((((v_1 << mix(0u, 16u, (v_1 <= 65535u))) << mix(0u, 8u, ((v_1 << mix(0u, 16u, (v_1 <= 65535u))) <= 16777215u))) << mix(0u, 4u, (((v_1 << mix(0u, 16u, (v_1 <= 65535u))) << mix(0u, 8u, ((v_1 << mix(0u, 16u, (v_1 <= 65535u))) <= 16777215u))) <= 268435455u))) <= 1073741823u))) == 0u)));
return res;
}
void main() {
@@ -30,13 +24,7 @@
uint countLeadingZeros_208d46() {
uint arg_0 = 1u;
uint v_1 = arg_0;
- uint v_2 = mix(0u, 16u, (v_1 <= 65535u));
- uint v_3 = mix(0u, 8u, ((v_1 << v_2) <= 16777215u));
- uint v_4 = mix(0u, 4u, (((v_1 << v_2) << v_3) <= 268435455u));
- uint v_5 = mix(0u, 2u, ((((v_1 << v_2) << v_3) << v_4) <= 1073741823u));
- uint v_6 = mix(0u, 1u, (((((v_1 << v_2) << v_3) << v_4) << v_5) <= 2147483647u));
- uint v_7 = mix(0u, 1u, (((((v_1 << v_2) << v_3) << v_4) << v_5) == 0u));
- uint res = ((v_2 | (v_3 | (v_4 | (v_5 | (v_6 | v_7))))) + v_7);
+ uint res = ((mix(0u, 16u, (v_1 <= 65535u)) | (mix(0u, 8u, ((v_1 << mix(0u, 16u, (v_1 <= 65535u))) <= 16777215u)) | (mix(0u, 4u, (((v_1 << mix(0u, 16u, (v_1 <= 65535u))) << mix(0u, 8u, ((v_1 << mix(0u, 16u, (v_1 <= 65535u))) <= 16777215u))) <= 268435455u)) | (mix(0u, 2u, ((((v_1 << mix(0u, 16u, (v_1 <= 65535u))) << mix(0u, 8u, ((v_1 << mix(0u, 16u, (v_1 <= 65535u))) <= 16777215u))) << mix(0u, 4u, (((v_1 << mix(0u, 16u, (v_1 <= 65535u))) << mix(0u, 8u, ((v_1 << mix(0u, 16u, (v_1 <= 65535u))) <= 16777215u))) <= 268435455u))) <= 1073741823u)) | (mix(0u, 1u, (((((v_1 << mix(0u, 16u, (v_1 <= 65535u))) << mix(0u, 8u, ((v_1 << mix(0u, 16u, (v_1 <= 65535u))) <= 16777215u))) << mix(0u, 4u, (((v_1 << mix(0u, 16u, (v_1 <= 65535u))) << mix(0u, 8u, ((v_1 << mix(0u, 16u, (v_1 <= 65535u))) <= 16777215u))) <= 268435455u))) << mix(0u, 2u, ((((v_1 << mix(0u, 16u, (v_1 <= 65535u))) << mix(0u, 8u, ((v_1 << mix(0u, 16u, (v_1 <= 65535u))) <= 16777215u))) << mix(0u, 4u, (((v_1 << mix(0u, 16u, (v_1 <= 65535u))) << mix(0u, 8u, ((v_1 << mix(0u, 16u, (v_1 <= 65535u))) <= 16777215u))) <= 268435455u))) <= 1073741823u))) <= 2147483647u)) | mix(0u, 1u, (((((v_1 << mix(0u, 16u, (v_1 <= 65535u))) << mix(0u, 8u, ((v_1 << mix(0u, 16u, (v_1 <= 65535u))) <= 16777215u))) << mix(0u, 4u, (((v_1 << mix(0u, 16u, (v_1 <= 65535u))) << mix(0u, 8u, ((v_1 << mix(0u, 16u, (v_1 <= 65535u))) <= 16777215u))) <= 268435455u))) << mix(0u, 2u, ((((v_1 << mix(0u, 16u, (v_1 <= 65535u))) << mix(0u, 8u, ((v_1 << mix(0u, 16u, (v_1 <= 65535u))) <= 16777215u))) << mix(0u, 4u, (((v_1 << mix(0u, 16u, (v_1 <= 65535u))) << mix(0u, 8u, ((v_1 << mix(0u, 16u, (v_1 <= 65535u))) <= 16777215u))) <= 268435455u))) <= 1073741823u))) == 0u))))))) + mix(0u, 1u, (((((v_1 << mix(0u, 16u, (v_1 <= 65535u))) << mix(0u, 8u, ((v_1 << mix(0u, 16u, (v_1 <= 65535u))) <= 16777215u))) << mix(0u, 4u, (((v_1 << mix(0u, 16u, (v_1 <= 65535u))) << mix(0u, 8u, ((v_1 << mix(0u, 16u, (v_1 <= 65535u))) <= 16777215u))) <= 268435455u))) << mix(0u, 2u, ((((v_1 << mix(0u, 16u, (v_1 <= 65535u))) << mix(0u, 8u, ((v_1 << mix(0u, 16u, (v_1 <= 65535u))) <= 16777215u))) << mix(0u, 4u, (((v_1 << mix(0u, 16u, (v_1 <= 65535u))) << mix(0u, 8u, ((v_1 << mix(0u, 16u, (v_1 <= 65535u))) <= 16777215u))) <= 268435455u))) <= 1073741823u))) == 0u)));
return res;
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
@@ -55,13 +43,7 @@
uint countLeadingZeros_208d46() {
uint arg_0 = 1u;
uint v = arg_0;
- uint v_1 = mix(0u, 16u, (v <= 65535u));
- uint v_2 = mix(0u, 8u, ((v << v_1) <= 16777215u));
- uint v_3 = mix(0u, 4u, (((v << v_1) << v_2) <= 268435455u));
- uint v_4 = mix(0u, 2u, ((((v << v_1) << v_2) << v_3) <= 1073741823u));
- uint v_5 = mix(0u, 1u, (((((v << v_1) << v_2) << v_3) << v_4) <= 2147483647u));
- uint v_6 = mix(0u, 1u, (((((v << v_1) << v_2) << v_3) << v_4) == 0u));
- uint res = ((v_1 | (v_2 | (v_3 | (v_4 | (v_5 | v_6))))) + v_6);
+ uint res = ((mix(0u, 16u, (v <= 65535u)) | (mix(0u, 8u, ((v << mix(0u, 16u, (v <= 65535u))) <= 16777215u)) | (mix(0u, 4u, (((v << mix(0u, 16u, (v <= 65535u))) << mix(0u, 8u, ((v << mix(0u, 16u, (v <= 65535u))) <= 16777215u))) <= 268435455u)) | (mix(0u, 2u, ((((v << mix(0u, 16u, (v <= 65535u))) << mix(0u, 8u, ((v << mix(0u, 16u, (v <= 65535u))) <= 16777215u))) << mix(0u, 4u, (((v << mix(0u, 16u, (v <= 65535u))) << mix(0u, 8u, ((v << mix(0u, 16u, (v <= 65535u))) <= 16777215u))) <= 268435455u))) <= 1073741823u)) | (mix(0u, 1u, (((((v << mix(0u, 16u, (v <= 65535u))) << mix(0u, 8u, ((v << mix(0u, 16u, (v <= 65535u))) <= 16777215u))) << mix(0u, 4u, (((v << mix(0u, 16u, (v <= 65535u))) << mix(0u, 8u, ((v << mix(0u, 16u, (v <= 65535u))) <= 16777215u))) <= 268435455u))) << mix(0u, 2u, ((((v << mix(0u, 16u, (v <= 65535u))) << mix(0u, 8u, ((v << mix(0u, 16u, (v <= 65535u))) <= 16777215u))) << mix(0u, 4u, (((v << mix(0u, 16u, (v <= 65535u))) << mix(0u, 8u, ((v << mix(0u, 16u, (v <= 65535u))) <= 16777215u))) <= 268435455u))) <= 1073741823u))) <= 2147483647u)) | mix(0u, 1u, (((((v << mix(0u, 16u, (v <= 65535u))) << mix(0u, 8u, ((v << mix(0u, 16u, (v <= 65535u))) <= 16777215u))) << mix(0u, 4u, (((v << mix(0u, 16u, (v <= 65535u))) << mix(0u, 8u, ((v << mix(0u, 16u, (v <= 65535u))) <= 16777215u))) <= 268435455u))) << mix(0u, 2u, ((((v << mix(0u, 16u, (v <= 65535u))) << mix(0u, 8u, ((v << mix(0u, 16u, (v <= 65535u))) <= 16777215u))) << mix(0u, 4u, (((v << mix(0u, 16u, (v <= 65535u))) << mix(0u, 8u, ((v << mix(0u, 16u, (v <= 65535u))) <= 16777215u))) <= 268435455u))) <= 1073741823u))) == 0u))))))) + mix(0u, 1u, (((((v << mix(0u, 16u, (v <= 65535u))) << mix(0u, 8u, ((v << mix(0u, 16u, (v <= 65535u))) <= 16777215u))) << mix(0u, 4u, (((v << mix(0u, 16u, (v <= 65535u))) << mix(0u, 8u, ((v << mix(0u, 16u, (v <= 65535u))) <= 16777215u))) <= 268435455u))) << mix(0u, 2u, ((((v << mix(0u, 16u, (v <= 65535u))) << mix(0u, 8u, ((v << mix(0u, 16u, (v <= 65535u))) <= 16777215u))) << mix(0u, 4u, (((v << mix(0u, 16u, (v <= 65535u))) << mix(0u, 8u, ((v << mix(0u, 16u, (v <= 65535u))) <= 16777215u))) <= 268435455u))) <= 1073741823u))) == 0u)));
return res;
}
VertexOutput vertex_main_inner() {
@@ -71,10 +53,10 @@
return tint_symbol;
}
void main() {
- VertexOutput v_7 = vertex_main_inner();
- gl_Position = v_7.pos;
+ VertexOutput v_1 = vertex_main_inner();
+ gl_Position = v_1.pos;
gl_Position[1u] = -(gl_Position.y);
gl_Position[2u] = ((2.0f * gl_Position.z) - gl_Position.w);
- vertex_main_loc0_Output = v_7.prevent_dce;
+ vertex_main_loc0_Output = v_1.prevent_dce;
gl_PointSize = 1.0f;
}
diff --git a/test/tint/builtins/gen/var/countLeadingZeros/6d4656.wgsl.expected.glsl b/test/tint/builtins/gen/var/countLeadingZeros/6d4656.wgsl.expected.glsl
index 4d3b89b..3801a84 100644
--- a/test/tint/builtins/gen/var/countLeadingZeros/6d4656.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/countLeadingZeros/6d4656.wgsl.expected.glsl
@@ -9,13 +9,7 @@
int countLeadingZeros_6d4656() {
int arg_0 = 1;
uint v_1 = uint(arg_0);
- uint v_2 = mix(0u, 16u, (v_1 <= 65535u));
- uint v_3 = mix(0u, 8u, ((v_1 << v_2) <= 16777215u));
- uint v_4 = mix(0u, 4u, (((v_1 << v_2) << v_3) <= 268435455u));
- uint v_5 = mix(0u, 2u, ((((v_1 << v_2) << v_3) << v_4) <= 1073741823u));
- uint v_6 = mix(0u, 1u, (((((v_1 << v_2) << v_3) << v_4) << v_5) <= 2147483647u));
- uint v_7 = mix(0u, 1u, (((((v_1 << v_2) << v_3) << v_4) << v_5) == 0u));
- int res = int(((v_2 | (v_3 | (v_4 | (v_5 | (v_6 | v_7))))) + v_7));
+ int res = int(((mix(0u, 16u, (v_1 <= 65535u)) | (mix(0u, 8u, ((v_1 << mix(0u, 16u, (v_1 <= 65535u))) <= 16777215u)) | (mix(0u, 4u, (((v_1 << mix(0u, 16u, (v_1 <= 65535u))) << mix(0u, 8u, ((v_1 << mix(0u, 16u, (v_1 <= 65535u))) <= 16777215u))) <= 268435455u)) | (mix(0u, 2u, ((((v_1 << mix(0u, 16u, (v_1 <= 65535u))) << mix(0u, 8u, ((v_1 << mix(0u, 16u, (v_1 <= 65535u))) <= 16777215u))) << mix(0u, 4u, (((v_1 << mix(0u, 16u, (v_1 <= 65535u))) << mix(0u, 8u, ((v_1 << mix(0u, 16u, (v_1 <= 65535u))) <= 16777215u))) <= 268435455u))) <= 1073741823u)) | (mix(0u, 1u, (((((v_1 << mix(0u, 16u, (v_1 <= 65535u))) << mix(0u, 8u, ((v_1 << mix(0u, 16u, (v_1 <= 65535u))) <= 16777215u))) << mix(0u, 4u, (((v_1 << mix(0u, 16u, (v_1 <= 65535u))) << mix(0u, 8u, ((v_1 << mix(0u, 16u, (v_1 <= 65535u))) <= 16777215u))) <= 268435455u))) << mix(0u, 2u, ((((v_1 << mix(0u, 16u, (v_1 <= 65535u))) << mix(0u, 8u, ((v_1 << mix(0u, 16u, (v_1 <= 65535u))) <= 16777215u))) << mix(0u, 4u, (((v_1 << mix(0u, 16u, (v_1 <= 65535u))) << mix(0u, 8u, ((v_1 << mix(0u, 16u, (v_1 <= 65535u))) <= 16777215u))) <= 268435455u))) <= 1073741823u))) <= 2147483647u)) | mix(0u, 1u, (((((v_1 << mix(0u, 16u, (v_1 <= 65535u))) << mix(0u, 8u, ((v_1 << mix(0u, 16u, (v_1 <= 65535u))) <= 16777215u))) << mix(0u, 4u, (((v_1 << mix(0u, 16u, (v_1 <= 65535u))) << mix(0u, 8u, ((v_1 << mix(0u, 16u, (v_1 <= 65535u))) <= 16777215u))) <= 268435455u))) << mix(0u, 2u, ((((v_1 << mix(0u, 16u, (v_1 <= 65535u))) << mix(0u, 8u, ((v_1 << mix(0u, 16u, (v_1 <= 65535u))) <= 16777215u))) << mix(0u, 4u, (((v_1 << mix(0u, 16u, (v_1 <= 65535u))) << mix(0u, 8u, ((v_1 << mix(0u, 16u, (v_1 <= 65535u))) <= 16777215u))) <= 268435455u))) <= 1073741823u))) == 0u))))))) + mix(0u, 1u, (((((v_1 << mix(0u, 16u, (v_1 <= 65535u))) << mix(0u, 8u, ((v_1 << mix(0u, 16u, (v_1 <= 65535u))) <= 16777215u))) << mix(0u, 4u, (((v_1 << mix(0u, 16u, (v_1 <= 65535u))) << mix(0u, 8u, ((v_1 << mix(0u, 16u, (v_1 <= 65535u))) <= 16777215u))) <= 268435455u))) << mix(0u, 2u, ((((v_1 << mix(0u, 16u, (v_1 <= 65535u))) << mix(0u, 8u, ((v_1 << mix(0u, 16u, (v_1 <= 65535u))) <= 16777215u))) << mix(0u, 4u, (((v_1 << mix(0u, 16u, (v_1 <= 65535u))) << mix(0u, 8u, ((v_1 << mix(0u, 16u, (v_1 <= 65535u))) <= 16777215u))) <= 268435455u))) <= 1073741823u))) == 0u))));
return res;
}
void main() {
@@ -30,13 +24,7 @@
int countLeadingZeros_6d4656() {
int arg_0 = 1;
uint v_1 = uint(arg_0);
- uint v_2 = mix(0u, 16u, (v_1 <= 65535u));
- uint v_3 = mix(0u, 8u, ((v_1 << v_2) <= 16777215u));
- uint v_4 = mix(0u, 4u, (((v_1 << v_2) << v_3) <= 268435455u));
- uint v_5 = mix(0u, 2u, ((((v_1 << v_2) << v_3) << v_4) <= 1073741823u));
- uint v_6 = mix(0u, 1u, (((((v_1 << v_2) << v_3) << v_4) << v_5) <= 2147483647u));
- uint v_7 = mix(0u, 1u, (((((v_1 << v_2) << v_3) << v_4) << v_5) == 0u));
- int res = int(((v_2 | (v_3 | (v_4 | (v_5 | (v_6 | v_7))))) + v_7));
+ int res = int(((mix(0u, 16u, (v_1 <= 65535u)) | (mix(0u, 8u, ((v_1 << mix(0u, 16u, (v_1 <= 65535u))) <= 16777215u)) | (mix(0u, 4u, (((v_1 << mix(0u, 16u, (v_1 <= 65535u))) << mix(0u, 8u, ((v_1 << mix(0u, 16u, (v_1 <= 65535u))) <= 16777215u))) <= 268435455u)) | (mix(0u, 2u, ((((v_1 << mix(0u, 16u, (v_1 <= 65535u))) << mix(0u, 8u, ((v_1 << mix(0u, 16u, (v_1 <= 65535u))) <= 16777215u))) << mix(0u, 4u, (((v_1 << mix(0u, 16u, (v_1 <= 65535u))) << mix(0u, 8u, ((v_1 << mix(0u, 16u, (v_1 <= 65535u))) <= 16777215u))) <= 268435455u))) <= 1073741823u)) | (mix(0u, 1u, (((((v_1 << mix(0u, 16u, (v_1 <= 65535u))) << mix(0u, 8u, ((v_1 << mix(0u, 16u, (v_1 <= 65535u))) <= 16777215u))) << mix(0u, 4u, (((v_1 << mix(0u, 16u, (v_1 <= 65535u))) << mix(0u, 8u, ((v_1 << mix(0u, 16u, (v_1 <= 65535u))) <= 16777215u))) <= 268435455u))) << mix(0u, 2u, ((((v_1 << mix(0u, 16u, (v_1 <= 65535u))) << mix(0u, 8u, ((v_1 << mix(0u, 16u, (v_1 <= 65535u))) <= 16777215u))) << mix(0u, 4u, (((v_1 << mix(0u, 16u, (v_1 <= 65535u))) << mix(0u, 8u, ((v_1 << mix(0u, 16u, (v_1 <= 65535u))) <= 16777215u))) <= 268435455u))) <= 1073741823u))) <= 2147483647u)) | mix(0u, 1u, (((((v_1 << mix(0u, 16u, (v_1 <= 65535u))) << mix(0u, 8u, ((v_1 << mix(0u, 16u, (v_1 <= 65535u))) <= 16777215u))) << mix(0u, 4u, (((v_1 << mix(0u, 16u, (v_1 <= 65535u))) << mix(0u, 8u, ((v_1 << mix(0u, 16u, (v_1 <= 65535u))) <= 16777215u))) <= 268435455u))) << mix(0u, 2u, ((((v_1 << mix(0u, 16u, (v_1 <= 65535u))) << mix(0u, 8u, ((v_1 << mix(0u, 16u, (v_1 <= 65535u))) <= 16777215u))) << mix(0u, 4u, (((v_1 << mix(0u, 16u, (v_1 <= 65535u))) << mix(0u, 8u, ((v_1 << mix(0u, 16u, (v_1 <= 65535u))) <= 16777215u))) <= 268435455u))) <= 1073741823u))) == 0u))))))) + mix(0u, 1u, (((((v_1 << mix(0u, 16u, (v_1 <= 65535u))) << mix(0u, 8u, ((v_1 << mix(0u, 16u, (v_1 <= 65535u))) <= 16777215u))) << mix(0u, 4u, (((v_1 << mix(0u, 16u, (v_1 <= 65535u))) << mix(0u, 8u, ((v_1 << mix(0u, 16u, (v_1 <= 65535u))) <= 16777215u))) <= 268435455u))) << mix(0u, 2u, ((((v_1 << mix(0u, 16u, (v_1 <= 65535u))) << mix(0u, 8u, ((v_1 << mix(0u, 16u, (v_1 <= 65535u))) <= 16777215u))) << mix(0u, 4u, (((v_1 << mix(0u, 16u, (v_1 <= 65535u))) << mix(0u, 8u, ((v_1 << mix(0u, 16u, (v_1 <= 65535u))) <= 16777215u))) <= 268435455u))) <= 1073741823u))) == 0u))));
return res;
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
@@ -55,13 +43,7 @@
int countLeadingZeros_6d4656() {
int arg_0 = 1;
uint v = uint(arg_0);
- uint v_1 = mix(0u, 16u, (v <= 65535u));
- uint v_2 = mix(0u, 8u, ((v << v_1) <= 16777215u));
- uint v_3 = mix(0u, 4u, (((v << v_1) << v_2) <= 268435455u));
- uint v_4 = mix(0u, 2u, ((((v << v_1) << v_2) << v_3) <= 1073741823u));
- uint v_5 = mix(0u, 1u, (((((v << v_1) << v_2) << v_3) << v_4) <= 2147483647u));
- uint v_6 = mix(0u, 1u, (((((v << v_1) << v_2) << v_3) << v_4) == 0u));
- int res = int(((v_1 | (v_2 | (v_3 | (v_4 | (v_5 | v_6))))) + v_6));
+ int res = int(((mix(0u, 16u, (v <= 65535u)) | (mix(0u, 8u, ((v << mix(0u, 16u, (v <= 65535u))) <= 16777215u)) | (mix(0u, 4u, (((v << mix(0u, 16u, (v <= 65535u))) << mix(0u, 8u, ((v << mix(0u, 16u, (v <= 65535u))) <= 16777215u))) <= 268435455u)) | (mix(0u, 2u, ((((v << mix(0u, 16u, (v <= 65535u))) << mix(0u, 8u, ((v << mix(0u, 16u, (v <= 65535u))) <= 16777215u))) << mix(0u, 4u, (((v << mix(0u, 16u, (v <= 65535u))) << mix(0u, 8u, ((v << mix(0u, 16u, (v <= 65535u))) <= 16777215u))) <= 268435455u))) <= 1073741823u)) | (mix(0u, 1u, (((((v << mix(0u, 16u, (v <= 65535u))) << mix(0u, 8u, ((v << mix(0u, 16u, (v <= 65535u))) <= 16777215u))) << mix(0u, 4u, (((v << mix(0u, 16u, (v <= 65535u))) << mix(0u, 8u, ((v << mix(0u, 16u, (v <= 65535u))) <= 16777215u))) <= 268435455u))) << mix(0u, 2u, ((((v << mix(0u, 16u, (v <= 65535u))) << mix(0u, 8u, ((v << mix(0u, 16u, (v <= 65535u))) <= 16777215u))) << mix(0u, 4u, (((v << mix(0u, 16u, (v <= 65535u))) << mix(0u, 8u, ((v << mix(0u, 16u, (v <= 65535u))) <= 16777215u))) <= 268435455u))) <= 1073741823u))) <= 2147483647u)) | mix(0u, 1u, (((((v << mix(0u, 16u, (v <= 65535u))) << mix(0u, 8u, ((v << mix(0u, 16u, (v <= 65535u))) <= 16777215u))) << mix(0u, 4u, (((v << mix(0u, 16u, (v <= 65535u))) << mix(0u, 8u, ((v << mix(0u, 16u, (v <= 65535u))) <= 16777215u))) <= 268435455u))) << mix(0u, 2u, ((((v << mix(0u, 16u, (v <= 65535u))) << mix(0u, 8u, ((v << mix(0u, 16u, (v <= 65535u))) <= 16777215u))) << mix(0u, 4u, (((v << mix(0u, 16u, (v <= 65535u))) << mix(0u, 8u, ((v << mix(0u, 16u, (v <= 65535u))) <= 16777215u))) <= 268435455u))) <= 1073741823u))) == 0u))))))) + mix(0u, 1u, (((((v << mix(0u, 16u, (v <= 65535u))) << mix(0u, 8u, ((v << mix(0u, 16u, (v <= 65535u))) <= 16777215u))) << mix(0u, 4u, (((v << mix(0u, 16u, (v <= 65535u))) << mix(0u, 8u, ((v << mix(0u, 16u, (v <= 65535u))) <= 16777215u))) <= 268435455u))) << mix(0u, 2u, ((((v << mix(0u, 16u, (v <= 65535u))) << mix(0u, 8u, ((v << mix(0u, 16u, (v <= 65535u))) <= 16777215u))) << mix(0u, 4u, (((v << mix(0u, 16u, (v <= 65535u))) << mix(0u, 8u, ((v << mix(0u, 16u, (v <= 65535u))) <= 16777215u))) <= 268435455u))) <= 1073741823u))) == 0u))));
return res;
}
VertexOutput vertex_main_inner() {
@@ -71,10 +53,10 @@
return tint_symbol;
}
void main() {
- VertexOutput v_7 = vertex_main_inner();
- gl_Position = v_7.pos;
+ VertexOutput v_1 = vertex_main_inner();
+ gl_Position = v_1.pos;
gl_Position[1u] = -(gl_Position.y);
gl_Position[2u] = ((2.0f * gl_Position.z) - gl_Position.w);
- vertex_main_loc0_Output = v_7.prevent_dce;
+ vertex_main_loc0_Output = v_1.prevent_dce;
gl_PointSize = 1.0f;
}
diff --git a/test/tint/builtins/gen/var/countLeadingZeros/70783f.wgsl.expected.glsl b/test/tint/builtins/gen/var/countLeadingZeros/70783f.wgsl.expected.glsl
index 042034f..8d5cafb 100644
--- a/test/tint/builtins/gen/var/countLeadingZeros/70783f.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/countLeadingZeros/70783f.wgsl.expected.glsl
@@ -9,13 +9,7 @@
uvec2 countLeadingZeros_70783f() {
uvec2 arg_0 = uvec2(1u);
uvec2 v_1 = arg_0;
- uvec2 v_2 = mix(uvec2(0u), uvec2(16u), lessThanEqual(v_1, uvec2(65535u)));
- uvec2 v_3 = mix(uvec2(0u), uvec2(8u), lessThanEqual((v_1 << v_2), uvec2(16777215u)));
- uvec2 v_4 = mix(uvec2(0u), uvec2(4u), lessThanEqual(((v_1 << v_2) << v_3), uvec2(268435455u)));
- uvec2 v_5 = mix(uvec2(0u), uvec2(2u), lessThanEqual((((v_1 << v_2) << v_3) << v_4), uvec2(1073741823u)));
- uvec2 v_6 = mix(uvec2(0u), uvec2(1u), lessThanEqual(((((v_1 << v_2) << v_3) << v_4) << v_5), uvec2(2147483647u)));
- uvec2 v_7 = mix(uvec2(0u), uvec2(1u), equal(((((v_1 << v_2) << v_3) << v_4) << v_5), uvec2(0u)));
- uvec2 res = ((v_2 | (v_3 | (v_4 | (v_5 | (v_6 | v_7))))) + v_7);
+ uvec2 res = ((mix(uvec2(0u), uvec2(16u), lessThanEqual(v_1, uvec2(65535u))) | (mix(uvec2(0u), uvec2(8u), lessThanEqual((v_1 << mix(uvec2(0u), uvec2(16u), lessThanEqual(v_1, uvec2(65535u)))), uvec2(16777215u))) | (mix(uvec2(0u), uvec2(4u), lessThanEqual(((v_1 << mix(uvec2(0u), uvec2(16u), lessThanEqual(v_1, uvec2(65535u)))) << mix(uvec2(0u), uvec2(8u), lessThanEqual((v_1 << mix(uvec2(0u), uvec2(16u), lessThanEqual(v_1, uvec2(65535u)))), uvec2(16777215u)))), uvec2(268435455u))) | (mix(uvec2(0u), uvec2(2u), lessThanEqual((((v_1 << mix(uvec2(0u), uvec2(16u), lessThanEqual(v_1, uvec2(65535u)))) << mix(uvec2(0u), uvec2(8u), lessThanEqual((v_1 << mix(uvec2(0u), uvec2(16u), lessThanEqual(v_1, uvec2(65535u)))), uvec2(16777215u)))) << mix(uvec2(0u), uvec2(4u), lessThanEqual(((v_1 << mix(uvec2(0u), uvec2(16u), lessThanEqual(v_1, uvec2(65535u)))) << mix(uvec2(0u), uvec2(8u), lessThanEqual((v_1 << mix(uvec2(0u), uvec2(16u), lessThanEqual(v_1, uvec2(65535u)))), uvec2(16777215u)))), uvec2(268435455u)))), uvec2(1073741823u))) | (mix(uvec2(0u), uvec2(1u), lessThanEqual(((((v_1 << mix(uvec2(0u), uvec2(16u), lessThanEqual(v_1, uvec2(65535u)))) << mix(uvec2(0u), uvec2(8u), lessThanEqual((v_1 << mix(uvec2(0u), uvec2(16u), lessThanEqual(v_1, uvec2(65535u)))), uvec2(16777215u)))) << mix(uvec2(0u), uvec2(4u), lessThanEqual(((v_1 << mix(uvec2(0u), uvec2(16u), lessThanEqual(v_1, uvec2(65535u)))) << mix(uvec2(0u), uvec2(8u), lessThanEqual((v_1 << mix(uvec2(0u), uvec2(16u), lessThanEqual(v_1, uvec2(65535u)))), uvec2(16777215u)))), uvec2(268435455u)))) << mix(uvec2(0u), uvec2(2u), lessThanEqual((((v_1 << mix(uvec2(0u), uvec2(16u), lessThanEqual(v_1, uvec2(65535u)))) << mix(uvec2(0u), uvec2(8u), lessThanEqual((v_1 << mix(uvec2(0u), uvec2(16u), lessThanEqual(v_1, uvec2(65535u)))), uvec2(16777215u)))) << mix(uvec2(0u), uvec2(4u), lessThanEqual(((v_1 << mix(uvec2(0u), uvec2(16u), lessThanEqual(v_1, uvec2(65535u)))) << mix(uvec2(0u), uvec2(8u), lessThanEqual((v_1 << mix(uvec2(0u), uvec2(16u), lessThanEqual(v_1, uvec2(65535u)))), uvec2(16777215u)))), uvec2(268435455u)))), uvec2(1073741823u)))), uvec2(2147483647u))) | mix(uvec2(0u), uvec2(1u), equal(((((v_1 << mix(uvec2(0u), uvec2(16u), lessThanEqual(v_1, uvec2(65535u)))) << mix(uvec2(0u), uvec2(8u), lessThanEqual((v_1 << mix(uvec2(0u), uvec2(16u), lessThanEqual(v_1, uvec2(65535u)))), uvec2(16777215u)))) << mix(uvec2(0u), uvec2(4u), lessThanEqual(((v_1 << mix(uvec2(0u), uvec2(16u), lessThanEqual(v_1, uvec2(65535u)))) << mix(uvec2(0u), uvec2(8u), lessThanEqual((v_1 << mix(uvec2(0u), uvec2(16u), lessThanEqual(v_1, uvec2(65535u)))), uvec2(16777215u)))), uvec2(268435455u)))) << mix(uvec2(0u), uvec2(2u), lessThanEqual((((v_1 << mix(uvec2(0u), uvec2(16u), lessThanEqual(v_1, uvec2(65535u)))) << mix(uvec2(0u), uvec2(8u), lessThanEqual((v_1 << mix(uvec2(0u), uvec2(16u), lessThanEqual(v_1, uvec2(65535u)))), uvec2(16777215u)))) << mix(uvec2(0u), uvec2(4u), lessThanEqual(((v_1 << mix(uvec2(0u), uvec2(16u), lessThanEqual(v_1, uvec2(65535u)))) << mix(uvec2(0u), uvec2(8u), lessThanEqual((v_1 << mix(uvec2(0u), uvec2(16u), lessThanEqual(v_1, uvec2(65535u)))), uvec2(16777215u)))), uvec2(268435455u)))), uvec2(1073741823u)))), uvec2(0u)))))))) + mix(uvec2(0u), uvec2(1u), equal(((((v_1 << mix(uvec2(0u), uvec2(16u), lessThanEqual(v_1, uvec2(65535u)))) << mix(uvec2(0u), uvec2(8u), lessThanEqual((v_1 << mix(uvec2(0u), uvec2(16u), lessThanEqual(v_1, uvec2(65535u)))), uvec2(16777215u)))) << mix(uvec2(0u), uvec2(4u), lessThanEqual(((v_1 << mix(uvec2(0u), uvec2(16u), lessThanEqual(v_1, uvec2(65535u)))) << mix(uvec2(0u), uvec2(8u), lessThanEqual((v_1 << mix(uvec2(0u), uvec2(16u), lessThanEqual(v_1, uvec2(65535u)))), uvec2(16777215u)))), uvec2(268435455u)))) << mix(uvec2(0u), uvec2(2u), lessThanEqual((((v_1 << mix(uvec2(0u), uvec2(16u), lessThanEqual(v_1, uvec2(65535u)))) << mix(uvec2(0u), uvec2(8u), lessThanEqual((v_1 << mix(uvec2(0u), uvec2(16u), lessThanEqual(v_1, uvec2(65535u)))), uvec2(16777215u)))) << mix(uvec2(0u), uvec2(4u), lessThanEqual(((v_1 << mix(uvec2(0u), uvec2(16u), lessThanEqual(v_1, uvec2(65535u)))) << mix(uvec2(0u), uvec2(8u), lessThanEqual((v_1 << mix(uvec2(0u), uvec2(16u), lessThanEqual(v_1, uvec2(65535u)))), uvec2(16777215u)))), uvec2(268435455u)))), uvec2(1073741823u)))), uvec2(0u))));
return res;
}
void main() {
@@ -30,13 +24,7 @@
uvec2 countLeadingZeros_70783f() {
uvec2 arg_0 = uvec2(1u);
uvec2 v_1 = arg_0;
- uvec2 v_2 = mix(uvec2(0u), uvec2(16u), lessThanEqual(v_1, uvec2(65535u)));
- uvec2 v_3 = mix(uvec2(0u), uvec2(8u), lessThanEqual((v_1 << v_2), uvec2(16777215u)));
- uvec2 v_4 = mix(uvec2(0u), uvec2(4u), lessThanEqual(((v_1 << v_2) << v_3), uvec2(268435455u)));
- uvec2 v_5 = mix(uvec2(0u), uvec2(2u), lessThanEqual((((v_1 << v_2) << v_3) << v_4), uvec2(1073741823u)));
- uvec2 v_6 = mix(uvec2(0u), uvec2(1u), lessThanEqual(((((v_1 << v_2) << v_3) << v_4) << v_5), uvec2(2147483647u)));
- uvec2 v_7 = mix(uvec2(0u), uvec2(1u), equal(((((v_1 << v_2) << v_3) << v_4) << v_5), uvec2(0u)));
- uvec2 res = ((v_2 | (v_3 | (v_4 | (v_5 | (v_6 | v_7))))) + v_7);
+ uvec2 res = ((mix(uvec2(0u), uvec2(16u), lessThanEqual(v_1, uvec2(65535u))) | (mix(uvec2(0u), uvec2(8u), lessThanEqual((v_1 << mix(uvec2(0u), uvec2(16u), lessThanEqual(v_1, uvec2(65535u)))), uvec2(16777215u))) | (mix(uvec2(0u), uvec2(4u), lessThanEqual(((v_1 << mix(uvec2(0u), uvec2(16u), lessThanEqual(v_1, uvec2(65535u)))) << mix(uvec2(0u), uvec2(8u), lessThanEqual((v_1 << mix(uvec2(0u), uvec2(16u), lessThanEqual(v_1, uvec2(65535u)))), uvec2(16777215u)))), uvec2(268435455u))) | (mix(uvec2(0u), uvec2(2u), lessThanEqual((((v_1 << mix(uvec2(0u), uvec2(16u), lessThanEqual(v_1, uvec2(65535u)))) << mix(uvec2(0u), uvec2(8u), lessThanEqual((v_1 << mix(uvec2(0u), uvec2(16u), lessThanEqual(v_1, uvec2(65535u)))), uvec2(16777215u)))) << mix(uvec2(0u), uvec2(4u), lessThanEqual(((v_1 << mix(uvec2(0u), uvec2(16u), lessThanEqual(v_1, uvec2(65535u)))) << mix(uvec2(0u), uvec2(8u), lessThanEqual((v_1 << mix(uvec2(0u), uvec2(16u), lessThanEqual(v_1, uvec2(65535u)))), uvec2(16777215u)))), uvec2(268435455u)))), uvec2(1073741823u))) | (mix(uvec2(0u), uvec2(1u), lessThanEqual(((((v_1 << mix(uvec2(0u), uvec2(16u), lessThanEqual(v_1, uvec2(65535u)))) << mix(uvec2(0u), uvec2(8u), lessThanEqual((v_1 << mix(uvec2(0u), uvec2(16u), lessThanEqual(v_1, uvec2(65535u)))), uvec2(16777215u)))) << mix(uvec2(0u), uvec2(4u), lessThanEqual(((v_1 << mix(uvec2(0u), uvec2(16u), lessThanEqual(v_1, uvec2(65535u)))) << mix(uvec2(0u), uvec2(8u), lessThanEqual((v_1 << mix(uvec2(0u), uvec2(16u), lessThanEqual(v_1, uvec2(65535u)))), uvec2(16777215u)))), uvec2(268435455u)))) << mix(uvec2(0u), uvec2(2u), lessThanEqual((((v_1 << mix(uvec2(0u), uvec2(16u), lessThanEqual(v_1, uvec2(65535u)))) << mix(uvec2(0u), uvec2(8u), lessThanEqual((v_1 << mix(uvec2(0u), uvec2(16u), lessThanEqual(v_1, uvec2(65535u)))), uvec2(16777215u)))) << mix(uvec2(0u), uvec2(4u), lessThanEqual(((v_1 << mix(uvec2(0u), uvec2(16u), lessThanEqual(v_1, uvec2(65535u)))) << mix(uvec2(0u), uvec2(8u), lessThanEqual((v_1 << mix(uvec2(0u), uvec2(16u), lessThanEqual(v_1, uvec2(65535u)))), uvec2(16777215u)))), uvec2(268435455u)))), uvec2(1073741823u)))), uvec2(2147483647u))) | mix(uvec2(0u), uvec2(1u), equal(((((v_1 << mix(uvec2(0u), uvec2(16u), lessThanEqual(v_1, uvec2(65535u)))) << mix(uvec2(0u), uvec2(8u), lessThanEqual((v_1 << mix(uvec2(0u), uvec2(16u), lessThanEqual(v_1, uvec2(65535u)))), uvec2(16777215u)))) << mix(uvec2(0u), uvec2(4u), lessThanEqual(((v_1 << mix(uvec2(0u), uvec2(16u), lessThanEqual(v_1, uvec2(65535u)))) << mix(uvec2(0u), uvec2(8u), lessThanEqual((v_1 << mix(uvec2(0u), uvec2(16u), lessThanEqual(v_1, uvec2(65535u)))), uvec2(16777215u)))), uvec2(268435455u)))) << mix(uvec2(0u), uvec2(2u), lessThanEqual((((v_1 << mix(uvec2(0u), uvec2(16u), lessThanEqual(v_1, uvec2(65535u)))) << mix(uvec2(0u), uvec2(8u), lessThanEqual((v_1 << mix(uvec2(0u), uvec2(16u), lessThanEqual(v_1, uvec2(65535u)))), uvec2(16777215u)))) << mix(uvec2(0u), uvec2(4u), lessThanEqual(((v_1 << mix(uvec2(0u), uvec2(16u), lessThanEqual(v_1, uvec2(65535u)))) << mix(uvec2(0u), uvec2(8u), lessThanEqual((v_1 << mix(uvec2(0u), uvec2(16u), lessThanEqual(v_1, uvec2(65535u)))), uvec2(16777215u)))), uvec2(268435455u)))), uvec2(1073741823u)))), uvec2(0u)))))))) + mix(uvec2(0u), uvec2(1u), equal(((((v_1 << mix(uvec2(0u), uvec2(16u), lessThanEqual(v_1, uvec2(65535u)))) << mix(uvec2(0u), uvec2(8u), lessThanEqual((v_1 << mix(uvec2(0u), uvec2(16u), lessThanEqual(v_1, uvec2(65535u)))), uvec2(16777215u)))) << mix(uvec2(0u), uvec2(4u), lessThanEqual(((v_1 << mix(uvec2(0u), uvec2(16u), lessThanEqual(v_1, uvec2(65535u)))) << mix(uvec2(0u), uvec2(8u), lessThanEqual((v_1 << mix(uvec2(0u), uvec2(16u), lessThanEqual(v_1, uvec2(65535u)))), uvec2(16777215u)))), uvec2(268435455u)))) << mix(uvec2(0u), uvec2(2u), lessThanEqual((((v_1 << mix(uvec2(0u), uvec2(16u), lessThanEqual(v_1, uvec2(65535u)))) << mix(uvec2(0u), uvec2(8u), lessThanEqual((v_1 << mix(uvec2(0u), uvec2(16u), lessThanEqual(v_1, uvec2(65535u)))), uvec2(16777215u)))) << mix(uvec2(0u), uvec2(4u), lessThanEqual(((v_1 << mix(uvec2(0u), uvec2(16u), lessThanEqual(v_1, uvec2(65535u)))) << mix(uvec2(0u), uvec2(8u), lessThanEqual((v_1 << mix(uvec2(0u), uvec2(16u), lessThanEqual(v_1, uvec2(65535u)))), uvec2(16777215u)))), uvec2(268435455u)))), uvec2(1073741823u)))), uvec2(0u))));
return res;
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
@@ -55,13 +43,7 @@
uvec2 countLeadingZeros_70783f() {
uvec2 arg_0 = uvec2(1u);
uvec2 v = arg_0;
- uvec2 v_1 = mix(uvec2(0u), uvec2(16u), lessThanEqual(v, uvec2(65535u)));
- uvec2 v_2 = mix(uvec2(0u), uvec2(8u), lessThanEqual((v << v_1), uvec2(16777215u)));
- uvec2 v_3 = mix(uvec2(0u), uvec2(4u), lessThanEqual(((v << v_1) << v_2), uvec2(268435455u)));
- uvec2 v_4 = mix(uvec2(0u), uvec2(2u), lessThanEqual((((v << v_1) << v_2) << v_3), uvec2(1073741823u)));
- uvec2 v_5 = mix(uvec2(0u), uvec2(1u), lessThanEqual(((((v << v_1) << v_2) << v_3) << v_4), uvec2(2147483647u)));
- uvec2 v_6 = mix(uvec2(0u), uvec2(1u), equal(((((v << v_1) << v_2) << v_3) << v_4), uvec2(0u)));
- uvec2 res = ((v_1 | (v_2 | (v_3 | (v_4 | (v_5 | v_6))))) + v_6);
+ uvec2 res = ((mix(uvec2(0u), uvec2(16u), lessThanEqual(v, uvec2(65535u))) | (mix(uvec2(0u), uvec2(8u), lessThanEqual((v << mix(uvec2(0u), uvec2(16u), lessThanEqual(v, uvec2(65535u)))), uvec2(16777215u))) | (mix(uvec2(0u), uvec2(4u), lessThanEqual(((v << mix(uvec2(0u), uvec2(16u), lessThanEqual(v, uvec2(65535u)))) << mix(uvec2(0u), uvec2(8u), lessThanEqual((v << mix(uvec2(0u), uvec2(16u), lessThanEqual(v, uvec2(65535u)))), uvec2(16777215u)))), uvec2(268435455u))) | (mix(uvec2(0u), uvec2(2u), lessThanEqual((((v << mix(uvec2(0u), uvec2(16u), lessThanEqual(v, uvec2(65535u)))) << mix(uvec2(0u), uvec2(8u), lessThanEqual((v << mix(uvec2(0u), uvec2(16u), lessThanEqual(v, uvec2(65535u)))), uvec2(16777215u)))) << mix(uvec2(0u), uvec2(4u), lessThanEqual(((v << mix(uvec2(0u), uvec2(16u), lessThanEqual(v, uvec2(65535u)))) << mix(uvec2(0u), uvec2(8u), lessThanEqual((v << mix(uvec2(0u), uvec2(16u), lessThanEqual(v, uvec2(65535u)))), uvec2(16777215u)))), uvec2(268435455u)))), uvec2(1073741823u))) | (mix(uvec2(0u), uvec2(1u), lessThanEqual(((((v << mix(uvec2(0u), uvec2(16u), lessThanEqual(v, uvec2(65535u)))) << mix(uvec2(0u), uvec2(8u), lessThanEqual((v << mix(uvec2(0u), uvec2(16u), lessThanEqual(v, uvec2(65535u)))), uvec2(16777215u)))) << mix(uvec2(0u), uvec2(4u), lessThanEqual(((v << mix(uvec2(0u), uvec2(16u), lessThanEqual(v, uvec2(65535u)))) << mix(uvec2(0u), uvec2(8u), lessThanEqual((v << mix(uvec2(0u), uvec2(16u), lessThanEqual(v, uvec2(65535u)))), uvec2(16777215u)))), uvec2(268435455u)))) << mix(uvec2(0u), uvec2(2u), lessThanEqual((((v << mix(uvec2(0u), uvec2(16u), lessThanEqual(v, uvec2(65535u)))) << mix(uvec2(0u), uvec2(8u), lessThanEqual((v << mix(uvec2(0u), uvec2(16u), lessThanEqual(v, uvec2(65535u)))), uvec2(16777215u)))) << mix(uvec2(0u), uvec2(4u), lessThanEqual(((v << mix(uvec2(0u), uvec2(16u), lessThanEqual(v, uvec2(65535u)))) << mix(uvec2(0u), uvec2(8u), lessThanEqual((v << mix(uvec2(0u), uvec2(16u), lessThanEqual(v, uvec2(65535u)))), uvec2(16777215u)))), uvec2(268435455u)))), uvec2(1073741823u)))), uvec2(2147483647u))) | mix(uvec2(0u), uvec2(1u), equal(((((v << mix(uvec2(0u), uvec2(16u), lessThanEqual(v, uvec2(65535u)))) << mix(uvec2(0u), uvec2(8u), lessThanEqual((v << mix(uvec2(0u), uvec2(16u), lessThanEqual(v, uvec2(65535u)))), uvec2(16777215u)))) << mix(uvec2(0u), uvec2(4u), lessThanEqual(((v << mix(uvec2(0u), uvec2(16u), lessThanEqual(v, uvec2(65535u)))) << mix(uvec2(0u), uvec2(8u), lessThanEqual((v << mix(uvec2(0u), uvec2(16u), lessThanEqual(v, uvec2(65535u)))), uvec2(16777215u)))), uvec2(268435455u)))) << mix(uvec2(0u), uvec2(2u), lessThanEqual((((v << mix(uvec2(0u), uvec2(16u), lessThanEqual(v, uvec2(65535u)))) << mix(uvec2(0u), uvec2(8u), lessThanEqual((v << mix(uvec2(0u), uvec2(16u), lessThanEqual(v, uvec2(65535u)))), uvec2(16777215u)))) << mix(uvec2(0u), uvec2(4u), lessThanEqual(((v << mix(uvec2(0u), uvec2(16u), lessThanEqual(v, uvec2(65535u)))) << mix(uvec2(0u), uvec2(8u), lessThanEqual((v << mix(uvec2(0u), uvec2(16u), lessThanEqual(v, uvec2(65535u)))), uvec2(16777215u)))), uvec2(268435455u)))), uvec2(1073741823u)))), uvec2(0u)))))))) + mix(uvec2(0u), uvec2(1u), equal(((((v << mix(uvec2(0u), uvec2(16u), lessThanEqual(v, uvec2(65535u)))) << mix(uvec2(0u), uvec2(8u), lessThanEqual((v << mix(uvec2(0u), uvec2(16u), lessThanEqual(v, uvec2(65535u)))), uvec2(16777215u)))) << mix(uvec2(0u), uvec2(4u), lessThanEqual(((v << mix(uvec2(0u), uvec2(16u), lessThanEqual(v, uvec2(65535u)))) << mix(uvec2(0u), uvec2(8u), lessThanEqual((v << mix(uvec2(0u), uvec2(16u), lessThanEqual(v, uvec2(65535u)))), uvec2(16777215u)))), uvec2(268435455u)))) << mix(uvec2(0u), uvec2(2u), lessThanEqual((((v << mix(uvec2(0u), uvec2(16u), lessThanEqual(v, uvec2(65535u)))) << mix(uvec2(0u), uvec2(8u), lessThanEqual((v << mix(uvec2(0u), uvec2(16u), lessThanEqual(v, uvec2(65535u)))), uvec2(16777215u)))) << mix(uvec2(0u), uvec2(4u), lessThanEqual(((v << mix(uvec2(0u), uvec2(16u), lessThanEqual(v, uvec2(65535u)))) << mix(uvec2(0u), uvec2(8u), lessThanEqual((v << mix(uvec2(0u), uvec2(16u), lessThanEqual(v, uvec2(65535u)))), uvec2(16777215u)))), uvec2(268435455u)))), uvec2(1073741823u)))), uvec2(0u))));
return res;
}
VertexOutput vertex_main_inner() {
@@ -71,10 +53,10 @@
return tint_symbol;
}
void main() {
- VertexOutput v_7 = vertex_main_inner();
- gl_Position = v_7.pos;
+ VertexOutput v_1 = vertex_main_inner();
+ gl_Position = v_1.pos;
gl_Position[1u] = -(gl_Position.y);
gl_Position[2u] = ((2.0f * gl_Position.z) - gl_Position.w);
- vertex_main_loc0_Output = v_7.prevent_dce;
+ vertex_main_loc0_Output = v_1.prevent_dce;
gl_PointSize = 1.0f;
}
diff --git a/test/tint/builtins/gen/var/countLeadingZeros/7c38a6.wgsl.expected.glsl b/test/tint/builtins/gen/var/countLeadingZeros/7c38a6.wgsl.expected.glsl
index dd39bfc..5962a4c 100644
--- a/test/tint/builtins/gen/var/countLeadingZeros/7c38a6.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/countLeadingZeros/7c38a6.wgsl.expected.glsl
@@ -9,13 +9,7 @@
ivec3 countLeadingZeros_7c38a6() {
ivec3 arg_0 = ivec3(1);
uvec3 v_1 = uvec3(arg_0);
- uvec3 v_2 = mix(uvec3(0u), uvec3(16u), lessThanEqual(v_1, uvec3(65535u)));
- uvec3 v_3 = mix(uvec3(0u), uvec3(8u), lessThanEqual((v_1 << v_2), uvec3(16777215u)));
- uvec3 v_4 = mix(uvec3(0u), uvec3(4u), lessThanEqual(((v_1 << v_2) << v_3), uvec3(268435455u)));
- uvec3 v_5 = mix(uvec3(0u), uvec3(2u), lessThanEqual((((v_1 << v_2) << v_3) << v_4), uvec3(1073741823u)));
- uvec3 v_6 = mix(uvec3(0u), uvec3(1u), lessThanEqual(((((v_1 << v_2) << v_3) << v_4) << v_5), uvec3(2147483647u)));
- uvec3 v_7 = mix(uvec3(0u), uvec3(1u), equal(((((v_1 << v_2) << v_3) << v_4) << v_5), uvec3(0u)));
- ivec3 res = ivec3(((v_2 | (v_3 | (v_4 | (v_5 | (v_6 | v_7))))) + v_7));
+ ivec3 res = ivec3(((mix(uvec3(0u), uvec3(16u), lessThanEqual(v_1, uvec3(65535u))) | (mix(uvec3(0u), uvec3(8u), lessThanEqual((v_1 << mix(uvec3(0u), uvec3(16u), lessThanEqual(v_1, uvec3(65535u)))), uvec3(16777215u))) | (mix(uvec3(0u), uvec3(4u), lessThanEqual(((v_1 << mix(uvec3(0u), uvec3(16u), lessThanEqual(v_1, uvec3(65535u)))) << mix(uvec3(0u), uvec3(8u), lessThanEqual((v_1 << mix(uvec3(0u), uvec3(16u), lessThanEqual(v_1, uvec3(65535u)))), uvec3(16777215u)))), uvec3(268435455u))) | (mix(uvec3(0u), uvec3(2u), lessThanEqual((((v_1 << mix(uvec3(0u), uvec3(16u), lessThanEqual(v_1, uvec3(65535u)))) << mix(uvec3(0u), uvec3(8u), lessThanEqual((v_1 << mix(uvec3(0u), uvec3(16u), lessThanEqual(v_1, uvec3(65535u)))), uvec3(16777215u)))) << mix(uvec3(0u), uvec3(4u), lessThanEqual(((v_1 << mix(uvec3(0u), uvec3(16u), lessThanEqual(v_1, uvec3(65535u)))) << mix(uvec3(0u), uvec3(8u), lessThanEqual((v_1 << mix(uvec3(0u), uvec3(16u), lessThanEqual(v_1, uvec3(65535u)))), uvec3(16777215u)))), uvec3(268435455u)))), uvec3(1073741823u))) | (mix(uvec3(0u), uvec3(1u), lessThanEqual(((((v_1 << mix(uvec3(0u), uvec3(16u), lessThanEqual(v_1, uvec3(65535u)))) << mix(uvec3(0u), uvec3(8u), lessThanEqual((v_1 << mix(uvec3(0u), uvec3(16u), lessThanEqual(v_1, uvec3(65535u)))), uvec3(16777215u)))) << mix(uvec3(0u), uvec3(4u), lessThanEqual(((v_1 << mix(uvec3(0u), uvec3(16u), lessThanEqual(v_1, uvec3(65535u)))) << mix(uvec3(0u), uvec3(8u), lessThanEqual((v_1 << mix(uvec3(0u), uvec3(16u), lessThanEqual(v_1, uvec3(65535u)))), uvec3(16777215u)))), uvec3(268435455u)))) << mix(uvec3(0u), uvec3(2u), lessThanEqual((((v_1 << mix(uvec3(0u), uvec3(16u), lessThanEqual(v_1, uvec3(65535u)))) << mix(uvec3(0u), uvec3(8u), lessThanEqual((v_1 << mix(uvec3(0u), uvec3(16u), lessThanEqual(v_1, uvec3(65535u)))), uvec3(16777215u)))) << mix(uvec3(0u), uvec3(4u), lessThanEqual(((v_1 << mix(uvec3(0u), uvec3(16u), lessThanEqual(v_1, uvec3(65535u)))) << mix(uvec3(0u), uvec3(8u), lessThanEqual((v_1 << mix(uvec3(0u), uvec3(16u), lessThanEqual(v_1, uvec3(65535u)))), uvec3(16777215u)))), uvec3(268435455u)))), uvec3(1073741823u)))), uvec3(2147483647u))) | mix(uvec3(0u), uvec3(1u), equal(((((v_1 << mix(uvec3(0u), uvec3(16u), lessThanEqual(v_1, uvec3(65535u)))) << mix(uvec3(0u), uvec3(8u), lessThanEqual((v_1 << mix(uvec3(0u), uvec3(16u), lessThanEqual(v_1, uvec3(65535u)))), uvec3(16777215u)))) << mix(uvec3(0u), uvec3(4u), lessThanEqual(((v_1 << mix(uvec3(0u), uvec3(16u), lessThanEqual(v_1, uvec3(65535u)))) << mix(uvec3(0u), uvec3(8u), lessThanEqual((v_1 << mix(uvec3(0u), uvec3(16u), lessThanEqual(v_1, uvec3(65535u)))), uvec3(16777215u)))), uvec3(268435455u)))) << mix(uvec3(0u), uvec3(2u), lessThanEqual((((v_1 << mix(uvec3(0u), uvec3(16u), lessThanEqual(v_1, uvec3(65535u)))) << mix(uvec3(0u), uvec3(8u), lessThanEqual((v_1 << mix(uvec3(0u), uvec3(16u), lessThanEqual(v_1, uvec3(65535u)))), uvec3(16777215u)))) << mix(uvec3(0u), uvec3(4u), lessThanEqual(((v_1 << mix(uvec3(0u), uvec3(16u), lessThanEqual(v_1, uvec3(65535u)))) << mix(uvec3(0u), uvec3(8u), lessThanEqual((v_1 << mix(uvec3(0u), uvec3(16u), lessThanEqual(v_1, uvec3(65535u)))), uvec3(16777215u)))), uvec3(268435455u)))), uvec3(1073741823u)))), uvec3(0u)))))))) + mix(uvec3(0u), uvec3(1u), equal(((((v_1 << mix(uvec3(0u), uvec3(16u), lessThanEqual(v_1, uvec3(65535u)))) << mix(uvec3(0u), uvec3(8u), lessThanEqual((v_1 << mix(uvec3(0u), uvec3(16u), lessThanEqual(v_1, uvec3(65535u)))), uvec3(16777215u)))) << mix(uvec3(0u), uvec3(4u), lessThanEqual(((v_1 << mix(uvec3(0u), uvec3(16u), lessThanEqual(v_1, uvec3(65535u)))) << mix(uvec3(0u), uvec3(8u), lessThanEqual((v_1 << mix(uvec3(0u), uvec3(16u), lessThanEqual(v_1, uvec3(65535u)))), uvec3(16777215u)))), uvec3(268435455u)))) << mix(uvec3(0u), uvec3(2u), lessThanEqual((((v_1 << mix(uvec3(0u), uvec3(16u), lessThanEqual(v_1, uvec3(65535u)))) << mix(uvec3(0u), uvec3(8u), lessThanEqual((v_1 << mix(uvec3(0u), uvec3(16u), lessThanEqual(v_1, uvec3(65535u)))), uvec3(16777215u)))) << mix(uvec3(0u), uvec3(4u), lessThanEqual(((v_1 << mix(uvec3(0u), uvec3(16u), lessThanEqual(v_1, uvec3(65535u)))) << mix(uvec3(0u), uvec3(8u), lessThanEqual((v_1 << mix(uvec3(0u), uvec3(16u), lessThanEqual(v_1, uvec3(65535u)))), uvec3(16777215u)))), uvec3(268435455u)))), uvec3(1073741823u)))), uvec3(0u)))));
return res;
}
void main() {
@@ -30,13 +24,7 @@
ivec3 countLeadingZeros_7c38a6() {
ivec3 arg_0 = ivec3(1);
uvec3 v_1 = uvec3(arg_0);
- uvec3 v_2 = mix(uvec3(0u), uvec3(16u), lessThanEqual(v_1, uvec3(65535u)));
- uvec3 v_3 = mix(uvec3(0u), uvec3(8u), lessThanEqual((v_1 << v_2), uvec3(16777215u)));
- uvec3 v_4 = mix(uvec3(0u), uvec3(4u), lessThanEqual(((v_1 << v_2) << v_3), uvec3(268435455u)));
- uvec3 v_5 = mix(uvec3(0u), uvec3(2u), lessThanEqual((((v_1 << v_2) << v_3) << v_4), uvec3(1073741823u)));
- uvec3 v_6 = mix(uvec3(0u), uvec3(1u), lessThanEqual(((((v_1 << v_2) << v_3) << v_4) << v_5), uvec3(2147483647u)));
- uvec3 v_7 = mix(uvec3(0u), uvec3(1u), equal(((((v_1 << v_2) << v_3) << v_4) << v_5), uvec3(0u)));
- ivec3 res = ivec3(((v_2 | (v_3 | (v_4 | (v_5 | (v_6 | v_7))))) + v_7));
+ ivec3 res = ivec3(((mix(uvec3(0u), uvec3(16u), lessThanEqual(v_1, uvec3(65535u))) | (mix(uvec3(0u), uvec3(8u), lessThanEqual((v_1 << mix(uvec3(0u), uvec3(16u), lessThanEqual(v_1, uvec3(65535u)))), uvec3(16777215u))) | (mix(uvec3(0u), uvec3(4u), lessThanEqual(((v_1 << mix(uvec3(0u), uvec3(16u), lessThanEqual(v_1, uvec3(65535u)))) << mix(uvec3(0u), uvec3(8u), lessThanEqual((v_1 << mix(uvec3(0u), uvec3(16u), lessThanEqual(v_1, uvec3(65535u)))), uvec3(16777215u)))), uvec3(268435455u))) | (mix(uvec3(0u), uvec3(2u), lessThanEqual((((v_1 << mix(uvec3(0u), uvec3(16u), lessThanEqual(v_1, uvec3(65535u)))) << mix(uvec3(0u), uvec3(8u), lessThanEqual((v_1 << mix(uvec3(0u), uvec3(16u), lessThanEqual(v_1, uvec3(65535u)))), uvec3(16777215u)))) << mix(uvec3(0u), uvec3(4u), lessThanEqual(((v_1 << mix(uvec3(0u), uvec3(16u), lessThanEqual(v_1, uvec3(65535u)))) << mix(uvec3(0u), uvec3(8u), lessThanEqual((v_1 << mix(uvec3(0u), uvec3(16u), lessThanEqual(v_1, uvec3(65535u)))), uvec3(16777215u)))), uvec3(268435455u)))), uvec3(1073741823u))) | (mix(uvec3(0u), uvec3(1u), lessThanEqual(((((v_1 << mix(uvec3(0u), uvec3(16u), lessThanEqual(v_1, uvec3(65535u)))) << mix(uvec3(0u), uvec3(8u), lessThanEqual((v_1 << mix(uvec3(0u), uvec3(16u), lessThanEqual(v_1, uvec3(65535u)))), uvec3(16777215u)))) << mix(uvec3(0u), uvec3(4u), lessThanEqual(((v_1 << mix(uvec3(0u), uvec3(16u), lessThanEqual(v_1, uvec3(65535u)))) << mix(uvec3(0u), uvec3(8u), lessThanEqual((v_1 << mix(uvec3(0u), uvec3(16u), lessThanEqual(v_1, uvec3(65535u)))), uvec3(16777215u)))), uvec3(268435455u)))) << mix(uvec3(0u), uvec3(2u), lessThanEqual((((v_1 << mix(uvec3(0u), uvec3(16u), lessThanEqual(v_1, uvec3(65535u)))) << mix(uvec3(0u), uvec3(8u), lessThanEqual((v_1 << mix(uvec3(0u), uvec3(16u), lessThanEqual(v_1, uvec3(65535u)))), uvec3(16777215u)))) << mix(uvec3(0u), uvec3(4u), lessThanEqual(((v_1 << mix(uvec3(0u), uvec3(16u), lessThanEqual(v_1, uvec3(65535u)))) << mix(uvec3(0u), uvec3(8u), lessThanEqual((v_1 << mix(uvec3(0u), uvec3(16u), lessThanEqual(v_1, uvec3(65535u)))), uvec3(16777215u)))), uvec3(268435455u)))), uvec3(1073741823u)))), uvec3(2147483647u))) | mix(uvec3(0u), uvec3(1u), equal(((((v_1 << mix(uvec3(0u), uvec3(16u), lessThanEqual(v_1, uvec3(65535u)))) << mix(uvec3(0u), uvec3(8u), lessThanEqual((v_1 << mix(uvec3(0u), uvec3(16u), lessThanEqual(v_1, uvec3(65535u)))), uvec3(16777215u)))) << mix(uvec3(0u), uvec3(4u), lessThanEqual(((v_1 << mix(uvec3(0u), uvec3(16u), lessThanEqual(v_1, uvec3(65535u)))) << mix(uvec3(0u), uvec3(8u), lessThanEqual((v_1 << mix(uvec3(0u), uvec3(16u), lessThanEqual(v_1, uvec3(65535u)))), uvec3(16777215u)))), uvec3(268435455u)))) << mix(uvec3(0u), uvec3(2u), lessThanEqual((((v_1 << mix(uvec3(0u), uvec3(16u), lessThanEqual(v_1, uvec3(65535u)))) << mix(uvec3(0u), uvec3(8u), lessThanEqual((v_1 << mix(uvec3(0u), uvec3(16u), lessThanEqual(v_1, uvec3(65535u)))), uvec3(16777215u)))) << mix(uvec3(0u), uvec3(4u), lessThanEqual(((v_1 << mix(uvec3(0u), uvec3(16u), lessThanEqual(v_1, uvec3(65535u)))) << mix(uvec3(0u), uvec3(8u), lessThanEqual((v_1 << mix(uvec3(0u), uvec3(16u), lessThanEqual(v_1, uvec3(65535u)))), uvec3(16777215u)))), uvec3(268435455u)))), uvec3(1073741823u)))), uvec3(0u)))))))) + mix(uvec3(0u), uvec3(1u), equal(((((v_1 << mix(uvec3(0u), uvec3(16u), lessThanEqual(v_1, uvec3(65535u)))) << mix(uvec3(0u), uvec3(8u), lessThanEqual((v_1 << mix(uvec3(0u), uvec3(16u), lessThanEqual(v_1, uvec3(65535u)))), uvec3(16777215u)))) << mix(uvec3(0u), uvec3(4u), lessThanEqual(((v_1 << mix(uvec3(0u), uvec3(16u), lessThanEqual(v_1, uvec3(65535u)))) << mix(uvec3(0u), uvec3(8u), lessThanEqual((v_1 << mix(uvec3(0u), uvec3(16u), lessThanEqual(v_1, uvec3(65535u)))), uvec3(16777215u)))), uvec3(268435455u)))) << mix(uvec3(0u), uvec3(2u), lessThanEqual((((v_1 << mix(uvec3(0u), uvec3(16u), lessThanEqual(v_1, uvec3(65535u)))) << mix(uvec3(0u), uvec3(8u), lessThanEqual((v_1 << mix(uvec3(0u), uvec3(16u), lessThanEqual(v_1, uvec3(65535u)))), uvec3(16777215u)))) << mix(uvec3(0u), uvec3(4u), lessThanEqual(((v_1 << mix(uvec3(0u), uvec3(16u), lessThanEqual(v_1, uvec3(65535u)))) << mix(uvec3(0u), uvec3(8u), lessThanEqual((v_1 << mix(uvec3(0u), uvec3(16u), lessThanEqual(v_1, uvec3(65535u)))), uvec3(16777215u)))), uvec3(268435455u)))), uvec3(1073741823u)))), uvec3(0u)))));
return res;
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
@@ -55,13 +43,7 @@
ivec3 countLeadingZeros_7c38a6() {
ivec3 arg_0 = ivec3(1);
uvec3 v = uvec3(arg_0);
- uvec3 v_1 = mix(uvec3(0u), uvec3(16u), lessThanEqual(v, uvec3(65535u)));
- uvec3 v_2 = mix(uvec3(0u), uvec3(8u), lessThanEqual((v << v_1), uvec3(16777215u)));
- uvec3 v_3 = mix(uvec3(0u), uvec3(4u), lessThanEqual(((v << v_1) << v_2), uvec3(268435455u)));
- uvec3 v_4 = mix(uvec3(0u), uvec3(2u), lessThanEqual((((v << v_1) << v_2) << v_3), uvec3(1073741823u)));
- uvec3 v_5 = mix(uvec3(0u), uvec3(1u), lessThanEqual(((((v << v_1) << v_2) << v_3) << v_4), uvec3(2147483647u)));
- uvec3 v_6 = mix(uvec3(0u), uvec3(1u), equal(((((v << v_1) << v_2) << v_3) << v_4), uvec3(0u)));
- ivec3 res = ivec3(((v_1 | (v_2 | (v_3 | (v_4 | (v_5 | v_6))))) + v_6));
+ ivec3 res = ivec3(((mix(uvec3(0u), uvec3(16u), lessThanEqual(v, uvec3(65535u))) | (mix(uvec3(0u), uvec3(8u), lessThanEqual((v << mix(uvec3(0u), uvec3(16u), lessThanEqual(v, uvec3(65535u)))), uvec3(16777215u))) | (mix(uvec3(0u), uvec3(4u), lessThanEqual(((v << mix(uvec3(0u), uvec3(16u), lessThanEqual(v, uvec3(65535u)))) << mix(uvec3(0u), uvec3(8u), lessThanEqual((v << mix(uvec3(0u), uvec3(16u), lessThanEqual(v, uvec3(65535u)))), uvec3(16777215u)))), uvec3(268435455u))) | (mix(uvec3(0u), uvec3(2u), lessThanEqual((((v << mix(uvec3(0u), uvec3(16u), lessThanEqual(v, uvec3(65535u)))) << mix(uvec3(0u), uvec3(8u), lessThanEqual((v << mix(uvec3(0u), uvec3(16u), lessThanEqual(v, uvec3(65535u)))), uvec3(16777215u)))) << mix(uvec3(0u), uvec3(4u), lessThanEqual(((v << mix(uvec3(0u), uvec3(16u), lessThanEqual(v, uvec3(65535u)))) << mix(uvec3(0u), uvec3(8u), lessThanEqual((v << mix(uvec3(0u), uvec3(16u), lessThanEqual(v, uvec3(65535u)))), uvec3(16777215u)))), uvec3(268435455u)))), uvec3(1073741823u))) | (mix(uvec3(0u), uvec3(1u), lessThanEqual(((((v << mix(uvec3(0u), uvec3(16u), lessThanEqual(v, uvec3(65535u)))) << mix(uvec3(0u), uvec3(8u), lessThanEqual((v << mix(uvec3(0u), uvec3(16u), lessThanEqual(v, uvec3(65535u)))), uvec3(16777215u)))) << mix(uvec3(0u), uvec3(4u), lessThanEqual(((v << mix(uvec3(0u), uvec3(16u), lessThanEqual(v, uvec3(65535u)))) << mix(uvec3(0u), uvec3(8u), lessThanEqual((v << mix(uvec3(0u), uvec3(16u), lessThanEqual(v, uvec3(65535u)))), uvec3(16777215u)))), uvec3(268435455u)))) << mix(uvec3(0u), uvec3(2u), lessThanEqual((((v << mix(uvec3(0u), uvec3(16u), lessThanEqual(v, uvec3(65535u)))) << mix(uvec3(0u), uvec3(8u), lessThanEqual((v << mix(uvec3(0u), uvec3(16u), lessThanEqual(v, uvec3(65535u)))), uvec3(16777215u)))) << mix(uvec3(0u), uvec3(4u), lessThanEqual(((v << mix(uvec3(0u), uvec3(16u), lessThanEqual(v, uvec3(65535u)))) << mix(uvec3(0u), uvec3(8u), lessThanEqual((v << mix(uvec3(0u), uvec3(16u), lessThanEqual(v, uvec3(65535u)))), uvec3(16777215u)))), uvec3(268435455u)))), uvec3(1073741823u)))), uvec3(2147483647u))) | mix(uvec3(0u), uvec3(1u), equal(((((v << mix(uvec3(0u), uvec3(16u), lessThanEqual(v, uvec3(65535u)))) << mix(uvec3(0u), uvec3(8u), lessThanEqual((v << mix(uvec3(0u), uvec3(16u), lessThanEqual(v, uvec3(65535u)))), uvec3(16777215u)))) << mix(uvec3(0u), uvec3(4u), lessThanEqual(((v << mix(uvec3(0u), uvec3(16u), lessThanEqual(v, uvec3(65535u)))) << mix(uvec3(0u), uvec3(8u), lessThanEqual((v << mix(uvec3(0u), uvec3(16u), lessThanEqual(v, uvec3(65535u)))), uvec3(16777215u)))), uvec3(268435455u)))) << mix(uvec3(0u), uvec3(2u), lessThanEqual((((v << mix(uvec3(0u), uvec3(16u), lessThanEqual(v, uvec3(65535u)))) << mix(uvec3(0u), uvec3(8u), lessThanEqual((v << mix(uvec3(0u), uvec3(16u), lessThanEqual(v, uvec3(65535u)))), uvec3(16777215u)))) << mix(uvec3(0u), uvec3(4u), lessThanEqual(((v << mix(uvec3(0u), uvec3(16u), lessThanEqual(v, uvec3(65535u)))) << mix(uvec3(0u), uvec3(8u), lessThanEqual((v << mix(uvec3(0u), uvec3(16u), lessThanEqual(v, uvec3(65535u)))), uvec3(16777215u)))), uvec3(268435455u)))), uvec3(1073741823u)))), uvec3(0u)))))))) + mix(uvec3(0u), uvec3(1u), equal(((((v << mix(uvec3(0u), uvec3(16u), lessThanEqual(v, uvec3(65535u)))) << mix(uvec3(0u), uvec3(8u), lessThanEqual((v << mix(uvec3(0u), uvec3(16u), lessThanEqual(v, uvec3(65535u)))), uvec3(16777215u)))) << mix(uvec3(0u), uvec3(4u), lessThanEqual(((v << mix(uvec3(0u), uvec3(16u), lessThanEqual(v, uvec3(65535u)))) << mix(uvec3(0u), uvec3(8u), lessThanEqual((v << mix(uvec3(0u), uvec3(16u), lessThanEqual(v, uvec3(65535u)))), uvec3(16777215u)))), uvec3(268435455u)))) << mix(uvec3(0u), uvec3(2u), lessThanEqual((((v << mix(uvec3(0u), uvec3(16u), lessThanEqual(v, uvec3(65535u)))) << mix(uvec3(0u), uvec3(8u), lessThanEqual((v << mix(uvec3(0u), uvec3(16u), lessThanEqual(v, uvec3(65535u)))), uvec3(16777215u)))) << mix(uvec3(0u), uvec3(4u), lessThanEqual(((v << mix(uvec3(0u), uvec3(16u), lessThanEqual(v, uvec3(65535u)))) << mix(uvec3(0u), uvec3(8u), lessThanEqual((v << mix(uvec3(0u), uvec3(16u), lessThanEqual(v, uvec3(65535u)))), uvec3(16777215u)))), uvec3(268435455u)))), uvec3(1073741823u)))), uvec3(0u)))));
return res;
}
VertexOutput vertex_main_inner() {
@@ -71,10 +53,10 @@
return tint_symbol;
}
void main() {
- VertexOutput v_7 = vertex_main_inner();
- gl_Position = v_7.pos;
+ VertexOutput v_1 = vertex_main_inner();
+ gl_Position = v_1.pos;
gl_Position[1u] = -(gl_Position.y);
gl_Position[2u] = ((2.0f * gl_Position.z) - gl_Position.w);
- vertex_main_loc0_Output = v_7.prevent_dce;
+ vertex_main_loc0_Output = v_1.prevent_dce;
gl_PointSize = 1.0f;
}
diff --git a/test/tint/builtins/gen/var/countLeadingZeros/858d40.wgsl.expected.glsl b/test/tint/builtins/gen/var/countLeadingZeros/858d40.wgsl.expected.glsl
index 7f84f81..c733ccc 100644
--- a/test/tint/builtins/gen/var/countLeadingZeros/858d40.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/countLeadingZeros/858d40.wgsl.expected.glsl
@@ -9,13 +9,7 @@
ivec2 countLeadingZeros_858d40() {
ivec2 arg_0 = ivec2(1);
uvec2 v_1 = uvec2(arg_0);
- uvec2 v_2 = mix(uvec2(0u), uvec2(16u), lessThanEqual(v_1, uvec2(65535u)));
- uvec2 v_3 = mix(uvec2(0u), uvec2(8u), lessThanEqual((v_1 << v_2), uvec2(16777215u)));
- uvec2 v_4 = mix(uvec2(0u), uvec2(4u), lessThanEqual(((v_1 << v_2) << v_3), uvec2(268435455u)));
- uvec2 v_5 = mix(uvec2(0u), uvec2(2u), lessThanEqual((((v_1 << v_2) << v_3) << v_4), uvec2(1073741823u)));
- uvec2 v_6 = mix(uvec2(0u), uvec2(1u), lessThanEqual(((((v_1 << v_2) << v_3) << v_4) << v_5), uvec2(2147483647u)));
- uvec2 v_7 = mix(uvec2(0u), uvec2(1u), equal(((((v_1 << v_2) << v_3) << v_4) << v_5), uvec2(0u)));
- ivec2 res = ivec2(((v_2 | (v_3 | (v_4 | (v_5 | (v_6 | v_7))))) + v_7));
+ ivec2 res = ivec2(((mix(uvec2(0u), uvec2(16u), lessThanEqual(v_1, uvec2(65535u))) | (mix(uvec2(0u), uvec2(8u), lessThanEqual((v_1 << mix(uvec2(0u), uvec2(16u), lessThanEqual(v_1, uvec2(65535u)))), uvec2(16777215u))) | (mix(uvec2(0u), uvec2(4u), lessThanEqual(((v_1 << mix(uvec2(0u), uvec2(16u), lessThanEqual(v_1, uvec2(65535u)))) << mix(uvec2(0u), uvec2(8u), lessThanEqual((v_1 << mix(uvec2(0u), uvec2(16u), lessThanEqual(v_1, uvec2(65535u)))), uvec2(16777215u)))), uvec2(268435455u))) | (mix(uvec2(0u), uvec2(2u), lessThanEqual((((v_1 << mix(uvec2(0u), uvec2(16u), lessThanEqual(v_1, uvec2(65535u)))) << mix(uvec2(0u), uvec2(8u), lessThanEqual((v_1 << mix(uvec2(0u), uvec2(16u), lessThanEqual(v_1, uvec2(65535u)))), uvec2(16777215u)))) << mix(uvec2(0u), uvec2(4u), lessThanEqual(((v_1 << mix(uvec2(0u), uvec2(16u), lessThanEqual(v_1, uvec2(65535u)))) << mix(uvec2(0u), uvec2(8u), lessThanEqual((v_1 << mix(uvec2(0u), uvec2(16u), lessThanEqual(v_1, uvec2(65535u)))), uvec2(16777215u)))), uvec2(268435455u)))), uvec2(1073741823u))) | (mix(uvec2(0u), uvec2(1u), lessThanEqual(((((v_1 << mix(uvec2(0u), uvec2(16u), lessThanEqual(v_1, uvec2(65535u)))) << mix(uvec2(0u), uvec2(8u), lessThanEqual((v_1 << mix(uvec2(0u), uvec2(16u), lessThanEqual(v_1, uvec2(65535u)))), uvec2(16777215u)))) << mix(uvec2(0u), uvec2(4u), lessThanEqual(((v_1 << mix(uvec2(0u), uvec2(16u), lessThanEqual(v_1, uvec2(65535u)))) << mix(uvec2(0u), uvec2(8u), lessThanEqual((v_1 << mix(uvec2(0u), uvec2(16u), lessThanEqual(v_1, uvec2(65535u)))), uvec2(16777215u)))), uvec2(268435455u)))) << mix(uvec2(0u), uvec2(2u), lessThanEqual((((v_1 << mix(uvec2(0u), uvec2(16u), lessThanEqual(v_1, uvec2(65535u)))) << mix(uvec2(0u), uvec2(8u), lessThanEqual((v_1 << mix(uvec2(0u), uvec2(16u), lessThanEqual(v_1, uvec2(65535u)))), uvec2(16777215u)))) << mix(uvec2(0u), uvec2(4u), lessThanEqual(((v_1 << mix(uvec2(0u), uvec2(16u), lessThanEqual(v_1, uvec2(65535u)))) << mix(uvec2(0u), uvec2(8u), lessThanEqual((v_1 << mix(uvec2(0u), uvec2(16u), lessThanEqual(v_1, uvec2(65535u)))), uvec2(16777215u)))), uvec2(268435455u)))), uvec2(1073741823u)))), uvec2(2147483647u))) | mix(uvec2(0u), uvec2(1u), equal(((((v_1 << mix(uvec2(0u), uvec2(16u), lessThanEqual(v_1, uvec2(65535u)))) << mix(uvec2(0u), uvec2(8u), lessThanEqual((v_1 << mix(uvec2(0u), uvec2(16u), lessThanEqual(v_1, uvec2(65535u)))), uvec2(16777215u)))) << mix(uvec2(0u), uvec2(4u), lessThanEqual(((v_1 << mix(uvec2(0u), uvec2(16u), lessThanEqual(v_1, uvec2(65535u)))) << mix(uvec2(0u), uvec2(8u), lessThanEqual((v_1 << mix(uvec2(0u), uvec2(16u), lessThanEqual(v_1, uvec2(65535u)))), uvec2(16777215u)))), uvec2(268435455u)))) << mix(uvec2(0u), uvec2(2u), lessThanEqual((((v_1 << mix(uvec2(0u), uvec2(16u), lessThanEqual(v_1, uvec2(65535u)))) << mix(uvec2(0u), uvec2(8u), lessThanEqual((v_1 << mix(uvec2(0u), uvec2(16u), lessThanEqual(v_1, uvec2(65535u)))), uvec2(16777215u)))) << mix(uvec2(0u), uvec2(4u), lessThanEqual(((v_1 << mix(uvec2(0u), uvec2(16u), lessThanEqual(v_1, uvec2(65535u)))) << mix(uvec2(0u), uvec2(8u), lessThanEqual((v_1 << mix(uvec2(0u), uvec2(16u), lessThanEqual(v_1, uvec2(65535u)))), uvec2(16777215u)))), uvec2(268435455u)))), uvec2(1073741823u)))), uvec2(0u)))))))) + mix(uvec2(0u), uvec2(1u), equal(((((v_1 << mix(uvec2(0u), uvec2(16u), lessThanEqual(v_1, uvec2(65535u)))) << mix(uvec2(0u), uvec2(8u), lessThanEqual((v_1 << mix(uvec2(0u), uvec2(16u), lessThanEqual(v_1, uvec2(65535u)))), uvec2(16777215u)))) << mix(uvec2(0u), uvec2(4u), lessThanEqual(((v_1 << mix(uvec2(0u), uvec2(16u), lessThanEqual(v_1, uvec2(65535u)))) << mix(uvec2(0u), uvec2(8u), lessThanEqual((v_1 << mix(uvec2(0u), uvec2(16u), lessThanEqual(v_1, uvec2(65535u)))), uvec2(16777215u)))), uvec2(268435455u)))) << mix(uvec2(0u), uvec2(2u), lessThanEqual((((v_1 << mix(uvec2(0u), uvec2(16u), lessThanEqual(v_1, uvec2(65535u)))) << mix(uvec2(0u), uvec2(8u), lessThanEqual((v_1 << mix(uvec2(0u), uvec2(16u), lessThanEqual(v_1, uvec2(65535u)))), uvec2(16777215u)))) << mix(uvec2(0u), uvec2(4u), lessThanEqual(((v_1 << mix(uvec2(0u), uvec2(16u), lessThanEqual(v_1, uvec2(65535u)))) << mix(uvec2(0u), uvec2(8u), lessThanEqual((v_1 << mix(uvec2(0u), uvec2(16u), lessThanEqual(v_1, uvec2(65535u)))), uvec2(16777215u)))), uvec2(268435455u)))), uvec2(1073741823u)))), uvec2(0u)))));
return res;
}
void main() {
@@ -30,13 +24,7 @@
ivec2 countLeadingZeros_858d40() {
ivec2 arg_0 = ivec2(1);
uvec2 v_1 = uvec2(arg_0);
- uvec2 v_2 = mix(uvec2(0u), uvec2(16u), lessThanEqual(v_1, uvec2(65535u)));
- uvec2 v_3 = mix(uvec2(0u), uvec2(8u), lessThanEqual((v_1 << v_2), uvec2(16777215u)));
- uvec2 v_4 = mix(uvec2(0u), uvec2(4u), lessThanEqual(((v_1 << v_2) << v_3), uvec2(268435455u)));
- uvec2 v_5 = mix(uvec2(0u), uvec2(2u), lessThanEqual((((v_1 << v_2) << v_3) << v_4), uvec2(1073741823u)));
- uvec2 v_6 = mix(uvec2(0u), uvec2(1u), lessThanEqual(((((v_1 << v_2) << v_3) << v_4) << v_5), uvec2(2147483647u)));
- uvec2 v_7 = mix(uvec2(0u), uvec2(1u), equal(((((v_1 << v_2) << v_3) << v_4) << v_5), uvec2(0u)));
- ivec2 res = ivec2(((v_2 | (v_3 | (v_4 | (v_5 | (v_6 | v_7))))) + v_7));
+ ivec2 res = ivec2(((mix(uvec2(0u), uvec2(16u), lessThanEqual(v_1, uvec2(65535u))) | (mix(uvec2(0u), uvec2(8u), lessThanEqual((v_1 << mix(uvec2(0u), uvec2(16u), lessThanEqual(v_1, uvec2(65535u)))), uvec2(16777215u))) | (mix(uvec2(0u), uvec2(4u), lessThanEqual(((v_1 << mix(uvec2(0u), uvec2(16u), lessThanEqual(v_1, uvec2(65535u)))) << mix(uvec2(0u), uvec2(8u), lessThanEqual((v_1 << mix(uvec2(0u), uvec2(16u), lessThanEqual(v_1, uvec2(65535u)))), uvec2(16777215u)))), uvec2(268435455u))) | (mix(uvec2(0u), uvec2(2u), lessThanEqual((((v_1 << mix(uvec2(0u), uvec2(16u), lessThanEqual(v_1, uvec2(65535u)))) << mix(uvec2(0u), uvec2(8u), lessThanEqual((v_1 << mix(uvec2(0u), uvec2(16u), lessThanEqual(v_1, uvec2(65535u)))), uvec2(16777215u)))) << mix(uvec2(0u), uvec2(4u), lessThanEqual(((v_1 << mix(uvec2(0u), uvec2(16u), lessThanEqual(v_1, uvec2(65535u)))) << mix(uvec2(0u), uvec2(8u), lessThanEqual((v_1 << mix(uvec2(0u), uvec2(16u), lessThanEqual(v_1, uvec2(65535u)))), uvec2(16777215u)))), uvec2(268435455u)))), uvec2(1073741823u))) | (mix(uvec2(0u), uvec2(1u), lessThanEqual(((((v_1 << mix(uvec2(0u), uvec2(16u), lessThanEqual(v_1, uvec2(65535u)))) << mix(uvec2(0u), uvec2(8u), lessThanEqual((v_1 << mix(uvec2(0u), uvec2(16u), lessThanEqual(v_1, uvec2(65535u)))), uvec2(16777215u)))) << mix(uvec2(0u), uvec2(4u), lessThanEqual(((v_1 << mix(uvec2(0u), uvec2(16u), lessThanEqual(v_1, uvec2(65535u)))) << mix(uvec2(0u), uvec2(8u), lessThanEqual((v_1 << mix(uvec2(0u), uvec2(16u), lessThanEqual(v_1, uvec2(65535u)))), uvec2(16777215u)))), uvec2(268435455u)))) << mix(uvec2(0u), uvec2(2u), lessThanEqual((((v_1 << mix(uvec2(0u), uvec2(16u), lessThanEqual(v_1, uvec2(65535u)))) << mix(uvec2(0u), uvec2(8u), lessThanEqual((v_1 << mix(uvec2(0u), uvec2(16u), lessThanEqual(v_1, uvec2(65535u)))), uvec2(16777215u)))) << mix(uvec2(0u), uvec2(4u), lessThanEqual(((v_1 << mix(uvec2(0u), uvec2(16u), lessThanEqual(v_1, uvec2(65535u)))) << mix(uvec2(0u), uvec2(8u), lessThanEqual((v_1 << mix(uvec2(0u), uvec2(16u), lessThanEqual(v_1, uvec2(65535u)))), uvec2(16777215u)))), uvec2(268435455u)))), uvec2(1073741823u)))), uvec2(2147483647u))) | mix(uvec2(0u), uvec2(1u), equal(((((v_1 << mix(uvec2(0u), uvec2(16u), lessThanEqual(v_1, uvec2(65535u)))) << mix(uvec2(0u), uvec2(8u), lessThanEqual((v_1 << mix(uvec2(0u), uvec2(16u), lessThanEqual(v_1, uvec2(65535u)))), uvec2(16777215u)))) << mix(uvec2(0u), uvec2(4u), lessThanEqual(((v_1 << mix(uvec2(0u), uvec2(16u), lessThanEqual(v_1, uvec2(65535u)))) << mix(uvec2(0u), uvec2(8u), lessThanEqual((v_1 << mix(uvec2(0u), uvec2(16u), lessThanEqual(v_1, uvec2(65535u)))), uvec2(16777215u)))), uvec2(268435455u)))) << mix(uvec2(0u), uvec2(2u), lessThanEqual((((v_1 << mix(uvec2(0u), uvec2(16u), lessThanEqual(v_1, uvec2(65535u)))) << mix(uvec2(0u), uvec2(8u), lessThanEqual((v_1 << mix(uvec2(0u), uvec2(16u), lessThanEqual(v_1, uvec2(65535u)))), uvec2(16777215u)))) << mix(uvec2(0u), uvec2(4u), lessThanEqual(((v_1 << mix(uvec2(0u), uvec2(16u), lessThanEqual(v_1, uvec2(65535u)))) << mix(uvec2(0u), uvec2(8u), lessThanEqual((v_1 << mix(uvec2(0u), uvec2(16u), lessThanEqual(v_1, uvec2(65535u)))), uvec2(16777215u)))), uvec2(268435455u)))), uvec2(1073741823u)))), uvec2(0u)))))))) + mix(uvec2(0u), uvec2(1u), equal(((((v_1 << mix(uvec2(0u), uvec2(16u), lessThanEqual(v_1, uvec2(65535u)))) << mix(uvec2(0u), uvec2(8u), lessThanEqual((v_1 << mix(uvec2(0u), uvec2(16u), lessThanEqual(v_1, uvec2(65535u)))), uvec2(16777215u)))) << mix(uvec2(0u), uvec2(4u), lessThanEqual(((v_1 << mix(uvec2(0u), uvec2(16u), lessThanEqual(v_1, uvec2(65535u)))) << mix(uvec2(0u), uvec2(8u), lessThanEqual((v_1 << mix(uvec2(0u), uvec2(16u), lessThanEqual(v_1, uvec2(65535u)))), uvec2(16777215u)))), uvec2(268435455u)))) << mix(uvec2(0u), uvec2(2u), lessThanEqual((((v_1 << mix(uvec2(0u), uvec2(16u), lessThanEqual(v_1, uvec2(65535u)))) << mix(uvec2(0u), uvec2(8u), lessThanEqual((v_1 << mix(uvec2(0u), uvec2(16u), lessThanEqual(v_1, uvec2(65535u)))), uvec2(16777215u)))) << mix(uvec2(0u), uvec2(4u), lessThanEqual(((v_1 << mix(uvec2(0u), uvec2(16u), lessThanEqual(v_1, uvec2(65535u)))) << mix(uvec2(0u), uvec2(8u), lessThanEqual((v_1 << mix(uvec2(0u), uvec2(16u), lessThanEqual(v_1, uvec2(65535u)))), uvec2(16777215u)))), uvec2(268435455u)))), uvec2(1073741823u)))), uvec2(0u)))));
return res;
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
@@ -55,13 +43,7 @@
ivec2 countLeadingZeros_858d40() {
ivec2 arg_0 = ivec2(1);
uvec2 v = uvec2(arg_0);
- uvec2 v_1 = mix(uvec2(0u), uvec2(16u), lessThanEqual(v, uvec2(65535u)));
- uvec2 v_2 = mix(uvec2(0u), uvec2(8u), lessThanEqual((v << v_1), uvec2(16777215u)));
- uvec2 v_3 = mix(uvec2(0u), uvec2(4u), lessThanEqual(((v << v_1) << v_2), uvec2(268435455u)));
- uvec2 v_4 = mix(uvec2(0u), uvec2(2u), lessThanEqual((((v << v_1) << v_2) << v_3), uvec2(1073741823u)));
- uvec2 v_5 = mix(uvec2(0u), uvec2(1u), lessThanEqual(((((v << v_1) << v_2) << v_3) << v_4), uvec2(2147483647u)));
- uvec2 v_6 = mix(uvec2(0u), uvec2(1u), equal(((((v << v_1) << v_2) << v_3) << v_4), uvec2(0u)));
- ivec2 res = ivec2(((v_1 | (v_2 | (v_3 | (v_4 | (v_5 | v_6))))) + v_6));
+ ivec2 res = ivec2(((mix(uvec2(0u), uvec2(16u), lessThanEqual(v, uvec2(65535u))) | (mix(uvec2(0u), uvec2(8u), lessThanEqual((v << mix(uvec2(0u), uvec2(16u), lessThanEqual(v, uvec2(65535u)))), uvec2(16777215u))) | (mix(uvec2(0u), uvec2(4u), lessThanEqual(((v << mix(uvec2(0u), uvec2(16u), lessThanEqual(v, uvec2(65535u)))) << mix(uvec2(0u), uvec2(8u), lessThanEqual((v << mix(uvec2(0u), uvec2(16u), lessThanEqual(v, uvec2(65535u)))), uvec2(16777215u)))), uvec2(268435455u))) | (mix(uvec2(0u), uvec2(2u), lessThanEqual((((v << mix(uvec2(0u), uvec2(16u), lessThanEqual(v, uvec2(65535u)))) << mix(uvec2(0u), uvec2(8u), lessThanEqual((v << mix(uvec2(0u), uvec2(16u), lessThanEqual(v, uvec2(65535u)))), uvec2(16777215u)))) << mix(uvec2(0u), uvec2(4u), lessThanEqual(((v << mix(uvec2(0u), uvec2(16u), lessThanEqual(v, uvec2(65535u)))) << mix(uvec2(0u), uvec2(8u), lessThanEqual((v << mix(uvec2(0u), uvec2(16u), lessThanEqual(v, uvec2(65535u)))), uvec2(16777215u)))), uvec2(268435455u)))), uvec2(1073741823u))) | (mix(uvec2(0u), uvec2(1u), lessThanEqual(((((v << mix(uvec2(0u), uvec2(16u), lessThanEqual(v, uvec2(65535u)))) << mix(uvec2(0u), uvec2(8u), lessThanEqual((v << mix(uvec2(0u), uvec2(16u), lessThanEqual(v, uvec2(65535u)))), uvec2(16777215u)))) << mix(uvec2(0u), uvec2(4u), lessThanEqual(((v << mix(uvec2(0u), uvec2(16u), lessThanEqual(v, uvec2(65535u)))) << mix(uvec2(0u), uvec2(8u), lessThanEqual((v << mix(uvec2(0u), uvec2(16u), lessThanEqual(v, uvec2(65535u)))), uvec2(16777215u)))), uvec2(268435455u)))) << mix(uvec2(0u), uvec2(2u), lessThanEqual((((v << mix(uvec2(0u), uvec2(16u), lessThanEqual(v, uvec2(65535u)))) << mix(uvec2(0u), uvec2(8u), lessThanEqual((v << mix(uvec2(0u), uvec2(16u), lessThanEqual(v, uvec2(65535u)))), uvec2(16777215u)))) << mix(uvec2(0u), uvec2(4u), lessThanEqual(((v << mix(uvec2(0u), uvec2(16u), lessThanEqual(v, uvec2(65535u)))) << mix(uvec2(0u), uvec2(8u), lessThanEqual((v << mix(uvec2(0u), uvec2(16u), lessThanEqual(v, uvec2(65535u)))), uvec2(16777215u)))), uvec2(268435455u)))), uvec2(1073741823u)))), uvec2(2147483647u))) | mix(uvec2(0u), uvec2(1u), equal(((((v << mix(uvec2(0u), uvec2(16u), lessThanEqual(v, uvec2(65535u)))) << mix(uvec2(0u), uvec2(8u), lessThanEqual((v << mix(uvec2(0u), uvec2(16u), lessThanEqual(v, uvec2(65535u)))), uvec2(16777215u)))) << mix(uvec2(0u), uvec2(4u), lessThanEqual(((v << mix(uvec2(0u), uvec2(16u), lessThanEqual(v, uvec2(65535u)))) << mix(uvec2(0u), uvec2(8u), lessThanEqual((v << mix(uvec2(0u), uvec2(16u), lessThanEqual(v, uvec2(65535u)))), uvec2(16777215u)))), uvec2(268435455u)))) << mix(uvec2(0u), uvec2(2u), lessThanEqual((((v << mix(uvec2(0u), uvec2(16u), lessThanEqual(v, uvec2(65535u)))) << mix(uvec2(0u), uvec2(8u), lessThanEqual((v << mix(uvec2(0u), uvec2(16u), lessThanEqual(v, uvec2(65535u)))), uvec2(16777215u)))) << mix(uvec2(0u), uvec2(4u), lessThanEqual(((v << mix(uvec2(0u), uvec2(16u), lessThanEqual(v, uvec2(65535u)))) << mix(uvec2(0u), uvec2(8u), lessThanEqual((v << mix(uvec2(0u), uvec2(16u), lessThanEqual(v, uvec2(65535u)))), uvec2(16777215u)))), uvec2(268435455u)))), uvec2(1073741823u)))), uvec2(0u)))))))) + mix(uvec2(0u), uvec2(1u), equal(((((v << mix(uvec2(0u), uvec2(16u), lessThanEqual(v, uvec2(65535u)))) << mix(uvec2(0u), uvec2(8u), lessThanEqual((v << mix(uvec2(0u), uvec2(16u), lessThanEqual(v, uvec2(65535u)))), uvec2(16777215u)))) << mix(uvec2(0u), uvec2(4u), lessThanEqual(((v << mix(uvec2(0u), uvec2(16u), lessThanEqual(v, uvec2(65535u)))) << mix(uvec2(0u), uvec2(8u), lessThanEqual((v << mix(uvec2(0u), uvec2(16u), lessThanEqual(v, uvec2(65535u)))), uvec2(16777215u)))), uvec2(268435455u)))) << mix(uvec2(0u), uvec2(2u), lessThanEqual((((v << mix(uvec2(0u), uvec2(16u), lessThanEqual(v, uvec2(65535u)))) << mix(uvec2(0u), uvec2(8u), lessThanEqual((v << mix(uvec2(0u), uvec2(16u), lessThanEqual(v, uvec2(65535u)))), uvec2(16777215u)))) << mix(uvec2(0u), uvec2(4u), lessThanEqual(((v << mix(uvec2(0u), uvec2(16u), lessThanEqual(v, uvec2(65535u)))) << mix(uvec2(0u), uvec2(8u), lessThanEqual((v << mix(uvec2(0u), uvec2(16u), lessThanEqual(v, uvec2(65535u)))), uvec2(16777215u)))), uvec2(268435455u)))), uvec2(1073741823u)))), uvec2(0u)))));
return res;
}
VertexOutput vertex_main_inner() {
@@ -71,10 +53,10 @@
return tint_symbol;
}
void main() {
- VertexOutput v_7 = vertex_main_inner();
- gl_Position = v_7.pos;
+ VertexOutput v_1 = vertex_main_inner();
+ gl_Position = v_1.pos;
gl_Position[1u] = -(gl_Position.y);
gl_Position[2u] = ((2.0f * gl_Position.z) - gl_Position.w);
- vertex_main_loc0_Output = v_7.prevent_dce;
+ vertex_main_loc0_Output = v_1.prevent_dce;
gl_PointSize = 1.0f;
}
diff --git a/test/tint/builtins/gen/var/countLeadingZeros/ab6345.wgsl.expected.glsl b/test/tint/builtins/gen/var/countLeadingZeros/ab6345.wgsl.expected.glsl
index 8b2518a..eb6c55a 100644
--- a/test/tint/builtins/gen/var/countLeadingZeros/ab6345.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/countLeadingZeros/ab6345.wgsl.expected.glsl
@@ -9,13 +9,7 @@
uvec3 countLeadingZeros_ab6345() {
uvec3 arg_0 = uvec3(1u);
uvec3 v_1 = arg_0;
- uvec3 v_2 = mix(uvec3(0u), uvec3(16u), lessThanEqual(v_1, uvec3(65535u)));
- uvec3 v_3 = mix(uvec3(0u), uvec3(8u), lessThanEqual((v_1 << v_2), uvec3(16777215u)));
- uvec3 v_4 = mix(uvec3(0u), uvec3(4u), lessThanEqual(((v_1 << v_2) << v_3), uvec3(268435455u)));
- uvec3 v_5 = mix(uvec3(0u), uvec3(2u), lessThanEqual((((v_1 << v_2) << v_3) << v_4), uvec3(1073741823u)));
- uvec3 v_6 = mix(uvec3(0u), uvec3(1u), lessThanEqual(((((v_1 << v_2) << v_3) << v_4) << v_5), uvec3(2147483647u)));
- uvec3 v_7 = mix(uvec3(0u), uvec3(1u), equal(((((v_1 << v_2) << v_3) << v_4) << v_5), uvec3(0u)));
- uvec3 res = ((v_2 | (v_3 | (v_4 | (v_5 | (v_6 | v_7))))) + v_7);
+ uvec3 res = ((mix(uvec3(0u), uvec3(16u), lessThanEqual(v_1, uvec3(65535u))) | (mix(uvec3(0u), uvec3(8u), lessThanEqual((v_1 << mix(uvec3(0u), uvec3(16u), lessThanEqual(v_1, uvec3(65535u)))), uvec3(16777215u))) | (mix(uvec3(0u), uvec3(4u), lessThanEqual(((v_1 << mix(uvec3(0u), uvec3(16u), lessThanEqual(v_1, uvec3(65535u)))) << mix(uvec3(0u), uvec3(8u), lessThanEqual((v_1 << mix(uvec3(0u), uvec3(16u), lessThanEqual(v_1, uvec3(65535u)))), uvec3(16777215u)))), uvec3(268435455u))) | (mix(uvec3(0u), uvec3(2u), lessThanEqual((((v_1 << mix(uvec3(0u), uvec3(16u), lessThanEqual(v_1, uvec3(65535u)))) << mix(uvec3(0u), uvec3(8u), lessThanEqual((v_1 << mix(uvec3(0u), uvec3(16u), lessThanEqual(v_1, uvec3(65535u)))), uvec3(16777215u)))) << mix(uvec3(0u), uvec3(4u), lessThanEqual(((v_1 << mix(uvec3(0u), uvec3(16u), lessThanEqual(v_1, uvec3(65535u)))) << mix(uvec3(0u), uvec3(8u), lessThanEqual((v_1 << mix(uvec3(0u), uvec3(16u), lessThanEqual(v_1, uvec3(65535u)))), uvec3(16777215u)))), uvec3(268435455u)))), uvec3(1073741823u))) | (mix(uvec3(0u), uvec3(1u), lessThanEqual(((((v_1 << mix(uvec3(0u), uvec3(16u), lessThanEqual(v_1, uvec3(65535u)))) << mix(uvec3(0u), uvec3(8u), lessThanEqual((v_1 << mix(uvec3(0u), uvec3(16u), lessThanEqual(v_1, uvec3(65535u)))), uvec3(16777215u)))) << mix(uvec3(0u), uvec3(4u), lessThanEqual(((v_1 << mix(uvec3(0u), uvec3(16u), lessThanEqual(v_1, uvec3(65535u)))) << mix(uvec3(0u), uvec3(8u), lessThanEqual((v_1 << mix(uvec3(0u), uvec3(16u), lessThanEqual(v_1, uvec3(65535u)))), uvec3(16777215u)))), uvec3(268435455u)))) << mix(uvec3(0u), uvec3(2u), lessThanEqual((((v_1 << mix(uvec3(0u), uvec3(16u), lessThanEqual(v_1, uvec3(65535u)))) << mix(uvec3(0u), uvec3(8u), lessThanEqual((v_1 << mix(uvec3(0u), uvec3(16u), lessThanEqual(v_1, uvec3(65535u)))), uvec3(16777215u)))) << mix(uvec3(0u), uvec3(4u), lessThanEqual(((v_1 << mix(uvec3(0u), uvec3(16u), lessThanEqual(v_1, uvec3(65535u)))) << mix(uvec3(0u), uvec3(8u), lessThanEqual((v_1 << mix(uvec3(0u), uvec3(16u), lessThanEqual(v_1, uvec3(65535u)))), uvec3(16777215u)))), uvec3(268435455u)))), uvec3(1073741823u)))), uvec3(2147483647u))) | mix(uvec3(0u), uvec3(1u), equal(((((v_1 << mix(uvec3(0u), uvec3(16u), lessThanEqual(v_1, uvec3(65535u)))) << mix(uvec3(0u), uvec3(8u), lessThanEqual((v_1 << mix(uvec3(0u), uvec3(16u), lessThanEqual(v_1, uvec3(65535u)))), uvec3(16777215u)))) << mix(uvec3(0u), uvec3(4u), lessThanEqual(((v_1 << mix(uvec3(0u), uvec3(16u), lessThanEqual(v_1, uvec3(65535u)))) << mix(uvec3(0u), uvec3(8u), lessThanEqual((v_1 << mix(uvec3(0u), uvec3(16u), lessThanEqual(v_1, uvec3(65535u)))), uvec3(16777215u)))), uvec3(268435455u)))) << mix(uvec3(0u), uvec3(2u), lessThanEqual((((v_1 << mix(uvec3(0u), uvec3(16u), lessThanEqual(v_1, uvec3(65535u)))) << mix(uvec3(0u), uvec3(8u), lessThanEqual((v_1 << mix(uvec3(0u), uvec3(16u), lessThanEqual(v_1, uvec3(65535u)))), uvec3(16777215u)))) << mix(uvec3(0u), uvec3(4u), lessThanEqual(((v_1 << mix(uvec3(0u), uvec3(16u), lessThanEqual(v_1, uvec3(65535u)))) << mix(uvec3(0u), uvec3(8u), lessThanEqual((v_1 << mix(uvec3(0u), uvec3(16u), lessThanEqual(v_1, uvec3(65535u)))), uvec3(16777215u)))), uvec3(268435455u)))), uvec3(1073741823u)))), uvec3(0u)))))))) + mix(uvec3(0u), uvec3(1u), equal(((((v_1 << mix(uvec3(0u), uvec3(16u), lessThanEqual(v_1, uvec3(65535u)))) << mix(uvec3(0u), uvec3(8u), lessThanEqual((v_1 << mix(uvec3(0u), uvec3(16u), lessThanEqual(v_1, uvec3(65535u)))), uvec3(16777215u)))) << mix(uvec3(0u), uvec3(4u), lessThanEqual(((v_1 << mix(uvec3(0u), uvec3(16u), lessThanEqual(v_1, uvec3(65535u)))) << mix(uvec3(0u), uvec3(8u), lessThanEqual((v_1 << mix(uvec3(0u), uvec3(16u), lessThanEqual(v_1, uvec3(65535u)))), uvec3(16777215u)))), uvec3(268435455u)))) << mix(uvec3(0u), uvec3(2u), lessThanEqual((((v_1 << mix(uvec3(0u), uvec3(16u), lessThanEqual(v_1, uvec3(65535u)))) << mix(uvec3(0u), uvec3(8u), lessThanEqual((v_1 << mix(uvec3(0u), uvec3(16u), lessThanEqual(v_1, uvec3(65535u)))), uvec3(16777215u)))) << mix(uvec3(0u), uvec3(4u), lessThanEqual(((v_1 << mix(uvec3(0u), uvec3(16u), lessThanEqual(v_1, uvec3(65535u)))) << mix(uvec3(0u), uvec3(8u), lessThanEqual((v_1 << mix(uvec3(0u), uvec3(16u), lessThanEqual(v_1, uvec3(65535u)))), uvec3(16777215u)))), uvec3(268435455u)))), uvec3(1073741823u)))), uvec3(0u))));
return res;
}
void main() {
@@ -30,13 +24,7 @@
uvec3 countLeadingZeros_ab6345() {
uvec3 arg_0 = uvec3(1u);
uvec3 v_1 = arg_0;
- uvec3 v_2 = mix(uvec3(0u), uvec3(16u), lessThanEqual(v_1, uvec3(65535u)));
- uvec3 v_3 = mix(uvec3(0u), uvec3(8u), lessThanEqual((v_1 << v_2), uvec3(16777215u)));
- uvec3 v_4 = mix(uvec3(0u), uvec3(4u), lessThanEqual(((v_1 << v_2) << v_3), uvec3(268435455u)));
- uvec3 v_5 = mix(uvec3(0u), uvec3(2u), lessThanEqual((((v_1 << v_2) << v_3) << v_4), uvec3(1073741823u)));
- uvec3 v_6 = mix(uvec3(0u), uvec3(1u), lessThanEqual(((((v_1 << v_2) << v_3) << v_4) << v_5), uvec3(2147483647u)));
- uvec3 v_7 = mix(uvec3(0u), uvec3(1u), equal(((((v_1 << v_2) << v_3) << v_4) << v_5), uvec3(0u)));
- uvec3 res = ((v_2 | (v_3 | (v_4 | (v_5 | (v_6 | v_7))))) + v_7);
+ uvec3 res = ((mix(uvec3(0u), uvec3(16u), lessThanEqual(v_1, uvec3(65535u))) | (mix(uvec3(0u), uvec3(8u), lessThanEqual((v_1 << mix(uvec3(0u), uvec3(16u), lessThanEqual(v_1, uvec3(65535u)))), uvec3(16777215u))) | (mix(uvec3(0u), uvec3(4u), lessThanEqual(((v_1 << mix(uvec3(0u), uvec3(16u), lessThanEqual(v_1, uvec3(65535u)))) << mix(uvec3(0u), uvec3(8u), lessThanEqual((v_1 << mix(uvec3(0u), uvec3(16u), lessThanEqual(v_1, uvec3(65535u)))), uvec3(16777215u)))), uvec3(268435455u))) | (mix(uvec3(0u), uvec3(2u), lessThanEqual((((v_1 << mix(uvec3(0u), uvec3(16u), lessThanEqual(v_1, uvec3(65535u)))) << mix(uvec3(0u), uvec3(8u), lessThanEqual((v_1 << mix(uvec3(0u), uvec3(16u), lessThanEqual(v_1, uvec3(65535u)))), uvec3(16777215u)))) << mix(uvec3(0u), uvec3(4u), lessThanEqual(((v_1 << mix(uvec3(0u), uvec3(16u), lessThanEqual(v_1, uvec3(65535u)))) << mix(uvec3(0u), uvec3(8u), lessThanEqual((v_1 << mix(uvec3(0u), uvec3(16u), lessThanEqual(v_1, uvec3(65535u)))), uvec3(16777215u)))), uvec3(268435455u)))), uvec3(1073741823u))) | (mix(uvec3(0u), uvec3(1u), lessThanEqual(((((v_1 << mix(uvec3(0u), uvec3(16u), lessThanEqual(v_1, uvec3(65535u)))) << mix(uvec3(0u), uvec3(8u), lessThanEqual((v_1 << mix(uvec3(0u), uvec3(16u), lessThanEqual(v_1, uvec3(65535u)))), uvec3(16777215u)))) << mix(uvec3(0u), uvec3(4u), lessThanEqual(((v_1 << mix(uvec3(0u), uvec3(16u), lessThanEqual(v_1, uvec3(65535u)))) << mix(uvec3(0u), uvec3(8u), lessThanEqual((v_1 << mix(uvec3(0u), uvec3(16u), lessThanEqual(v_1, uvec3(65535u)))), uvec3(16777215u)))), uvec3(268435455u)))) << mix(uvec3(0u), uvec3(2u), lessThanEqual((((v_1 << mix(uvec3(0u), uvec3(16u), lessThanEqual(v_1, uvec3(65535u)))) << mix(uvec3(0u), uvec3(8u), lessThanEqual((v_1 << mix(uvec3(0u), uvec3(16u), lessThanEqual(v_1, uvec3(65535u)))), uvec3(16777215u)))) << mix(uvec3(0u), uvec3(4u), lessThanEqual(((v_1 << mix(uvec3(0u), uvec3(16u), lessThanEqual(v_1, uvec3(65535u)))) << mix(uvec3(0u), uvec3(8u), lessThanEqual((v_1 << mix(uvec3(0u), uvec3(16u), lessThanEqual(v_1, uvec3(65535u)))), uvec3(16777215u)))), uvec3(268435455u)))), uvec3(1073741823u)))), uvec3(2147483647u))) | mix(uvec3(0u), uvec3(1u), equal(((((v_1 << mix(uvec3(0u), uvec3(16u), lessThanEqual(v_1, uvec3(65535u)))) << mix(uvec3(0u), uvec3(8u), lessThanEqual((v_1 << mix(uvec3(0u), uvec3(16u), lessThanEqual(v_1, uvec3(65535u)))), uvec3(16777215u)))) << mix(uvec3(0u), uvec3(4u), lessThanEqual(((v_1 << mix(uvec3(0u), uvec3(16u), lessThanEqual(v_1, uvec3(65535u)))) << mix(uvec3(0u), uvec3(8u), lessThanEqual((v_1 << mix(uvec3(0u), uvec3(16u), lessThanEqual(v_1, uvec3(65535u)))), uvec3(16777215u)))), uvec3(268435455u)))) << mix(uvec3(0u), uvec3(2u), lessThanEqual((((v_1 << mix(uvec3(0u), uvec3(16u), lessThanEqual(v_1, uvec3(65535u)))) << mix(uvec3(0u), uvec3(8u), lessThanEqual((v_1 << mix(uvec3(0u), uvec3(16u), lessThanEqual(v_1, uvec3(65535u)))), uvec3(16777215u)))) << mix(uvec3(0u), uvec3(4u), lessThanEqual(((v_1 << mix(uvec3(0u), uvec3(16u), lessThanEqual(v_1, uvec3(65535u)))) << mix(uvec3(0u), uvec3(8u), lessThanEqual((v_1 << mix(uvec3(0u), uvec3(16u), lessThanEqual(v_1, uvec3(65535u)))), uvec3(16777215u)))), uvec3(268435455u)))), uvec3(1073741823u)))), uvec3(0u)))))))) + mix(uvec3(0u), uvec3(1u), equal(((((v_1 << mix(uvec3(0u), uvec3(16u), lessThanEqual(v_1, uvec3(65535u)))) << mix(uvec3(0u), uvec3(8u), lessThanEqual((v_1 << mix(uvec3(0u), uvec3(16u), lessThanEqual(v_1, uvec3(65535u)))), uvec3(16777215u)))) << mix(uvec3(0u), uvec3(4u), lessThanEqual(((v_1 << mix(uvec3(0u), uvec3(16u), lessThanEqual(v_1, uvec3(65535u)))) << mix(uvec3(0u), uvec3(8u), lessThanEqual((v_1 << mix(uvec3(0u), uvec3(16u), lessThanEqual(v_1, uvec3(65535u)))), uvec3(16777215u)))), uvec3(268435455u)))) << mix(uvec3(0u), uvec3(2u), lessThanEqual((((v_1 << mix(uvec3(0u), uvec3(16u), lessThanEqual(v_1, uvec3(65535u)))) << mix(uvec3(0u), uvec3(8u), lessThanEqual((v_1 << mix(uvec3(0u), uvec3(16u), lessThanEqual(v_1, uvec3(65535u)))), uvec3(16777215u)))) << mix(uvec3(0u), uvec3(4u), lessThanEqual(((v_1 << mix(uvec3(0u), uvec3(16u), lessThanEqual(v_1, uvec3(65535u)))) << mix(uvec3(0u), uvec3(8u), lessThanEqual((v_1 << mix(uvec3(0u), uvec3(16u), lessThanEqual(v_1, uvec3(65535u)))), uvec3(16777215u)))), uvec3(268435455u)))), uvec3(1073741823u)))), uvec3(0u))));
return res;
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
@@ -55,13 +43,7 @@
uvec3 countLeadingZeros_ab6345() {
uvec3 arg_0 = uvec3(1u);
uvec3 v = arg_0;
- uvec3 v_1 = mix(uvec3(0u), uvec3(16u), lessThanEqual(v, uvec3(65535u)));
- uvec3 v_2 = mix(uvec3(0u), uvec3(8u), lessThanEqual((v << v_1), uvec3(16777215u)));
- uvec3 v_3 = mix(uvec3(0u), uvec3(4u), lessThanEqual(((v << v_1) << v_2), uvec3(268435455u)));
- uvec3 v_4 = mix(uvec3(0u), uvec3(2u), lessThanEqual((((v << v_1) << v_2) << v_3), uvec3(1073741823u)));
- uvec3 v_5 = mix(uvec3(0u), uvec3(1u), lessThanEqual(((((v << v_1) << v_2) << v_3) << v_4), uvec3(2147483647u)));
- uvec3 v_6 = mix(uvec3(0u), uvec3(1u), equal(((((v << v_1) << v_2) << v_3) << v_4), uvec3(0u)));
- uvec3 res = ((v_1 | (v_2 | (v_3 | (v_4 | (v_5 | v_6))))) + v_6);
+ uvec3 res = ((mix(uvec3(0u), uvec3(16u), lessThanEqual(v, uvec3(65535u))) | (mix(uvec3(0u), uvec3(8u), lessThanEqual((v << mix(uvec3(0u), uvec3(16u), lessThanEqual(v, uvec3(65535u)))), uvec3(16777215u))) | (mix(uvec3(0u), uvec3(4u), lessThanEqual(((v << mix(uvec3(0u), uvec3(16u), lessThanEqual(v, uvec3(65535u)))) << mix(uvec3(0u), uvec3(8u), lessThanEqual((v << mix(uvec3(0u), uvec3(16u), lessThanEqual(v, uvec3(65535u)))), uvec3(16777215u)))), uvec3(268435455u))) | (mix(uvec3(0u), uvec3(2u), lessThanEqual((((v << mix(uvec3(0u), uvec3(16u), lessThanEqual(v, uvec3(65535u)))) << mix(uvec3(0u), uvec3(8u), lessThanEqual((v << mix(uvec3(0u), uvec3(16u), lessThanEqual(v, uvec3(65535u)))), uvec3(16777215u)))) << mix(uvec3(0u), uvec3(4u), lessThanEqual(((v << mix(uvec3(0u), uvec3(16u), lessThanEqual(v, uvec3(65535u)))) << mix(uvec3(0u), uvec3(8u), lessThanEqual((v << mix(uvec3(0u), uvec3(16u), lessThanEqual(v, uvec3(65535u)))), uvec3(16777215u)))), uvec3(268435455u)))), uvec3(1073741823u))) | (mix(uvec3(0u), uvec3(1u), lessThanEqual(((((v << mix(uvec3(0u), uvec3(16u), lessThanEqual(v, uvec3(65535u)))) << mix(uvec3(0u), uvec3(8u), lessThanEqual((v << mix(uvec3(0u), uvec3(16u), lessThanEqual(v, uvec3(65535u)))), uvec3(16777215u)))) << mix(uvec3(0u), uvec3(4u), lessThanEqual(((v << mix(uvec3(0u), uvec3(16u), lessThanEqual(v, uvec3(65535u)))) << mix(uvec3(0u), uvec3(8u), lessThanEqual((v << mix(uvec3(0u), uvec3(16u), lessThanEqual(v, uvec3(65535u)))), uvec3(16777215u)))), uvec3(268435455u)))) << mix(uvec3(0u), uvec3(2u), lessThanEqual((((v << mix(uvec3(0u), uvec3(16u), lessThanEqual(v, uvec3(65535u)))) << mix(uvec3(0u), uvec3(8u), lessThanEqual((v << mix(uvec3(0u), uvec3(16u), lessThanEqual(v, uvec3(65535u)))), uvec3(16777215u)))) << mix(uvec3(0u), uvec3(4u), lessThanEqual(((v << mix(uvec3(0u), uvec3(16u), lessThanEqual(v, uvec3(65535u)))) << mix(uvec3(0u), uvec3(8u), lessThanEqual((v << mix(uvec3(0u), uvec3(16u), lessThanEqual(v, uvec3(65535u)))), uvec3(16777215u)))), uvec3(268435455u)))), uvec3(1073741823u)))), uvec3(2147483647u))) | mix(uvec3(0u), uvec3(1u), equal(((((v << mix(uvec3(0u), uvec3(16u), lessThanEqual(v, uvec3(65535u)))) << mix(uvec3(0u), uvec3(8u), lessThanEqual((v << mix(uvec3(0u), uvec3(16u), lessThanEqual(v, uvec3(65535u)))), uvec3(16777215u)))) << mix(uvec3(0u), uvec3(4u), lessThanEqual(((v << mix(uvec3(0u), uvec3(16u), lessThanEqual(v, uvec3(65535u)))) << mix(uvec3(0u), uvec3(8u), lessThanEqual((v << mix(uvec3(0u), uvec3(16u), lessThanEqual(v, uvec3(65535u)))), uvec3(16777215u)))), uvec3(268435455u)))) << mix(uvec3(0u), uvec3(2u), lessThanEqual((((v << mix(uvec3(0u), uvec3(16u), lessThanEqual(v, uvec3(65535u)))) << mix(uvec3(0u), uvec3(8u), lessThanEqual((v << mix(uvec3(0u), uvec3(16u), lessThanEqual(v, uvec3(65535u)))), uvec3(16777215u)))) << mix(uvec3(0u), uvec3(4u), lessThanEqual(((v << mix(uvec3(0u), uvec3(16u), lessThanEqual(v, uvec3(65535u)))) << mix(uvec3(0u), uvec3(8u), lessThanEqual((v << mix(uvec3(0u), uvec3(16u), lessThanEqual(v, uvec3(65535u)))), uvec3(16777215u)))), uvec3(268435455u)))), uvec3(1073741823u)))), uvec3(0u)))))))) + mix(uvec3(0u), uvec3(1u), equal(((((v << mix(uvec3(0u), uvec3(16u), lessThanEqual(v, uvec3(65535u)))) << mix(uvec3(0u), uvec3(8u), lessThanEqual((v << mix(uvec3(0u), uvec3(16u), lessThanEqual(v, uvec3(65535u)))), uvec3(16777215u)))) << mix(uvec3(0u), uvec3(4u), lessThanEqual(((v << mix(uvec3(0u), uvec3(16u), lessThanEqual(v, uvec3(65535u)))) << mix(uvec3(0u), uvec3(8u), lessThanEqual((v << mix(uvec3(0u), uvec3(16u), lessThanEqual(v, uvec3(65535u)))), uvec3(16777215u)))), uvec3(268435455u)))) << mix(uvec3(0u), uvec3(2u), lessThanEqual((((v << mix(uvec3(0u), uvec3(16u), lessThanEqual(v, uvec3(65535u)))) << mix(uvec3(0u), uvec3(8u), lessThanEqual((v << mix(uvec3(0u), uvec3(16u), lessThanEqual(v, uvec3(65535u)))), uvec3(16777215u)))) << mix(uvec3(0u), uvec3(4u), lessThanEqual(((v << mix(uvec3(0u), uvec3(16u), lessThanEqual(v, uvec3(65535u)))) << mix(uvec3(0u), uvec3(8u), lessThanEqual((v << mix(uvec3(0u), uvec3(16u), lessThanEqual(v, uvec3(65535u)))), uvec3(16777215u)))), uvec3(268435455u)))), uvec3(1073741823u)))), uvec3(0u))));
return res;
}
VertexOutput vertex_main_inner() {
@@ -71,10 +53,10 @@
return tint_symbol;
}
void main() {
- VertexOutput v_7 = vertex_main_inner();
- gl_Position = v_7.pos;
+ VertexOutput v_1 = vertex_main_inner();
+ gl_Position = v_1.pos;
gl_Position[1u] = -(gl_Position.y);
gl_Position[2u] = ((2.0f * gl_Position.z) - gl_Position.w);
- vertex_main_loc0_Output = v_7.prevent_dce;
+ vertex_main_loc0_Output = v_1.prevent_dce;
gl_PointSize = 1.0f;
}
diff --git a/test/tint/builtins/gen/var/countLeadingZeros/eab32b.wgsl.expected.glsl b/test/tint/builtins/gen/var/countLeadingZeros/eab32b.wgsl.expected.glsl
index 14c858e..3eafa0b 100644
--- a/test/tint/builtins/gen/var/countLeadingZeros/eab32b.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/countLeadingZeros/eab32b.wgsl.expected.glsl
@@ -9,13 +9,7 @@
ivec4 countLeadingZeros_eab32b() {
ivec4 arg_0 = ivec4(1);
uvec4 v_1 = uvec4(arg_0);
- uvec4 v_2 = mix(uvec4(0u), uvec4(16u), lessThanEqual(v_1, uvec4(65535u)));
- uvec4 v_3 = mix(uvec4(0u), uvec4(8u), lessThanEqual((v_1 << v_2), uvec4(16777215u)));
- uvec4 v_4 = mix(uvec4(0u), uvec4(4u), lessThanEqual(((v_1 << v_2) << v_3), uvec4(268435455u)));
- uvec4 v_5 = mix(uvec4(0u), uvec4(2u), lessThanEqual((((v_1 << v_2) << v_3) << v_4), uvec4(1073741823u)));
- uvec4 v_6 = mix(uvec4(0u), uvec4(1u), lessThanEqual(((((v_1 << v_2) << v_3) << v_4) << v_5), uvec4(2147483647u)));
- uvec4 v_7 = mix(uvec4(0u), uvec4(1u), equal(((((v_1 << v_2) << v_3) << v_4) << v_5), uvec4(0u)));
- ivec4 res = ivec4(((v_2 | (v_3 | (v_4 | (v_5 | (v_6 | v_7))))) + v_7));
+ ivec4 res = ivec4(((mix(uvec4(0u), uvec4(16u), lessThanEqual(v_1, uvec4(65535u))) | (mix(uvec4(0u), uvec4(8u), lessThanEqual((v_1 << mix(uvec4(0u), uvec4(16u), lessThanEqual(v_1, uvec4(65535u)))), uvec4(16777215u))) | (mix(uvec4(0u), uvec4(4u), lessThanEqual(((v_1 << mix(uvec4(0u), uvec4(16u), lessThanEqual(v_1, uvec4(65535u)))) << mix(uvec4(0u), uvec4(8u), lessThanEqual((v_1 << mix(uvec4(0u), uvec4(16u), lessThanEqual(v_1, uvec4(65535u)))), uvec4(16777215u)))), uvec4(268435455u))) | (mix(uvec4(0u), uvec4(2u), lessThanEqual((((v_1 << mix(uvec4(0u), uvec4(16u), lessThanEqual(v_1, uvec4(65535u)))) << mix(uvec4(0u), uvec4(8u), lessThanEqual((v_1 << mix(uvec4(0u), uvec4(16u), lessThanEqual(v_1, uvec4(65535u)))), uvec4(16777215u)))) << mix(uvec4(0u), uvec4(4u), lessThanEqual(((v_1 << mix(uvec4(0u), uvec4(16u), lessThanEqual(v_1, uvec4(65535u)))) << mix(uvec4(0u), uvec4(8u), lessThanEqual((v_1 << mix(uvec4(0u), uvec4(16u), lessThanEqual(v_1, uvec4(65535u)))), uvec4(16777215u)))), uvec4(268435455u)))), uvec4(1073741823u))) | (mix(uvec4(0u), uvec4(1u), lessThanEqual(((((v_1 << mix(uvec4(0u), uvec4(16u), lessThanEqual(v_1, uvec4(65535u)))) << mix(uvec4(0u), uvec4(8u), lessThanEqual((v_1 << mix(uvec4(0u), uvec4(16u), lessThanEqual(v_1, uvec4(65535u)))), uvec4(16777215u)))) << mix(uvec4(0u), uvec4(4u), lessThanEqual(((v_1 << mix(uvec4(0u), uvec4(16u), lessThanEqual(v_1, uvec4(65535u)))) << mix(uvec4(0u), uvec4(8u), lessThanEqual((v_1 << mix(uvec4(0u), uvec4(16u), lessThanEqual(v_1, uvec4(65535u)))), uvec4(16777215u)))), uvec4(268435455u)))) << mix(uvec4(0u), uvec4(2u), lessThanEqual((((v_1 << mix(uvec4(0u), uvec4(16u), lessThanEqual(v_1, uvec4(65535u)))) << mix(uvec4(0u), uvec4(8u), lessThanEqual((v_1 << mix(uvec4(0u), uvec4(16u), lessThanEqual(v_1, uvec4(65535u)))), uvec4(16777215u)))) << mix(uvec4(0u), uvec4(4u), lessThanEqual(((v_1 << mix(uvec4(0u), uvec4(16u), lessThanEqual(v_1, uvec4(65535u)))) << mix(uvec4(0u), uvec4(8u), lessThanEqual((v_1 << mix(uvec4(0u), uvec4(16u), lessThanEqual(v_1, uvec4(65535u)))), uvec4(16777215u)))), uvec4(268435455u)))), uvec4(1073741823u)))), uvec4(2147483647u))) | mix(uvec4(0u), uvec4(1u), equal(((((v_1 << mix(uvec4(0u), uvec4(16u), lessThanEqual(v_1, uvec4(65535u)))) << mix(uvec4(0u), uvec4(8u), lessThanEqual((v_1 << mix(uvec4(0u), uvec4(16u), lessThanEqual(v_1, uvec4(65535u)))), uvec4(16777215u)))) << mix(uvec4(0u), uvec4(4u), lessThanEqual(((v_1 << mix(uvec4(0u), uvec4(16u), lessThanEqual(v_1, uvec4(65535u)))) << mix(uvec4(0u), uvec4(8u), lessThanEqual((v_1 << mix(uvec4(0u), uvec4(16u), lessThanEqual(v_1, uvec4(65535u)))), uvec4(16777215u)))), uvec4(268435455u)))) << mix(uvec4(0u), uvec4(2u), lessThanEqual((((v_1 << mix(uvec4(0u), uvec4(16u), lessThanEqual(v_1, uvec4(65535u)))) << mix(uvec4(0u), uvec4(8u), lessThanEqual((v_1 << mix(uvec4(0u), uvec4(16u), lessThanEqual(v_1, uvec4(65535u)))), uvec4(16777215u)))) << mix(uvec4(0u), uvec4(4u), lessThanEqual(((v_1 << mix(uvec4(0u), uvec4(16u), lessThanEqual(v_1, uvec4(65535u)))) << mix(uvec4(0u), uvec4(8u), lessThanEqual((v_1 << mix(uvec4(0u), uvec4(16u), lessThanEqual(v_1, uvec4(65535u)))), uvec4(16777215u)))), uvec4(268435455u)))), uvec4(1073741823u)))), uvec4(0u)))))))) + mix(uvec4(0u), uvec4(1u), equal(((((v_1 << mix(uvec4(0u), uvec4(16u), lessThanEqual(v_1, uvec4(65535u)))) << mix(uvec4(0u), uvec4(8u), lessThanEqual((v_1 << mix(uvec4(0u), uvec4(16u), lessThanEqual(v_1, uvec4(65535u)))), uvec4(16777215u)))) << mix(uvec4(0u), uvec4(4u), lessThanEqual(((v_1 << mix(uvec4(0u), uvec4(16u), lessThanEqual(v_1, uvec4(65535u)))) << mix(uvec4(0u), uvec4(8u), lessThanEqual((v_1 << mix(uvec4(0u), uvec4(16u), lessThanEqual(v_1, uvec4(65535u)))), uvec4(16777215u)))), uvec4(268435455u)))) << mix(uvec4(0u), uvec4(2u), lessThanEqual((((v_1 << mix(uvec4(0u), uvec4(16u), lessThanEqual(v_1, uvec4(65535u)))) << mix(uvec4(0u), uvec4(8u), lessThanEqual((v_1 << mix(uvec4(0u), uvec4(16u), lessThanEqual(v_1, uvec4(65535u)))), uvec4(16777215u)))) << mix(uvec4(0u), uvec4(4u), lessThanEqual(((v_1 << mix(uvec4(0u), uvec4(16u), lessThanEqual(v_1, uvec4(65535u)))) << mix(uvec4(0u), uvec4(8u), lessThanEqual((v_1 << mix(uvec4(0u), uvec4(16u), lessThanEqual(v_1, uvec4(65535u)))), uvec4(16777215u)))), uvec4(268435455u)))), uvec4(1073741823u)))), uvec4(0u)))));
return res;
}
void main() {
@@ -30,13 +24,7 @@
ivec4 countLeadingZeros_eab32b() {
ivec4 arg_0 = ivec4(1);
uvec4 v_1 = uvec4(arg_0);
- uvec4 v_2 = mix(uvec4(0u), uvec4(16u), lessThanEqual(v_1, uvec4(65535u)));
- uvec4 v_3 = mix(uvec4(0u), uvec4(8u), lessThanEqual((v_1 << v_2), uvec4(16777215u)));
- uvec4 v_4 = mix(uvec4(0u), uvec4(4u), lessThanEqual(((v_1 << v_2) << v_3), uvec4(268435455u)));
- uvec4 v_5 = mix(uvec4(0u), uvec4(2u), lessThanEqual((((v_1 << v_2) << v_3) << v_4), uvec4(1073741823u)));
- uvec4 v_6 = mix(uvec4(0u), uvec4(1u), lessThanEqual(((((v_1 << v_2) << v_3) << v_4) << v_5), uvec4(2147483647u)));
- uvec4 v_7 = mix(uvec4(0u), uvec4(1u), equal(((((v_1 << v_2) << v_3) << v_4) << v_5), uvec4(0u)));
- ivec4 res = ivec4(((v_2 | (v_3 | (v_4 | (v_5 | (v_6 | v_7))))) + v_7));
+ ivec4 res = ivec4(((mix(uvec4(0u), uvec4(16u), lessThanEqual(v_1, uvec4(65535u))) | (mix(uvec4(0u), uvec4(8u), lessThanEqual((v_1 << mix(uvec4(0u), uvec4(16u), lessThanEqual(v_1, uvec4(65535u)))), uvec4(16777215u))) | (mix(uvec4(0u), uvec4(4u), lessThanEqual(((v_1 << mix(uvec4(0u), uvec4(16u), lessThanEqual(v_1, uvec4(65535u)))) << mix(uvec4(0u), uvec4(8u), lessThanEqual((v_1 << mix(uvec4(0u), uvec4(16u), lessThanEqual(v_1, uvec4(65535u)))), uvec4(16777215u)))), uvec4(268435455u))) | (mix(uvec4(0u), uvec4(2u), lessThanEqual((((v_1 << mix(uvec4(0u), uvec4(16u), lessThanEqual(v_1, uvec4(65535u)))) << mix(uvec4(0u), uvec4(8u), lessThanEqual((v_1 << mix(uvec4(0u), uvec4(16u), lessThanEqual(v_1, uvec4(65535u)))), uvec4(16777215u)))) << mix(uvec4(0u), uvec4(4u), lessThanEqual(((v_1 << mix(uvec4(0u), uvec4(16u), lessThanEqual(v_1, uvec4(65535u)))) << mix(uvec4(0u), uvec4(8u), lessThanEqual((v_1 << mix(uvec4(0u), uvec4(16u), lessThanEqual(v_1, uvec4(65535u)))), uvec4(16777215u)))), uvec4(268435455u)))), uvec4(1073741823u))) | (mix(uvec4(0u), uvec4(1u), lessThanEqual(((((v_1 << mix(uvec4(0u), uvec4(16u), lessThanEqual(v_1, uvec4(65535u)))) << mix(uvec4(0u), uvec4(8u), lessThanEqual((v_1 << mix(uvec4(0u), uvec4(16u), lessThanEqual(v_1, uvec4(65535u)))), uvec4(16777215u)))) << mix(uvec4(0u), uvec4(4u), lessThanEqual(((v_1 << mix(uvec4(0u), uvec4(16u), lessThanEqual(v_1, uvec4(65535u)))) << mix(uvec4(0u), uvec4(8u), lessThanEqual((v_1 << mix(uvec4(0u), uvec4(16u), lessThanEqual(v_1, uvec4(65535u)))), uvec4(16777215u)))), uvec4(268435455u)))) << mix(uvec4(0u), uvec4(2u), lessThanEqual((((v_1 << mix(uvec4(0u), uvec4(16u), lessThanEqual(v_1, uvec4(65535u)))) << mix(uvec4(0u), uvec4(8u), lessThanEqual((v_1 << mix(uvec4(0u), uvec4(16u), lessThanEqual(v_1, uvec4(65535u)))), uvec4(16777215u)))) << mix(uvec4(0u), uvec4(4u), lessThanEqual(((v_1 << mix(uvec4(0u), uvec4(16u), lessThanEqual(v_1, uvec4(65535u)))) << mix(uvec4(0u), uvec4(8u), lessThanEqual((v_1 << mix(uvec4(0u), uvec4(16u), lessThanEqual(v_1, uvec4(65535u)))), uvec4(16777215u)))), uvec4(268435455u)))), uvec4(1073741823u)))), uvec4(2147483647u))) | mix(uvec4(0u), uvec4(1u), equal(((((v_1 << mix(uvec4(0u), uvec4(16u), lessThanEqual(v_1, uvec4(65535u)))) << mix(uvec4(0u), uvec4(8u), lessThanEqual((v_1 << mix(uvec4(0u), uvec4(16u), lessThanEqual(v_1, uvec4(65535u)))), uvec4(16777215u)))) << mix(uvec4(0u), uvec4(4u), lessThanEqual(((v_1 << mix(uvec4(0u), uvec4(16u), lessThanEqual(v_1, uvec4(65535u)))) << mix(uvec4(0u), uvec4(8u), lessThanEqual((v_1 << mix(uvec4(0u), uvec4(16u), lessThanEqual(v_1, uvec4(65535u)))), uvec4(16777215u)))), uvec4(268435455u)))) << mix(uvec4(0u), uvec4(2u), lessThanEqual((((v_1 << mix(uvec4(0u), uvec4(16u), lessThanEqual(v_1, uvec4(65535u)))) << mix(uvec4(0u), uvec4(8u), lessThanEqual((v_1 << mix(uvec4(0u), uvec4(16u), lessThanEqual(v_1, uvec4(65535u)))), uvec4(16777215u)))) << mix(uvec4(0u), uvec4(4u), lessThanEqual(((v_1 << mix(uvec4(0u), uvec4(16u), lessThanEqual(v_1, uvec4(65535u)))) << mix(uvec4(0u), uvec4(8u), lessThanEqual((v_1 << mix(uvec4(0u), uvec4(16u), lessThanEqual(v_1, uvec4(65535u)))), uvec4(16777215u)))), uvec4(268435455u)))), uvec4(1073741823u)))), uvec4(0u)))))))) + mix(uvec4(0u), uvec4(1u), equal(((((v_1 << mix(uvec4(0u), uvec4(16u), lessThanEqual(v_1, uvec4(65535u)))) << mix(uvec4(0u), uvec4(8u), lessThanEqual((v_1 << mix(uvec4(0u), uvec4(16u), lessThanEqual(v_1, uvec4(65535u)))), uvec4(16777215u)))) << mix(uvec4(0u), uvec4(4u), lessThanEqual(((v_1 << mix(uvec4(0u), uvec4(16u), lessThanEqual(v_1, uvec4(65535u)))) << mix(uvec4(0u), uvec4(8u), lessThanEqual((v_1 << mix(uvec4(0u), uvec4(16u), lessThanEqual(v_1, uvec4(65535u)))), uvec4(16777215u)))), uvec4(268435455u)))) << mix(uvec4(0u), uvec4(2u), lessThanEqual((((v_1 << mix(uvec4(0u), uvec4(16u), lessThanEqual(v_1, uvec4(65535u)))) << mix(uvec4(0u), uvec4(8u), lessThanEqual((v_1 << mix(uvec4(0u), uvec4(16u), lessThanEqual(v_1, uvec4(65535u)))), uvec4(16777215u)))) << mix(uvec4(0u), uvec4(4u), lessThanEqual(((v_1 << mix(uvec4(0u), uvec4(16u), lessThanEqual(v_1, uvec4(65535u)))) << mix(uvec4(0u), uvec4(8u), lessThanEqual((v_1 << mix(uvec4(0u), uvec4(16u), lessThanEqual(v_1, uvec4(65535u)))), uvec4(16777215u)))), uvec4(268435455u)))), uvec4(1073741823u)))), uvec4(0u)))));
return res;
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
@@ -55,13 +43,7 @@
ivec4 countLeadingZeros_eab32b() {
ivec4 arg_0 = ivec4(1);
uvec4 v = uvec4(arg_0);
- uvec4 v_1 = mix(uvec4(0u), uvec4(16u), lessThanEqual(v, uvec4(65535u)));
- uvec4 v_2 = mix(uvec4(0u), uvec4(8u), lessThanEqual((v << v_1), uvec4(16777215u)));
- uvec4 v_3 = mix(uvec4(0u), uvec4(4u), lessThanEqual(((v << v_1) << v_2), uvec4(268435455u)));
- uvec4 v_4 = mix(uvec4(0u), uvec4(2u), lessThanEqual((((v << v_1) << v_2) << v_3), uvec4(1073741823u)));
- uvec4 v_5 = mix(uvec4(0u), uvec4(1u), lessThanEqual(((((v << v_1) << v_2) << v_3) << v_4), uvec4(2147483647u)));
- uvec4 v_6 = mix(uvec4(0u), uvec4(1u), equal(((((v << v_1) << v_2) << v_3) << v_4), uvec4(0u)));
- ivec4 res = ivec4(((v_1 | (v_2 | (v_3 | (v_4 | (v_5 | v_6))))) + v_6));
+ ivec4 res = ivec4(((mix(uvec4(0u), uvec4(16u), lessThanEqual(v, uvec4(65535u))) | (mix(uvec4(0u), uvec4(8u), lessThanEqual((v << mix(uvec4(0u), uvec4(16u), lessThanEqual(v, uvec4(65535u)))), uvec4(16777215u))) | (mix(uvec4(0u), uvec4(4u), lessThanEqual(((v << mix(uvec4(0u), uvec4(16u), lessThanEqual(v, uvec4(65535u)))) << mix(uvec4(0u), uvec4(8u), lessThanEqual((v << mix(uvec4(0u), uvec4(16u), lessThanEqual(v, uvec4(65535u)))), uvec4(16777215u)))), uvec4(268435455u))) | (mix(uvec4(0u), uvec4(2u), lessThanEqual((((v << mix(uvec4(0u), uvec4(16u), lessThanEqual(v, uvec4(65535u)))) << mix(uvec4(0u), uvec4(8u), lessThanEqual((v << mix(uvec4(0u), uvec4(16u), lessThanEqual(v, uvec4(65535u)))), uvec4(16777215u)))) << mix(uvec4(0u), uvec4(4u), lessThanEqual(((v << mix(uvec4(0u), uvec4(16u), lessThanEqual(v, uvec4(65535u)))) << mix(uvec4(0u), uvec4(8u), lessThanEqual((v << mix(uvec4(0u), uvec4(16u), lessThanEqual(v, uvec4(65535u)))), uvec4(16777215u)))), uvec4(268435455u)))), uvec4(1073741823u))) | (mix(uvec4(0u), uvec4(1u), lessThanEqual(((((v << mix(uvec4(0u), uvec4(16u), lessThanEqual(v, uvec4(65535u)))) << mix(uvec4(0u), uvec4(8u), lessThanEqual((v << mix(uvec4(0u), uvec4(16u), lessThanEqual(v, uvec4(65535u)))), uvec4(16777215u)))) << mix(uvec4(0u), uvec4(4u), lessThanEqual(((v << mix(uvec4(0u), uvec4(16u), lessThanEqual(v, uvec4(65535u)))) << mix(uvec4(0u), uvec4(8u), lessThanEqual((v << mix(uvec4(0u), uvec4(16u), lessThanEqual(v, uvec4(65535u)))), uvec4(16777215u)))), uvec4(268435455u)))) << mix(uvec4(0u), uvec4(2u), lessThanEqual((((v << mix(uvec4(0u), uvec4(16u), lessThanEqual(v, uvec4(65535u)))) << mix(uvec4(0u), uvec4(8u), lessThanEqual((v << mix(uvec4(0u), uvec4(16u), lessThanEqual(v, uvec4(65535u)))), uvec4(16777215u)))) << mix(uvec4(0u), uvec4(4u), lessThanEqual(((v << mix(uvec4(0u), uvec4(16u), lessThanEqual(v, uvec4(65535u)))) << mix(uvec4(0u), uvec4(8u), lessThanEqual((v << mix(uvec4(0u), uvec4(16u), lessThanEqual(v, uvec4(65535u)))), uvec4(16777215u)))), uvec4(268435455u)))), uvec4(1073741823u)))), uvec4(2147483647u))) | mix(uvec4(0u), uvec4(1u), equal(((((v << mix(uvec4(0u), uvec4(16u), lessThanEqual(v, uvec4(65535u)))) << mix(uvec4(0u), uvec4(8u), lessThanEqual((v << mix(uvec4(0u), uvec4(16u), lessThanEqual(v, uvec4(65535u)))), uvec4(16777215u)))) << mix(uvec4(0u), uvec4(4u), lessThanEqual(((v << mix(uvec4(0u), uvec4(16u), lessThanEqual(v, uvec4(65535u)))) << mix(uvec4(0u), uvec4(8u), lessThanEqual((v << mix(uvec4(0u), uvec4(16u), lessThanEqual(v, uvec4(65535u)))), uvec4(16777215u)))), uvec4(268435455u)))) << mix(uvec4(0u), uvec4(2u), lessThanEqual((((v << mix(uvec4(0u), uvec4(16u), lessThanEqual(v, uvec4(65535u)))) << mix(uvec4(0u), uvec4(8u), lessThanEqual((v << mix(uvec4(0u), uvec4(16u), lessThanEqual(v, uvec4(65535u)))), uvec4(16777215u)))) << mix(uvec4(0u), uvec4(4u), lessThanEqual(((v << mix(uvec4(0u), uvec4(16u), lessThanEqual(v, uvec4(65535u)))) << mix(uvec4(0u), uvec4(8u), lessThanEqual((v << mix(uvec4(0u), uvec4(16u), lessThanEqual(v, uvec4(65535u)))), uvec4(16777215u)))), uvec4(268435455u)))), uvec4(1073741823u)))), uvec4(0u)))))))) + mix(uvec4(0u), uvec4(1u), equal(((((v << mix(uvec4(0u), uvec4(16u), lessThanEqual(v, uvec4(65535u)))) << mix(uvec4(0u), uvec4(8u), lessThanEqual((v << mix(uvec4(0u), uvec4(16u), lessThanEqual(v, uvec4(65535u)))), uvec4(16777215u)))) << mix(uvec4(0u), uvec4(4u), lessThanEqual(((v << mix(uvec4(0u), uvec4(16u), lessThanEqual(v, uvec4(65535u)))) << mix(uvec4(0u), uvec4(8u), lessThanEqual((v << mix(uvec4(0u), uvec4(16u), lessThanEqual(v, uvec4(65535u)))), uvec4(16777215u)))), uvec4(268435455u)))) << mix(uvec4(0u), uvec4(2u), lessThanEqual((((v << mix(uvec4(0u), uvec4(16u), lessThanEqual(v, uvec4(65535u)))) << mix(uvec4(0u), uvec4(8u), lessThanEqual((v << mix(uvec4(0u), uvec4(16u), lessThanEqual(v, uvec4(65535u)))), uvec4(16777215u)))) << mix(uvec4(0u), uvec4(4u), lessThanEqual(((v << mix(uvec4(0u), uvec4(16u), lessThanEqual(v, uvec4(65535u)))) << mix(uvec4(0u), uvec4(8u), lessThanEqual((v << mix(uvec4(0u), uvec4(16u), lessThanEqual(v, uvec4(65535u)))), uvec4(16777215u)))), uvec4(268435455u)))), uvec4(1073741823u)))), uvec4(0u)))));
return res;
}
VertexOutput vertex_main_inner() {
@@ -71,10 +53,10 @@
return tint_symbol;
}
void main() {
- VertexOutput v_7 = vertex_main_inner();
- gl_Position = v_7.pos;
+ VertexOutput v_1 = vertex_main_inner();
+ gl_Position = v_1.pos;
gl_Position[1u] = -(gl_Position.y);
gl_Position[2u] = ((2.0f * gl_Position.z) - gl_Position.w);
- vertex_main_loc0_Output = v_7.prevent_dce;
+ vertex_main_loc0_Output = v_1.prevent_dce;
gl_PointSize = 1.0f;
}
diff --git a/test/tint/builtins/gen/var/countLeadingZeros/f70103.wgsl.expected.glsl b/test/tint/builtins/gen/var/countLeadingZeros/f70103.wgsl.expected.glsl
index 6db87a9..56527d6 100644
--- a/test/tint/builtins/gen/var/countLeadingZeros/f70103.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/countLeadingZeros/f70103.wgsl.expected.glsl
@@ -9,13 +9,7 @@
uvec4 countLeadingZeros_f70103() {
uvec4 arg_0 = uvec4(1u);
uvec4 v_1 = arg_0;
- uvec4 v_2 = mix(uvec4(0u), uvec4(16u), lessThanEqual(v_1, uvec4(65535u)));
- uvec4 v_3 = mix(uvec4(0u), uvec4(8u), lessThanEqual((v_1 << v_2), uvec4(16777215u)));
- uvec4 v_4 = mix(uvec4(0u), uvec4(4u), lessThanEqual(((v_1 << v_2) << v_3), uvec4(268435455u)));
- uvec4 v_5 = mix(uvec4(0u), uvec4(2u), lessThanEqual((((v_1 << v_2) << v_3) << v_4), uvec4(1073741823u)));
- uvec4 v_6 = mix(uvec4(0u), uvec4(1u), lessThanEqual(((((v_1 << v_2) << v_3) << v_4) << v_5), uvec4(2147483647u)));
- uvec4 v_7 = mix(uvec4(0u), uvec4(1u), equal(((((v_1 << v_2) << v_3) << v_4) << v_5), uvec4(0u)));
- uvec4 res = ((v_2 | (v_3 | (v_4 | (v_5 | (v_6 | v_7))))) + v_7);
+ uvec4 res = ((mix(uvec4(0u), uvec4(16u), lessThanEqual(v_1, uvec4(65535u))) | (mix(uvec4(0u), uvec4(8u), lessThanEqual((v_1 << mix(uvec4(0u), uvec4(16u), lessThanEqual(v_1, uvec4(65535u)))), uvec4(16777215u))) | (mix(uvec4(0u), uvec4(4u), lessThanEqual(((v_1 << mix(uvec4(0u), uvec4(16u), lessThanEqual(v_1, uvec4(65535u)))) << mix(uvec4(0u), uvec4(8u), lessThanEqual((v_1 << mix(uvec4(0u), uvec4(16u), lessThanEqual(v_1, uvec4(65535u)))), uvec4(16777215u)))), uvec4(268435455u))) | (mix(uvec4(0u), uvec4(2u), lessThanEqual((((v_1 << mix(uvec4(0u), uvec4(16u), lessThanEqual(v_1, uvec4(65535u)))) << mix(uvec4(0u), uvec4(8u), lessThanEqual((v_1 << mix(uvec4(0u), uvec4(16u), lessThanEqual(v_1, uvec4(65535u)))), uvec4(16777215u)))) << mix(uvec4(0u), uvec4(4u), lessThanEqual(((v_1 << mix(uvec4(0u), uvec4(16u), lessThanEqual(v_1, uvec4(65535u)))) << mix(uvec4(0u), uvec4(8u), lessThanEqual((v_1 << mix(uvec4(0u), uvec4(16u), lessThanEqual(v_1, uvec4(65535u)))), uvec4(16777215u)))), uvec4(268435455u)))), uvec4(1073741823u))) | (mix(uvec4(0u), uvec4(1u), lessThanEqual(((((v_1 << mix(uvec4(0u), uvec4(16u), lessThanEqual(v_1, uvec4(65535u)))) << mix(uvec4(0u), uvec4(8u), lessThanEqual((v_1 << mix(uvec4(0u), uvec4(16u), lessThanEqual(v_1, uvec4(65535u)))), uvec4(16777215u)))) << mix(uvec4(0u), uvec4(4u), lessThanEqual(((v_1 << mix(uvec4(0u), uvec4(16u), lessThanEqual(v_1, uvec4(65535u)))) << mix(uvec4(0u), uvec4(8u), lessThanEqual((v_1 << mix(uvec4(0u), uvec4(16u), lessThanEqual(v_1, uvec4(65535u)))), uvec4(16777215u)))), uvec4(268435455u)))) << mix(uvec4(0u), uvec4(2u), lessThanEqual((((v_1 << mix(uvec4(0u), uvec4(16u), lessThanEqual(v_1, uvec4(65535u)))) << mix(uvec4(0u), uvec4(8u), lessThanEqual((v_1 << mix(uvec4(0u), uvec4(16u), lessThanEqual(v_1, uvec4(65535u)))), uvec4(16777215u)))) << mix(uvec4(0u), uvec4(4u), lessThanEqual(((v_1 << mix(uvec4(0u), uvec4(16u), lessThanEqual(v_1, uvec4(65535u)))) << mix(uvec4(0u), uvec4(8u), lessThanEqual((v_1 << mix(uvec4(0u), uvec4(16u), lessThanEqual(v_1, uvec4(65535u)))), uvec4(16777215u)))), uvec4(268435455u)))), uvec4(1073741823u)))), uvec4(2147483647u))) | mix(uvec4(0u), uvec4(1u), equal(((((v_1 << mix(uvec4(0u), uvec4(16u), lessThanEqual(v_1, uvec4(65535u)))) << mix(uvec4(0u), uvec4(8u), lessThanEqual((v_1 << mix(uvec4(0u), uvec4(16u), lessThanEqual(v_1, uvec4(65535u)))), uvec4(16777215u)))) << mix(uvec4(0u), uvec4(4u), lessThanEqual(((v_1 << mix(uvec4(0u), uvec4(16u), lessThanEqual(v_1, uvec4(65535u)))) << mix(uvec4(0u), uvec4(8u), lessThanEqual((v_1 << mix(uvec4(0u), uvec4(16u), lessThanEqual(v_1, uvec4(65535u)))), uvec4(16777215u)))), uvec4(268435455u)))) << mix(uvec4(0u), uvec4(2u), lessThanEqual((((v_1 << mix(uvec4(0u), uvec4(16u), lessThanEqual(v_1, uvec4(65535u)))) << mix(uvec4(0u), uvec4(8u), lessThanEqual((v_1 << mix(uvec4(0u), uvec4(16u), lessThanEqual(v_1, uvec4(65535u)))), uvec4(16777215u)))) << mix(uvec4(0u), uvec4(4u), lessThanEqual(((v_1 << mix(uvec4(0u), uvec4(16u), lessThanEqual(v_1, uvec4(65535u)))) << mix(uvec4(0u), uvec4(8u), lessThanEqual((v_1 << mix(uvec4(0u), uvec4(16u), lessThanEqual(v_1, uvec4(65535u)))), uvec4(16777215u)))), uvec4(268435455u)))), uvec4(1073741823u)))), uvec4(0u)))))))) + mix(uvec4(0u), uvec4(1u), equal(((((v_1 << mix(uvec4(0u), uvec4(16u), lessThanEqual(v_1, uvec4(65535u)))) << mix(uvec4(0u), uvec4(8u), lessThanEqual((v_1 << mix(uvec4(0u), uvec4(16u), lessThanEqual(v_1, uvec4(65535u)))), uvec4(16777215u)))) << mix(uvec4(0u), uvec4(4u), lessThanEqual(((v_1 << mix(uvec4(0u), uvec4(16u), lessThanEqual(v_1, uvec4(65535u)))) << mix(uvec4(0u), uvec4(8u), lessThanEqual((v_1 << mix(uvec4(0u), uvec4(16u), lessThanEqual(v_1, uvec4(65535u)))), uvec4(16777215u)))), uvec4(268435455u)))) << mix(uvec4(0u), uvec4(2u), lessThanEqual((((v_1 << mix(uvec4(0u), uvec4(16u), lessThanEqual(v_1, uvec4(65535u)))) << mix(uvec4(0u), uvec4(8u), lessThanEqual((v_1 << mix(uvec4(0u), uvec4(16u), lessThanEqual(v_1, uvec4(65535u)))), uvec4(16777215u)))) << mix(uvec4(0u), uvec4(4u), lessThanEqual(((v_1 << mix(uvec4(0u), uvec4(16u), lessThanEqual(v_1, uvec4(65535u)))) << mix(uvec4(0u), uvec4(8u), lessThanEqual((v_1 << mix(uvec4(0u), uvec4(16u), lessThanEqual(v_1, uvec4(65535u)))), uvec4(16777215u)))), uvec4(268435455u)))), uvec4(1073741823u)))), uvec4(0u))));
return res;
}
void main() {
@@ -30,13 +24,7 @@
uvec4 countLeadingZeros_f70103() {
uvec4 arg_0 = uvec4(1u);
uvec4 v_1 = arg_0;
- uvec4 v_2 = mix(uvec4(0u), uvec4(16u), lessThanEqual(v_1, uvec4(65535u)));
- uvec4 v_3 = mix(uvec4(0u), uvec4(8u), lessThanEqual((v_1 << v_2), uvec4(16777215u)));
- uvec4 v_4 = mix(uvec4(0u), uvec4(4u), lessThanEqual(((v_1 << v_2) << v_3), uvec4(268435455u)));
- uvec4 v_5 = mix(uvec4(0u), uvec4(2u), lessThanEqual((((v_1 << v_2) << v_3) << v_4), uvec4(1073741823u)));
- uvec4 v_6 = mix(uvec4(0u), uvec4(1u), lessThanEqual(((((v_1 << v_2) << v_3) << v_4) << v_5), uvec4(2147483647u)));
- uvec4 v_7 = mix(uvec4(0u), uvec4(1u), equal(((((v_1 << v_2) << v_3) << v_4) << v_5), uvec4(0u)));
- uvec4 res = ((v_2 | (v_3 | (v_4 | (v_5 | (v_6 | v_7))))) + v_7);
+ uvec4 res = ((mix(uvec4(0u), uvec4(16u), lessThanEqual(v_1, uvec4(65535u))) | (mix(uvec4(0u), uvec4(8u), lessThanEqual((v_1 << mix(uvec4(0u), uvec4(16u), lessThanEqual(v_1, uvec4(65535u)))), uvec4(16777215u))) | (mix(uvec4(0u), uvec4(4u), lessThanEqual(((v_1 << mix(uvec4(0u), uvec4(16u), lessThanEqual(v_1, uvec4(65535u)))) << mix(uvec4(0u), uvec4(8u), lessThanEqual((v_1 << mix(uvec4(0u), uvec4(16u), lessThanEqual(v_1, uvec4(65535u)))), uvec4(16777215u)))), uvec4(268435455u))) | (mix(uvec4(0u), uvec4(2u), lessThanEqual((((v_1 << mix(uvec4(0u), uvec4(16u), lessThanEqual(v_1, uvec4(65535u)))) << mix(uvec4(0u), uvec4(8u), lessThanEqual((v_1 << mix(uvec4(0u), uvec4(16u), lessThanEqual(v_1, uvec4(65535u)))), uvec4(16777215u)))) << mix(uvec4(0u), uvec4(4u), lessThanEqual(((v_1 << mix(uvec4(0u), uvec4(16u), lessThanEqual(v_1, uvec4(65535u)))) << mix(uvec4(0u), uvec4(8u), lessThanEqual((v_1 << mix(uvec4(0u), uvec4(16u), lessThanEqual(v_1, uvec4(65535u)))), uvec4(16777215u)))), uvec4(268435455u)))), uvec4(1073741823u))) | (mix(uvec4(0u), uvec4(1u), lessThanEqual(((((v_1 << mix(uvec4(0u), uvec4(16u), lessThanEqual(v_1, uvec4(65535u)))) << mix(uvec4(0u), uvec4(8u), lessThanEqual((v_1 << mix(uvec4(0u), uvec4(16u), lessThanEqual(v_1, uvec4(65535u)))), uvec4(16777215u)))) << mix(uvec4(0u), uvec4(4u), lessThanEqual(((v_1 << mix(uvec4(0u), uvec4(16u), lessThanEqual(v_1, uvec4(65535u)))) << mix(uvec4(0u), uvec4(8u), lessThanEqual((v_1 << mix(uvec4(0u), uvec4(16u), lessThanEqual(v_1, uvec4(65535u)))), uvec4(16777215u)))), uvec4(268435455u)))) << mix(uvec4(0u), uvec4(2u), lessThanEqual((((v_1 << mix(uvec4(0u), uvec4(16u), lessThanEqual(v_1, uvec4(65535u)))) << mix(uvec4(0u), uvec4(8u), lessThanEqual((v_1 << mix(uvec4(0u), uvec4(16u), lessThanEqual(v_1, uvec4(65535u)))), uvec4(16777215u)))) << mix(uvec4(0u), uvec4(4u), lessThanEqual(((v_1 << mix(uvec4(0u), uvec4(16u), lessThanEqual(v_1, uvec4(65535u)))) << mix(uvec4(0u), uvec4(8u), lessThanEqual((v_1 << mix(uvec4(0u), uvec4(16u), lessThanEqual(v_1, uvec4(65535u)))), uvec4(16777215u)))), uvec4(268435455u)))), uvec4(1073741823u)))), uvec4(2147483647u))) | mix(uvec4(0u), uvec4(1u), equal(((((v_1 << mix(uvec4(0u), uvec4(16u), lessThanEqual(v_1, uvec4(65535u)))) << mix(uvec4(0u), uvec4(8u), lessThanEqual((v_1 << mix(uvec4(0u), uvec4(16u), lessThanEqual(v_1, uvec4(65535u)))), uvec4(16777215u)))) << mix(uvec4(0u), uvec4(4u), lessThanEqual(((v_1 << mix(uvec4(0u), uvec4(16u), lessThanEqual(v_1, uvec4(65535u)))) << mix(uvec4(0u), uvec4(8u), lessThanEqual((v_1 << mix(uvec4(0u), uvec4(16u), lessThanEqual(v_1, uvec4(65535u)))), uvec4(16777215u)))), uvec4(268435455u)))) << mix(uvec4(0u), uvec4(2u), lessThanEqual((((v_1 << mix(uvec4(0u), uvec4(16u), lessThanEqual(v_1, uvec4(65535u)))) << mix(uvec4(0u), uvec4(8u), lessThanEqual((v_1 << mix(uvec4(0u), uvec4(16u), lessThanEqual(v_1, uvec4(65535u)))), uvec4(16777215u)))) << mix(uvec4(0u), uvec4(4u), lessThanEqual(((v_1 << mix(uvec4(0u), uvec4(16u), lessThanEqual(v_1, uvec4(65535u)))) << mix(uvec4(0u), uvec4(8u), lessThanEqual((v_1 << mix(uvec4(0u), uvec4(16u), lessThanEqual(v_1, uvec4(65535u)))), uvec4(16777215u)))), uvec4(268435455u)))), uvec4(1073741823u)))), uvec4(0u)))))))) + mix(uvec4(0u), uvec4(1u), equal(((((v_1 << mix(uvec4(0u), uvec4(16u), lessThanEqual(v_1, uvec4(65535u)))) << mix(uvec4(0u), uvec4(8u), lessThanEqual((v_1 << mix(uvec4(0u), uvec4(16u), lessThanEqual(v_1, uvec4(65535u)))), uvec4(16777215u)))) << mix(uvec4(0u), uvec4(4u), lessThanEqual(((v_1 << mix(uvec4(0u), uvec4(16u), lessThanEqual(v_1, uvec4(65535u)))) << mix(uvec4(0u), uvec4(8u), lessThanEqual((v_1 << mix(uvec4(0u), uvec4(16u), lessThanEqual(v_1, uvec4(65535u)))), uvec4(16777215u)))), uvec4(268435455u)))) << mix(uvec4(0u), uvec4(2u), lessThanEqual((((v_1 << mix(uvec4(0u), uvec4(16u), lessThanEqual(v_1, uvec4(65535u)))) << mix(uvec4(0u), uvec4(8u), lessThanEqual((v_1 << mix(uvec4(0u), uvec4(16u), lessThanEqual(v_1, uvec4(65535u)))), uvec4(16777215u)))) << mix(uvec4(0u), uvec4(4u), lessThanEqual(((v_1 << mix(uvec4(0u), uvec4(16u), lessThanEqual(v_1, uvec4(65535u)))) << mix(uvec4(0u), uvec4(8u), lessThanEqual((v_1 << mix(uvec4(0u), uvec4(16u), lessThanEqual(v_1, uvec4(65535u)))), uvec4(16777215u)))), uvec4(268435455u)))), uvec4(1073741823u)))), uvec4(0u))));
return res;
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
@@ -55,13 +43,7 @@
uvec4 countLeadingZeros_f70103() {
uvec4 arg_0 = uvec4(1u);
uvec4 v = arg_0;
- uvec4 v_1 = mix(uvec4(0u), uvec4(16u), lessThanEqual(v, uvec4(65535u)));
- uvec4 v_2 = mix(uvec4(0u), uvec4(8u), lessThanEqual((v << v_1), uvec4(16777215u)));
- uvec4 v_3 = mix(uvec4(0u), uvec4(4u), lessThanEqual(((v << v_1) << v_2), uvec4(268435455u)));
- uvec4 v_4 = mix(uvec4(0u), uvec4(2u), lessThanEqual((((v << v_1) << v_2) << v_3), uvec4(1073741823u)));
- uvec4 v_5 = mix(uvec4(0u), uvec4(1u), lessThanEqual(((((v << v_1) << v_2) << v_3) << v_4), uvec4(2147483647u)));
- uvec4 v_6 = mix(uvec4(0u), uvec4(1u), equal(((((v << v_1) << v_2) << v_3) << v_4), uvec4(0u)));
- uvec4 res = ((v_1 | (v_2 | (v_3 | (v_4 | (v_5 | v_6))))) + v_6);
+ uvec4 res = ((mix(uvec4(0u), uvec4(16u), lessThanEqual(v, uvec4(65535u))) | (mix(uvec4(0u), uvec4(8u), lessThanEqual((v << mix(uvec4(0u), uvec4(16u), lessThanEqual(v, uvec4(65535u)))), uvec4(16777215u))) | (mix(uvec4(0u), uvec4(4u), lessThanEqual(((v << mix(uvec4(0u), uvec4(16u), lessThanEqual(v, uvec4(65535u)))) << mix(uvec4(0u), uvec4(8u), lessThanEqual((v << mix(uvec4(0u), uvec4(16u), lessThanEqual(v, uvec4(65535u)))), uvec4(16777215u)))), uvec4(268435455u))) | (mix(uvec4(0u), uvec4(2u), lessThanEqual((((v << mix(uvec4(0u), uvec4(16u), lessThanEqual(v, uvec4(65535u)))) << mix(uvec4(0u), uvec4(8u), lessThanEqual((v << mix(uvec4(0u), uvec4(16u), lessThanEqual(v, uvec4(65535u)))), uvec4(16777215u)))) << mix(uvec4(0u), uvec4(4u), lessThanEqual(((v << mix(uvec4(0u), uvec4(16u), lessThanEqual(v, uvec4(65535u)))) << mix(uvec4(0u), uvec4(8u), lessThanEqual((v << mix(uvec4(0u), uvec4(16u), lessThanEqual(v, uvec4(65535u)))), uvec4(16777215u)))), uvec4(268435455u)))), uvec4(1073741823u))) | (mix(uvec4(0u), uvec4(1u), lessThanEqual(((((v << mix(uvec4(0u), uvec4(16u), lessThanEqual(v, uvec4(65535u)))) << mix(uvec4(0u), uvec4(8u), lessThanEqual((v << mix(uvec4(0u), uvec4(16u), lessThanEqual(v, uvec4(65535u)))), uvec4(16777215u)))) << mix(uvec4(0u), uvec4(4u), lessThanEqual(((v << mix(uvec4(0u), uvec4(16u), lessThanEqual(v, uvec4(65535u)))) << mix(uvec4(0u), uvec4(8u), lessThanEqual((v << mix(uvec4(0u), uvec4(16u), lessThanEqual(v, uvec4(65535u)))), uvec4(16777215u)))), uvec4(268435455u)))) << mix(uvec4(0u), uvec4(2u), lessThanEqual((((v << mix(uvec4(0u), uvec4(16u), lessThanEqual(v, uvec4(65535u)))) << mix(uvec4(0u), uvec4(8u), lessThanEqual((v << mix(uvec4(0u), uvec4(16u), lessThanEqual(v, uvec4(65535u)))), uvec4(16777215u)))) << mix(uvec4(0u), uvec4(4u), lessThanEqual(((v << mix(uvec4(0u), uvec4(16u), lessThanEqual(v, uvec4(65535u)))) << mix(uvec4(0u), uvec4(8u), lessThanEqual((v << mix(uvec4(0u), uvec4(16u), lessThanEqual(v, uvec4(65535u)))), uvec4(16777215u)))), uvec4(268435455u)))), uvec4(1073741823u)))), uvec4(2147483647u))) | mix(uvec4(0u), uvec4(1u), equal(((((v << mix(uvec4(0u), uvec4(16u), lessThanEqual(v, uvec4(65535u)))) << mix(uvec4(0u), uvec4(8u), lessThanEqual((v << mix(uvec4(0u), uvec4(16u), lessThanEqual(v, uvec4(65535u)))), uvec4(16777215u)))) << mix(uvec4(0u), uvec4(4u), lessThanEqual(((v << mix(uvec4(0u), uvec4(16u), lessThanEqual(v, uvec4(65535u)))) << mix(uvec4(0u), uvec4(8u), lessThanEqual((v << mix(uvec4(0u), uvec4(16u), lessThanEqual(v, uvec4(65535u)))), uvec4(16777215u)))), uvec4(268435455u)))) << mix(uvec4(0u), uvec4(2u), lessThanEqual((((v << mix(uvec4(0u), uvec4(16u), lessThanEqual(v, uvec4(65535u)))) << mix(uvec4(0u), uvec4(8u), lessThanEqual((v << mix(uvec4(0u), uvec4(16u), lessThanEqual(v, uvec4(65535u)))), uvec4(16777215u)))) << mix(uvec4(0u), uvec4(4u), lessThanEqual(((v << mix(uvec4(0u), uvec4(16u), lessThanEqual(v, uvec4(65535u)))) << mix(uvec4(0u), uvec4(8u), lessThanEqual((v << mix(uvec4(0u), uvec4(16u), lessThanEqual(v, uvec4(65535u)))), uvec4(16777215u)))), uvec4(268435455u)))), uvec4(1073741823u)))), uvec4(0u)))))))) + mix(uvec4(0u), uvec4(1u), equal(((((v << mix(uvec4(0u), uvec4(16u), lessThanEqual(v, uvec4(65535u)))) << mix(uvec4(0u), uvec4(8u), lessThanEqual((v << mix(uvec4(0u), uvec4(16u), lessThanEqual(v, uvec4(65535u)))), uvec4(16777215u)))) << mix(uvec4(0u), uvec4(4u), lessThanEqual(((v << mix(uvec4(0u), uvec4(16u), lessThanEqual(v, uvec4(65535u)))) << mix(uvec4(0u), uvec4(8u), lessThanEqual((v << mix(uvec4(0u), uvec4(16u), lessThanEqual(v, uvec4(65535u)))), uvec4(16777215u)))), uvec4(268435455u)))) << mix(uvec4(0u), uvec4(2u), lessThanEqual((((v << mix(uvec4(0u), uvec4(16u), lessThanEqual(v, uvec4(65535u)))) << mix(uvec4(0u), uvec4(8u), lessThanEqual((v << mix(uvec4(0u), uvec4(16u), lessThanEqual(v, uvec4(65535u)))), uvec4(16777215u)))) << mix(uvec4(0u), uvec4(4u), lessThanEqual(((v << mix(uvec4(0u), uvec4(16u), lessThanEqual(v, uvec4(65535u)))) << mix(uvec4(0u), uvec4(8u), lessThanEqual((v << mix(uvec4(0u), uvec4(16u), lessThanEqual(v, uvec4(65535u)))), uvec4(16777215u)))), uvec4(268435455u)))), uvec4(1073741823u)))), uvec4(0u))));
return res;
}
VertexOutput vertex_main_inner() {
@@ -71,10 +53,10 @@
return tint_symbol;
}
void main() {
- VertexOutput v_7 = vertex_main_inner();
- gl_Position = v_7.pos;
+ VertexOutput v_1 = vertex_main_inner();
+ gl_Position = v_1.pos;
gl_Position[1u] = -(gl_Position.y);
gl_Position[2u] = ((2.0f * gl_Position.z) - gl_Position.w);
- vertex_main_loc0_Output = v_7.prevent_dce;
+ vertex_main_loc0_Output = v_1.prevent_dce;
gl_PointSize = 1.0f;
}
diff --git a/test/tint/builtins/gen/var/countTrailingZeros/1ad138.wgsl.expected.glsl b/test/tint/builtins/gen/var/countTrailingZeros/1ad138.wgsl.expected.glsl
index 368c0cc..479c86a 100644
--- a/test/tint/builtins/gen/var/countTrailingZeros/1ad138.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/countTrailingZeros/1ad138.wgsl.expected.glsl
@@ -9,12 +9,7 @@
uvec2 countTrailingZeros_1ad138() {
uvec2 arg_0 = uvec2(1u);
uvec2 v_1 = arg_0;
- uvec2 v_2 = mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)));
- uvec2 v_3 = mix(uvec2(0u), uvec2(8u), equal(((v_1 >> v_2) & uvec2(255u)), uvec2(0u)));
- uvec2 v_4 = mix(uvec2(0u), uvec2(4u), equal((((v_1 >> v_2) >> v_3) & uvec2(15u)), uvec2(0u)));
- uvec2 v_5 = mix(uvec2(0u), uvec2(2u), equal(((((v_1 >> v_2) >> v_3) >> v_4) & uvec2(3u)), uvec2(0u)));
- uvec2 v_6 = mix(uvec2(0u), uvec2(1u), equal((((((v_1 >> v_2) >> v_3) >> v_4) >> v_5) & uvec2(1u)), uvec2(0u)));
- uvec2 res = ((v_2 | (v_3 | (v_4 | (v_5 | v_6)))) + mix(uvec2(0u), uvec2(1u), equal(((((v_1 >> v_2) >> v_3) >> v_4) >> v_5), uvec2(0u))));
+ uvec2 res = ((mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u))) | (mix(uvec2(0u), uvec2(8u), equal(((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u))) | (mix(uvec2(0u), uvec2(4u), equal((((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(8u), equal(((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u)))) & uvec2(15u)), uvec2(0u))) | (mix(uvec2(0u), uvec2(2u), equal(((((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(8u), equal(((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(4u), equal((((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(8u), equal(((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u)))) & uvec2(15u)), uvec2(0u)))) & uvec2(3u)), uvec2(0u))) | mix(uvec2(0u), uvec2(1u), equal((((((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(8u), equal(((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(4u), equal((((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(8u), equal(((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u)))) & uvec2(15u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(2u), equal(((((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(8u), equal(((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(4u), equal((((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(8u), equal(((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u)))) & uvec2(15u)), uvec2(0u)))) & uvec2(3u)), uvec2(0u)))) & uvec2(1u)), uvec2(0u))))))) + mix(uvec2(0u), uvec2(1u), equal(((((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(8u), equal(((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(4u), equal((((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(8u), equal(((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u)))) & uvec2(15u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(2u), equal(((((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(8u), equal(((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(4u), equal((((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(8u), equal(((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u)))) & uvec2(15u)), uvec2(0u)))) & uvec2(3u)), uvec2(0u)))), uvec2(0u))));
return res;
}
void main() {
@@ -29,12 +24,7 @@
uvec2 countTrailingZeros_1ad138() {
uvec2 arg_0 = uvec2(1u);
uvec2 v_1 = arg_0;
- uvec2 v_2 = mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)));
- uvec2 v_3 = mix(uvec2(0u), uvec2(8u), equal(((v_1 >> v_2) & uvec2(255u)), uvec2(0u)));
- uvec2 v_4 = mix(uvec2(0u), uvec2(4u), equal((((v_1 >> v_2) >> v_3) & uvec2(15u)), uvec2(0u)));
- uvec2 v_5 = mix(uvec2(0u), uvec2(2u), equal(((((v_1 >> v_2) >> v_3) >> v_4) & uvec2(3u)), uvec2(0u)));
- uvec2 v_6 = mix(uvec2(0u), uvec2(1u), equal((((((v_1 >> v_2) >> v_3) >> v_4) >> v_5) & uvec2(1u)), uvec2(0u)));
- uvec2 res = ((v_2 | (v_3 | (v_4 | (v_5 | v_6)))) + mix(uvec2(0u), uvec2(1u), equal(((((v_1 >> v_2) >> v_3) >> v_4) >> v_5), uvec2(0u))));
+ uvec2 res = ((mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u))) | (mix(uvec2(0u), uvec2(8u), equal(((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u))) | (mix(uvec2(0u), uvec2(4u), equal((((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(8u), equal(((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u)))) & uvec2(15u)), uvec2(0u))) | (mix(uvec2(0u), uvec2(2u), equal(((((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(8u), equal(((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(4u), equal((((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(8u), equal(((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u)))) & uvec2(15u)), uvec2(0u)))) & uvec2(3u)), uvec2(0u))) | mix(uvec2(0u), uvec2(1u), equal((((((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(8u), equal(((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(4u), equal((((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(8u), equal(((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u)))) & uvec2(15u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(2u), equal(((((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(8u), equal(((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(4u), equal((((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(8u), equal(((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u)))) & uvec2(15u)), uvec2(0u)))) & uvec2(3u)), uvec2(0u)))) & uvec2(1u)), uvec2(0u))))))) + mix(uvec2(0u), uvec2(1u), equal(((((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(8u), equal(((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(4u), equal((((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(8u), equal(((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u)))) & uvec2(15u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(2u), equal(((((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(8u), equal(((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(4u), equal((((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(8u), equal(((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u)))) & uvec2(15u)), uvec2(0u)))) & uvec2(3u)), uvec2(0u)))), uvec2(0u))));
return res;
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
@@ -53,12 +43,7 @@
uvec2 countTrailingZeros_1ad138() {
uvec2 arg_0 = uvec2(1u);
uvec2 v = arg_0;
- uvec2 v_1 = mix(uvec2(0u), uvec2(16u), equal((v & uvec2(65535u)), uvec2(0u)));
- uvec2 v_2 = mix(uvec2(0u), uvec2(8u), equal(((v >> v_1) & uvec2(255u)), uvec2(0u)));
- uvec2 v_3 = mix(uvec2(0u), uvec2(4u), equal((((v >> v_1) >> v_2) & uvec2(15u)), uvec2(0u)));
- uvec2 v_4 = mix(uvec2(0u), uvec2(2u), equal(((((v >> v_1) >> v_2) >> v_3) & uvec2(3u)), uvec2(0u)));
- uvec2 v_5 = mix(uvec2(0u), uvec2(1u), equal((((((v >> v_1) >> v_2) >> v_3) >> v_4) & uvec2(1u)), uvec2(0u)));
- uvec2 res = ((v_1 | (v_2 | (v_3 | (v_4 | v_5)))) + mix(uvec2(0u), uvec2(1u), equal(((((v >> v_1) >> v_2) >> v_3) >> v_4), uvec2(0u))));
+ uvec2 res = ((mix(uvec2(0u), uvec2(16u), equal((v & uvec2(65535u)), uvec2(0u))) | (mix(uvec2(0u), uvec2(8u), equal(((v >> mix(uvec2(0u), uvec2(16u), equal((v & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u))) | (mix(uvec2(0u), uvec2(4u), equal((((v >> mix(uvec2(0u), uvec2(16u), equal((v & uvec2(65535u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(8u), equal(((v >> mix(uvec2(0u), uvec2(16u), equal((v & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u)))) & uvec2(15u)), uvec2(0u))) | (mix(uvec2(0u), uvec2(2u), equal(((((v >> mix(uvec2(0u), uvec2(16u), equal((v & uvec2(65535u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(8u), equal(((v >> mix(uvec2(0u), uvec2(16u), equal((v & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(4u), equal((((v >> mix(uvec2(0u), uvec2(16u), equal((v & uvec2(65535u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(8u), equal(((v >> mix(uvec2(0u), uvec2(16u), equal((v & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u)))) & uvec2(15u)), uvec2(0u)))) & uvec2(3u)), uvec2(0u))) | mix(uvec2(0u), uvec2(1u), equal((((((v >> mix(uvec2(0u), uvec2(16u), equal((v & uvec2(65535u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(8u), equal(((v >> mix(uvec2(0u), uvec2(16u), equal((v & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(4u), equal((((v >> mix(uvec2(0u), uvec2(16u), equal((v & uvec2(65535u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(8u), equal(((v >> mix(uvec2(0u), uvec2(16u), equal((v & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u)))) & uvec2(15u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(2u), equal(((((v >> mix(uvec2(0u), uvec2(16u), equal((v & uvec2(65535u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(8u), equal(((v >> mix(uvec2(0u), uvec2(16u), equal((v & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(4u), equal((((v >> mix(uvec2(0u), uvec2(16u), equal((v & uvec2(65535u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(8u), equal(((v >> mix(uvec2(0u), uvec2(16u), equal((v & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u)))) & uvec2(15u)), uvec2(0u)))) & uvec2(3u)), uvec2(0u)))) & uvec2(1u)), uvec2(0u))))))) + mix(uvec2(0u), uvec2(1u), equal(((((v >> mix(uvec2(0u), uvec2(16u), equal((v & uvec2(65535u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(8u), equal(((v >> mix(uvec2(0u), uvec2(16u), equal((v & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(4u), equal((((v >> mix(uvec2(0u), uvec2(16u), equal((v & uvec2(65535u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(8u), equal(((v >> mix(uvec2(0u), uvec2(16u), equal((v & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u)))) & uvec2(15u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(2u), equal(((((v >> mix(uvec2(0u), uvec2(16u), equal((v & uvec2(65535u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(8u), equal(((v >> mix(uvec2(0u), uvec2(16u), equal((v & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(4u), equal((((v >> mix(uvec2(0u), uvec2(16u), equal((v & uvec2(65535u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(8u), equal(((v >> mix(uvec2(0u), uvec2(16u), equal((v & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u)))) & uvec2(15u)), uvec2(0u)))) & uvec2(3u)), uvec2(0u)))), uvec2(0u))));
return res;
}
VertexOutput vertex_main_inner() {
@@ -68,10 +53,10 @@
return tint_symbol;
}
void main() {
- VertexOutput v_6 = vertex_main_inner();
- gl_Position = v_6.pos;
+ VertexOutput v_1 = vertex_main_inner();
+ gl_Position = v_1.pos;
gl_Position[1u] = -(gl_Position.y);
gl_Position[2u] = ((2.0f * gl_Position.z) - gl_Position.w);
- vertex_main_loc0_Output = v_6.prevent_dce;
+ vertex_main_loc0_Output = v_1.prevent_dce;
gl_PointSize = 1.0f;
}
diff --git a/test/tint/builtins/gen/var/countTrailingZeros/1dc84a.wgsl.expected.glsl b/test/tint/builtins/gen/var/countTrailingZeros/1dc84a.wgsl.expected.glsl
index ed0c73f..c05e3a0 100644
--- a/test/tint/builtins/gen/var/countTrailingZeros/1dc84a.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/countTrailingZeros/1dc84a.wgsl.expected.glsl
@@ -9,12 +9,7 @@
ivec4 countTrailingZeros_1dc84a() {
ivec4 arg_0 = ivec4(1);
uvec4 v_1 = uvec4(arg_0);
- uvec4 v_2 = mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)));
- uvec4 v_3 = mix(uvec4(0u), uvec4(8u), equal(((v_1 >> v_2) & uvec4(255u)), uvec4(0u)));
- uvec4 v_4 = mix(uvec4(0u), uvec4(4u), equal((((v_1 >> v_2) >> v_3) & uvec4(15u)), uvec4(0u)));
- uvec4 v_5 = mix(uvec4(0u), uvec4(2u), equal(((((v_1 >> v_2) >> v_3) >> v_4) & uvec4(3u)), uvec4(0u)));
- uvec4 v_6 = mix(uvec4(0u), uvec4(1u), equal((((((v_1 >> v_2) >> v_3) >> v_4) >> v_5) & uvec4(1u)), uvec4(0u)));
- ivec4 res = ivec4(((v_2 | (v_3 | (v_4 | (v_5 | v_6)))) + mix(uvec4(0u), uvec4(1u), equal(((((v_1 >> v_2) >> v_3) >> v_4) >> v_5), uvec4(0u)))));
+ ivec4 res = ivec4(((mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u))) | (mix(uvec4(0u), uvec4(8u), equal(((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u))) | (mix(uvec4(0u), uvec4(4u), equal((((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(8u), equal(((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u)))) & uvec4(15u)), uvec4(0u))) | (mix(uvec4(0u), uvec4(2u), equal(((((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(8u), equal(((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(4u), equal((((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(8u), equal(((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u)))) & uvec4(15u)), uvec4(0u)))) & uvec4(3u)), uvec4(0u))) | mix(uvec4(0u), uvec4(1u), equal((((((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(8u), equal(((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(4u), equal((((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(8u), equal(((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u)))) & uvec4(15u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(2u), equal(((((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(8u), equal(((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(4u), equal((((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(8u), equal(((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u)))) & uvec4(15u)), uvec4(0u)))) & uvec4(3u)), uvec4(0u)))) & uvec4(1u)), uvec4(0u))))))) + mix(uvec4(0u), uvec4(1u), equal(((((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(8u), equal(((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(4u), equal((((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(8u), equal(((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u)))) & uvec4(15u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(2u), equal(((((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(8u), equal(((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(4u), equal((((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(8u), equal(((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u)))) & uvec4(15u)), uvec4(0u)))) & uvec4(3u)), uvec4(0u)))), uvec4(0u)))));
return res;
}
void main() {
@@ -29,12 +24,7 @@
ivec4 countTrailingZeros_1dc84a() {
ivec4 arg_0 = ivec4(1);
uvec4 v_1 = uvec4(arg_0);
- uvec4 v_2 = mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)));
- uvec4 v_3 = mix(uvec4(0u), uvec4(8u), equal(((v_1 >> v_2) & uvec4(255u)), uvec4(0u)));
- uvec4 v_4 = mix(uvec4(0u), uvec4(4u), equal((((v_1 >> v_2) >> v_3) & uvec4(15u)), uvec4(0u)));
- uvec4 v_5 = mix(uvec4(0u), uvec4(2u), equal(((((v_1 >> v_2) >> v_3) >> v_4) & uvec4(3u)), uvec4(0u)));
- uvec4 v_6 = mix(uvec4(0u), uvec4(1u), equal((((((v_1 >> v_2) >> v_3) >> v_4) >> v_5) & uvec4(1u)), uvec4(0u)));
- ivec4 res = ivec4(((v_2 | (v_3 | (v_4 | (v_5 | v_6)))) + mix(uvec4(0u), uvec4(1u), equal(((((v_1 >> v_2) >> v_3) >> v_4) >> v_5), uvec4(0u)))));
+ ivec4 res = ivec4(((mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u))) | (mix(uvec4(0u), uvec4(8u), equal(((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u))) | (mix(uvec4(0u), uvec4(4u), equal((((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(8u), equal(((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u)))) & uvec4(15u)), uvec4(0u))) | (mix(uvec4(0u), uvec4(2u), equal(((((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(8u), equal(((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(4u), equal((((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(8u), equal(((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u)))) & uvec4(15u)), uvec4(0u)))) & uvec4(3u)), uvec4(0u))) | mix(uvec4(0u), uvec4(1u), equal((((((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(8u), equal(((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(4u), equal((((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(8u), equal(((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u)))) & uvec4(15u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(2u), equal(((((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(8u), equal(((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(4u), equal((((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(8u), equal(((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u)))) & uvec4(15u)), uvec4(0u)))) & uvec4(3u)), uvec4(0u)))) & uvec4(1u)), uvec4(0u))))))) + mix(uvec4(0u), uvec4(1u), equal(((((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(8u), equal(((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(4u), equal((((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(8u), equal(((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u)))) & uvec4(15u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(2u), equal(((((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(8u), equal(((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(4u), equal((((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(8u), equal(((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u)))) & uvec4(15u)), uvec4(0u)))) & uvec4(3u)), uvec4(0u)))), uvec4(0u)))));
return res;
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
@@ -53,12 +43,7 @@
ivec4 countTrailingZeros_1dc84a() {
ivec4 arg_0 = ivec4(1);
uvec4 v = uvec4(arg_0);
- uvec4 v_1 = mix(uvec4(0u), uvec4(16u), equal((v & uvec4(65535u)), uvec4(0u)));
- uvec4 v_2 = mix(uvec4(0u), uvec4(8u), equal(((v >> v_1) & uvec4(255u)), uvec4(0u)));
- uvec4 v_3 = mix(uvec4(0u), uvec4(4u), equal((((v >> v_1) >> v_2) & uvec4(15u)), uvec4(0u)));
- uvec4 v_4 = mix(uvec4(0u), uvec4(2u), equal(((((v >> v_1) >> v_2) >> v_3) & uvec4(3u)), uvec4(0u)));
- uvec4 v_5 = mix(uvec4(0u), uvec4(1u), equal((((((v >> v_1) >> v_2) >> v_3) >> v_4) & uvec4(1u)), uvec4(0u)));
- ivec4 res = ivec4(((v_1 | (v_2 | (v_3 | (v_4 | v_5)))) + mix(uvec4(0u), uvec4(1u), equal(((((v >> v_1) >> v_2) >> v_3) >> v_4), uvec4(0u)))));
+ ivec4 res = ivec4(((mix(uvec4(0u), uvec4(16u), equal((v & uvec4(65535u)), uvec4(0u))) | (mix(uvec4(0u), uvec4(8u), equal(((v >> mix(uvec4(0u), uvec4(16u), equal((v & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u))) | (mix(uvec4(0u), uvec4(4u), equal((((v >> mix(uvec4(0u), uvec4(16u), equal((v & uvec4(65535u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(8u), equal(((v >> mix(uvec4(0u), uvec4(16u), equal((v & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u)))) & uvec4(15u)), uvec4(0u))) | (mix(uvec4(0u), uvec4(2u), equal(((((v >> mix(uvec4(0u), uvec4(16u), equal((v & uvec4(65535u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(8u), equal(((v >> mix(uvec4(0u), uvec4(16u), equal((v & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(4u), equal((((v >> mix(uvec4(0u), uvec4(16u), equal((v & uvec4(65535u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(8u), equal(((v >> mix(uvec4(0u), uvec4(16u), equal((v & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u)))) & uvec4(15u)), uvec4(0u)))) & uvec4(3u)), uvec4(0u))) | mix(uvec4(0u), uvec4(1u), equal((((((v >> mix(uvec4(0u), uvec4(16u), equal((v & uvec4(65535u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(8u), equal(((v >> mix(uvec4(0u), uvec4(16u), equal((v & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(4u), equal((((v >> mix(uvec4(0u), uvec4(16u), equal((v & uvec4(65535u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(8u), equal(((v >> mix(uvec4(0u), uvec4(16u), equal((v & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u)))) & uvec4(15u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(2u), equal(((((v >> mix(uvec4(0u), uvec4(16u), equal((v & uvec4(65535u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(8u), equal(((v >> mix(uvec4(0u), uvec4(16u), equal((v & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(4u), equal((((v >> mix(uvec4(0u), uvec4(16u), equal((v & uvec4(65535u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(8u), equal(((v >> mix(uvec4(0u), uvec4(16u), equal((v & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u)))) & uvec4(15u)), uvec4(0u)))) & uvec4(3u)), uvec4(0u)))) & uvec4(1u)), uvec4(0u))))))) + mix(uvec4(0u), uvec4(1u), equal(((((v >> mix(uvec4(0u), uvec4(16u), equal((v & uvec4(65535u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(8u), equal(((v >> mix(uvec4(0u), uvec4(16u), equal((v & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(4u), equal((((v >> mix(uvec4(0u), uvec4(16u), equal((v & uvec4(65535u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(8u), equal(((v >> mix(uvec4(0u), uvec4(16u), equal((v & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u)))) & uvec4(15u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(2u), equal(((((v >> mix(uvec4(0u), uvec4(16u), equal((v & uvec4(65535u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(8u), equal(((v >> mix(uvec4(0u), uvec4(16u), equal((v & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(4u), equal((((v >> mix(uvec4(0u), uvec4(16u), equal((v & uvec4(65535u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(8u), equal(((v >> mix(uvec4(0u), uvec4(16u), equal((v & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u)))) & uvec4(15u)), uvec4(0u)))) & uvec4(3u)), uvec4(0u)))), uvec4(0u)))));
return res;
}
VertexOutput vertex_main_inner() {
@@ -68,10 +53,10 @@
return tint_symbol;
}
void main() {
- VertexOutput v_6 = vertex_main_inner();
- gl_Position = v_6.pos;
+ VertexOutput v_1 = vertex_main_inner();
+ gl_Position = v_1.pos;
gl_Position[1u] = -(gl_Position.y);
gl_Position[2u] = ((2.0f * gl_Position.z) - gl_Position.w);
- vertex_main_loc0_Output = v_6.prevent_dce;
+ vertex_main_loc0_Output = v_1.prevent_dce;
gl_PointSize = 1.0f;
}
diff --git a/test/tint/builtins/gen/var/countTrailingZeros/21e394.wgsl.expected.glsl b/test/tint/builtins/gen/var/countTrailingZeros/21e394.wgsl.expected.glsl
index e388806..0528a35 100644
--- a/test/tint/builtins/gen/var/countTrailingZeros/21e394.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/countTrailingZeros/21e394.wgsl.expected.glsl
@@ -9,12 +9,7 @@
uint countTrailingZeros_21e394() {
uint arg_0 = 1u;
uint v_1 = arg_0;
- uint v_2 = mix(0u, 16u, ((v_1 & 65535u) == 0u));
- uint v_3 = mix(0u, 8u, (((v_1 >> v_2) & 255u) == 0u));
- uint v_4 = mix(0u, 4u, ((((v_1 >> v_2) >> v_3) & 15u) == 0u));
- uint v_5 = mix(0u, 2u, (((((v_1 >> v_2) >> v_3) >> v_4) & 3u) == 0u));
- uint v_6 = mix(0u, 1u, ((((((v_1 >> v_2) >> v_3) >> v_4) >> v_5) & 1u) == 0u));
- uint res = ((v_2 | (v_3 | (v_4 | (v_5 | v_6)))) + mix(0u, 1u, (((((v_1 >> v_2) >> v_3) >> v_4) >> v_5) == 0u)));
+ uint res = ((mix(0u, 16u, ((v_1 & 65535u) == 0u)) | (mix(0u, 8u, (((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) & 255u) == 0u)) | (mix(0u, 4u, ((((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) >> mix(0u, 8u, (((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) & 255u) == 0u))) & 15u) == 0u)) | (mix(0u, 2u, (((((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) >> mix(0u, 8u, (((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) & 255u) == 0u))) >> mix(0u, 4u, ((((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) >> mix(0u, 8u, (((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) & 255u) == 0u))) & 15u) == 0u))) & 3u) == 0u)) | mix(0u, 1u, ((((((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) >> mix(0u, 8u, (((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) & 255u) == 0u))) >> mix(0u, 4u, ((((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) >> mix(0u, 8u, (((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) & 255u) == 0u))) & 15u) == 0u))) >> mix(0u, 2u, (((((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) >> mix(0u, 8u, (((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) & 255u) == 0u))) >> mix(0u, 4u, ((((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) >> mix(0u, 8u, (((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) & 255u) == 0u))) & 15u) == 0u))) & 3u) == 0u))) & 1u) == 0u)))))) + mix(0u, 1u, (((((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) >> mix(0u, 8u, (((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) & 255u) == 0u))) >> mix(0u, 4u, ((((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) >> mix(0u, 8u, (((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) & 255u) == 0u))) & 15u) == 0u))) >> mix(0u, 2u, (((((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) >> mix(0u, 8u, (((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) & 255u) == 0u))) >> mix(0u, 4u, ((((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) >> mix(0u, 8u, (((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) & 255u) == 0u))) & 15u) == 0u))) & 3u) == 0u))) == 0u)));
return res;
}
void main() {
@@ -29,12 +24,7 @@
uint countTrailingZeros_21e394() {
uint arg_0 = 1u;
uint v_1 = arg_0;
- uint v_2 = mix(0u, 16u, ((v_1 & 65535u) == 0u));
- uint v_3 = mix(0u, 8u, (((v_1 >> v_2) & 255u) == 0u));
- uint v_4 = mix(0u, 4u, ((((v_1 >> v_2) >> v_3) & 15u) == 0u));
- uint v_5 = mix(0u, 2u, (((((v_1 >> v_2) >> v_3) >> v_4) & 3u) == 0u));
- uint v_6 = mix(0u, 1u, ((((((v_1 >> v_2) >> v_3) >> v_4) >> v_5) & 1u) == 0u));
- uint res = ((v_2 | (v_3 | (v_4 | (v_5 | v_6)))) + mix(0u, 1u, (((((v_1 >> v_2) >> v_3) >> v_4) >> v_5) == 0u)));
+ uint res = ((mix(0u, 16u, ((v_1 & 65535u) == 0u)) | (mix(0u, 8u, (((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) & 255u) == 0u)) | (mix(0u, 4u, ((((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) >> mix(0u, 8u, (((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) & 255u) == 0u))) & 15u) == 0u)) | (mix(0u, 2u, (((((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) >> mix(0u, 8u, (((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) & 255u) == 0u))) >> mix(0u, 4u, ((((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) >> mix(0u, 8u, (((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) & 255u) == 0u))) & 15u) == 0u))) & 3u) == 0u)) | mix(0u, 1u, ((((((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) >> mix(0u, 8u, (((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) & 255u) == 0u))) >> mix(0u, 4u, ((((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) >> mix(0u, 8u, (((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) & 255u) == 0u))) & 15u) == 0u))) >> mix(0u, 2u, (((((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) >> mix(0u, 8u, (((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) & 255u) == 0u))) >> mix(0u, 4u, ((((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) >> mix(0u, 8u, (((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) & 255u) == 0u))) & 15u) == 0u))) & 3u) == 0u))) & 1u) == 0u)))))) + mix(0u, 1u, (((((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) >> mix(0u, 8u, (((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) & 255u) == 0u))) >> mix(0u, 4u, ((((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) >> mix(0u, 8u, (((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) & 255u) == 0u))) & 15u) == 0u))) >> mix(0u, 2u, (((((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) >> mix(0u, 8u, (((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) & 255u) == 0u))) >> mix(0u, 4u, ((((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) >> mix(0u, 8u, (((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) & 255u) == 0u))) & 15u) == 0u))) & 3u) == 0u))) == 0u)));
return res;
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
@@ -53,12 +43,7 @@
uint countTrailingZeros_21e394() {
uint arg_0 = 1u;
uint v = arg_0;
- uint v_1 = mix(0u, 16u, ((v & 65535u) == 0u));
- uint v_2 = mix(0u, 8u, (((v >> v_1) & 255u) == 0u));
- uint v_3 = mix(0u, 4u, ((((v >> v_1) >> v_2) & 15u) == 0u));
- uint v_4 = mix(0u, 2u, (((((v >> v_1) >> v_2) >> v_3) & 3u) == 0u));
- uint v_5 = mix(0u, 1u, ((((((v >> v_1) >> v_2) >> v_3) >> v_4) & 1u) == 0u));
- uint res = ((v_1 | (v_2 | (v_3 | (v_4 | v_5)))) + mix(0u, 1u, (((((v >> v_1) >> v_2) >> v_3) >> v_4) == 0u)));
+ uint res = ((mix(0u, 16u, ((v & 65535u) == 0u)) | (mix(0u, 8u, (((v >> mix(0u, 16u, ((v & 65535u) == 0u))) & 255u) == 0u)) | (mix(0u, 4u, ((((v >> mix(0u, 16u, ((v & 65535u) == 0u))) >> mix(0u, 8u, (((v >> mix(0u, 16u, ((v & 65535u) == 0u))) & 255u) == 0u))) & 15u) == 0u)) | (mix(0u, 2u, (((((v >> mix(0u, 16u, ((v & 65535u) == 0u))) >> mix(0u, 8u, (((v >> mix(0u, 16u, ((v & 65535u) == 0u))) & 255u) == 0u))) >> mix(0u, 4u, ((((v >> mix(0u, 16u, ((v & 65535u) == 0u))) >> mix(0u, 8u, (((v >> mix(0u, 16u, ((v & 65535u) == 0u))) & 255u) == 0u))) & 15u) == 0u))) & 3u) == 0u)) | mix(0u, 1u, ((((((v >> mix(0u, 16u, ((v & 65535u) == 0u))) >> mix(0u, 8u, (((v >> mix(0u, 16u, ((v & 65535u) == 0u))) & 255u) == 0u))) >> mix(0u, 4u, ((((v >> mix(0u, 16u, ((v & 65535u) == 0u))) >> mix(0u, 8u, (((v >> mix(0u, 16u, ((v & 65535u) == 0u))) & 255u) == 0u))) & 15u) == 0u))) >> mix(0u, 2u, (((((v >> mix(0u, 16u, ((v & 65535u) == 0u))) >> mix(0u, 8u, (((v >> mix(0u, 16u, ((v & 65535u) == 0u))) & 255u) == 0u))) >> mix(0u, 4u, ((((v >> mix(0u, 16u, ((v & 65535u) == 0u))) >> mix(0u, 8u, (((v >> mix(0u, 16u, ((v & 65535u) == 0u))) & 255u) == 0u))) & 15u) == 0u))) & 3u) == 0u))) & 1u) == 0u)))))) + mix(0u, 1u, (((((v >> mix(0u, 16u, ((v & 65535u) == 0u))) >> mix(0u, 8u, (((v >> mix(0u, 16u, ((v & 65535u) == 0u))) & 255u) == 0u))) >> mix(0u, 4u, ((((v >> mix(0u, 16u, ((v & 65535u) == 0u))) >> mix(0u, 8u, (((v >> mix(0u, 16u, ((v & 65535u) == 0u))) & 255u) == 0u))) & 15u) == 0u))) >> mix(0u, 2u, (((((v >> mix(0u, 16u, ((v & 65535u) == 0u))) >> mix(0u, 8u, (((v >> mix(0u, 16u, ((v & 65535u) == 0u))) & 255u) == 0u))) >> mix(0u, 4u, ((((v >> mix(0u, 16u, ((v & 65535u) == 0u))) >> mix(0u, 8u, (((v >> mix(0u, 16u, ((v & 65535u) == 0u))) & 255u) == 0u))) & 15u) == 0u))) & 3u) == 0u))) == 0u)));
return res;
}
VertexOutput vertex_main_inner() {
@@ -68,10 +53,10 @@
return tint_symbol;
}
void main() {
- VertexOutput v_6 = vertex_main_inner();
- gl_Position = v_6.pos;
+ VertexOutput v_1 = vertex_main_inner();
+ gl_Position = v_1.pos;
gl_Position[1u] = -(gl_Position.y);
gl_Position[2u] = ((2.0f * gl_Position.z) - gl_Position.w);
- vertex_main_loc0_Output = v_6.prevent_dce;
+ vertex_main_loc0_Output = v_1.prevent_dce;
gl_PointSize = 1.0f;
}
diff --git a/test/tint/builtins/gen/var/countTrailingZeros/327c37.wgsl.expected.glsl b/test/tint/builtins/gen/var/countTrailingZeros/327c37.wgsl.expected.glsl
index 3c431d7..2396290 100644
--- a/test/tint/builtins/gen/var/countTrailingZeros/327c37.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/countTrailingZeros/327c37.wgsl.expected.glsl
@@ -9,12 +9,7 @@
ivec2 countTrailingZeros_327c37() {
ivec2 arg_0 = ivec2(1);
uvec2 v_1 = uvec2(arg_0);
- uvec2 v_2 = mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)));
- uvec2 v_3 = mix(uvec2(0u), uvec2(8u), equal(((v_1 >> v_2) & uvec2(255u)), uvec2(0u)));
- uvec2 v_4 = mix(uvec2(0u), uvec2(4u), equal((((v_1 >> v_2) >> v_3) & uvec2(15u)), uvec2(0u)));
- uvec2 v_5 = mix(uvec2(0u), uvec2(2u), equal(((((v_1 >> v_2) >> v_3) >> v_4) & uvec2(3u)), uvec2(0u)));
- uvec2 v_6 = mix(uvec2(0u), uvec2(1u), equal((((((v_1 >> v_2) >> v_3) >> v_4) >> v_5) & uvec2(1u)), uvec2(0u)));
- ivec2 res = ivec2(((v_2 | (v_3 | (v_4 | (v_5 | v_6)))) + mix(uvec2(0u), uvec2(1u), equal(((((v_1 >> v_2) >> v_3) >> v_4) >> v_5), uvec2(0u)))));
+ ivec2 res = ivec2(((mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u))) | (mix(uvec2(0u), uvec2(8u), equal(((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u))) | (mix(uvec2(0u), uvec2(4u), equal((((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(8u), equal(((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u)))) & uvec2(15u)), uvec2(0u))) | (mix(uvec2(0u), uvec2(2u), equal(((((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(8u), equal(((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(4u), equal((((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(8u), equal(((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u)))) & uvec2(15u)), uvec2(0u)))) & uvec2(3u)), uvec2(0u))) | mix(uvec2(0u), uvec2(1u), equal((((((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(8u), equal(((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(4u), equal((((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(8u), equal(((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u)))) & uvec2(15u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(2u), equal(((((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(8u), equal(((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(4u), equal((((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(8u), equal(((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u)))) & uvec2(15u)), uvec2(0u)))) & uvec2(3u)), uvec2(0u)))) & uvec2(1u)), uvec2(0u))))))) + mix(uvec2(0u), uvec2(1u), equal(((((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(8u), equal(((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(4u), equal((((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(8u), equal(((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u)))) & uvec2(15u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(2u), equal(((((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(8u), equal(((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(4u), equal((((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(8u), equal(((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u)))) & uvec2(15u)), uvec2(0u)))) & uvec2(3u)), uvec2(0u)))), uvec2(0u)))));
return res;
}
void main() {
@@ -29,12 +24,7 @@
ivec2 countTrailingZeros_327c37() {
ivec2 arg_0 = ivec2(1);
uvec2 v_1 = uvec2(arg_0);
- uvec2 v_2 = mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)));
- uvec2 v_3 = mix(uvec2(0u), uvec2(8u), equal(((v_1 >> v_2) & uvec2(255u)), uvec2(0u)));
- uvec2 v_4 = mix(uvec2(0u), uvec2(4u), equal((((v_1 >> v_2) >> v_3) & uvec2(15u)), uvec2(0u)));
- uvec2 v_5 = mix(uvec2(0u), uvec2(2u), equal(((((v_1 >> v_2) >> v_3) >> v_4) & uvec2(3u)), uvec2(0u)));
- uvec2 v_6 = mix(uvec2(0u), uvec2(1u), equal((((((v_1 >> v_2) >> v_3) >> v_4) >> v_5) & uvec2(1u)), uvec2(0u)));
- ivec2 res = ivec2(((v_2 | (v_3 | (v_4 | (v_5 | v_6)))) + mix(uvec2(0u), uvec2(1u), equal(((((v_1 >> v_2) >> v_3) >> v_4) >> v_5), uvec2(0u)))));
+ ivec2 res = ivec2(((mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u))) | (mix(uvec2(0u), uvec2(8u), equal(((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u))) | (mix(uvec2(0u), uvec2(4u), equal((((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(8u), equal(((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u)))) & uvec2(15u)), uvec2(0u))) | (mix(uvec2(0u), uvec2(2u), equal(((((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(8u), equal(((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(4u), equal((((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(8u), equal(((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u)))) & uvec2(15u)), uvec2(0u)))) & uvec2(3u)), uvec2(0u))) | mix(uvec2(0u), uvec2(1u), equal((((((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(8u), equal(((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(4u), equal((((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(8u), equal(((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u)))) & uvec2(15u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(2u), equal(((((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(8u), equal(((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(4u), equal((((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(8u), equal(((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u)))) & uvec2(15u)), uvec2(0u)))) & uvec2(3u)), uvec2(0u)))) & uvec2(1u)), uvec2(0u))))))) + mix(uvec2(0u), uvec2(1u), equal(((((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(8u), equal(((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(4u), equal((((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(8u), equal(((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u)))) & uvec2(15u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(2u), equal(((((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(8u), equal(((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(4u), equal((((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(8u), equal(((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u)))) & uvec2(15u)), uvec2(0u)))) & uvec2(3u)), uvec2(0u)))), uvec2(0u)))));
return res;
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
@@ -53,12 +43,7 @@
ivec2 countTrailingZeros_327c37() {
ivec2 arg_0 = ivec2(1);
uvec2 v = uvec2(arg_0);
- uvec2 v_1 = mix(uvec2(0u), uvec2(16u), equal((v & uvec2(65535u)), uvec2(0u)));
- uvec2 v_2 = mix(uvec2(0u), uvec2(8u), equal(((v >> v_1) & uvec2(255u)), uvec2(0u)));
- uvec2 v_3 = mix(uvec2(0u), uvec2(4u), equal((((v >> v_1) >> v_2) & uvec2(15u)), uvec2(0u)));
- uvec2 v_4 = mix(uvec2(0u), uvec2(2u), equal(((((v >> v_1) >> v_2) >> v_3) & uvec2(3u)), uvec2(0u)));
- uvec2 v_5 = mix(uvec2(0u), uvec2(1u), equal((((((v >> v_1) >> v_2) >> v_3) >> v_4) & uvec2(1u)), uvec2(0u)));
- ivec2 res = ivec2(((v_1 | (v_2 | (v_3 | (v_4 | v_5)))) + mix(uvec2(0u), uvec2(1u), equal(((((v >> v_1) >> v_2) >> v_3) >> v_4), uvec2(0u)))));
+ ivec2 res = ivec2(((mix(uvec2(0u), uvec2(16u), equal((v & uvec2(65535u)), uvec2(0u))) | (mix(uvec2(0u), uvec2(8u), equal(((v >> mix(uvec2(0u), uvec2(16u), equal((v & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u))) | (mix(uvec2(0u), uvec2(4u), equal((((v >> mix(uvec2(0u), uvec2(16u), equal((v & uvec2(65535u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(8u), equal(((v >> mix(uvec2(0u), uvec2(16u), equal((v & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u)))) & uvec2(15u)), uvec2(0u))) | (mix(uvec2(0u), uvec2(2u), equal(((((v >> mix(uvec2(0u), uvec2(16u), equal((v & uvec2(65535u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(8u), equal(((v >> mix(uvec2(0u), uvec2(16u), equal((v & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(4u), equal((((v >> mix(uvec2(0u), uvec2(16u), equal((v & uvec2(65535u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(8u), equal(((v >> mix(uvec2(0u), uvec2(16u), equal((v & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u)))) & uvec2(15u)), uvec2(0u)))) & uvec2(3u)), uvec2(0u))) | mix(uvec2(0u), uvec2(1u), equal((((((v >> mix(uvec2(0u), uvec2(16u), equal((v & uvec2(65535u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(8u), equal(((v >> mix(uvec2(0u), uvec2(16u), equal((v & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(4u), equal((((v >> mix(uvec2(0u), uvec2(16u), equal((v & uvec2(65535u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(8u), equal(((v >> mix(uvec2(0u), uvec2(16u), equal((v & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u)))) & uvec2(15u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(2u), equal(((((v >> mix(uvec2(0u), uvec2(16u), equal((v & uvec2(65535u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(8u), equal(((v >> mix(uvec2(0u), uvec2(16u), equal((v & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(4u), equal((((v >> mix(uvec2(0u), uvec2(16u), equal((v & uvec2(65535u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(8u), equal(((v >> mix(uvec2(0u), uvec2(16u), equal((v & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u)))) & uvec2(15u)), uvec2(0u)))) & uvec2(3u)), uvec2(0u)))) & uvec2(1u)), uvec2(0u))))))) + mix(uvec2(0u), uvec2(1u), equal(((((v >> mix(uvec2(0u), uvec2(16u), equal((v & uvec2(65535u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(8u), equal(((v >> mix(uvec2(0u), uvec2(16u), equal((v & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(4u), equal((((v >> mix(uvec2(0u), uvec2(16u), equal((v & uvec2(65535u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(8u), equal(((v >> mix(uvec2(0u), uvec2(16u), equal((v & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u)))) & uvec2(15u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(2u), equal(((((v >> mix(uvec2(0u), uvec2(16u), equal((v & uvec2(65535u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(8u), equal(((v >> mix(uvec2(0u), uvec2(16u), equal((v & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(4u), equal((((v >> mix(uvec2(0u), uvec2(16u), equal((v & uvec2(65535u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(8u), equal(((v >> mix(uvec2(0u), uvec2(16u), equal((v & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u)))) & uvec2(15u)), uvec2(0u)))) & uvec2(3u)), uvec2(0u)))), uvec2(0u)))));
return res;
}
VertexOutput vertex_main_inner() {
@@ -68,10 +53,10 @@
return tint_symbol;
}
void main() {
- VertexOutput v_6 = vertex_main_inner();
- gl_Position = v_6.pos;
+ VertexOutput v_1 = vertex_main_inner();
+ gl_Position = v_1.pos;
gl_Position[1u] = -(gl_Position.y);
gl_Position[2u] = ((2.0f * gl_Position.z) - gl_Position.w);
- vertex_main_loc0_Output = v_6.prevent_dce;
+ vertex_main_loc0_Output = v_1.prevent_dce;
gl_PointSize = 1.0f;
}
diff --git a/test/tint/builtins/gen/var/countTrailingZeros/42fed6.wgsl.expected.glsl b/test/tint/builtins/gen/var/countTrailingZeros/42fed6.wgsl.expected.glsl
index 50bd0f3..463f5be 100644
--- a/test/tint/builtins/gen/var/countTrailingZeros/42fed6.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/countTrailingZeros/42fed6.wgsl.expected.glsl
@@ -9,12 +9,7 @@
int countTrailingZeros_42fed6() {
int arg_0 = 1;
uint v_1 = uint(arg_0);
- uint v_2 = mix(0u, 16u, ((v_1 & 65535u) == 0u));
- uint v_3 = mix(0u, 8u, (((v_1 >> v_2) & 255u) == 0u));
- uint v_4 = mix(0u, 4u, ((((v_1 >> v_2) >> v_3) & 15u) == 0u));
- uint v_5 = mix(0u, 2u, (((((v_1 >> v_2) >> v_3) >> v_4) & 3u) == 0u));
- uint v_6 = mix(0u, 1u, ((((((v_1 >> v_2) >> v_3) >> v_4) >> v_5) & 1u) == 0u));
- int res = int(((v_2 | (v_3 | (v_4 | (v_5 | v_6)))) + mix(0u, 1u, (((((v_1 >> v_2) >> v_3) >> v_4) >> v_5) == 0u))));
+ int res = int(((mix(0u, 16u, ((v_1 & 65535u) == 0u)) | (mix(0u, 8u, (((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) & 255u) == 0u)) | (mix(0u, 4u, ((((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) >> mix(0u, 8u, (((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) & 255u) == 0u))) & 15u) == 0u)) | (mix(0u, 2u, (((((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) >> mix(0u, 8u, (((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) & 255u) == 0u))) >> mix(0u, 4u, ((((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) >> mix(0u, 8u, (((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) & 255u) == 0u))) & 15u) == 0u))) & 3u) == 0u)) | mix(0u, 1u, ((((((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) >> mix(0u, 8u, (((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) & 255u) == 0u))) >> mix(0u, 4u, ((((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) >> mix(0u, 8u, (((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) & 255u) == 0u))) & 15u) == 0u))) >> mix(0u, 2u, (((((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) >> mix(0u, 8u, (((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) & 255u) == 0u))) >> mix(0u, 4u, ((((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) >> mix(0u, 8u, (((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) & 255u) == 0u))) & 15u) == 0u))) & 3u) == 0u))) & 1u) == 0u)))))) + mix(0u, 1u, (((((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) >> mix(0u, 8u, (((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) & 255u) == 0u))) >> mix(0u, 4u, ((((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) >> mix(0u, 8u, (((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) & 255u) == 0u))) & 15u) == 0u))) >> mix(0u, 2u, (((((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) >> mix(0u, 8u, (((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) & 255u) == 0u))) >> mix(0u, 4u, ((((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) >> mix(0u, 8u, (((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) & 255u) == 0u))) & 15u) == 0u))) & 3u) == 0u))) == 0u))));
return res;
}
void main() {
@@ -29,12 +24,7 @@
int countTrailingZeros_42fed6() {
int arg_0 = 1;
uint v_1 = uint(arg_0);
- uint v_2 = mix(0u, 16u, ((v_1 & 65535u) == 0u));
- uint v_3 = mix(0u, 8u, (((v_1 >> v_2) & 255u) == 0u));
- uint v_4 = mix(0u, 4u, ((((v_1 >> v_2) >> v_3) & 15u) == 0u));
- uint v_5 = mix(0u, 2u, (((((v_1 >> v_2) >> v_3) >> v_4) & 3u) == 0u));
- uint v_6 = mix(0u, 1u, ((((((v_1 >> v_2) >> v_3) >> v_4) >> v_5) & 1u) == 0u));
- int res = int(((v_2 | (v_3 | (v_4 | (v_5 | v_6)))) + mix(0u, 1u, (((((v_1 >> v_2) >> v_3) >> v_4) >> v_5) == 0u))));
+ int res = int(((mix(0u, 16u, ((v_1 & 65535u) == 0u)) | (mix(0u, 8u, (((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) & 255u) == 0u)) | (mix(0u, 4u, ((((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) >> mix(0u, 8u, (((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) & 255u) == 0u))) & 15u) == 0u)) | (mix(0u, 2u, (((((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) >> mix(0u, 8u, (((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) & 255u) == 0u))) >> mix(0u, 4u, ((((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) >> mix(0u, 8u, (((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) & 255u) == 0u))) & 15u) == 0u))) & 3u) == 0u)) | mix(0u, 1u, ((((((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) >> mix(0u, 8u, (((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) & 255u) == 0u))) >> mix(0u, 4u, ((((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) >> mix(0u, 8u, (((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) & 255u) == 0u))) & 15u) == 0u))) >> mix(0u, 2u, (((((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) >> mix(0u, 8u, (((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) & 255u) == 0u))) >> mix(0u, 4u, ((((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) >> mix(0u, 8u, (((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) & 255u) == 0u))) & 15u) == 0u))) & 3u) == 0u))) & 1u) == 0u)))))) + mix(0u, 1u, (((((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) >> mix(0u, 8u, (((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) & 255u) == 0u))) >> mix(0u, 4u, ((((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) >> mix(0u, 8u, (((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) & 255u) == 0u))) & 15u) == 0u))) >> mix(0u, 2u, (((((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) >> mix(0u, 8u, (((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) & 255u) == 0u))) >> mix(0u, 4u, ((((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) >> mix(0u, 8u, (((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) & 255u) == 0u))) & 15u) == 0u))) & 3u) == 0u))) == 0u))));
return res;
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
@@ -53,12 +43,7 @@
int countTrailingZeros_42fed6() {
int arg_0 = 1;
uint v = uint(arg_0);
- uint v_1 = mix(0u, 16u, ((v & 65535u) == 0u));
- uint v_2 = mix(0u, 8u, (((v >> v_1) & 255u) == 0u));
- uint v_3 = mix(0u, 4u, ((((v >> v_1) >> v_2) & 15u) == 0u));
- uint v_4 = mix(0u, 2u, (((((v >> v_1) >> v_2) >> v_3) & 3u) == 0u));
- uint v_5 = mix(0u, 1u, ((((((v >> v_1) >> v_2) >> v_3) >> v_4) & 1u) == 0u));
- int res = int(((v_1 | (v_2 | (v_3 | (v_4 | v_5)))) + mix(0u, 1u, (((((v >> v_1) >> v_2) >> v_3) >> v_4) == 0u))));
+ int res = int(((mix(0u, 16u, ((v & 65535u) == 0u)) | (mix(0u, 8u, (((v >> mix(0u, 16u, ((v & 65535u) == 0u))) & 255u) == 0u)) | (mix(0u, 4u, ((((v >> mix(0u, 16u, ((v & 65535u) == 0u))) >> mix(0u, 8u, (((v >> mix(0u, 16u, ((v & 65535u) == 0u))) & 255u) == 0u))) & 15u) == 0u)) | (mix(0u, 2u, (((((v >> mix(0u, 16u, ((v & 65535u) == 0u))) >> mix(0u, 8u, (((v >> mix(0u, 16u, ((v & 65535u) == 0u))) & 255u) == 0u))) >> mix(0u, 4u, ((((v >> mix(0u, 16u, ((v & 65535u) == 0u))) >> mix(0u, 8u, (((v >> mix(0u, 16u, ((v & 65535u) == 0u))) & 255u) == 0u))) & 15u) == 0u))) & 3u) == 0u)) | mix(0u, 1u, ((((((v >> mix(0u, 16u, ((v & 65535u) == 0u))) >> mix(0u, 8u, (((v >> mix(0u, 16u, ((v & 65535u) == 0u))) & 255u) == 0u))) >> mix(0u, 4u, ((((v >> mix(0u, 16u, ((v & 65535u) == 0u))) >> mix(0u, 8u, (((v >> mix(0u, 16u, ((v & 65535u) == 0u))) & 255u) == 0u))) & 15u) == 0u))) >> mix(0u, 2u, (((((v >> mix(0u, 16u, ((v & 65535u) == 0u))) >> mix(0u, 8u, (((v >> mix(0u, 16u, ((v & 65535u) == 0u))) & 255u) == 0u))) >> mix(0u, 4u, ((((v >> mix(0u, 16u, ((v & 65535u) == 0u))) >> mix(0u, 8u, (((v >> mix(0u, 16u, ((v & 65535u) == 0u))) & 255u) == 0u))) & 15u) == 0u))) & 3u) == 0u))) & 1u) == 0u)))))) + mix(0u, 1u, (((((v >> mix(0u, 16u, ((v & 65535u) == 0u))) >> mix(0u, 8u, (((v >> mix(0u, 16u, ((v & 65535u) == 0u))) & 255u) == 0u))) >> mix(0u, 4u, ((((v >> mix(0u, 16u, ((v & 65535u) == 0u))) >> mix(0u, 8u, (((v >> mix(0u, 16u, ((v & 65535u) == 0u))) & 255u) == 0u))) & 15u) == 0u))) >> mix(0u, 2u, (((((v >> mix(0u, 16u, ((v & 65535u) == 0u))) >> mix(0u, 8u, (((v >> mix(0u, 16u, ((v & 65535u) == 0u))) & 255u) == 0u))) >> mix(0u, 4u, ((((v >> mix(0u, 16u, ((v & 65535u) == 0u))) >> mix(0u, 8u, (((v >> mix(0u, 16u, ((v & 65535u) == 0u))) & 255u) == 0u))) & 15u) == 0u))) & 3u) == 0u))) == 0u))));
return res;
}
VertexOutput vertex_main_inner() {
@@ -68,10 +53,10 @@
return tint_symbol;
}
void main() {
- VertexOutput v_6 = vertex_main_inner();
- gl_Position = v_6.pos;
+ VertexOutput v_1 = vertex_main_inner();
+ gl_Position = v_1.pos;
gl_Position[1u] = -(gl_Position.y);
gl_Position[2u] = ((2.0f * gl_Position.z) - gl_Position.w);
- vertex_main_loc0_Output = v_6.prevent_dce;
+ vertex_main_loc0_Output = v_1.prevent_dce;
gl_PointSize = 1.0f;
}
diff --git a/test/tint/builtins/gen/var/countTrailingZeros/8ed26f.wgsl.expected.glsl b/test/tint/builtins/gen/var/countTrailingZeros/8ed26f.wgsl.expected.glsl
index b5b448d..c98cc14 100644
--- a/test/tint/builtins/gen/var/countTrailingZeros/8ed26f.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/countTrailingZeros/8ed26f.wgsl.expected.glsl
@@ -9,12 +9,7 @@
uvec3 countTrailingZeros_8ed26f() {
uvec3 arg_0 = uvec3(1u);
uvec3 v_1 = arg_0;
- uvec3 v_2 = mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)));
- uvec3 v_3 = mix(uvec3(0u), uvec3(8u), equal(((v_1 >> v_2) & uvec3(255u)), uvec3(0u)));
- uvec3 v_4 = mix(uvec3(0u), uvec3(4u), equal((((v_1 >> v_2) >> v_3) & uvec3(15u)), uvec3(0u)));
- uvec3 v_5 = mix(uvec3(0u), uvec3(2u), equal(((((v_1 >> v_2) >> v_3) >> v_4) & uvec3(3u)), uvec3(0u)));
- uvec3 v_6 = mix(uvec3(0u), uvec3(1u), equal((((((v_1 >> v_2) >> v_3) >> v_4) >> v_5) & uvec3(1u)), uvec3(0u)));
- uvec3 res = ((v_2 | (v_3 | (v_4 | (v_5 | v_6)))) + mix(uvec3(0u), uvec3(1u), equal(((((v_1 >> v_2) >> v_3) >> v_4) >> v_5), uvec3(0u))));
+ uvec3 res = ((mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u))) | (mix(uvec3(0u), uvec3(8u), equal(((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u))) | (mix(uvec3(0u), uvec3(4u), equal((((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(8u), equal(((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u)))) & uvec3(15u)), uvec3(0u))) | (mix(uvec3(0u), uvec3(2u), equal(((((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(8u), equal(((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(4u), equal((((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(8u), equal(((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u)))) & uvec3(15u)), uvec3(0u)))) & uvec3(3u)), uvec3(0u))) | mix(uvec3(0u), uvec3(1u), equal((((((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(8u), equal(((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(4u), equal((((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(8u), equal(((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u)))) & uvec3(15u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(2u), equal(((((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(8u), equal(((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(4u), equal((((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(8u), equal(((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u)))) & uvec3(15u)), uvec3(0u)))) & uvec3(3u)), uvec3(0u)))) & uvec3(1u)), uvec3(0u))))))) + mix(uvec3(0u), uvec3(1u), equal(((((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(8u), equal(((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(4u), equal((((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(8u), equal(((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u)))) & uvec3(15u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(2u), equal(((((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(8u), equal(((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(4u), equal((((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(8u), equal(((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u)))) & uvec3(15u)), uvec3(0u)))) & uvec3(3u)), uvec3(0u)))), uvec3(0u))));
return res;
}
void main() {
@@ -29,12 +24,7 @@
uvec3 countTrailingZeros_8ed26f() {
uvec3 arg_0 = uvec3(1u);
uvec3 v_1 = arg_0;
- uvec3 v_2 = mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)));
- uvec3 v_3 = mix(uvec3(0u), uvec3(8u), equal(((v_1 >> v_2) & uvec3(255u)), uvec3(0u)));
- uvec3 v_4 = mix(uvec3(0u), uvec3(4u), equal((((v_1 >> v_2) >> v_3) & uvec3(15u)), uvec3(0u)));
- uvec3 v_5 = mix(uvec3(0u), uvec3(2u), equal(((((v_1 >> v_2) >> v_3) >> v_4) & uvec3(3u)), uvec3(0u)));
- uvec3 v_6 = mix(uvec3(0u), uvec3(1u), equal((((((v_1 >> v_2) >> v_3) >> v_4) >> v_5) & uvec3(1u)), uvec3(0u)));
- uvec3 res = ((v_2 | (v_3 | (v_4 | (v_5 | v_6)))) + mix(uvec3(0u), uvec3(1u), equal(((((v_1 >> v_2) >> v_3) >> v_4) >> v_5), uvec3(0u))));
+ uvec3 res = ((mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u))) | (mix(uvec3(0u), uvec3(8u), equal(((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u))) | (mix(uvec3(0u), uvec3(4u), equal((((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(8u), equal(((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u)))) & uvec3(15u)), uvec3(0u))) | (mix(uvec3(0u), uvec3(2u), equal(((((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(8u), equal(((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(4u), equal((((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(8u), equal(((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u)))) & uvec3(15u)), uvec3(0u)))) & uvec3(3u)), uvec3(0u))) | mix(uvec3(0u), uvec3(1u), equal((((((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(8u), equal(((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(4u), equal((((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(8u), equal(((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u)))) & uvec3(15u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(2u), equal(((((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(8u), equal(((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(4u), equal((((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(8u), equal(((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u)))) & uvec3(15u)), uvec3(0u)))) & uvec3(3u)), uvec3(0u)))) & uvec3(1u)), uvec3(0u))))))) + mix(uvec3(0u), uvec3(1u), equal(((((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(8u), equal(((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(4u), equal((((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(8u), equal(((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u)))) & uvec3(15u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(2u), equal(((((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(8u), equal(((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(4u), equal((((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(8u), equal(((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u)))) & uvec3(15u)), uvec3(0u)))) & uvec3(3u)), uvec3(0u)))), uvec3(0u))));
return res;
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
@@ -53,12 +43,7 @@
uvec3 countTrailingZeros_8ed26f() {
uvec3 arg_0 = uvec3(1u);
uvec3 v = arg_0;
- uvec3 v_1 = mix(uvec3(0u), uvec3(16u), equal((v & uvec3(65535u)), uvec3(0u)));
- uvec3 v_2 = mix(uvec3(0u), uvec3(8u), equal(((v >> v_1) & uvec3(255u)), uvec3(0u)));
- uvec3 v_3 = mix(uvec3(0u), uvec3(4u), equal((((v >> v_1) >> v_2) & uvec3(15u)), uvec3(0u)));
- uvec3 v_4 = mix(uvec3(0u), uvec3(2u), equal(((((v >> v_1) >> v_2) >> v_3) & uvec3(3u)), uvec3(0u)));
- uvec3 v_5 = mix(uvec3(0u), uvec3(1u), equal((((((v >> v_1) >> v_2) >> v_3) >> v_4) & uvec3(1u)), uvec3(0u)));
- uvec3 res = ((v_1 | (v_2 | (v_3 | (v_4 | v_5)))) + mix(uvec3(0u), uvec3(1u), equal(((((v >> v_1) >> v_2) >> v_3) >> v_4), uvec3(0u))));
+ uvec3 res = ((mix(uvec3(0u), uvec3(16u), equal((v & uvec3(65535u)), uvec3(0u))) | (mix(uvec3(0u), uvec3(8u), equal(((v >> mix(uvec3(0u), uvec3(16u), equal((v & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u))) | (mix(uvec3(0u), uvec3(4u), equal((((v >> mix(uvec3(0u), uvec3(16u), equal((v & uvec3(65535u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(8u), equal(((v >> mix(uvec3(0u), uvec3(16u), equal((v & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u)))) & uvec3(15u)), uvec3(0u))) | (mix(uvec3(0u), uvec3(2u), equal(((((v >> mix(uvec3(0u), uvec3(16u), equal((v & uvec3(65535u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(8u), equal(((v >> mix(uvec3(0u), uvec3(16u), equal((v & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(4u), equal((((v >> mix(uvec3(0u), uvec3(16u), equal((v & uvec3(65535u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(8u), equal(((v >> mix(uvec3(0u), uvec3(16u), equal((v & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u)))) & uvec3(15u)), uvec3(0u)))) & uvec3(3u)), uvec3(0u))) | mix(uvec3(0u), uvec3(1u), equal((((((v >> mix(uvec3(0u), uvec3(16u), equal((v & uvec3(65535u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(8u), equal(((v >> mix(uvec3(0u), uvec3(16u), equal((v & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(4u), equal((((v >> mix(uvec3(0u), uvec3(16u), equal((v & uvec3(65535u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(8u), equal(((v >> mix(uvec3(0u), uvec3(16u), equal((v & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u)))) & uvec3(15u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(2u), equal(((((v >> mix(uvec3(0u), uvec3(16u), equal((v & uvec3(65535u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(8u), equal(((v >> mix(uvec3(0u), uvec3(16u), equal((v & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(4u), equal((((v >> mix(uvec3(0u), uvec3(16u), equal((v & uvec3(65535u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(8u), equal(((v >> mix(uvec3(0u), uvec3(16u), equal((v & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u)))) & uvec3(15u)), uvec3(0u)))) & uvec3(3u)), uvec3(0u)))) & uvec3(1u)), uvec3(0u))))))) + mix(uvec3(0u), uvec3(1u), equal(((((v >> mix(uvec3(0u), uvec3(16u), equal((v & uvec3(65535u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(8u), equal(((v >> mix(uvec3(0u), uvec3(16u), equal((v & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(4u), equal((((v >> mix(uvec3(0u), uvec3(16u), equal((v & uvec3(65535u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(8u), equal(((v >> mix(uvec3(0u), uvec3(16u), equal((v & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u)))) & uvec3(15u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(2u), equal(((((v >> mix(uvec3(0u), uvec3(16u), equal((v & uvec3(65535u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(8u), equal(((v >> mix(uvec3(0u), uvec3(16u), equal((v & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(4u), equal((((v >> mix(uvec3(0u), uvec3(16u), equal((v & uvec3(65535u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(8u), equal(((v >> mix(uvec3(0u), uvec3(16u), equal((v & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u)))) & uvec3(15u)), uvec3(0u)))) & uvec3(3u)), uvec3(0u)))), uvec3(0u))));
return res;
}
VertexOutput vertex_main_inner() {
@@ -68,10 +53,10 @@
return tint_symbol;
}
void main() {
- VertexOutput v_6 = vertex_main_inner();
- gl_Position = v_6.pos;
+ VertexOutput v_1 = vertex_main_inner();
+ gl_Position = v_1.pos;
gl_Position[1u] = -(gl_Position.y);
gl_Position[2u] = ((2.0f * gl_Position.z) - gl_Position.w);
- vertex_main_loc0_Output = v_6.prevent_dce;
+ vertex_main_loc0_Output = v_1.prevent_dce;
gl_PointSize = 1.0f;
}
diff --git a/test/tint/builtins/gen/var/countTrailingZeros/acfacb.wgsl.expected.glsl b/test/tint/builtins/gen/var/countTrailingZeros/acfacb.wgsl.expected.glsl
index 950b362..0e870d1 100644
--- a/test/tint/builtins/gen/var/countTrailingZeros/acfacb.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/countTrailingZeros/acfacb.wgsl.expected.glsl
@@ -9,12 +9,7 @@
ivec3 countTrailingZeros_acfacb() {
ivec3 arg_0 = ivec3(1);
uvec3 v_1 = uvec3(arg_0);
- uvec3 v_2 = mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)));
- uvec3 v_3 = mix(uvec3(0u), uvec3(8u), equal(((v_1 >> v_2) & uvec3(255u)), uvec3(0u)));
- uvec3 v_4 = mix(uvec3(0u), uvec3(4u), equal((((v_1 >> v_2) >> v_3) & uvec3(15u)), uvec3(0u)));
- uvec3 v_5 = mix(uvec3(0u), uvec3(2u), equal(((((v_1 >> v_2) >> v_3) >> v_4) & uvec3(3u)), uvec3(0u)));
- uvec3 v_6 = mix(uvec3(0u), uvec3(1u), equal((((((v_1 >> v_2) >> v_3) >> v_4) >> v_5) & uvec3(1u)), uvec3(0u)));
- ivec3 res = ivec3(((v_2 | (v_3 | (v_4 | (v_5 | v_6)))) + mix(uvec3(0u), uvec3(1u), equal(((((v_1 >> v_2) >> v_3) >> v_4) >> v_5), uvec3(0u)))));
+ ivec3 res = ivec3(((mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u))) | (mix(uvec3(0u), uvec3(8u), equal(((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u))) | (mix(uvec3(0u), uvec3(4u), equal((((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(8u), equal(((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u)))) & uvec3(15u)), uvec3(0u))) | (mix(uvec3(0u), uvec3(2u), equal(((((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(8u), equal(((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(4u), equal((((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(8u), equal(((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u)))) & uvec3(15u)), uvec3(0u)))) & uvec3(3u)), uvec3(0u))) | mix(uvec3(0u), uvec3(1u), equal((((((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(8u), equal(((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(4u), equal((((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(8u), equal(((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u)))) & uvec3(15u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(2u), equal(((((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(8u), equal(((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(4u), equal((((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(8u), equal(((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u)))) & uvec3(15u)), uvec3(0u)))) & uvec3(3u)), uvec3(0u)))) & uvec3(1u)), uvec3(0u))))))) + mix(uvec3(0u), uvec3(1u), equal(((((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(8u), equal(((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(4u), equal((((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(8u), equal(((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u)))) & uvec3(15u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(2u), equal(((((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(8u), equal(((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(4u), equal((((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(8u), equal(((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u)))) & uvec3(15u)), uvec3(0u)))) & uvec3(3u)), uvec3(0u)))), uvec3(0u)))));
return res;
}
void main() {
@@ -29,12 +24,7 @@
ivec3 countTrailingZeros_acfacb() {
ivec3 arg_0 = ivec3(1);
uvec3 v_1 = uvec3(arg_0);
- uvec3 v_2 = mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)));
- uvec3 v_3 = mix(uvec3(0u), uvec3(8u), equal(((v_1 >> v_2) & uvec3(255u)), uvec3(0u)));
- uvec3 v_4 = mix(uvec3(0u), uvec3(4u), equal((((v_1 >> v_2) >> v_3) & uvec3(15u)), uvec3(0u)));
- uvec3 v_5 = mix(uvec3(0u), uvec3(2u), equal(((((v_1 >> v_2) >> v_3) >> v_4) & uvec3(3u)), uvec3(0u)));
- uvec3 v_6 = mix(uvec3(0u), uvec3(1u), equal((((((v_1 >> v_2) >> v_3) >> v_4) >> v_5) & uvec3(1u)), uvec3(0u)));
- ivec3 res = ivec3(((v_2 | (v_3 | (v_4 | (v_5 | v_6)))) + mix(uvec3(0u), uvec3(1u), equal(((((v_1 >> v_2) >> v_3) >> v_4) >> v_5), uvec3(0u)))));
+ ivec3 res = ivec3(((mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u))) | (mix(uvec3(0u), uvec3(8u), equal(((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u))) | (mix(uvec3(0u), uvec3(4u), equal((((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(8u), equal(((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u)))) & uvec3(15u)), uvec3(0u))) | (mix(uvec3(0u), uvec3(2u), equal(((((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(8u), equal(((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(4u), equal((((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(8u), equal(((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u)))) & uvec3(15u)), uvec3(0u)))) & uvec3(3u)), uvec3(0u))) | mix(uvec3(0u), uvec3(1u), equal((((((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(8u), equal(((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(4u), equal((((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(8u), equal(((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u)))) & uvec3(15u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(2u), equal(((((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(8u), equal(((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(4u), equal((((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(8u), equal(((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u)))) & uvec3(15u)), uvec3(0u)))) & uvec3(3u)), uvec3(0u)))) & uvec3(1u)), uvec3(0u))))))) + mix(uvec3(0u), uvec3(1u), equal(((((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(8u), equal(((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(4u), equal((((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(8u), equal(((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u)))) & uvec3(15u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(2u), equal(((((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(8u), equal(((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(4u), equal((((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(8u), equal(((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u)))) & uvec3(15u)), uvec3(0u)))) & uvec3(3u)), uvec3(0u)))), uvec3(0u)))));
return res;
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
@@ -53,12 +43,7 @@
ivec3 countTrailingZeros_acfacb() {
ivec3 arg_0 = ivec3(1);
uvec3 v = uvec3(arg_0);
- uvec3 v_1 = mix(uvec3(0u), uvec3(16u), equal((v & uvec3(65535u)), uvec3(0u)));
- uvec3 v_2 = mix(uvec3(0u), uvec3(8u), equal(((v >> v_1) & uvec3(255u)), uvec3(0u)));
- uvec3 v_3 = mix(uvec3(0u), uvec3(4u), equal((((v >> v_1) >> v_2) & uvec3(15u)), uvec3(0u)));
- uvec3 v_4 = mix(uvec3(0u), uvec3(2u), equal(((((v >> v_1) >> v_2) >> v_3) & uvec3(3u)), uvec3(0u)));
- uvec3 v_5 = mix(uvec3(0u), uvec3(1u), equal((((((v >> v_1) >> v_2) >> v_3) >> v_4) & uvec3(1u)), uvec3(0u)));
- ivec3 res = ivec3(((v_1 | (v_2 | (v_3 | (v_4 | v_5)))) + mix(uvec3(0u), uvec3(1u), equal(((((v >> v_1) >> v_2) >> v_3) >> v_4), uvec3(0u)))));
+ ivec3 res = ivec3(((mix(uvec3(0u), uvec3(16u), equal((v & uvec3(65535u)), uvec3(0u))) | (mix(uvec3(0u), uvec3(8u), equal(((v >> mix(uvec3(0u), uvec3(16u), equal((v & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u))) | (mix(uvec3(0u), uvec3(4u), equal((((v >> mix(uvec3(0u), uvec3(16u), equal((v & uvec3(65535u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(8u), equal(((v >> mix(uvec3(0u), uvec3(16u), equal((v & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u)))) & uvec3(15u)), uvec3(0u))) | (mix(uvec3(0u), uvec3(2u), equal(((((v >> mix(uvec3(0u), uvec3(16u), equal((v & uvec3(65535u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(8u), equal(((v >> mix(uvec3(0u), uvec3(16u), equal((v & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(4u), equal((((v >> mix(uvec3(0u), uvec3(16u), equal((v & uvec3(65535u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(8u), equal(((v >> mix(uvec3(0u), uvec3(16u), equal((v & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u)))) & uvec3(15u)), uvec3(0u)))) & uvec3(3u)), uvec3(0u))) | mix(uvec3(0u), uvec3(1u), equal((((((v >> mix(uvec3(0u), uvec3(16u), equal((v & uvec3(65535u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(8u), equal(((v >> mix(uvec3(0u), uvec3(16u), equal((v & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(4u), equal((((v >> mix(uvec3(0u), uvec3(16u), equal((v & uvec3(65535u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(8u), equal(((v >> mix(uvec3(0u), uvec3(16u), equal((v & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u)))) & uvec3(15u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(2u), equal(((((v >> mix(uvec3(0u), uvec3(16u), equal((v & uvec3(65535u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(8u), equal(((v >> mix(uvec3(0u), uvec3(16u), equal((v & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(4u), equal((((v >> mix(uvec3(0u), uvec3(16u), equal((v & uvec3(65535u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(8u), equal(((v >> mix(uvec3(0u), uvec3(16u), equal((v & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u)))) & uvec3(15u)), uvec3(0u)))) & uvec3(3u)), uvec3(0u)))) & uvec3(1u)), uvec3(0u))))))) + mix(uvec3(0u), uvec3(1u), equal(((((v >> mix(uvec3(0u), uvec3(16u), equal((v & uvec3(65535u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(8u), equal(((v >> mix(uvec3(0u), uvec3(16u), equal((v & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(4u), equal((((v >> mix(uvec3(0u), uvec3(16u), equal((v & uvec3(65535u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(8u), equal(((v >> mix(uvec3(0u), uvec3(16u), equal((v & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u)))) & uvec3(15u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(2u), equal(((((v >> mix(uvec3(0u), uvec3(16u), equal((v & uvec3(65535u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(8u), equal(((v >> mix(uvec3(0u), uvec3(16u), equal((v & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(4u), equal((((v >> mix(uvec3(0u), uvec3(16u), equal((v & uvec3(65535u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(8u), equal(((v >> mix(uvec3(0u), uvec3(16u), equal((v & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u)))) & uvec3(15u)), uvec3(0u)))) & uvec3(3u)), uvec3(0u)))), uvec3(0u)))));
return res;
}
VertexOutput vertex_main_inner() {
@@ -68,10 +53,10 @@
return tint_symbol;
}
void main() {
- VertexOutput v_6 = vertex_main_inner();
- gl_Position = v_6.pos;
+ VertexOutput v_1 = vertex_main_inner();
+ gl_Position = v_1.pos;
gl_Position[1u] = -(gl_Position.y);
gl_Position[2u] = ((2.0f * gl_Position.z) - gl_Position.w);
- vertex_main_loc0_Output = v_6.prevent_dce;
+ vertex_main_loc0_Output = v_1.prevent_dce;
gl_PointSize = 1.0f;
}
diff --git a/test/tint/builtins/gen/var/countTrailingZeros/d2b4a0.wgsl.expected.glsl b/test/tint/builtins/gen/var/countTrailingZeros/d2b4a0.wgsl.expected.glsl
index cea65db..38044d3 100644
--- a/test/tint/builtins/gen/var/countTrailingZeros/d2b4a0.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/countTrailingZeros/d2b4a0.wgsl.expected.glsl
@@ -9,12 +9,7 @@
uvec4 countTrailingZeros_d2b4a0() {
uvec4 arg_0 = uvec4(1u);
uvec4 v_1 = arg_0;
- uvec4 v_2 = mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)));
- uvec4 v_3 = mix(uvec4(0u), uvec4(8u), equal(((v_1 >> v_2) & uvec4(255u)), uvec4(0u)));
- uvec4 v_4 = mix(uvec4(0u), uvec4(4u), equal((((v_1 >> v_2) >> v_3) & uvec4(15u)), uvec4(0u)));
- uvec4 v_5 = mix(uvec4(0u), uvec4(2u), equal(((((v_1 >> v_2) >> v_3) >> v_4) & uvec4(3u)), uvec4(0u)));
- uvec4 v_6 = mix(uvec4(0u), uvec4(1u), equal((((((v_1 >> v_2) >> v_3) >> v_4) >> v_5) & uvec4(1u)), uvec4(0u)));
- uvec4 res = ((v_2 | (v_3 | (v_4 | (v_5 | v_6)))) + mix(uvec4(0u), uvec4(1u), equal(((((v_1 >> v_2) >> v_3) >> v_4) >> v_5), uvec4(0u))));
+ uvec4 res = ((mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u))) | (mix(uvec4(0u), uvec4(8u), equal(((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u))) | (mix(uvec4(0u), uvec4(4u), equal((((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(8u), equal(((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u)))) & uvec4(15u)), uvec4(0u))) | (mix(uvec4(0u), uvec4(2u), equal(((((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(8u), equal(((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(4u), equal((((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(8u), equal(((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u)))) & uvec4(15u)), uvec4(0u)))) & uvec4(3u)), uvec4(0u))) | mix(uvec4(0u), uvec4(1u), equal((((((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(8u), equal(((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(4u), equal((((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(8u), equal(((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u)))) & uvec4(15u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(2u), equal(((((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(8u), equal(((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(4u), equal((((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(8u), equal(((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u)))) & uvec4(15u)), uvec4(0u)))) & uvec4(3u)), uvec4(0u)))) & uvec4(1u)), uvec4(0u))))))) + mix(uvec4(0u), uvec4(1u), equal(((((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(8u), equal(((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(4u), equal((((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(8u), equal(((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u)))) & uvec4(15u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(2u), equal(((((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(8u), equal(((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(4u), equal((((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(8u), equal(((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u)))) & uvec4(15u)), uvec4(0u)))) & uvec4(3u)), uvec4(0u)))), uvec4(0u))));
return res;
}
void main() {
@@ -29,12 +24,7 @@
uvec4 countTrailingZeros_d2b4a0() {
uvec4 arg_0 = uvec4(1u);
uvec4 v_1 = arg_0;
- uvec4 v_2 = mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)));
- uvec4 v_3 = mix(uvec4(0u), uvec4(8u), equal(((v_1 >> v_2) & uvec4(255u)), uvec4(0u)));
- uvec4 v_4 = mix(uvec4(0u), uvec4(4u), equal((((v_1 >> v_2) >> v_3) & uvec4(15u)), uvec4(0u)));
- uvec4 v_5 = mix(uvec4(0u), uvec4(2u), equal(((((v_1 >> v_2) >> v_3) >> v_4) & uvec4(3u)), uvec4(0u)));
- uvec4 v_6 = mix(uvec4(0u), uvec4(1u), equal((((((v_1 >> v_2) >> v_3) >> v_4) >> v_5) & uvec4(1u)), uvec4(0u)));
- uvec4 res = ((v_2 | (v_3 | (v_4 | (v_5 | v_6)))) + mix(uvec4(0u), uvec4(1u), equal(((((v_1 >> v_2) >> v_3) >> v_4) >> v_5), uvec4(0u))));
+ uvec4 res = ((mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u))) | (mix(uvec4(0u), uvec4(8u), equal(((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u))) | (mix(uvec4(0u), uvec4(4u), equal((((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(8u), equal(((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u)))) & uvec4(15u)), uvec4(0u))) | (mix(uvec4(0u), uvec4(2u), equal(((((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(8u), equal(((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(4u), equal((((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(8u), equal(((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u)))) & uvec4(15u)), uvec4(0u)))) & uvec4(3u)), uvec4(0u))) | mix(uvec4(0u), uvec4(1u), equal((((((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(8u), equal(((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(4u), equal((((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(8u), equal(((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u)))) & uvec4(15u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(2u), equal(((((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(8u), equal(((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(4u), equal((((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(8u), equal(((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u)))) & uvec4(15u)), uvec4(0u)))) & uvec4(3u)), uvec4(0u)))) & uvec4(1u)), uvec4(0u))))))) + mix(uvec4(0u), uvec4(1u), equal(((((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(8u), equal(((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(4u), equal((((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(8u), equal(((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u)))) & uvec4(15u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(2u), equal(((((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(8u), equal(((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(4u), equal((((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(8u), equal(((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u)))) & uvec4(15u)), uvec4(0u)))) & uvec4(3u)), uvec4(0u)))), uvec4(0u))));
return res;
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
@@ -53,12 +43,7 @@
uvec4 countTrailingZeros_d2b4a0() {
uvec4 arg_0 = uvec4(1u);
uvec4 v = arg_0;
- uvec4 v_1 = mix(uvec4(0u), uvec4(16u), equal((v & uvec4(65535u)), uvec4(0u)));
- uvec4 v_2 = mix(uvec4(0u), uvec4(8u), equal(((v >> v_1) & uvec4(255u)), uvec4(0u)));
- uvec4 v_3 = mix(uvec4(0u), uvec4(4u), equal((((v >> v_1) >> v_2) & uvec4(15u)), uvec4(0u)));
- uvec4 v_4 = mix(uvec4(0u), uvec4(2u), equal(((((v >> v_1) >> v_2) >> v_3) & uvec4(3u)), uvec4(0u)));
- uvec4 v_5 = mix(uvec4(0u), uvec4(1u), equal((((((v >> v_1) >> v_2) >> v_3) >> v_4) & uvec4(1u)), uvec4(0u)));
- uvec4 res = ((v_1 | (v_2 | (v_3 | (v_4 | v_5)))) + mix(uvec4(0u), uvec4(1u), equal(((((v >> v_1) >> v_2) >> v_3) >> v_4), uvec4(0u))));
+ uvec4 res = ((mix(uvec4(0u), uvec4(16u), equal((v & uvec4(65535u)), uvec4(0u))) | (mix(uvec4(0u), uvec4(8u), equal(((v >> mix(uvec4(0u), uvec4(16u), equal((v & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u))) | (mix(uvec4(0u), uvec4(4u), equal((((v >> mix(uvec4(0u), uvec4(16u), equal((v & uvec4(65535u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(8u), equal(((v >> mix(uvec4(0u), uvec4(16u), equal((v & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u)))) & uvec4(15u)), uvec4(0u))) | (mix(uvec4(0u), uvec4(2u), equal(((((v >> mix(uvec4(0u), uvec4(16u), equal((v & uvec4(65535u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(8u), equal(((v >> mix(uvec4(0u), uvec4(16u), equal((v & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(4u), equal((((v >> mix(uvec4(0u), uvec4(16u), equal((v & uvec4(65535u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(8u), equal(((v >> mix(uvec4(0u), uvec4(16u), equal((v & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u)))) & uvec4(15u)), uvec4(0u)))) & uvec4(3u)), uvec4(0u))) | mix(uvec4(0u), uvec4(1u), equal((((((v >> mix(uvec4(0u), uvec4(16u), equal((v & uvec4(65535u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(8u), equal(((v >> mix(uvec4(0u), uvec4(16u), equal((v & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(4u), equal((((v >> mix(uvec4(0u), uvec4(16u), equal((v & uvec4(65535u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(8u), equal(((v >> mix(uvec4(0u), uvec4(16u), equal((v & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u)))) & uvec4(15u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(2u), equal(((((v >> mix(uvec4(0u), uvec4(16u), equal((v & uvec4(65535u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(8u), equal(((v >> mix(uvec4(0u), uvec4(16u), equal((v & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(4u), equal((((v >> mix(uvec4(0u), uvec4(16u), equal((v & uvec4(65535u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(8u), equal(((v >> mix(uvec4(0u), uvec4(16u), equal((v & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u)))) & uvec4(15u)), uvec4(0u)))) & uvec4(3u)), uvec4(0u)))) & uvec4(1u)), uvec4(0u))))))) + mix(uvec4(0u), uvec4(1u), equal(((((v >> mix(uvec4(0u), uvec4(16u), equal((v & uvec4(65535u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(8u), equal(((v >> mix(uvec4(0u), uvec4(16u), equal((v & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(4u), equal((((v >> mix(uvec4(0u), uvec4(16u), equal((v & uvec4(65535u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(8u), equal(((v >> mix(uvec4(0u), uvec4(16u), equal((v & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u)))) & uvec4(15u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(2u), equal(((((v >> mix(uvec4(0u), uvec4(16u), equal((v & uvec4(65535u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(8u), equal(((v >> mix(uvec4(0u), uvec4(16u), equal((v & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(4u), equal((((v >> mix(uvec4(0u), uvec4(16u), equal((v & uvec4(65535u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(8u), equal(((v >> mix(uvec4(0u), uvec4(16u), equal((v & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u)))) & uvec4(15u)), uvec4(0u)))) & uvec4(3u)), uvec4(0u)))), uvec4(0u))));
return res;
}
VertexOutput vertex_main_inner() {
@@ -68,10 +53,10 @@
return tint_symbol;
}
void main() {
- VertexOutput v_6 = vertex_main_inner();
- gl_Position = v_6.pos;
+ VertexOutput v_1 = vertex_main_inner();
+ gl_Position = v_1.pos;
gl_Position[1u] = -(gl_Position.y);
gl_Position[2u] = ((2.0f * gl_Position.z) - gl_Position.w);
- vertex_main_loc0_Output = v_6.prevent_dce;
+ vertex_main_loc0_Output = v_1.prevent_dce;
gl_PointSize = 1.0f;
}
diff --git a/test/tint/builtins/gen/var/extractBits/12b197.wgsl.expected.glsl b/test/tint/builtins/gen/var/extractBits/12b197.wgsl.expected.glsl
index d8e52a7..aa91425 100644
--- a/test/tint/builtins/gen/var/extractBits/12b197.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/extractBits/12b197.wgsl.expected.glsl
@@ -11,11 +11,10 @@
uint arg_1 = 1u;
uint arg_2 = 1u;
uvec3 v_1 = arg_0;
- uint v_2 = arg_2;
- uint v_3 = min(arg_1, 32u);
- uint v_4 = min(v_2, (32u - v_3));
- int v_5 = int(v_3);
- uvec3 res = bitfieldExtract(v_1, v_5, int(v_4));
+ uint v_2 = min(arg_1, 32u);
+ uint v_3 = min(arg_2, (32u - v_2));
+ int v_4 = int(v_2);
+ uvec3 res = bitfieldExtract(v_1, v_4, int(v_3));
return res;
}
void main() {
@@ -32,11 +31,10 @@
uint arg_1 = 1u;
uint arg_2 = 1u;
uvec3 v_1 = arg_0;
- uint v_2 = arg_2;
- uint v_3 = min(arg_1, 32u);
- uint v_4 = min(v_2, (32u - v_3));
- int v_5 = int(v_3);
- uvec3 res = bitfieldExtract(v_1, v_5, int(v_4));
+ uint v_2 = min(arg_1, 32u);
+ uint v_3 = min(arg_2, (32u - v_2));
+ int v_4 = int(v_2);
+ uvec3 res = bitfieldExtract(v_1, v_4, int(v_3));
return res;
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
@@ -57,11 +55,10 @@
uint arg_1 = 1u;
uint arg_2 = 1u;
uvec3 v = arg_0;
- uint v_1 = arg_2;
- uint v_2 = min(arg_1, 32u);
- uint v_3 = min(v_1, (32u - v_2));
- int v_4 = int(v_2);
- uvec3 res = bitfieldExtract(v, v_4, int(v_3));
+ uint v_1 = min(arg_1, 32u);
+ uint v_2 = min(arg_2, (32u - v_1));
+ int v_3 = int(v_1);
+ uvec3 res = bitfieldExtract(v, v_3, int(v_2));
return res;
}
VertexOutput vertex_main_inner() {
@@ -71,10 +68,10 @@
return tint_symbol;
}
void main() {
- VertexOutput v_5 = vertex_main_inner();
- gl_Position = v_5.pos;
+ VertexOutput v_4 = vertex_main_inner();
+ gl_Position = v_4.pos;
gl_Position[1u] = -(gl_Position.y);
gl_Position[2u] = ((2.0f * gl_Position.z) - gl_Position.w);
- vertex_main_loc0_Output = v_5.prevent_dce;
+ vertex_main_loc0_Output = v_4.prevent_dce;
gl_PointSize = 1.0f;
}
diff --git a/test/tint/builtins/gen/var/extractBits/12b197.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/gen/var/extractBits/12b197.wgsl.expected.ir.dxc.hlsl
index 5503593..a628378 100644
--- a/test/tint/builtins/gen/var/extractBits/12b197.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/gen/var/extractBits/12b197.wgsl.expected.ir.dxc.hlsl
@@ -15,11 +15,10 @@
uint arg_1 = 1u;
uint arg_2 = 1u;
uint3 v = arg_0;
- uint v_1 = arg_2;
- uint v_2 = min(arg_1, 32u);
- uint v_3 = (32u - min(32u, (v_2 + v_1)));
- uint3 v_4 = (((v_3 < 32u)) ? ((v << uint3((v_3).xxx))) : ((0u).xxx));
- uint3 res = ((((v_3 + v_2) < 32u)) ? ((v_4 >> uint3(((v_3 + v_2)).xxx))) : (((v_4 >> (31u).xxx) >> (1u).xxx)));
+ uint v_1 = min(arg_1, 32u);
+ uint v_2 = (32u - min(32u, (v_1 + arg_2)));
+ uint3 v_3 = (((v_2 < 32u)) ? ((v << uint3((v_2).xxx))) : ((0u).xxx));
+ uint3 res = ((((v_2 + v_1) < 32u)) ? ((v_3 >> uint3(((v_2 + v_1)).xxx))) : (((v_3 >> (31u).xxx) >> (1u).xxx)));
return res;
}
@@ -36,13 +35,13 @@
VertexOutput tint_symbol = (VertexOutput)0;
tint_symbol.pos = (0.0f).xxxx;
tint_symbol.prevent_dce = extractBits_12b197();
- VertexOutput v_5 = tint_symbol;
- return v_5;
+ VertexOutput v_4 = tint_symbol;
+ return v_4;
}
vertex_main_outputs vertex_main() {
- VertexOutput v_6 = vertex_main_inner();
- vertex_main_outputs v_7 = {v_6.prevent_dce, v_6.pos};
- return v_7;
+ VertexOutput v_5 = vertex_main_inner();
+ vertex_main_outputs v_6 = {v_5.prevent_dce, v_5.pos};
+ return v_6;
}
diff --git a/test/tint/builtins/gen/var/extractBits/12b197.wgsl.expected.ir.fxc.hlsl b/test/tint/builtins/gen/var/extractBits/12b197.wgsl.expected.ir.fxc.hlsl
index 5503593..a628378 100644
--- a/test/tint/builtins/gen/var/extractBits/12b197.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/builtins/gen/var/extractBits/12b197.wgsl.expected.ir.fxc.hlsl
@@ -15,11 +15,10 @@
uint arg_1 = 1u;
uint arg_2 = 1u;
uint3 v = arg_0;
- uint v_1 = arg_2;
- uint v_2 = min(arg_1, 32u);
- uint v_3 = (32u - min(32u, (v_2 + v_1)));
- uint3 v_4 = (((v_3 < 32u)) ? ((v << uint3((v_3).xxx))) : ((0u).xxx));
- uint3 res = ((((v_3 + v_2) < 32u)) ? ((v_4 >> uint3(((v_3 + v_2)).xxx))) : (((v_4 >> (31u).xxx) >> (1u).xxx)));
+ uint v_1 = min(arg_1, 32u);
+ uint v_2 = (32u - min(32u, (v_1 + arg_2)));
+ uint3 v_3 = (((v_2 < 32u)) ? ((v << uint3((v_2).xxx))) : ((0u).xxx));
+ uint3 res = ((((v_2 + v_1) < 32u)) ? ((v_3 >> uint3(((v_2 + v_1)).xxx))) : (((v_3 >> (31u).xxx) >> (1u).xxx)));
return res;
}
@@ -36,13 +35,13 @@
VertexOutput tint_symbol = (VertexOutput)0;
tint_symbol.pos = (0.0f).xxxx;
tint_symbol.prevent_dce = extractBits_12b197();
- VertexOutput v_5 = tint_symbol;
- return v_5;
+ VertexOutput v_4 = tint_symbol;
+ return v_4;
}
vertex_main_outputs vertex_main() {
- VertexOutput v_6 = vertex_main_inner();
- vertex_main_outputs v_7 = {v_6.prevent_dce, v_6.pos};
- return v_7;
+ VertexOutput v_5 = vertex_main_inner();
+ vertex_main_outputs v_6 = {v_5.prevent_dce, v_5.pos};
+ return v_6;
}
diff --git a/test/tint/builtins/gen/var/extractBits/12b197.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/extractBits/12b197.wgsl.expected.ir.msl
index c64d479..d33142f 100644
--- a/test/tint/builtins/gen/var/extractBits/12b197.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/extractBits/12b197.wgsl.expected.ir.msl
@@ -19,10 +19,8 @@
uint3 arg_0 = uint3(1u);
uint arg_1 = 1u;
uint arg_2 = 1u;
- uint3 const v = arg_0;
- uint const v_1 = arg_2;
- uint const v_2 = min(arg_1, 32u);
- uint3 res = extract_bits(v, v_2, min(v_1, (32u - v_2)));
+ uint const v = min(arg_1, 32u);
+ uint3 res = extract_bits(arg_0, v, min(arg_2, (32u - v)));
return res;
}
@@ -44,9 +42,9 @@
}
vertex vertex_main_outputs vertex_main() {
- VertexOutput const v_3 = vertex_main_inner();
+ VertexOutput const v_1 = vertex_main_inner();
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_3.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_3.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v_1.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/extractBits/249874.wgsl.expected.glsl b/test/tint/builtins/gen/var/extractBits/249874.wgsl.expected.glsl
index 7524ac7..f5eb5a2 100644
--- a/test/tint/builtins/gen/var/extractBits/249874.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/extractBits/249874.wgsl.expected.glsl
@@ -11,11 +11,10 @@
uint arg_1 = 1u;
uint arg_2 = 1u;
int v_1 = arg_0;
- uint v_2 = arg_2;
- uint v_3 = min(arg_1, 32u);
- uint v_4 = min(v_2, (32u - v_3));
- int v_5 = int(v_3);
- int res = bitfieldExtract(v_1, v_5, int(v_4));
+ uint v_2 = min(arg_1, 32u);
+ uint v_3 = min(arg_2, (32u - v_2));
+ int v_4 = int(v_2);
+ int res = bitfieldExtract(v_1, v_4, int(v_3));
return res;
}
void main() {
@@ -32,11 +31,10 @@
uint arg_1 = 1u;
uint arg_2 = 1u;
int v_1 = arg_0;
- uint v_2 = arg_2;
- uint v_3 = min(arg_1, 32u);
- uint v_4 = min(v_2, (32u - v_3));
- int v_5 = int(v_3);
- int res = bitfieldExtract(v_1, v_5, int(v_4));
+ uint v_2 = min(arg_1, 32u);
+ uint v_3 = min(arg_2, (32u - v_2));
+ int v_4 = int(v_2);
+ int res = bitfieldExtract(v_1, v_4, int(v_3));
return res;
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
@@ -57,11 +55,10 @@
uint arg_1 = 1u;
uint arg_2 = 1u;
int v = arg_0;
- uint v_1 = arg_2;
- uint v_2 = min(arg_1, 32u);
- uint v_3 = min(v_1, (32u - v_2));
- int v_4 = int(v_2);
- int res = bitfieldExtract(v, v_4, int(v_3));
+ uint v_1 = min(arg_1, 32u);
+ uint v_2 = min(arg_2, (32u - v_1));
+ int v_3 = int(v_1);
+ int res = bitfieldExtract(v, v_3, int(v_2));
return res;
}
VertexOutput vertex_main_inner() {
@@ -71,10 +68,10 @@
return tint_symbol;
}
void main() {
- VertexOutput v_5 = vertex_main_inner();
- gl_Position = v_5.pos;
+ VertexOutput v_4 = vertex_main_inner();
+ gl_Position = v_4.pos;
gl_Position[1u] = -(gl_Position.y);
gl_Position[2u] = ((2.0f * gl_Position.z) - gl_Position.w);
- vertex_main_loc0_Output = v_5.prevent_dce;
+ vertex_main_loc0_Output = v_4.prevent_dce;
gl_PointSize = 1.0f;
}
diff --git a/test/tint/builtins/gen/var/extractBits/249874.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/gen/var/extractBits/249874.wgsl.expected.ir.dxc.hlsl
index 64a34fb..bf1aa5c 100644
--- a/test/tint/builtins/gen/var/extractBits/249874.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/gen/var/extractBits/249874.wgsl.expected.ir.dxc.hlsl
@@ -15,11 +15,10 @@
uint arg_1 = 1u;
uint arg_2 = 1u;
int v = arg_0;
- uint v_1 = arg_2;
- uint v_2 = min(arg_1, 32u);
- uint v_3 = (32u - min(32u, (v_2 + v_1)));
- int v_4 = (((v_3 < 32u)) ? ((v << uint(v_3))) : (int(0)));
- int res = ((((v_3 + v_2) < 32u)) ? ((v_4 >> uint((v_3 + v_2)))) : (((v_4 >> 31u) >> 1u)));
+ uint v_1 = min(arg_1, 32u);
+ uint v_2 = (32u - min(32u, (v_1 + arg_2)));
+ int v_3 = (((v_2 < 32u)) ? ((v << uint(v_2))) : (int(0)));
+ int res = ((((v_2 + v_1) < 32u)) ? ((v_3 >> uint((v_2 + v_1)))) : (((v_3 >> 31u) >> 1u)));
return res;
}
@@ -36,13 +35,13 @@
VertexOutput tint_symbol = (VertexOutput)0;
tint_symbol.pos = (0.0f).xxxx;
tint_symbol.prevent_dce = extractBits_249874();
- VertexOutput v_5 = tint_symbol;
- return v_5;
+ VertexOutput v_4 = tint_symbol;
+ return v_4;
}
vertex_main_outputs vertex_main() {
- VertexOutput v_6 = vertex_main_inner();
- vertex_main_outputs v_7 = {v_6.prevent_dce, v_6.pos};
- return v_7;
+ VertexOutput v_5 = vertex_main_inner();
+ vertex_main_outputs v_6 = {v_5.prevent_dce, v_5.pos};
+ return v_6;
}
diff --git a/test/tint/builtins/gen/var/extractBits/249874.wgsl.expected.ir.fxc.hlsl b/test/tint/builtins/gen/var/extractBits/249874.wgsl.expected.ir.fxc.hlsl
index 64a34fb..bf1aa5c 100644
--- a/test/tint/builtins/gen/var/extractBits/249874.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/builtins/gen/var/extractBits/249874.wgsl.expected.ir.fxc.hlsl
@@ -15,11 +15,10 @@
uint arg_1 = 1u;
uint arg_2 = 1u;
int v = arg_0;
- uint v_1 = arg_2;
- uint v_2 = min(arg_1, 32u);
- uint v_3 = (32u - min(32u, (v_2 + v_1)));
- int v_4 = (((v_3 < 32u)) ? ((v << uint(v_3))) : (int(0)));
- int res = ((((v_3 + v_2) < 32u)) ? ((v_4 >> uint((v_3 + v_2)))) : (((v_4 >> 31u) >> 1u)));
+ uint v_1 = min(arg_1, 32u);
+ uint v_2 = (32u - min(32u, (v_1 + arg_2)));
+ int v_3 = (((v_2 < 32u)) ? ((v << uint(v_2))) : (int(0)));
+ int res = ((((v_2 + v_1) < 32u)) ? ((v_3 >> uint((v_2 + v_1)))) : (((v_3 >> 31u) >> 1u)));
return res;
}
@@ -36,13 +35,13 @@
VertexOutput tint_symbol = (VertexOutput)0;
tint_symbol.pos = (0.0f).xxxx;
tint_symbol.prevent_dce = extractBits_249874();
- VertexOutput v_5 = tint_symbol;
- return v_5;
+ VertexOutput v_4 = tint_symbol;
+ return v_4;
}
vertex_main_outputs vertex_main() {
- VertexOutput v_6 = vertex_main_inner();
- vertex_main_outputs v_7 = {v_6.prevent_dce, v_6.pos};
- return v_7;
+ VertexOutput v_5 = vertex_main_inner();
+ vertex_main_outputs v_6 = {v_5.prevent_dce, v_5.pos};
+ return v_6;
}
diff --git a/test/tint/builtins/gen/var/extractBits/249874.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/extractBits/249874.wgsl.expected.ir.msl
index de5e7a2..3772fb7 100644
--- a/test/tint/builtins/gen/var/extractBits/249874.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/extractBits/249874.wgsl.expected.ir.msl
@@ -19,10 +19,8 @@
int arg_0 = 1;
uint arg_1 = 1u;
uint arg_2 = 1u;
- int const v = arg_0;
- uint const v_1 = arg_2;
- uint const v_2 = min(arg_1, 32u);
- int res = extract_bits(v, v_2, min(v_1, (32u - v_2)));
+ uint const v = min(arg_1, 32u);
+ int res = extract_bits(arg_0, v, min(arg_2, (32u - v)));
return res;
}
@@ -44,9 +42,9 @@
}
vertex vertex_main_outputs vertex_main() {
- VertexOutput const v_3 = vertex_main_inner();
+ VertexOutput const v_1 = vertex_main_inner();
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_3.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_3.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v_1.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/extractBits/631377.wgsl.expected.glsl b/test/tint/builtins/gen/var/extractBits/631377.wgsl.expected.glsl
index 3ad6970..3a29f14 100644
--- a/test/tint/builtins/gen/var/extractBits/631377.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/extractBits/631377.wgsl.expected.glsl
@@ -11,11 +11,10 @@
uint arg_1 = 1u;
uint arg_2 = 1u;
uvec4 v_1 = arg_0;
- uint v_2 = arg_2;
- uint v_3 = min(arg_1, 32u);
- uint v_4 = min(v_2, (32u - v_3));
- int v_5 = int(v_3);
- uvec4 res = bitfieldExtract(v_1, v_5, int(v_4));
+ uint v_2 = min(arg_1, 32u);
+ uint v_3 = min(arg_2, (32u - v_2));
+ int v_4 = int(v_2);
+ uvec4 res = bitfieldExtract(v_1, v_4, int(v_3));
return res;
}
void main() {
@@ -32,11 +31,10 @@
uint arg_1 = 1u;
uint arg_2 = 1u;
uvec4 v_1 = arg_0;
- uint v_2 = arg_2;
- uint v_3 = min(arg_1, 32u);
- uint v_4 = min(v_2, (32u - v_3));
- int v_5 = int(v_3);
- uvec4 res = bitfieldExtract(v_1, v_5, int(v_4));
+ uint v_2 = min(arg_1, 32u);
+ uint v_3 = min(arg_2, (32u - v_2));
+ int v_4 = int(v_2);
+ uvec4 res = bitfieldExtract(v_1, v_4, int(v_3));
return res;
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
@@ -57,11 +55,10 @@
uint arg_1 = 1u;
uint arg_2 = 1u;
uvec4 v = arg_0;
- uint v_1 = arg_2;
- uint v_2 = min(arg_1, 32u);
- uint v_3 = min(v_1, (32u - v_2));
- int v_4 = int(v_2);
- uvec4 res = bitfieldExtract(v, v_4, int(v_3));
+ uint v_1 = min(arg_1, 32u);
+ uint v_2 = min(arg_2, (32u - v_1));
+ int v_3 = int(v_1);
+ uvec4 res = bitfieldExtract(v, v_3, int(v_2));
return res;
}
VertexOutput vertex_main_inner() {
@@ -71,10 +68,10 @@
return tint_symbol;
}
void main() {
- VertexOutput v_5 = vertex_main_inner();
- gl_Position = v_5.pos;
+ VertexOutput v_4 = vertex_main_inner();
+ gl_Position = v_4.pos;
gl_Position[1u] = -(gl_Position.y);
gl_Position[2u] = ((2.0f * gl_Position.z) - gl_Position.w);
- vertex_main_loc0_Output = v_5.prevent_dce;
+ vertex_main_loc0_Output = v_4.prevent_dce;
gl_PointSize = 1.0f;
}
diff --git a/test/tint/builtins/gen/var/extractBits/631377.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/gen/var/extractBits/631377.wgsl.expected.ir.dxc.hlsl
index fe0a93a..27f8741 100644
--- a/test/tint/builtins/gen/var/extractBits/631377.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/gen/var/extractBits/631377.wgsl.expected.ir.dxc.hlsl
@@ -15,11 +15,10 @@
uint arg_1 = 1u;
uint arg_2 = 1u;
uint4 v = arg_0;
- uint v_1 = arg_2;
- uint v_2 = min(arg_1, 32u);
- uint v_3 = (32u - min(32u, (v_2 + v_1)));
- uint4 v_4 = (((v_3 < 32u)) ? ((v << uint4((v_3).xxxx))) : ((0u).xxxx));
- uint4 res = ((((v_3 + v_2) < 32u)) ? ((v_4 >> uint4(((v_3 + v_2)).xxxx))) : (((v_4 >> (31u).xxxx) >> (1u).xxxx)));
+ uint v_1 = min(arg_1, 32u);
+ uint v_2 = (32u - min(32u, (v_1 + arg_2)));
+ uint4 v_3 = (((v_2 < 32u)) ? ((v << uint4((v_2).xxxx))) : ((0u).xxxx));
+ uint4 res = ((((v_2 + v_1) < 32u)) ? ((v_3 >> uint4(((v_2 + v_1)).xxxx))) : (((v_3 >> (31u).xxxx) >> (1u).xxxx)));
return res;
}
@@ -36,13 +35,13 @@
VertexOutput tint_symbol = (VertexOutput)0;
tint_symbol.pos = (0.0f).xxxx;
tint_symbol.prevent_dce = extractBits_631377();
- VertexOutput v_5 = tint_symbol;
- return v_5;
+ VertexOutput v_4 = tint_symbol;
+ return v_4;
}
vertex_main_outputs vertex_main() {
- VertexOutput v_6 = vertex_main_inner();
- vertex_main_outputs v_7 = {v_6.prevent_dce, v_6.pos};
- return v_7;
+ VertexOutput v_5 = vertex_main_inner();
+ vertex_main_outputs v_6 = {v_5.prevent_dce, v_5.pos};
+ return v_6;
}
diff --git a/test/tint/builtins/gen/var/extractBits/631377.wgsl.expected.ir.fxc.hlsl b/test/tint/builtins/gen/var/extractBits/631377.wgsl.expected.ir.fxc.hlsl
index fe0a93a..27f8741 100644
--- a/test/tint/builtins/gen/var/extractBits/631377.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/builtins/gen/var/extractBits/631377.wgsl.expected.ir.fxc.hlsl
@@ -15,11 +15,10 @@
uint arg_1 = 1u;
uint arg_2 = 1u;
uint4 v = arg_0;
- uint v_1 = arg_2;
- uint v_2 = min(arg_1, 32u);
- uint v_3 = (32u - min(32u, (v_2 + v_1)));
- uint4 v_4 = (((v_3 < 32u)) ? ((v << uint4((v_3).xxxx))) : ((0u).xxxx));
- uint4 res = ((((v_3 + v_2) < 32u)) ? ((v_4 >> uint4(((v_3 + v_2)).xxxx))) : (((v_4 >> (31u).xxxx) >> (1u).xxxx)));
+ uint v_1 = min(arg_1, 32u);
+ uint v_2 = (32u - min(32u, (v_1 + arg_2)));
+ uint4 v_3 = (((v_2 < 32u)) ? ((v << uint4((v_2).xxxx))) : ((0u).xxxx));
+ uint4 res = ((((v_2 + v_1) < 32u)) ? ((v_3 >> uint4(((v_2 + v_1)).xxxx))) : (((v_3 >> (31u).xxxx) >> (1u).xxxx)));
return res;
}
@@ -36,13 +35,13 @@
VertexOutput tint_symbol = (VertexOutput)0;
tint_symbol.pos = (0.0f).xxxx;
tint_symbol.prevent_dce = extractBits_631377();
- VertexOutput v_5 = tint_symbol;
- return v_5;
+ VertexOutput v_4 = tint_symbol;
+ return v_4;
}
vertex_main_outputs vertex_main() {
- VertexOutput v_6 = vertex_main_inner();
- vertex_main_outputs v_7 = {v_6.prevent_dce, v_6.pos};
- return v_7;
+ VertexOutput v_5 = vertex_main_inner();
+ vertex_main_outputs v_6 = {v_5.prevent_dce, v_5.pos};
+ return v_6;
}
diff --git a/test/tint/builtins/gen/var/extractBits/631377.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/extractBits/631377.wgsl.expected.ir.msl
index f43884c..ad1ce56 100644
--- a/test/tint/builtins/gen/var/extractBits/631377.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/extractBits/631377.wgsl.expected.ir.msl
@@ -19,10 +19,8 @@
uint4 arg_0 = uint4(1u);
uint arg_1 = 1u;
uint arg_2 = 1u;
- uint4 const v = arg_0;
- uint const v_1 = arg_2;
- uint const v_2 = min(arg_1, 32u);
- uint4 res = extract_bits(v, v_2, min(v_1, (32u - v_2)));
+ uint const v = min(arg_1, 32u);
+ uint4 res = extract_bits(arg_0, v, min(arg_2, (32u - v)));
return res;
}
@@ -44,9 +42,9 @@
}
vertex vertex_main_outputs vertex_main() {
- VertexOutput const v_3 = vertex_main_inner();
+ VertexOutput const v_1 = vertex_main_inner();
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_3.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_3.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v_1.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/extractBits/a99a8d.wgsl.expected.glsl b/test/tint/builtins/gen/var/extractBits/a99a8d.wgsl.expected.glsl
index 76c2cc3..29f38ec 100644
--- a/test/tint/builtins/gen/var/extractBits/a99a8d.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/extractBits/a99a8d.wgsl.expected.glsl
@@ -11,11 +11,10 @@
uint arg_1 = 1u;
uint arg_2 = 1u;
ivec2 v_1 = arg_0;
- uint v_2 = arg_2;
- uint v_3 = min(arg_1, 32u);
- uint v_4 = min(v_2, (32u - v_3));
- int v_5 = int(v_3);
- ivec2 res = bitfieldExtract(v_1, v_5, int(v_4));
+ uint v_2 = min(arg_1, 32u);
+ uint v_3 = min(arg_2, (32u - v_2));
+ int v_4 = int(v_2);
+ ivec2 res = bitfieldExtract(v_1, v_4, int(v_3));
return res;
}
void main() {
@@ -32,11 +31,10 @@
uint arg_1 = 1u;
uint arg_2 = 1u;
ivec2 v_1 = arg_0;
- uint v_2 = arg_2;
- uint v_3 = min(arg_1, 32u);
- uint v_4 = min(v_2, (32u - v_3));
- int v_5 = int(v_3);
- ivec2 res = bitfieldExtract(v_1, v_5, int(v_4));
+ uint v_2 = min(arg_1, 32u);
+ uint v_3 = min(arg_2, (32u - v_2));
+ int v_4 = int(v_2);
+ ivec2 res = bitfieldExtract(v_1, v_4, int(v_3));
return res;
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
@@ -57,11 +55,10 @@
uint arg_1 = 1u;
uint arg_2 = 1u;
ivec2 v = arg_0;
- uint v_1 = arg_2;
- uint v_2 = min(arg_1, 32u);
- uint v_3 = min(v_1, (32u - v_2));
- int v_4 = int(v_2);
- ivec2 res = bitfieldExtract(v, v_4, int(v_3));
+ uint v_1 = min(arg_1, 32u);
+ uint v_2 = min(arg_2, (32u - v_1));
+ int v_3 = int(v_1);
+ ivec2 res = bitfieldExtract(v, v_3, int(v_2));
return res;
}
VertexOutput vertex_main_inner() {
@@ -71,10 +68,10 @@
return tint_symbol;
}
void main() {
- VertexOutput v_5 = vertex_main_inner();
- gl_Position = v_5.pos;
+ VertexOutput v_4 = vertex_main_inner();
+ gl_Position = v_4.pos;
gl_Position[1u] = -(gl_Position.y);
gl_Position[2u] = ((2.0f * gl_Position.z) - gl_Position.w);
- vertex_main_loc0_Output = v_5.prevent_dce;
+ vertex_main_loc0_Output = v_4.prevent_dce;
gl_PointSize = 1.0f;
}
diff --git a/test/tint/builtins/gen/var/extractBits/a99a8d.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/gen/var/extractBits/a99a8d.wgsl.expected.ir.dxc.hlsl
index c8ed297..716a405 100644
--- a/test/tint/builtins/gen/var/extractBits/a99a8d.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/gen/var/extractBits/a99a8d.wgsl.expected.ir.dxc.hlsl
@@ -15,11 +15,10 @@
uint arg_1 = 1u;
uint arg_2 = 1u;
int2 v = arg_0;
- uint v_1 = arg_2;
- uint v_2 = min(arg_1, 32u);
- uint v_3 = (32u - min(32u, (v_2 + v_1)));
- int2 v_4 = (((v_3 < 32u)) ? ((v << uint2((v_3).xx))) : ((int(0)).xx));
- int2 res = ((((v_3 + v_2) < 32u)) ? ((v_4 >> uint2(((v_3 + v_2)).xx))) : (((v_4 >> (31u).xx) >> (1u).xx)));
+ uint v_1 = min(arg_1, 32u);
+ uint v_2 = (32u - min(32u, (v_1 + arg_2)));
+ int2 v_3 = (((v_2 < 32u)) ? ((v << uint2((v_2).xx))) : ((int(0)).xx));
+ int2 res = ((((v_2 + v_1) < 32u)) ? ((v_3 >> uint2(((v_2 + v_1)).xx))) : (((v_3 >> (31u).xx) >> (1u).xx)));
return res;
}
@@ -36,13 +35,13 @@
VertexOutput tint_symbol = (VertexOutput)0;
tint_symbol.pos = (0.0f).xxxx;
tint_symbol.prevent_dce = extractBits_a99a8d();
- VertexOutput v_5 = tint_symbol;
- return v_5;
+ VertexOutput v_4 = tint_symbol;
+ return v_4;
}
vertex_main_outputs vertex_main() {
- VertexOutput v_6 = vertex_main_inner();
- vertex_main_outputs v_7 = {v_6.prevent_dce, v_6.pos};
- return v_7;
+ VertexOutput v_5 = vertex_main_inner();
+ vertex_main_outputs v_6 = {v_5.prevent_dce, v_5.pos};
+ return v_6;
}
diff --git a/test/tint/builtins/gen/var/extractBits/a99a8d.wgsl.expected.ir.fxc.hlsl b/test/tint/builtins/gen/var/extractBits/a99a8d.wgsl.expected.ir.fxc.hlsl
index c8ed297..716a405 100644
--- a/test/tint/builtins/gen/var/extractBits/a99a8d.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/builtins/gen/var/extractBits/a99a8d.wgsl.expected.ir.fxc.hlsl
@@ -15,11 +15,10 @@
uint arg_1 = 1u;
uint arg_2 = 1u;
int2 v = arg_0;
- uint v_1 = arg_2;
- uint v_2 = min(arg_1, 32u);
- uint v_3 = (32u - min(32u, (v_2 + v_1)));
- int2 v_4 = (((v_3 < 32u)) ? ((v << uint2((v_3).xx))) : ((int(0)).xx));
- int2 res = ((((v_3 + v_2) < 32u)) ? ((v_4 >> uint2(((v_3 + v_2)).xx))) : (((v_4 >> (31u).xx) >> (1u).xx)));
+ uint v_1 = min(arg_1, 32u);
+ uint v_2 = (32u - min(32u, (v_1 + arg_2)));
+ int2 v_3 = (((v_2 < 32u)) ? ((v << uint2((v_2).xx))) : ((int(0)).xx));
+ int2 res = ((((v_2 + v_1) < 32u)) ? ((v_3 >> uint2(((v_2 + v_1)).xx))) : (((v_3 >> (31u).xx) >> (1u).xx)));
return res;
}
@@ -36,13 +35,13 @@
VertexOutput tint_symbol = (VertexOutput)0;
tint_symbol.pos = (0.0f).xxxx;
tint_symbol.prevent_dce = extractBits_a99a8d();
- VertexOutput v_5 = tint_symbol;
- return v_5;
+ VertexOutput v_4 = tint_symbol;
+ return v_4;
}
vertex_main_outputs vertex_main() {
- VertexOutput v_6 = vertex_main_inner();
- vertex_main_outputs v_7 = {v_6.prevent_dce, v_6.pos};
- return v_7;
+ VertexOutput v_5 = vertex_main_inner();
+ vertex_main_outputs v_6 = {v_5.prevent_dce, v_5.pos};
+ return v_6;
}
diff --git a/test/tint/builtins/gen/var/extractBits/a99a8d.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/extractBits/a99a8d.wgsl.expected.ir.msl
index b497c43..0826377 100644
--- a/test/tint/builtins/gen/var/extractBits/a99a8d.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/extractBits/a99a8d.wgsl.expected.ir.msl
@@ -19,10 +19,8 @@
int2 arg_0 = int2(1);
uint arg_1 = 1u;
uint arg_2 = 1u;
- int2 const v = arg_0;
- uint const v_1 = arg_2;
- uint const v_2 = min(arg_1, 32u);
- int2 res = extract_bits(v, v_2, min(v_1, (32u - v_2)));
+ uint const v = min(arg_1, 32u);
+ int2 res = extract_bits(arg_0, v, min(arg_2, (32u - v)));
return res;
}
@@ -44,9 +42,9 @@
}
vertex vertex_main_outputs vertex_main() {
- VertexOutput const v_3 = vertex_main_inner();
+ VertexOutput const v_1 = vertex_main_inner();
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_3.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_3.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v_1.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/extractBits/ce81f8.wgsl.expected.glsl b/test/tint/builtins/gen/var/extractBits/ce81f8.wgsl.expected.glsl
index b2a76e9..aacab76 100644
--- a/test/tint/builtins/gen/var/extractBits/ce81f8.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/extractBits/ce81f8.wgsl.expected.glsl
@@ -11,11 +11,10 @@
uint arg_1 = 1u;
uint arg_2 = 1u;
uint v_1 = arg_0;
- uint v_2 = arg_2;
- uint v_3 = min(arg_1, 32u);
- uint v_4 = min(v_2, (32u - v_3));
- int v_5 = int(v_3);
- uint res = bitfieldExtract(v_1, v_5, int(v_4));
+ uint v_2 = min(arg_1, 32u);
+ uint v_3 = min(arg_2, (32u - v_2));
+ int v_4 = int(v_2);
+ uint res = bitfieldExtract(v_1, v_4, int(v_3));
return res;
}
void main() {
@@ -32,11 +31,10 @@
uint arg_1 = 1u;
uint arg_2 = 1u;
uint v_1 = arg_0;
- uint v_2 = arg_2;
- uint v_3 = min(arg_1, 32u);
- uint v_4 = min(v_2, (32u - v_3));
- int v_5 = int(v_3);
- uint res = bitfieldExtract(v_1, v_5, int(v_4));
+ uint v_2 = min(arg_1, 32u);
+ uint v_3 = min(arg_2, (32u - v_2));
+ int v_4 = int(v_2);
+ uint res = bitfieldExtract(v_1, v_4, int(v_3));
return res;
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
@@ -57,11 +55,10 @@
uint arg_1 = 1u;
uint arg_2 = 1u;
uint v = arg_0;
- uint v_1 = arg_2;
- uint v_2 = min(arg_1, 32u);
- uint v_3 = min(v_1, (32u - v_2));
- int v_4 = int(v_2);
- uint res = bitfieldExtract(v, v_4, int(v_3));
+ uint v_1 = min(arg_1, 32u);
+ uint v_2 = min(arg_2, (32u - v_1));
+ int v_3 = int(v_1);
+ uint res = bitfieldExtract(v, v_3, int(v_2));
return res;
}
VertexOutput vertex_main_inner() {
@@ -71,10 +68,10 @@
return tint_symbol;
}
void main() {
- VertexOutput v_5 = vertex_main_inner();
- gl_Position = v_5.pos;
+ VertexOutput v_4 = vertex_main_inner();
+ gl_Position = v_4.pos;
gl_Position[1u] = -(gl_Position.y);
gl_Position[2u] = ((2.0f * gl_Position.z) - gl_Position.w);
- vertex_main_loc0_Output = v_5.prevent_dce;
+ vertex_main_loc0_Output = v_4.prevent_dce;
gl_PointSize = 1.0f;
}
diff --git a/test/tint/builtins/gen/var/extractBits/ce81f8.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/gen/var/extractBits/ce81f8.wgsl.expected.ir.dxc.hlsl
index 0b3d757..78df095 100644
--- a/test/tint/builtins/gen/var/extractBits/ce81f8.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/gen/var/extractBits/ce81f8.wgsl.expected.ir.dxc.hlsl
@@ -15,11 +15,10 @@
uint arg_1 = 1u;
uint arg_2 = 1u;
uint v = arg_0;
- uint v_1 = arg_2;
- uint v_2 = min(arg_1, 32u);
- uint v_3 = (32u - min(32u, (v_2 + v_1)));
- uint v_4 = (((v_3 < 32u)) ? ((v << uint(v_3))) : (0u));
- uint res = ((((v_3 + v_2) < 32u)) ? ((v_4 >> uint((v_3 + v_2)))) : (((v_4 >> 31u) >> 1u)));
+ uint v_1 = min(arg_1, 32u);
+ uint v_2 = (32u - min(32u, (v_1 + arg_2)));
+ uint v_3 = (((v_2 < 32u)) ? ((v << uint(v_2))) : (0u));
+ uint res = ((((v_2 + v_1) < 32u)) ? ((v_3 >> uint((v_2 + v_1)))) : (((v_3 >> 31u) >> 1u)));
return res;
}
@@ -36,13 +35,13 @@
VertexOutput tint_symbol = (VertexOutput)0;
tint_symbol.pos = (0.0f).xxxx;
tint_symbol.prevent_dce = extractBits_ce81f8();
- VertexOutput v_5 = tint_symbol;
- return v_5;
+ VertexOutput v_4 = tint_symbol;
+ return v_4;
}
vertex_main_outputs vertex_main() {
- VertexOutput v_6 = vertex_main_inner();
- vertex_main_outputs v_7 = {v_6.prevent_dce, v_6.pos};
- return v_7;
+ VertexOutput v_5 = vertex_main_inner();
+ vertex_main_outputs v_6 = {v_5.prevent_dce, v_5.pos};
+ return v_6;
}
diff --git a/test/tint/builtins/gen/var/extractBits/ce81f8.wgsl.expected.ir.fxc.hlsl b/test/tint/builtins/gen/var/extractBits/ce81f8.wgsl.expected.ir.fxc.hlsl
index 0b3d757..78df095 100644
--- a/test/tint/builtins/gen/var/extractBits/ce81f8.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/builtins/gen/var/extractBits/ce81f8.wgsl.expected.ir.fxc.hlsl
@@ -15,11 +15,10 @@
uint arg_1 = 1u;
uint arg_2 = 1u;
uint v = arg_0;
- uint v_1 = arg_2;
- uint v_2 = min(arg_1, 32u);
- uint v_3 = (32u - min(32u, (v_2 + v_1)));
- uint v_4 = (((v_3 < 32u)) ? ((v << uint(v_3))) : (0u));
- uint res = ((((v_3 + v_2) < 32u)) ? ((v_4 >> uint((v_3 + v_2)))) : (((v_4 >> 31u) >> 1u)));
+ uint v_1 = min(arg_1, 32u);
+ uint v_2 = (32u - min(32u, (v_1 + arg_2)));
+ uint v_3 = (((v_2 < 32u)) ? ((v << uint(v_2))) : (0u));
+ uint res = ((((v_2 + v_1) < 32u)) ? ((v_3 >> uint((v_2 + v_1)))) : (((v_3 >> 31u) >> 1u)));
return res;
}
@@ -36,13 +35,13 @@
VertexOutput tint_symbol = (VertexOutput)0;
tint_symbol.pos = (0.0f).xxxx;
tint_symbol.prevent_dce = extractBits_ce81f8();
- VertexOutput v_5 = tint_symbol;
- return v_5;
+ VertexOutput v_4 = tint_symbol;
+ return v_4;
}
vertex_main_outputs vertex_main() {
- VertexOutput v_6 = vertex_main_inner();
- vertex_main_outputs v_7 = {v_6.prevent_dce, v_6.pos};
- return v_7;
+ VertexOutput v_5 = vertex_main_inner();
+ vertex_main_outputs v_6 = {v_5.prevent_dce, v_5.pos};
+ return v_6;
}
diff --git a/test/tint/builtins/gen/var/extractBits/ce81f8.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/extractBits/ce81f8.wgsl.expected.ir.msl
index 227eb82..adf99c0 100644
--- a/test/tint/builtins/gen/var/extractBits/ce81f8.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/extractBits/ce81f8.wgsl.expected.ir.msl
@@ -19,10 +19,8 @@
uint arg_0 = 1u;
uint arg_1 = 1u;
uint arg_2 = 1u;
- uint const v = arg_0;
- uint const v_1 = arg_2;
- uint const v_2 = min(arg_1, 32u);
- uint res = extract_bits(v, v_2, min(v_1, (32u - v_2)));
+ uint const v = min(arg_1, 32u);
+ uint res = extract_bits(arg_0, v, min(arg_2, (32u - v)));
return res;
}
@@ -44,9 +42,9 @@
}
vertex vertex_main_outputs vertex_main() {
- VertexOutput const v_3 = vertex_main_inner();
+ VertexOutput const v_1 = vertex_main_inner();
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_3.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_3.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v_1.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/extractBits/e04f5d.wgsl.expected.glsl b/test/tint/builtins/gen/var/extractBits/e04f5d.wgsl.expected.glsl
index 2f4bf52..fee3921 100644
--- a/test/tint/builtins/gen/var/extractBits/e04f5d.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/extractBits/e04f5d.wgsl.expected.glsl
@@ -11,11 +11,10 @@
uint arg_1 = 1u;
uint arg_2 = 1u;
ivec3 v_1 = arg_0;
- uint v_2 = arg_2;
- uint v_3 = min(arg_1, 32u);
- uint v_4 = min(v_2, (32u - v_3));
- int v_5 = int(v_3);
- ivec3 res = bitfieldExtract(v_1, v_5, int(v_4));
+ uint v_2 = min(arg_1, 32u);
+ uint v_3 = min(arg_2, (32u - v_2));
+ int v_4 = int(v_2);
+ ivec3 res = bitfieldExtract(v_1, v_4, int(v_3));
return res;
}
void main() {
@@ -32,11 +31,10 @@
uint arg_1 = 1u;
uint arg_2 = 1u;
ivec3 v_1 = arg_0;
- uint v_2 = arg_2;
- uint v_3 = min(arg_1, 32u);
- uint v_4 = min(v_2, (32u - v_3));
- int v_5 = int(v_3);
- ivec3 res = bitfieldExtract(v_1, v_5, int(v_4));
+ uint v_2 = min(arg_1, 32u);
+ uint v_3 = min(arg_2, (32u - v_2));
+ int v_4 = int(v_2);
+ ivec3 res = bitfieldExtract(v_1, v_4, int(v_3));
return res;
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
@@ -57,11 +55,10 @@
uint arg_1 = 1u;
uint arg_2 = 1u;
ivec3 v = arg_0;
- uint v_1 = arg_2;
- uint v_2 = min(arg_1, 32u);
- uint v_3 = min(v_1, (32u - v_2));
- int v_4 = int(v_2);
- ivec3 res = bitfieldExtract(v, v_4, int(v_3));
+ uint v_1 = min(arg_1, 32u);
+ uint v_2 = min(arg_2, (32u - v_1));
+ int v_3 = int(v_1);
+ ivec3 res = bitfieldExtract(v, v_3, int(v_2));
return res;
}
VertexOutput vertex_main_inner() {
@@ -71,10 +68,10 @@
return tint_symbol;
}
void main() {
- VertexOutput v_5 = vertex_main_inner();
- gl_Position = v_5.pos;
+ VertexOutput v_4 = vertex_main_inner();
+ gl_Position = v_4.pos;
gl_Position[1u] = -(gl_Position.y);
gl_Position[2u] = ((2.0f * gl_Position.z) - gl_Position.w);
- vertex_main_loc0_Output = v_5.prevent_dce;
+ vertex_main_loc0_Output = v_4.prevent_dce;
gl_PointSize = 1.0f;
}
diff --git a/test/tint/builtins/gen/var/extractBits/e04f5d.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/gen/var/extractBits/e04f5d.wgsl.expected.ir.dxc.hlsl
index b8fa436..655af51 100644
--- a/test/tint/builtins/gen/var/extractBits/e04f5d.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/gen/var/extractBits/e04f5d.wgsl.expected.ir.dxc.hlsl
@@ -15,11 +15,10 @@
uint arg_1 = 1u;
uint arg_2 = 1u;
int3 v = arg_0;
- uint v_1 = arg_2;
- uint v_2 = min(arg_1, 32u);
- uint v_3 = (32u - min(32u, (v_2 + v_1)));
- int3 v_4 = (((v_3 < 32u)) ? ((v << uint3((v_3).xxx))) : ((int(0)).xxx));
- int3 res = ((((v_3 + v_2) < 32u)) ? ((v_4 >> uint3(((v_3 + v_2)).xxx))) : (((v_4 >> (31u).xxx) >> (1u).xxx)));
+ uint v_1 = min(arg_1, 32u);
+ uint v_2 = (32u - min(32u, (v_1 + arg_2)));
+ int3 v_3 = (((v_2 < 32u)) ? ((v << uint3((v_2).xxx))) : ((int(0)).xxx));
+ int3 res = ((((v_2 + v_1) < 32u)) ? ((v_3 >> uint3(((v_2 + v_1)).xxx))) : (((v_3 >> (31u).xxx) >> (1u).xxx)));
return res;
}
@@ -36,13 +35,13 @@
VertexOutput tint_symbol = (VertexOutput)0;
tint_symbol.pos = (0.0f).xxxx;
tint_symbol.prevent_dce = extractBits_e04f5d();
- VertexOutput v_5 = tint_symbol;
- return v_5;
+ VertexOutput v_4 = tint_symbol;
+ return v_4;
}
vertex_main_outputs vertex_main() {
- VertexOutput v_6 = vertex_main_inner();
- vertex_main_outputs v_7 = {v_6.prevent_dce, v_6.pos};
- return v_7;
+ VertexOutput v_5 = vertex_main_inner();
+ vertex_main_outputs v_6 = {v_5.prevent_dce, v_5.pos};
+ return v_6;
}
diff --git a/test/tint/builtins/gen/var/extractBits/e04f5d.wgsl.expected.ir.fxc.hlsl b/test/tint/builtins/gen/var/extractBits/e04f5d.wgsl.expected.ir.fxc.hlsl
index b8fa436..655af51 100644
--- a/test/tint/builtins/gen/var/extractBits/e04f5d.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/builtins/gen/var/extractBits/e04f5d.wgsl.expected.ir.fxc.hlsl
@@ -15,11 +15,10 @@
uint arg_1 = 1u;
uint arg_2 = 1u;
int3 v = arg_0;
- uint v_1 = arg_2;
- uint v_2 = min(arg_1, 32u);
- uint v_3 = (32u - min(32u, (v_2 + v_1)));
- int3 v_4 = (((v_3 < 32u)) ? ((v << uint3((v_3).xxx))) : ((int(0)).xxx));
- int3 res = ((((v_3 + v_2) < 32u)) ? ((v_4 >> uint3(((v_3 + v_2)).xxx))) : (((v_4 >> (31u).xxx) >> (1u).xxx)));
+ uint v_1 = min(arg_1, 32u);
+ uint v_2 = (32u - min(32u, (v_1 + arg_2)));
+ int3 v_3 = (((v_2 < 32u)) ? ((v << uint3((v_2).xxx))) : ((int(0)).xxx));
+ int3 res = ((((v_2 + v_1) < 32u)) ? ((v_3 >> uint3(((v_2 + v_1)).xxx))) : (((v_3 >> (31u).xxx) >> (1u).xxx)));
return res;
}
@@ -36,13 +35,13 @@
VertexOutput tint_symbol = (VertexOutput)0;
tint_symbol.pos = (0.0f).xxxx;
tint_symbol.prevent_dce = extractBits_e04f5d();
- VertexOutput v_5 = tint_symbol;
- return v_5;
+ VertexOutput v_4 = tint_symbol;
+ return v_4;
}
vertex_main_outputs vertex_main() {
- VertexOutput v_6 = vertex_main_inner();
- vertex_main_outputs v_7 = {v_6.prevent_dce, v_6.pos};
- return v_7;
+ VertexOutput v_5 = vertex_main_inner();
+ vertex_main_outputs v_6 = {v_5.prevent_dce, v_5.pos};
+ return v_6;
}
diff --git a/test/tint/builtins/gen/var/extractBits/e04f5d.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/extractBits/e04f5d.wgsl.expected.ir.msl
index d3f88cf..6300284 100644
--- a/test/tint/builtins/gen/var/extractBits/e04f5d.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/extractBits/e04f5d.wgsl.expected.ir.msl
@@ -19,10 +19,8 @@
int3 arg_0 = int3(1);
uint arg_1 = 1u;
uint arg_2 = 1u;
- int3 const v = arg_0;
- uint const v_1 = arg_2;
- uint const v_2 = min(arg_1, 32u);
- int3 res = extract_bits(v, v_2, min(v_1, (32u - v_2)));
+ uint const v = min(arg_1, 32u);
+ int3 res = extract_bits(arg_0, v, min(arg_2, (32u - v)));
return res;
}
@@ -44,9 +42,9 @@
}
vertex vertex_main_outputs vertex_main() {
- VertexOutput const v_3 = vertex_main_inner();
+ VertexOutput const v_1 = vertex_main_inner();
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_3.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_3.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v_1.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/extractBits/f28f69.wgsl.expected.glsl b/test/tint/builtins/gen/var/extractBits/f28f69.wgsl.expected.glsl
index 48aaa99..b1f5b29 100644
--- a/test/tint/builtins/gen/var/extractBits/f28f69.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/extractBits/f28f69.wgsl.expected.glsl
@@ -11,11 +11,10 @@
uint arg_1 = 1u;
uint arg_2 = 1u;
uvec2 v_1 = arg_0;
- uint v_2 = arg_2;
- uint v_3 = min(arg_1, 32u);
- uint v_4 = min(v_2, (32u - v_3));
- int v_5 = int(v_3);
- uvec2 res = bitfieldExtract(v_1, v_5, int(v_4));
+ uint v_2 = min(arg_1, 32u);
+ uint v_3 = min(arg_2, (32u - v_2));
+ int v_4 = int(v_2);
+ uvec2 res = bitfieldExtract(v_1, v_4, int(v_3));
return res;
}
void main() {
@@ -32,11 +31,10 @@
uint arg_1 = 1u;
uint arg_2 = 1u;
uvec2 v_1 = arg_0;
- uint v_2 = arg_2;
- uint v_3 = min(arg_1, 32u);
- uint v_4 = min(v_2, (32u - v_3));
- int v_5 = int(v_3);
- uvec2 res = bitfieldExtract(v_1, v_5, int(v_4));
+ uint v_2 = min(arg_1, 32u);
+ uint v_3 = min(arg_2, (32u - v_2));
+ int v_4 = int(v_2);
+ uvec2 res = bitfieldExtract(v_1, v_4, int(v_3));
return res;
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
@@ -57,11 +55,10 @@
uint arg_1 = 1u;
uint arg_2 = 1u;
uvec2 v = arg_0;
- uint v_1 = arg_2;
- uint v_2 = min(arg_1, 32u);
- uint v_3 = min(v_1, (32u - v_2));
- int v_4 = int(v_2);
- uvec2 res = bitfieldExtract(v, v_4, int(v_3));
+ uint v_1 = min(arg_1, 32u);
+ uint v_2 = min(arg_2, (32u - v_1));
+ int v_3 = int(v_1);
+ uvec2 res = bitfieldExtract(v, v_3, int(v_2));
return res;
}
VertexOutput vertex_main_inner() {
@@ -71,10 +68,10 @@
return tint_symbol;
}
void main() {
- VertexOutput v_5 = vertex_main_inner();
- gl_Position = v_5.pos;
+ VertexOutput v_4 = vertex_main_inner();
+ gl_Position = v_4.pos;
gl_Position[1u] = -(gl_Position.y);
gl_Position[2u] = ((2.0f * gl_Position.z) - gl_Position.w);
- vertex_main_loc0_Output = v_5.prevent_dce;
+ vertex_main_loc0_Output = v_4.prevent_dce;
gl_PointSize = 1.0f;
}
diff --git a/test/tint/builtins/gen/var/extractBits/f28f69.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/gen/var/extractBits/f28f69.wgsl.expected.ir.dxc.hlsl
index a55acd4..b3f37e6 100644
--- a/test/tint/builtins/gen/var/extractBits/f28f69.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/gen/var/extractBits/f28f69.wgsl.expected.ir.dxc.hlsl
@@ -15,11 +15,10 @@
uint arg_1 = 1u;
uint arg_2 = 1u;
uint2 v = arg_0;
- uint v_1 = arg_2;
- uint v_2 = min(arg_1, 32u);
- uint v_3 = (32u - min(32u, (v_2 + v_1)));
- uint2 v_4 = (((v_3 < 32u)) ? ((v << uint2((v_3).xx))) : ((0u).xx));
- uint2 res = ((((v_3 + v_2) < 32u)) ? ((v_4 >> uint2(((v_3 + v_2)).xx))) : (((v_4 >> (31u).xx) >> (1u).xx)));
+ uint v_1 = min(arg_1, 32u);
+ uint v_2 = (32u - min(32u, (v_1 + arg_2)));
+ uint2 v_3 = (((v_2 < 32u)) ? ((v << uint2((v_2).xx))) : ((0u).xx));
+ uint2 res = ((((v_2 + v_1) < 32u)) ? ((v_3 >> uint2(((v_2 + v_1)).xx))) : (((v_3 >> (31u).xx) >> (1u).xx)));
return res;
}
@@ -36,13 +35,13 @@
VertexOutput tint_symbol = (VertexOutput)0;
tint_symbol.pos = (0.0f).xxxx;
tint_symbol.prevent_dce = extractBits_f28f69();
- VertexOutput v_5 = tint_symbol;
- return v_5;
+ VertexOutput v_4 = tint_symbol;
+ return v_4;
}
vertex_main_outputs vertex_main() {
- VertexOutput v_6 = vertex_main_inner();
- vertex_main_outputs v_7 = {v_6.prevent_dce, v_6.pos};
- return v_7;
+ VertexOutput v_5 = vertex_main_inner();
+ vertex_main_outputs v_6 = {v_5.prevent_dce, v_5.pos};
+ return v_6;
}
diff --git a/test/tint/builtins/gen/var/extractBits/f28f69.wgsl.expected.ir.fxc.hlsl b/test/tint/builtins/gen/var/extractBits/f28f69.wgsl.expected.ir.fxc.hlsl
index a55acd4..b3f37e6 100644
--- a/test/tint/builtins/gen/var/extractBits/f28f69.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/builtins/gen/var/extractBits/f28f69.wgsl.expected.ir.fxc.hlsl
@@ -15,11 +15,10 @@
uint arg_1 = 1u;
uint arg_2 = 1u;
uint2 v = arg_0;
- uint v_1 = arg_2;
- uint v_2 = min(arg_1, 32u);
- uint v_3 = (32u - min(32u, (v_2 + v_1)));
- uint2 v_4 = (((v_3 < 32u)) ? ((v << uint2((v_3).xx))) : ((0u).xx));
- uint2 res = ((((v_3 + v_2) < 32u)) ? ((v_4 >> uint2(((v_3 + v_2)).xx))) : (((v_4 >> (31u).xx) >> (1u).xx)));
+ uint v_1 = min(arg_1, 32u);
+ uint v_2 = (32u - min(32u, (v_1 + arg_2)));
+ uint2 v_3 = (((v_2 < 32u)) ? ((v << uint2((v_2).xx))) : ((0u).xx));
+ uint2 res = ((((v_2 + v_1) < 32u)) ? ((v_3 >> uint2(((v_2 + v_1)).xx))) : (((v_3 >> (31u).xx) >> (1u).xx)));
return res;
}
@@ -36,13 +35,13 @@
VertexOutput tint_symbol = (VertexOutput)0;
tint_symbol.pos = (0.0f).xxxx;
tint_symbol.prevent_dce = extractBits_f28f69();
- VertexOutput v_5 = tint_symbol;
- return v_5;
+ VertexOutput v_4 = tint_symbol;
+ return v_4;
}
vertex_main_outputs vertex_main() {
- VertexOutput v_6 = vertex_main_inner();
- vertex_main_outputs v_7 = {v_6.prevent_dce, v_6.pos};
- return v_7;
+ VertexOutput v_5 = vertex_main_inner();
+ vertex_main_outputs v_6 = {v_5.prevent_dce, v_5.pos};
+ return v_6;
}
diff --git a/test/tint/builtins/gen/var/extractBits/f28f69.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/extractBits/f28f69.wgsl.expected.ir.msl
index 92ed21e..08e7311 100644
--- a/test/tint/builtins/gen/var/extractBits/f28f69.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/extractBits/f28f69.wgsl.expected.ir.msl
@@ -19,10 +19,8 @@
uint2 arg_0 = uint2(1u);
uint arg_1 = 1u;
uint arg_2 = 1u;
- uint2 const v = arg_0;
- uint const v_1 = arg_2;
- uint const v_2 = min(arg_1, 32u);
- uint2 res = extract_bits(v, v_2, min(v_1, (32u - v_2)));
+ uint const v = min(arg_1, 32u);
+ uint2 res = extract_bits(arg_0, v, min(arg_2, (32u - v)));
return res;
}
@@ -44,9 +42,9 @@
}
vertex vertex_main_outputs vertex_main() {
- VertexOutput const v_3 = vertex_main_inner();
+ VertexOutput const v_1 = vertex_main_inner();
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_3.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_3.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v_1.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/extractBits/fb850f.wgsl.expected.glsl b/test/tint/builtins/gen/var/extractBits/fb850f.wgsl.expected.glsl
index 324498c..4328120 100644
--- a/test/tint/builtins/gen/var/extractBits/fb850f.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/extractBits/fb850f.wgsl.expected.glsl
@@ -11,11 +11,10 @@
uint arg_1 = 1u;
uint arg_2 = 1u;
ivec4 v_1 = arg_0;
- uint v_2 = arg_2;
- uint v_3 = min(arg_1, 32u);
- uint v_4 = min(v_2, (32u - v_3));
- int v_5 = int(v_3);
- ivec4 res = bitfieldExtract(v_1, v_5, int(v_4));
+ uint v_2 = min(arg_1, 32u);
+ uint v_3 = min(arg_2, (32u - v_2));
+ int v_4 = int(v_2);
+ ivec4 res = bitfieldExtract(v_1, v_4, int(v_3));
return res;
}
void main() {
@@ -32,11 +31,10 @@
uint arg_1 = 1u;
uint arg_2 = 1u;
ivec4 v_1 = arg_0;
- uint v_2 = arg_2;
- uint v_3 = min(arg_1, 32u);
- uint v_4 = min(v_2, (32u - v_3));
- int v_5 = int(v_3);
- ivec4 res = bitfieldExtract(v_1, v_5, int(v_4));
+ uint v_2 = min(arg_1, 32u);
+ uint v_3 = min(arg_2, (32u - v_2));
+ int v_4 = int(v_2);
+ ivec4 res = bitfieldExtract(v_1, v_4, int(v_3));
return res;
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
@@ -57,11 +55,10 @@
uint arg_1 = 1u;
uint arg_2 = 1u;
ivec4 v = arg_0;
- uint v_1 = arg_2;
- uint v_2 = min(arg_1, 32u);
- uint v_3 = min(v_1, (32u - v_2));
- int v_4 = int(v_2);
- ivec4 res = bitfieldExtract(v, v_4, int(v_3));
+ uint v_1 = min(arg_1, 32u);
+ uint v_2 = min(arg_2, (32u - v_1));
+ int v_3 = int(v_1);
+ ivec4 res = bitfieldExtract(v, v_3, int(v_2));
return res;
}
VertexOutput vertex_main_inner() {
@@ -71,10 +68,10 @@
return tint_symbol;
}
void main() {
- VertexOutput v_5 = vertex_main_inner();
- gl_Position = v_5.pos;
+ VertexOutput v_4 = vertex_main_inner();
+ gl_Position = v_4.pos;
gl_Position[1u] = -(gl_Position.y);
gl_Position[2u] = ((2.0f * gl_Position.z) - gl_Position.w);
- vertex_main_loc0_Output = v_5.prevent_dce;
+ vertex_main_loc0_Output = v_4.prevent_dce;
gl_PointSize = 1.0f;
}
diff --git a/test/tint/builtins/gen/var/extractBits/fb850f.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/gen/var/extractBits/fb850f.wgsl.expected.ir.dxc.hlsl
index d2428f8..7280da2 100644
--- a/test/tint/builtins/gen/var/extractBits/fb850f.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/gen/var/extractBits/fb850f.wgsl.expected.ir.dxc.hlsl
@@ -15,11 +15,10 @@
uint arg_1 = 1u;
uint arg_2 = 1u;
int4 v = arg_0;
- uint v_1 = arg_2;
- uint v_2 = min(arg_1, 32u);
- uint v_3 = (32u - min(32u, (v_2 + v_1)));
- int4 v_4 = (((v_3 < 32u)) ? ((v << uint4((v_3).xxxx))) : ((int(0)).xxxx));
- int4 res = ((((v_3 + v_2) < 32u)) ? ((v_4 >> uint4(((v_3 + v_2)).xxxx))) : (((v_4 >> (31u).xxxx) >> (1u).xxxx)));
+ uint v_1 = min(arg_1, 32u);
+ uint v_2 = (32u - min(32u, (v_1 + arg_2)));
+ int4 v_3 = (((v_2 < 32u)) ? ((v << uint4((v_2).xxxx))) : ((int(0)).xxxx));
+ int4 res = ((((v_2 + v_1) < 32u)) ? ((v_3 >> uint4(((v_2 + v_1)).xxxx))) : (((v_3 >> (31u).xxxx) >> (1u).xxxx)));
return res;
}
@@ -36,13 +35,13 @@
VertexOutput tint_symbol = (VertexOutput)0;
tint_symbol.pos = (0.0f).xxxx;
tint_symbol.prevent_dce = extractBits_fb850f();
- VertexOutput v_5 = tint_symbol;
- return v_5;
+ VertexOutput v_4 = tint_symbol;
+ return v_4;
}
vertex_main_outputs vertex_main() {
- VertexOutput v_6 = vertex_main_inner();
- vertex_main_outputs v_7 = {v_6.prevent_dce, v_6.pos};
- return v_7;
+ VertexOutput v_5 = vertex_main_inner();
+ vertex_main_outputs v_6 = {v_5.prevent_dce, v_5.pos};
+ return v_6;
}
diff --git a/test/tint/builtins/gen/var/extractBits/fb850f.wgsl.expected.ir.fxc.hlsl b/test/tint/builtins/gen/var/extractBits/fb850f.wgsl.expected.ir.fxc.hlsl
index d2428f8..7280da2 100644
--- a/test/tint/builtins/gen/var/extractBits/fb850f.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/builtins/gen/var/extractBits/fb850f.wgsl.expected.ir.fxc.hlsl
@@ -15,11 +15,10 @@
uint arg_1 = 1u;
uint arg_2 = 1u;
int4 v = arg_0;
- uint v_1 = arg_2;
- uint v_2 = min(arg_1, 32u);
- uint v_3 = (32u - min(32u, (v_2 + v_1)));
- int4 v_4 = (((v_3 < 32u)) ? ((v << uint4((v_3).xxxx))) : ((int(0)).xxxx));
- int4 res = ((((v_3 + v_2) < 32u)) ? ((v_4 >> uint4(((v_3 + v_2)).xxxx))) : (((v_4 >> (31u).xxxx) >> (1u).xxxx)));
+ uint v_1 = min(arg_1, 32u);
+ uint v_2 = (32u - min(32u, (v_1 + arg_2)));
+ int4 v_3 = (((v_2 < 32u)) ? ((v << uint4((v_2).xxxx))) : ((int(0)).xxxx));
+ int4 res = ((((v_2 + v_1) < 32u)) ? ((v_3 >> uint4(((v_2 + v_1)).xxxx))) : (((v_3 >> (31u).xxxx) >> (1u).xxxx)));
return res;
}
@@ -36,13 +35,13 @@
VertexOutput tint_symbol = (VertexOutput)0;
tint_symbol.pos = (0.0f).xxxx;
tint_symbol.prevent_dce = extractBits_fb850f();
- VertexOutput v_5 = tint_symbol;
- return v_5;
+ VertexOutput v_4 = tint_symbol;
+ return v_4;
}
vertex_main_outputs vertex_main() {
- VertexOutput v_6 = vertex_main_inner();
- vertex_main_outputs v_7 = {v_6.prevent_dce, v_6.pos};
- return v_7;
+ VertexOutput v_5 = vertex_main_inner();
+ vertex_main_outputs v_6 = {v_5.prevent_dce, v_5.pos};
+ return v_6;
}
diff --git a/test/tint/builtins/gen/var/extractBits/fb850f.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/extractBits/fb850f.wgsl.expected.ir.msl
index 898d24e..2991a7d 100644
--- a/test/tint/builtins/gen/var/extractBits/fb850f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/extractBits/fb850f.wgsl.expected.ir.msl
@@ -19,10 +19,8 @@
int4 arg_0 = int4(1);
uint arg_1 = 1u;
uint arg_2 = 1u;
- int4 const v = arg_0;
- uint const v_1 = arg_2;
- uint const v_2 = min(arg_1, 32u);
- int4 res = extract_bits(v, v_2, min(v_1, (32u - v_2)));
+ uint const v = min(arg_1, 32u);
+ int4 res = extract_bits(arg_0, v, min(arg_2, (32u - v)));
return res;
}
@@ -44,9 +42,9 @@
}
vertex vertex_main_outputs vertex_main() {
- VertexOutput const v_3 = vertex_main_inner();
+ VertexOutput const v_1 = vertex_main_inner();
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_3.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_3.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v_1.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/firstLeadingBit/000ff3.wgsl.expected.glsl b/test/tint/builtins/gen/var/firstLeadingBit/000ff3.wgsl.expected.glsl
index 5010d58..ba08519 100644
--- a/test/tint/builtins/gen/var/firstLeadingBit/000ff3.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/firstLeadingBit/000ff3.wgsl.expected.glsl
@@ -9,12 +9,7 @@
uvec4 firstLeadingBit_000ff3() {
uvec4 arg_0 = uvec4(1u);
uvec4 v_1 = arg_0;
- uvec4 v_2 = mix(uvec4(16u), uvec4(0u), equal((v_1 & uvec4(4294901760u)), uvec4(0u)));
- uvec4 v_3 = mix(uvec4(8u), uvec4(0u), equal(((v_1 >> v_2) & uvec4(65280u)), uvec4(0u)));
- uvec4 v_4 = mix(uvec4(4u), uvec4(0u), equal((((v_1 >> v_2) >> v_3) & uvec4(240u)), uvec4(0u)));
- uvec4 v_5 = mix(uvec4(2u), uvec4(0u), equal(((((v_1 >> v_2) >> v_3) >> v_4) & uvec4(12u)), uvec4(0u)));
- uvec4 v_6 = (v_2 | (v_3 | (v_4 | (v_5 | mix(uvec4(1u), uvec4(0u), equal((((((v_1 >> v_2) >> v_3) >> v_4) >> v_5) & uvec4(2u)), uvec4(0u)))))));
- uvec4 res = mix(v_6, uvec4(4294967295u), equal(((((v_1 >> v_2) >> v_3) >> v_4) >> v_5), uvec4(0u)));
+ uvec4 res = mix((mix(uvec4(16u), uvec4(0u), equal((v_1 & uvec4(4294901760u)), uvec4(0u))) | (mix(uvec4(8u), uvec4(0u), equal(((v_1 >> mix(uvec4(16u), uvec4(0u), equal((v_1 & uvec4(4294901760u)), uvec4(0u)))) & uvec4(65280u)), uvec4(0u))) | (mix(uvec4(4u), uvec4(0u), equal((((v_1 >> mix(uvec4(16u), uvec4(0u), equal((v_1 & uvec4(4294901760u)), uvec4(0u)))) >> mix(uvec4(8u), uvec4(0u), equal(((v_1 >> mix(uvec4(16u), uvec4(0u), equal((v_1 & uvec4(4294901760u)), uvec4(0u)))) & uvec4(65280u)), uvec4(0u)))) & uvec4(240u)), uvec4(0u))) | (mix(uvec4(2u), uvec4(0u), equal(((((v_1 >> mix(uvec4(16u), uvec4(0u), equal((v_1 & uvec4(4294901760u)), uvec4(0u)))) >> mix(uvec4(8u), uvec4(0u), equal(((v_1 >> mix(uvec4(16u), uvec4(0u), equal((v_1 & uvec4(4294901760u)), uvec4(0u)))) & uvec4(65280u)), uvec4(0u)))) >> mix(uvec4(4u), uvec4(0u), equal((((v_1 >> mix(uvec4(16u), uvec4(0u), equal((v_1 & uvec4(4294901760u)), uvec4(0u)))) >> mix(uvec4(8u), uvec4(0u), equal(((v_1 >> mix(uvec4(16u), uvec4(0u), equal((v_1 & uvec4(4294901760u)), uvec4(0u)))) & uvec4(65280u)), uvec4(0u)))) & uvec4(240u)), uvec4(0u)))) & uvec4(12u)), uvec4(0u))) | mix(uvec4(1u), uvec4(0u), equal((((((v_1 >> mix(uvec4(16u), uvec4(0u), equal((v_1 & uvec4(4294901760u)), uvec4(0u)))) >> mix(uvec4(8u), uvec4(0u), equal(((v_1 >> mix(uvec4(16u), uvec4(0u), equal((v_1 & uvec4(4294901760u)), uvec4(0u)))) & uvec4(65280u)), uvec4(0u)))) >> mix(uvec4(4u), uvec4(0u), equal((((v_1 >> mix(uvec4(16u), uvec4(0u), equal((v_1 & uvec4(4294901760u)), uvec4(0u)))) >> mix(uvec4(8u), uvec4(0u), equal(((v_1 >> mix(uvec4(16u), uvec4(0u), equal((v_1 & uvec4(4294901760u)), uvec4(0u)))) & uvec4(65280u)), uvec4(0u)))) & uvec4(240u)), uvec4(0u)))) >> mix(uvec4(2u), uvec4(0u), equal(((((v_1 >> mix(uvec4(16u), uvec4(0u), equal((v_1 & uvec4(4294901760u)), uvec4(0u)))) >> mix(uvec4(8u), uvec4(0u), equal(((v_1 >> mix(uvec4(16u), uvec4(0u), equal((v_1 & uvec4(4294901760u)), uvec4(0u)))) & uvec4(65280u)), uvec4(0u)))) >> mix(uvec4(4u), uvec4(0u), equal((((v_1 >> mix(uvec4(16u), uvec4(0u), equal((v_1 & uvec4(4294901760u)), uvec4(0u)))) >> mix(uvec4(8u), uvec4(0u), equal(((v_1 >> mix(uvec4(16u), uvec4(0u), equal((v_1 & uvec4(4294901760u)), uvec4(0u)))) & uvec4(65280u)), uvec4(0u)))) & uvec4(240u)), uvec4(0u)))) & uvec4(12u)), uvec4(0u)))) & uvec4(2u)), uvec4(0u))))))), uvec4(4294967295u), equal(((((v_1 >> mix(uvec4(16u), uvec4(0u), equal((v_1 & uvec4(4294901760u)), uvec4(0u)))) >> mix(uvec4(8u), uvec4(0u), equal(((v_1 >> mix(uvec4(16u), uvec4(0u), equal((v_1 & uvec4(4294901760u)), uvec4(0u)))) & uvec4(65280u)), uvec4(0u)))) >> mix(uvec4(4u), uvec4(0u), equal((((v_1 >> mix(uvec4(16u), uvec4(0u), equal((v_1 & uvec4(4294901760u)), uvec4(0u)))) >> mix(uvec4(8u), uvec4(0u), equal(((v_1 >> mix(uvec4(16u), uvec4(0u), equal((v_1 & uvec4(4294901760u)), uvec4(0u)))) & uvec4(65280u)), uvec4(0u)))) & uvec4(240u)), uvec4(0u)))) >> mix(uvec4(2u), uvec4(0u), equal(((((v_1 >> mix(uvec4(16u), uvec4(0u), equal((v_1 & uvec4(4294901760u)), uvec4(0u)))) >> mix(uvec4(8u), uvec4(0u), equal(((v_1 >> mix(uvec4(16u), uvec4(0u), equal((v_1 & uvec4(4294901760u)), uvec4(0u)))) & uvec4(65280u)), uvec4(0u)))) >> mix(uvec4(4u), uvec4(0u), equal((((v_1 >> mix(uvec4(16u), uvec4(0u), equal((v_1 & uvec4(4294901760u)), uvec4(0u)))) >> mix(uvec4(8u), uvec4(0u), equal(((v_1 >> mix(uvec4(16u), uvec4(0u), equal((v_1 & uvec4(4294901760u)), uvec4(0u)))) & uvec4(65280u)), uvec4(0u)))) & uvec4(240u)), uvec4(0u)))) & uvec4(12u)), uvec4(0u)))), uvec4(0u)));
return res;
}
void main() {
@@ -29,12 +24,7 @@
uvec4 firstLeadingBit_000ff3() {
uvec4 arg_0 = uvec4(1u);
uvec4 v_1 = arg_0;
- uvec4 v_2 = mix(uvec4(16u), uvec4(0u), equal((v_1 & uvec4(4294901760u)), uvec4(0u)));
- uvec4 v_3 = mix(uvec4(8u), uvec4(0u), equal(((v_1 >> v_2) & uvec4(65280u)), uvec4(0u)));
- uvec4 v_4 = mix(uvec4(4u), uvec4(0u), equal((((v_1 >> v_2) >> v_3) & uvec4(240u)), uvec4(0u)));
- uvec4 v_5 = mix(uvec4(2u), uvec4(0u), equal(((((v_1 >> v_2) >> v_3) >> v_4) & uvec4(12u)), uvec4(0u)));
- uvec4 v_6 = (v_2 | (v_3 | (v_4 | (v_5 | mix(uvec4(1u), uvec4(0u), equal((((((v_1 >> v_2) >> v_3) >> v_4) >> v_5) & uvec4(2u)), uvec4(0u)))))));
- uvec4 res = mix(v_6, uvec4(4294967295u), equal(((((v_1 >> v_2) >> v_3) >> v_4) >> v_5), uvec4(0u)));
+ uvec4 res = mix((mix(uvec4(16u), uvec4(0u), equal((v_1 & uvec4(4294901760u)), uvec4(0u))) | (mix(uvec4(8u), uvec4(0u), equal(((v_1 >> mix(uvec4(16u), uvec4(0u), equal((v_1 & uvec4(4294901760u)), uvec4(0u)))) & uvec4(65280u)), uvec4(0u))) | (mix(uvec4(4u), uvec4(0u), equal((((v_1 >> mix(uvec4(16u), uvec4(0u), equal((v_1 & uvec4(4294901760u)), uvec4(0u)))) >> mix(uvec4(8u), uvec4(0u), equal(((v_1 >> mix(uvec4(16u), uvec4(0u), equal((v_1 & uvec4(4294901760u)), uvec4(0u)))) & uvec4(65280u)), uvec4(0u)))) & uvec4(240u)), uvec4(0u))) | (mix(uvec4(2u), uvec4(0u), equal(((((v_1 >> mix(uvec4(16u), uvec4(0u), equal((v_1 & uvec4(4294901760u)), uvec4(0u)))) >> mix(uvec4(8u), uvec4(0u), equal(((v_1 >> mix(uvec4(16u), uvec4(0u), equal((v_1 & uvec4(4294901760u)), uvec4(0u)))) & uvec4(65280u)), uvec4(0u)))) >> mix(uvec4(4u), uvec4(0u), equal((((v_1 >> mix(uvec4(16u), uvec4(0u), equal((v_1 & uvec4(4294901760u)), uvec4(0u)))) >> mix(uvec4(8u), uvec4(0u), equal(((v_1 >> mix(uvec4(16u), uvec4(0u), equal((v_1 & uvec4(4294901760u)), uvec4(0u)))) & uvec4(65280u)), uvec4(0u)))) & uvec4(240u)), uvec4(0u)))) & uvec4(12u)), uvec4(0u))) | mix(uvec4(1u), uvec4(0u), equal((((((v_1 >> mix(uvec4(16u), uvec4(0u), equal((v_1 & uvec4(4294901760u)), uvec4(0u)))) >> mix(uvec4(8u), uvec4(0u), equal(((v_1 >> mix(uvec4(16u), uvec4(0u), equal((v_1 & uvec4(4294901760u)), uvec4(0u)))) & uvec4(65280u)), uvec4(0u)))) >> mix(uvec4(4u), uvec4(0u), equal((((v_1 >> mix(uvec4(16u), uvec4(0u), equal((v_1 & uvec4(4294901760u)), uvec4(0u)))) >> mix(uvec4(8u), uvec4(0u), equal(((v_1 >> mix(uvec4(16u), uvec4(0u), equal((v_1 & uvec4(4294901760u)), uvec4(0u)))) & uvec4(65280u)), uvec4(0u)))) & uvec4(240u)), uvec4(0u)))) >> mix(uvec4(2u), uvec4(0u), equal(((((v_1 >> mix(uvec4(16u), uvec4(0u), equal((v_1 & uvec4(4294901760u)), uvec4(0u)))) >> mix(uvec4(8u), uvec4(0u), equal(((v_1 >> mix(uvec4(16u), uvec4(0u), equal((v_1 & uvec4(4294901760u)), uvec4(0u)))) & uvec4(65280u)), uvec4(0u)))) >> mix(uvec4(4u), uvec4(0u), equal((((v_1 >> mix(uvec4(16u), uvec4(0u), equal((v_1 & uvec4(4294901760u)), uvec4(0u)))) >> mix(uvec4(8u), uvec4(0u), equal(((v_1 >> mix(uvec4(16u), uvec4(0u), equal((v_1 & uvec4(4294901760u)), uvec4(0u)))) & uvec4(65280u)), uvec4(0u)))) & uvec4(240u)), uvec4(0u)))) & uvec4(12u)), uvec4(0u)))) & uvec4(2u)), uvec4(0u))))))), uvec4(4294967295u), equal(((((v_1 >> mix(uvec4(16u), uvec4(0u), equal((v_1 & uvec4(4294901760u)), uvec4(0u)))) >> mix(uvec4(8u), uvec4(0u), equal(((v_1 >> mix(uvec4(16u), uvec4(0u), equal((v_1 & uvec4(4294901760u)), uvec4(0u)))) & uvec4(65280u)), uvec4(0u)))) >> mix(uvec4(4u), uvec4(0u), equal((((v_1 >> mix(uvec4(16u), uvec4(0u), equal((v_1 & uvec4(4294901760u)), uvec4(0u)))) >> mix(uvec4(8u), uvec4(0u), equal(((v_1 >> mix(uvec4(16u), uvec4(0u), equal((v_1 & uvec4(4294901760u)), uvec4(0u)))) & uvec4(65280u)), uvec4(0u)))) & uvec4(240u)), uvec4(0u)))) >> mix(uvec4(2u), uvec4(0u), equal(((((v_1 >> mix(uvec4(16u), uvec4(0u), equal((v_1 & uvec4(4294901760u)), uvec4(0u)))) >> mix(uvec4(8u), uvec4(0u), equal(((v_1 >> mix(uvec4(16u), uvec4(0u), equal((v_1 & uvec4(4294901760u)), uvec4(0u)))) & uvec4(65280u)), uvec4(0u)))) >> mix(uvec4(4u), uvec4(0u), equal((((v_1 >> mix(uvec4(16u), uvec4(0u), equal((v_1 & uvec4(4294901760u)), uvec4(0u)))) >> mix(uvec4(8u), uvec4(0u), equal(((v_1 >> mix(uvec4(16u), uvec4(0u), equal((v_1 & uvec4(4294901760u)), uvec4(0u)))) & uvec4(65280u)), uvec4(0u)))) & uvec4(240u)), uvec4(0u)))) & uvec4(12u)), uvec4(0u)))), uvec4(0u)));
return res;
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
@@ -53,12 +43,7 @@
uvec4 firstLeadingBit_000ff3() {
uvec4 arg_0 = uvec4(1u);
uvec4 v = arg_0;
- uvec4 v_1 = mix(uvec4(16u), uvec4(0u), equal((v & uvec4(4294901760u)), uvec4(0u)));
- uvec4 v_2 = mix(uvec4(8u), uvec4(0u), equal(((v >> v_1) & uvec4(65280u)), uvec4(0u)));
- uvec4 v_3 = mix(uvec4(4u), uvec4(0u), equal((((v >> v_1) >> v_2) & uvec4(240u)), uvec4(0u)));
- uvec4 v_4 = mix(uvec4(2u), uvec4(0u), equal(((((v >> v_1) >> v_2) >> v_3) & uvec4(12u)), uvec4(0u)));
- uvec4 v_5 = (v_1 | (v_2 | (v_3 | (v_4 | mix(uvec4(1u), uvec4(0u), equal((((((v >> v_1) >> v_2) >> v_3) >> v_4) & uvec4(2u)), uvec4(0u)))))));
- uvec4 res = mix(v_5, uvec4(4294967295u), equal(((((v >> v_1) >> v_2) >> v_3) >> v_4), uvec4(0u)));
+ uvec4 res = mix((mix(uvec4(16u), uvec4(0u), equal((v & uvec4(4294901760u)), uvec4(0u))) | (mix(uvec4(8u), uvec4(0u), equal(((v >> mix(uvec4(16u), uvec4(0u), equal((v & uvec4(4294901760u)), uvec4(0u)))) & uvec4(65280u)), uvec4(0u))) | (mix(uvec4(4u), uvec4(0u), equal((((v >> mix(uvec4(16u), uvec4(0u), equal((v & uvec4(4294901760u)), uvec4(0u)))) >> mix(uvec4(8u), uvec4(0u), equal(((v >> mix(uvec4(16u), uvec4(0u), equal((v & uvec4(4294901760u)), uvec4(0u)))) & uvec4(65280u)), uvec4(0u)))) & uvec4(240u)), uvec4(0u))) | (mix(uvec4(2u), uvec4(0u), equal(((((v >> mix(uvec4(16u), uvec4(0u), equal((v & uvec4(4294901760u)), uvec4(0u)))) >> mix(uvec4(8u), uvec4(0u), equal(((v >> mix(uvec4(16u), uvec4(0u), equal((v & uvec4(4294901760u)), uvec4(0u)))) & uvec4(65280u)), uvec4(0u)))) >> mix(uvec4(4u), uvec4(0u), equal((((v >> mix(uvec4(16u), uvec4(0u), equal((v & uvec4(4294901760u)), uvec4(0u)))) >> mix(uvec4(8u), uvec4(0u), equal(((v >> mix(uvec4(16u), uvec4(0u), equal((v & uvec4(4294901760u)), uvec4(0u)))) & uvec4(65280u)), uvec4(0u)))) & uvec4(240u)), uvec4(0u)))) & uvec4(12u)), uvec4(0u))) | mix(uvec4(1u), uvec4(0u), equal((((((v >> mix(uvec4(16u), uvec4(0u), equal((v & uvec4(4294901760u)), uvec4(0u)))) >> mix(uvec4(8u), uvec4(0u), equal(((v >> mix(uvec4(16u), uvec4(0u), equal((v & uvec4(4294901760u)), uvec4(0u)))) & uvec4(65280u)), uvec4(0u)))) >> mix(uvec4(4u), uvec4(0u), equal((((v >> mix(uvec4(16u), uvec4(0u), equal((v & uvec4(4294901760u)), uvec4(0u)))) >> mix(uvec4(8u), uvec4(0u), equal(((v >> mix(uvec4(16u), uvec4(0u), equal((v & uvec4(4294901760u)), uvec4(0u)))) & uvec4(65280u)), uvec4(0u)))) & uvec4(240u)), uvec4(0u)))) >> mix(uvec4(2u), uvec4(0u), equal(((((v >> mix(uvec4(16u), uvec4(0u), equal((v & uvec4(4294901760u)), uvec4(0u)))) >> mix(uvec4(8u), uvec4(0u), equal(((v >> mix(uvec4(16u), uvec4(0u), equal((v & uvec4(4294901760u)), uvec4(0u)))) & uvec4(65280u)), uvec4(0u)))) >> mix(uvec4(4u), uvec4(0u), equal((((v >> mix(uvec4(16u), uvec4(0u), equal((v & uvec4(4294901760u)), uvec4(0u)))) >> mix(uvec4(8u), uvec4(0u), equal(((v >> mix(uvec4(16u), uvec4(0u), equal((v & uvec4(4294901760u)), uvec4(0u)))) & uvec4(65280u)), uvec4(0u)))) & uvec4(240u)), uvec4(0u)))) & uvec4(12u)), uvec4(0u)))) & uvec4(2u)), uvec4(0u))))))), uvec4(4294967295u), equal(((((v >> mix(uvec4(16u), uvec4(0u), equal((v & uvec4(4294901760u)), uvec4(0u)))) >> mix(uvec4(8u), uvec4(0u), equal(((v >> mix(uvec4(16u), uvec4(0u), equal((v & uvec4(4294901760u)), uvec4(0u)))) & uvec4(65280u)), uvec4(0u)))) >> mix(uvec4(4u), uvec4(0u), equal((((v >> mix(uvec4(16u), uvec4(0u), equal((v & uvec4(4294901760u)), uvec4(0u)))) >> mix(uvec4(8u), uvec4(0u), equal(((v >> mix(uvec4(16u), uvec4(0u), equal((v & uvec4(4294901760u)), uvec4(0u)))) & uvec4(65280u)), uvec4(0u)))) & uvec4(240u)), uvec4(0u)))) >> mix(uvec4(2u), uvec4(0u), equal(((((v >> mix(uvec4(16u), uvec4(0u), equal((v & uvec4(4294901760u)), uvec4(0u)))) >> mix(uvec4(8u), uvec4(0u), equal(((v >> mix(uvec4(16u), uvec4(0u), equal((v & uvec4(4294901760u)), uvec4(0u)))) & uvec4(65280u)), uvec4(0u)))) >> mix(uvec4(4u), uvec4(0u), equal((((v >> mix(uvec4(16u), uvec4(0u), equal((v & uvec4(4294901760u)), uvec4(0u)))) >> mix(uvec4(8u), uvec4(0u), equal(((v >> mix(uvec4(16u), uvec4(0u), equal((v & uvec4(4294901760u)), uvec4(0u)))) & uvec4(65280u)), uvec4(0u)))) & uvec4(240u)), uvec4(0u)))) & uvec4(12u)), uvec4(0u)))), uvec4(0u)));
return res;
}
VertexOutput vertex_main_inner() {
@@ -68,10 +53,10 @@
return tint_symbol;
}
void main() {
- VertexOutput v_6 = vertex_main_inner();
- gl_Position = v_6.pos;
+ VertexOutput v_1 = vertex_main_inner();
+ gl_Position = v_1.pos;
gl_Position[1u] = -(gl_Position.y);
gl_Position[2u] = ((2.0f * gl_Position.z) - gl_Position.w);
- vertex_main_loc0_Output = v_6.prevent_dce;
+ vertex_main_loc0_Output = v_1.prevent_dce;
gl_PointSize = 1.0f;
}
diff --git a/test/tint/builtins/gen/var/firstLeadingBit/000ff3.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/firstLeadingBit/000ff3.wgsl.expected.ir.msl
index 69baa57..5bd3d49 100644
--- a/test/tint/builtins/gen/var/firstLeadingBit/000ff3.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/firstLeadingBit/000ff3.wgsl.expected.ir.msl
@@ -18,11 +18,7 @@
uint4 firstLeadingBit_000ff3() {
uint4 arg_0 = uint4(1u);
uint4 const v = arg_0;
- uint4 const v_1 = select(uint4(16u), uint4(0u), ((v & uint4(4294901760u)) == uint4(0u)));
- uint4 const v_2 = select(uint4(8u), uint4(0u), (((v >> v_1) & uint4(65280u)) == uint4(0u)));
- uint4 const v_3 = select(uint4(4u), uint4(0u), ((((v >> v_1) >> v_2) & uint4(240u)) == uint4(0u)));
- uint4 const v_4 = select(uint4(2u), uint4(0u), (((((v >> v_1) >> v_2) >> v_3) & uint4(12u)) == uint4(0u)));
- uint4 res = select((v_1 | (v_2 | (v_3 | (v_4 | select(uint4(1u), uint4(0u), ((((((v >> v_1) >> v_2) >> v_3) >> v_4) & uint4(2u)) == uint4(0u))))))), uint4(4294967295u), (((((v >> v_1) >> v_2) >> v_3) >> v_4) == uint4(0u)));
+ uint4 res = select((select(uint4(16u), uint4(0u), ((v & uint4(4294901760u)) == uint4(0u))) | (select(uint4(8u), uint4(0u), (((v >> select(uint4(16u), uint4(0u), ((v & uint4(4294901760u)) == uint4(0u)))) & uint4(65280u)) == uint4(0u))) | (select(uint4(4u), uint4(0u), ((((v >> select(uint4(16u), uint4(0u), ((v & uint4(4294901760u)) == uint4(0u)))) >> select(uint4(8u), uint4(0u), (((v >> select(uint4(16u), uint4(0u), ((v & uint4(4294901760u)) == uint4(0u)))) & uint4(65280u)) == uint4(0u)))) & uint4(240u)) == uint4(0u))) | (select(uint4(2u), uint4(0u), (((((v >> select(uint4(16u), uint4(0u), ((v & uint4(4294901760u)) == uint4(0u)))) >> select(uint4(8u), uint4(0u), (((v >> select(uint4(16u), uint4(0u), ((v & uint4(4294901760u)) == uint4(0u)))) & uint4(65280u)) == uint4(0u)))) >> select(uint4(4u), uint4(0u), ((((v >> select(uint4(16u), uint4(0u), ((v & uint4(4294901760u)) == uint4(0u)))) >> select(uint4(8u), uint4(0u), (((v >> select(uint4(16u), uint4(0u), ((v & uint4(4294901760u)) == uint4(0u)))) & uint4(65280u)) == uint4(0u)))) & uint4(240u)) == uint4(0u)))) & uint4(12u)) == uint4(0u))) | select(uint4(1u), uint4(0u), ((((((v >> select(uint4(16u), uint4(0u), ((v & uint4(4294901760u)) == uint4(0u)))) >> select(uint4(8u), uint4(0u), (((v >> select(uint4(16u), uint4(0u), ((v & uint4(4294901760u)) == uint4(0u)))) & uint4(65280u)) == uint4(0u)))) >> select(uint4(4u), uint4(0u), ((((v >> select(uint4(16u), uint4(0u), ((v & uint4(4294901760u)) == uint4(0u)))) >> select(uint4(8u), uint4(0u), (((v >> select(uint4(16u), uint4(0u), ((v & uint4(4294901760u)) == uint4(0u)))) & uint4(65280u)) == uint4(0u)))) & uint4(240u)) == uint4(0u)))) >> select(uint4(2u), uint4(0u), (((((v >> select(uint4(16u), uint4(0u), ((v & uint4(4294901760u)) == uint4(0u)))) >> select(uint4(8u), uint4(0u), (((v >> select(uint4(16u), uint4(0u), ((v & uint4(4294901760u)) == uint4(0u)))) & uint4(65280u)) == uint4(0u)))) >> select(uint4(4u), uint4(0u), ((((v >> select(uint4(16u), uint4(0u), ((v & uint4(4294901760u)) == uint4(0u)))) >> select(uint4(8u), uint4(0u), (((v >> select(uint4(16u), uint4(0u), ((v & uint4(4294901760u)) == uint4(0u)))) & uint4(65280u)) == uint4(0u)))) & uint4(240u)) == uint4(0u)))) & uint4(12u)) == uint4(0u)))) & uint4(2u)) == uint4(0u))))))), uint4(4294967295u), (((((v >> select(uint4(16u), uint4(0u), ((v & uint4(4294901760u)) == uint4(0u)))) >> select(uint4(8u), uint4(0u), (((v >> select(uint4(16u), uint4(0u), ((v & uint4(4294901760u)) == uint4(0u)))) & uint4(65280u)) == uint4(0u)))) >> select(uint4(4u), uint4(0u), ((((v >> select(uint4(16u), uint4(0u), ((v & uint4(4294901760u)) == uint4(0u)))) >> select(uint4(8u), uint4(0u), (((v >> select(uint4(16u), uint4(0u), ((v & uint4(4294901760u)) == uint4(0u)))) & uint4(65280u)) == uint4(0u)))) & uint4(240u)) == uint4(0u)))) >> select(uint4(2u), uint4(0u), (((((v >> select(uint4(16u), uint4(0u), ((v & uint4(4294901760u)) == uint4(0u)))) >> select(uint4(8u), uint4(0u), (((v >> select(uint4(16u), uint4(0u), ((v & uint4(4294901760u)) == uint4(0u)))) & uint4(65280u)) == uint4(0u)))) >> select(uint4(4u), uint4(0u), ((((v >> select(uint4(16u), uint4(0u), ((v & uint4(4294901760u)) == uint4(0u)))) >> select(uint4(8u), uint4(0u), (((v >> select(uint4(16u), uint4(0u), ((v & uint4(4294901760u)) == uint4(0u)))) & uint4(65280u)) == uint4(0u)))) & uint4(240u)) == uint4(0u)))) & uint4(12u)) == uint4(0u)))) == uint4(0u)));
return res;
}
@@ -44,9 +40,9 @@
}
vertex vertex_main_outputs vertex_main() {
- VertexOutput const v_5 = vertex_main_inner();
+ VertexOutput const v_1 = vertex_main_inner();
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_5.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_5.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v_1.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/firstLeadingBit/35053e.wgsl.expected.glsl b/test/tint/builtins/gen/var/firstLeadingBit/35053e.wgsl.expected.glsl
index aae6bfd..2ad5dfa 100644
--- a/test/tint/builtins/gen/var/firstLeadingBit/35053e.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/firstLeadingBit/35053e.wgsl.expected.glsl
@@ -9,13 +9,7 @@
ivec3 firstLeadingBit_35053e() {
ivec3 arg_0 = ivec3(1);
uvec3 v_1 = uvec3(arg_0);
- uvec3 v_2 = mix(~(v_1), v_1, lessThan(v_1, uvec3(2147483648u)));
- uvec3 v_3 = mix(uvec3(16u), uvec3(0u), equal((v_2 & uvec3(4294901760u)), uvec3(0u)));
- uvec3 v_4 = mix(uvec3(8u), uvec3(0u), equal(((v_2 >> v_3) & uvec3(65280u)), uvec3(0u)));
- uvec3 v_5 = mix(uvec3(4u), uvec3(0u), equal((((v_2 >> v_3) >> v_4) & uvec3(240u)), uvec3(0u)));
- uvec3 v_6 = mix(uvec3(2u), uvec3(0u), equal(((((v_2 >> v_3) >> v_4) >> v_5) & uvec3(12u)), uvec3(0u)));
- uvec3 v_7 = (v_3 | (v_4 | (v_5 | (v_6 | mix(uvec3(1u), uvec3(0u), equal((((((v_2 >> v_3) >> v_4) >> v_5) >> v_6) & uvec3(2u)), uvec3(0u)))))));
- ivec3 res = ivec3(mix(v_7, uvec3(4294967295u), equal(((((v_2 >> v_3) >> v_4) >> v_5) >> v_6), uvec3(0u))));
+ ivec3 res = ivec3(mix((mix(uvec3(16u), uvec3(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec3(2147483648u))) & uvec3(4294901760u)), uvec3(0u))) | (mix(uvec3(8u), uvec3(0u), equal(((mix(~(v_1), v_1, lessThan(v_1, uvec3(2147483648u))) >> mix(uvec3(16u), uvec3(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec3(2147483648u))) & uvec3(4294901760u)), uvec3(0u)))) & uvec3(65280u)), uvec3(0u))) | (mix(uvec3(4u), uvec3(0u), equal((((mix(~(v_1), v_1, lessThan(v_1, uvec3(2147483648u))) >> mix(uvec3(16u), uvec3(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec3(2147483648u))) & uvec3(4294901760u)), uvec3(0u)))) >> mix(uvec3(8u), uvec3(0u), equal(((mix(~(v_1), v_1, lessThan(v_1, uvec3(2147483648u))) >> mix(uvec3(16u), uvec3(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec3(2147483648u))) & uvec3(4294901760u)), uvec3(0u)))) & uvec3(65280u)), uvec3(0u)))) & uvec3(240u)), uvec3(0u))) | (mix(uvec3(2u), uvec3(0u), equal(((((mix(~(v_1), v_1, lessThan(v_1, uvec3(2147483648u))) >> mix(uvec3(16u), uvec3(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec3(2147483648u))) & uvec3(4294901760u)), uvec3(0u)))) >> mix(uvec3(8u), uvec3(0u), equal(((mix(~(v_1), v_1, lessThan(v_1, uvec3(2147483648u))) >> mix(uvec3(16u), uvec3(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec3(2147483648u))) & uvec3(4294901760u)), uvec3(0u)))) & uvec3(65280u)), uvec3(0u)))) >> mix(uvec3(4u), uvec3(0u), equal((((mix(~(v_1), v_1, lessThan(v_1, uvec3(2147483648u))) >> mix(uvec3(16u), uvec3(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec3(2147483648u))) & uvec3(4294901760u)), uvec3(0u)))) >> mix(uvec3(8u), uvec3(0u), equal(((mix(~(v_1), v_1, lessThan(v_1, uvec3(2147483648u))) >> mix(uvec3(16u), uvec3(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec3(2147483648u))) & uvec3(4294901760u)), uvec3(0u)))) & uvec3(65280u)), uvec3(0u)))) & uvec3(240u)), uvec3(0u)))) & uvec3(12u)), uvec3(0u))) | mix(uvec3(1u), uvec3(0u), equal((((((mix(~(v_1), v_1, lessThan(v_1, uvec3(2147483648u))) >> mix(uvec3(16u), uvec3(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec3(2147483648u))) & uvec3(4294901760u)), uvec3(0u)))) >> mix(uvec3(8u), uvec3(0u), equal(((mix(~(v_1), v_1, lessThan(v_1, uvec3(2147483648u))) >> mix(uvec3(16u), uvec3(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec3(2147483648u))) & uvec3(4294901760u)), uvec3(0u)))) & uvec3(65280u)), uvec3(0u)))) >> mix(uvec3(4u), uvec3(0u), equal((((mix(~(v_1), v_1, lessThan(v_1, uvec3(2147483648u))) >> mix(uvec3(16u), uvec3(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec3(2147483648u))) & uvec3(4294901760u)), uvec3(0u)))) >> mix(uvec3(8u), uvec3(0u), equal(((mix(~(v_1), v_1, lessThan(v_1, uvec3(2147483648u))) >> mix(uvec3(16u), uvec3(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec3(2147483648u))) & uvec3(4294901760u)), uvec3(0u)))) & uvec3(65280u)), uvec3(0u)))) & uvec3(240u)), uvec3(0u)))) >> mix(uvec3(2u), uvec3(0u), equal(((((mix(~(v_1), v_1, lessThan(v_1, uvec3(2147483648u))) >> mix(uvec3(16u), uvec3(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec3(2147483648u))) & uvec3(4294901760u)), uvec3(0u)))) >> mix(uvec3(8u), uvec3(0u), equal(((mix(~(v_1), v_1, lessThan(v_1, uvec3(2147483648u))) >> mix(uvec3(16u), uvec3(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec3(2147483648u))) & uvec3(4294901760u)), uvec3(0u)))) & uvec3(65280u)), uvec3(0u)))) >> mix(uvec3(4u), uvec3(0u), equal((((mix(~(v_1), v_1, lessThan(v_1, uvec3(2147483648u))) >> mix(uvec3(16u), uvec3(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec3(2147483648u))) & uvec3(4294901760u)), uvec3(0u)))) >> mix(uvec3(8u), uvec3(0u), equal(((mix(~(v_1), v_1, lessThan(v_1, uvec3(2147483648u))) >> mix(uvec3(16u), uvec3(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec3(2147483648u))) & uvec3(4294901760u)), uvec3(0u)))) & uvec3(65280u)), uvec3(0u)))) & uvec3(240u)), uvec3(0u)))) & uvec3(12u)), uvec3(0u)))) & uvec3(2u)), uvec3(0u))))))), uvec3(4294967295u), equal(((((mix(~(v_1), v_1, lessThan(v_1, uvec3(2147483648u))) >> mix(uvec3(16u), uvec3(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec3(2147483648u))) & uvec3(4294901760u)), uvec3(0u)))) >> mix(uvec3(8u), uvec3(0u), equal(((mix(~(v_1), v_1, lessThan(v_1, uvec3(2147483648u))) >> mix(uvec3(16u), uvec3(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec3(2147483648u))) & uvec3(4294901760u)), uvec3(0u)))) & uvec3(65280u)), uvec3(0u)))) >> mix(uvec3(4u), uvec3(0u), equal((((mix(~(v_1), v_1, lessThan(v_1, uvec3(2147483648u))) >> mix(uvec3(16u), uvec3(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec3(2147483648u))) & uvec3(4294901760u)), uvec3(0u)))) >> mix(uvec3(8u), uvec3(0u), equal(((mix(~(v_1), v_1, lessThan(v_1, uvec3(2147483648u))) >> mix(uvec3(16u), uvec3(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec3(2147483648u))) & uvec3(4294901760u)), uvec3(0u)))) & uvec3(65280u)), uvec3(0u)))) & uvec3(240u)), uvec3(0u)))) >> mix(uvec3(2u), uvec3(0u), equal(((((mix(~(v_1), v_1, lessThan(v_1, uvec3(2147483648u))) >> mix(uvec3(16u), uvec3(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec3(2147483648u))) & uvec3(4294901760u)), uvec3(0u)))) >> mix(uvec3(8u), uvec3(0u), equal(((mix(~(v_1), v_1, lessThan(v_1, uvec3(2147483648u))) >> mix(uvec3(16u), uvec3(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec3(2147483648u))) & uvec3(4294901760u)), uvec3(0u)))) & uvec3(65280u)), uvec3(0u)))) >> mix(uvec3(4u), uvec3(0u), equal((((mix(~(v_1), v_1, lessThan(v_1, uvec3(2147483648u))) >> mix(uvec3(16u), uvec3(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec3(2147483648u))) & uvec3(4294901760u)), uvec3(0u)))) >> mix(uvec3(8u), uvec3(0u), equal(((mix(~(v_1), v_1, lessThan(v_1, uvec3(2147483648u))) >> mix(uvec3(16u), uvec3(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec3(2147483648u))) & uvec3(4294901760u)), uvec3(0u)))) & uvec3(65280u)), uvec3(0u)))) & uvec3(240u)), uvec3(0u)))) & uvec3(12u)), uvec3(0u)))), uvec3(0u))));
return res;
}
void main() {
@@ -30,13 +24,7 @@
ivec3 firstLeadingBit_35053e() {
ivec3 arg_0 = ivec3(1);
uvec3 v_1 = uvec3(arg_0);
- uvec3 v_2 = mix(~(v_1), v_1, lessThan(v_1, uvec3(2147483648u)));
- uvec3 v_3 = mix(uvec3(16u), uvec3(0u), equal((v_2 & uvec3(4294901760u)), uvec3(0u)));
- uvec3 v_4 = mix(uvec3(8u), uvec3(0u), equal(((v_2 >> v_3) & uvec3(65280u)), uvec3(0u)));
- uvec3 v_5 = mix(uvec3(4u), uvec3(0u), equal((((v_2 >> v_3) >> v_4) & uvec3(240u)), uvec3(0u)));
- uvec3 v_6 = mix(uvec3(2u), uvec3(0u), equal(((((v_2 >> v_3) >> v_4) >> v_5) & uvec3(12u)), uvec3(0u)));
- uvec3 v_7 = (v_3 | (v_4 | (v_5 | (v_6 | mix(uvec3(1u), uvec3(0u), equal((((((v_2 >> v_3) >> v_4) >> v_5) >> v_6) & uvec3(2u)), uvec3(0u)))))));
- ivec3 res = ivec3(mix(v_7, uvec3(4294967295u), equal(((((v_2 >> v_3) >> v_4) >> v_5) >> v_6), uvec3(0u))));
+ ivec3 res = ivec3(mix((mix(uvec3(16u), uvec3(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec3(2147483648u))) & uvec3(4294901760u)), uvec3(0u))) | (mix(uvec3(8u), uvec3(0u), equal(((mix(~(v_1), v_1, lessThan(v_1, uvec3(2147483648u))) >> mix(uvec3(16u), uvec3(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec3(2147483648u))) & uvec3(4294901760u)), uvec3(0u)))) & uvec3(65280u)), uvec3(0u))) | (mix(uvec3(4u), uvec3(0u), equal((((mix(~(v_1), v_1, lessThan(v_1, uvec3(2147483648u))) >> mix(uvec3(16u), uvec3(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec3(2147483648u))) & uvec3(4294901760u)), uvec3(0u)))) >> mix(uvec3(8u), uvec3(0u), equal(((mix(~(v_1), v_1, lessThan(v_1, uvec3(2147483648u))) >> mix(uvec3(16u), uvec3(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec3(2147483648u))) & uvec3(4294901760u)), uvec3(0u)))) & uvec3(65280u)), uvec3(0u)))) & uvec3(240u)), uvec3(0u))) | (mix(uvec3(2u), uvec3(0u), equal(((((mix(~(v_1), v_1, lessThan(v_1, uvec3(2147483648u))) >> mix(uvec3(16u), uvec3(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec3(2147483648u))) & uvec3(4294901760u)), uvec3(0u)))) >> mix(uvec3(8u), uvec3(0u), equal(((mix(~(v_1), v_1, lessThan(v_1, uvec3(2147483648u))) >> mix(uvec3(16u), uvec3(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec3(2147483648u))) & uvec3(4294901760u)), uvec3(0u)))) & uvec3(65280u)), uvec3(0u)))) >> mix(uvec3(4u), uvec3(0u), equal((((mix(~(v_1), v_1, lessThan(v_1, uvec3(2147483648u))) >> mix(uvec3(16u), uvec3(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec3(2147483648u))) & uvec3(4294901760u)), uvec3(0u)))) >> mix(uvec3(8u), uvec3(0u), equal(((mix(~(v_1), v_1, lessThan(v_1, uvec3(2147483648u))) >> mix(uvec3(16u), uvec3(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec3(2147483648u))) & uvec3(4294901760u)), uvec3(0u)))) & uvec3(65280u)), uvec3(0u)))) & uvec3(240u)), uvec3(0u)))) & uvec3(12u)), uvec3(0u))) | mix(uvec3(1u), uvec3(0u), equal((((((mix(~(v_1), v_1, lessThan(v_1, uvec3(2147483648u))) >> mix(uvec3(16u), uvec3(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec3(2147483648u))) & uvec3(4294901760u)), uvec3(0u)))) >> mix(uvec3(8u), uvec3(0u), equal(((mix(~(v_1), v_1, lessThan(v_1, uvec3(2147483648u))) >> mix(uvec3(16u), uvec3(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec3(2147483648u))) & uvec3(4294901760u)), uvec3(0u)))) & uvec3(65280u)), uvec3(0u)))) >> mix(uvec3(4u), uvec3(0u), equal((((mix(~(v_1), v_1, lessThan(v_1, uvec3(2147483648u))) >> mix(uvec3(16u), uvec3(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec3(2147483648u))) & uvec3(4294901760u)), uvec3(0u)))) >> mix(uvec3(8u), uvec3(0u), equal(((mix(~(v_1), v_1, lessThan(v_1, uvec3(2147483648u))) >> mix(uvec3(16u), uvec3(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec3(2147483648u))) & uvec3(4294901760u)), uvec3(0u)))) & uvec3(65280u)), uvec3(0u)))) & uvec3(240u)), uvec3(0u)))) >> mix(uvec3(2u), uvec3(0u), equal(((((mix(~(v_1), v_1, lessThan(v_1, uvec3(2147483648u))) >> mix(uvec3(16u), uvec3(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec3(2147483648u))) & uvec3(4294901760u)), uvec3(0u)))) >> mix(uvec3(8u), uvec3(0u), equal(((mix(~(v_1), v_1, lessThan(v_1, uvec3(2147483648u))) >> mix(uvec3(16u), uvec3(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec3(2147483648u))) & uvec3(4294901760u)), uvec3(0u)))) & uvec3(65280u)), uvec3(0u)))) >> mix(uvec3(4u), uvec3(0u), equal((((mix(~(v_1), v_1, lessThan(v_1, uvec3(2147483648u))) >> mix(uvec3(16u), uvec3(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec3(2147483648u))) & uvec3(4294901760u)), uvec3(0u)))) >> mix(uvec3(8u), uvec3(0u), equal(((mix(~(v_1), v_1, lessThan(v_1, uvec3(2147483648u))) >> mix(uvec3(16u), uvec3(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec3(2147483648u))) & uvec3(4294901760u)), uvec3(0u)))) & uvec3(65280u)), uvec3(0u)))) & uvec3(240u)), uvec3(0u)))) & uvec3(12u)), uvec3(0u)))) & uvec3(2u)), uvec3(0u))))))), uvec3(4294967295u), equal(((((mix(~(v_1), v_1, lessThan(v_1, uvec3(2147483648u))) >> mix(uvec3(16u), uvec3(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec3(2147483648u))) & uvec3(4294901760u)), uvec3(0u)))) >> mix(uvec3(8u), uvec3(0u), equal(((mix(~(v_1), v_1, lessThan(v_1, uvec3(2147483648u))) >> mix(uvec3(16u), uvec3(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec3(2147483648u))) & uvec3(4294901760u)), uvec3(0u)))) & uvec3(65280u)), uvec3(0u)))) >> mix(uvec3(4u), uvec3(0u), equal((((mix(~(v_1), v_1, lessThan(v_1, uvec3(2147483648u))) >> mix(uvec3(16u), uvec3(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec3(2147483648u))) & uvec3(4294901760u)), uvec3(0u)))) >> mix(uvec3(8u), uvec3(0u), equal(((mix(~(v_1), v_1, lessThan(v_1, uvec3(2147483648u))) >> mix(uvec3(16u), uvec3(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec3(2147483648u))) & uvec3(4294901760u)), uvec3(0u)))) & uvec3(65280u)), uvec3(0u)))) & uvec3(240u)), uvec3(0u)))) >> mix(uvec3(2u), uvec3(0u), equal(((((mix(~(v_1), v_1, lessThan(v_1, uvec3(2147483648u))) >> mix(uvec3(16u), uvec3(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec3(2147483648u))) & uvec3(4294901760u)), uvec3(0u)))) >> mix(uvec3(8u), uvec3(0u), equal(((mix(~(v_1), v_1, lessThan(v_1, uvec3(2147483648u))) >> mix(uvec3(16u), uvec3(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec3(2147483648u))) & uvec3(4294901760u)), uvec3(0u)))) & uvec3(65280u)), uvec3(0u)))) >> mix(uvec3(4u), uvec3(0u), equal((((mix(~(v_1), v_1, lessThan(v_1, uvec3(2147483648u))) >> mix(uvec3(16u), uvec3(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec3(2147483648u))) & uvec3(4294901760u)), uvec3(0u)))) >> mix(uvec3(8u), uvec3(0u), equal(((mix(~(v_1), v_1, lessThan(v_1, uvec3(2147483648u))) >> mix(uvec3(16u), uvec3(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec3(2147483648u))) & uvec3(4294901760u)), uvec3(0u)))) & uvec3(65280u)), uvec3(0u)))) & uvec3(240u)), uvec3(0u)))) & uvec3(12u)), uvec3(0u)))), uvec3(0u))));
return res;
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
@@ -55,13 +43,7 @@
ivec3 firstLeadingBit_35053e() {
ivec3 arg_0 = ivec3(1);
uvec3 v = uvec3(arg_0);
- uvec3 v_1 = mix(~(v), v, lessThan(v, uvec3(2147483648u)));
- uvec3 v_2 = mix(uvec3(16u), uvec3(0u), equal((v_1 & uvec3(4294901760u)), uvec3(0u)));
- uvec3 v_3 = mix(uvec3(8u), uvec3(0u), equal(((v_1 >> v_2) & uvec3(65280u)), uvec3(0u)));
- uvec3 v_4 = mix(uvec3(4u), uvec3(0u), equal((((v_1 >> v_2) >> v_3) & uvec3(240u)), uvec3(0u)));
- uvec3 v_5 = mix(uvec3(2u), uvec3(0u), equal(((((v_1 >> v_2) >> v_3) >> v_4) & uvec3(12u)), uvec3(0u)));
- uvec3 v_6 = (v_2 | (v_3 | (v_4 | (v_5 | mix(uvec3(1u), uvec3(0u), equal((((((v_1 >> v_2) >> v_3) >> v_4) >> v_5) & uvec3(2u)), uvec3(0u)))))));
- ivec3 res = ivec3(mix(v_6, uvec3(4294967295u), equal(((((v_1 >> v_2) >> v_3) >> v_4) >> v_5), uvec3(0u))));
+ ivec3 res = ivec3(mix((mix(uvec3(16u), uvec3(0u), equal((mix(~(v), v, lessThan(v, uvec3(2147483648u))) & uvec3(4294901760u)), uvec3(0u))) | (mix(uvec3(8u), uvec3(0u), equal(((mix(~(v), v, lessThan(v, uvec3(2147483648u))) >> mix(uvec3(16u), uvec3(0u), equal((mix(~(v), v, lessThan(v, uvec3(2147483648u))) & uvec3(4294901760u)), uvec3(0u)))) & uvec3(65280u)), uvec3(0u))) | (mix(uvec3(4u), uvec3(0u), equal((((mix(~(v), v, lessThan(v, uvec3(2147483648u))) >> mix(uvec3(16u), uvec3(0u), equal((mix(~(v), v, lessThan(v, uvec3(2147483648u))) & uvec3(4294901760u)), uvec3(0u)))) >> mix(uvec3(8u), uvec3(0u), equal(((mix(~(v), v, lessThan(v, uvec3(2147483648u))) >> mix(uvec3(16u), uvec3(0u), equal((mix(~(v), v, lessThan(v, uvec3(2147483648u))) & uvec3(4294901760u)), uvec3(0u)))) & uvec3(65280u)), uvec3(0u)))) & uvec3(240u)), uvec3(0u))) | (mix(uvec3(2u), uvec3(0u), equal(((((mix(~(v), v, lessThan(v, uvec3(2147483648u))) >> mix(uvec3(16u), uvec3(0u), equal((mix(~(v), v, lessThan(v, uvec3(2147483648u))) & uvec3(4294901760u)), uvec3(0u)))) >> mix(uvec3(8u), uvec3(0u), equal(((mix(~(v), v, lessThan(v, uvec3(2147483648u))) >> mix(uvec3(16u), uvec3(0u), equal((mix(~(v), v, lessThan(v, uvec3(2147483648u))) & uvec3(4294901760u)), uvec3(0u)))) & uvec3(65280u)), uvec3(0u)))) >> mix(uvec3(4u), uvec3(0u), equal((((mix(~(v), v, lessThan(v, uvec3(2147483648u))) >> mix(uvec3(16u), uvec3(0u), equal((mix(~(v), v, lessThan(v, uvec3(2147483648u))) & uvec3(4294901760u)), uvec3(0u)))) >> mix(uvec3(8u), uvec3(0u), equal(((mix(~(v), v, lessThan(v, uvec3(2147483648u))) >> mix(uvec3(16u), uvec3(0u), equal((mix(~(v), v, lessThan(v, uvec3(2147483648u))) & uvec3(4294901760u)), uvec3(0u)))) & uvec3(65280u)), uvec3(0u)))) & uvec3(240u)), uvec3(0u)))) & uvec3(12u)), uvec3(0u))) | mix(uvec3(1u), uvec3(0u), equal((((((mix(~(v), v, lessThan(v, uvec3(2147483648u))) >> mix(uvec3(16u), uvec3(0u), equal((mix(~(v), v, lessThan(v, uvec3(2147483648u))) & uvec3(4294901760u)), uvec3(0u)))) >> mix(uvec3(8u), uvec3(0u), equal(((mix(~(v), v, lessThan(v, uvec3(2147483648u))) >> mix(uvec3(16u), uvec3(0u), equal((mix(~(v), v, lessThan(v, uvec3(2147483648u))) & uvec3(4294901760u)), uvec3(0u)))) & uvec3(65280u)), uvec3(0u)))) >> mix(uvec3(4u), uvec3(0u), equal((((mix(~(v), v, lessThan(v, uvec3(2147483648u))) >> mix(uvec3(16u), uvec3(0u), equal((mix(~(v), v, lessThan(v, uvec3(2147483648u))) & uvec3(4294901760u)), uvec3(0u)))) >> mix(uvec3(8u), uvec3(0u), equal(((mix(~(v), v, lessThan(v, uvec3(2147483648u))) >> mix(uvec3(16u), uvec3(0u), equal((mix(~(v), v, lessThan(v, uvec3(2147483648u))) & uvec3(4294901760u)), uvec3(0u)))) & uvec3(65280u)), uvec3(0u)))) & uvec3(240u)), uvec3(0u)))) >> mix(uvec3(2u), uvec3(0u), equal(((((mix(~(v), v, lessThan(v, uvec3(2147483648u))) >> mix(uvec3(16u), uvec3(0u), equal((mix(~(v), v, lessThan(v, uvec3(2147483648u))) & uvec3(4294901760u)), uvec3(0u)))) >> mix(uvec3(8u), uvec3(0u), equal(((mix(~(v), v, lessThan(v, uvec3(2147483648u))) >> mix(uvec3(16u), uvec3(0u), equal((mix(~(v), v, lessThan(v, uvec3(2147483648u))) & uvec3(4294901760u)), uvec3(0u)))) & uvec3(65280u)), uvec3(0u)))) >> mix(uvec3(4u), uvec3(0u), equal((((mix(~(v), v, lessThan(v, uvec3(2147483648u))) >> mix(uvec3(16u), uvec3(0u), equal((mix(~(v), v, lessThan(v, uvec3(2147483648u))) & uvec3(4294901760u)), uvec3(0u)))) >> mix(uvec3(8u), uvec3(0u), equal(((mix(~(v), v, lessThan(v, uvec3(2147483648u))) >> mix(uvec3(16u), uvec3(0u), equal((mix(~(v), v, lessThan(v, uvec3(2147483648u))) & uvec3(4294901760u)), uvec3(0u)))) & uvec3(65280u)), uvec3(0u)))) & uvec3(240u)), uvec3(0u)))) & uvec3(12u)), uvec3(0u)))) & uvec3(2u)), uvec3(0u))))))), uvec3(4294967295u), equal(((((mix(~(v), v, lessThan(v, uvec3(2147483648u))) >> mix(uvec3(16u), uvec3(0u), equal((mix(~(v), v, lessThan(v, uvec3(2147483648u))) & uvec3(4294901760u)), uvec3(0u)))) >> mix(uvec3(8u), uvec3(0u), equal(((mix(~(v), v, lessThan(v, uvec3(2147483648u))) >> mix(uvec3(16u), uvec3(0u), equal((mix(~(v), v, lessThan(v, uvec3(2147483648u))) & uvec3(4294901760u)), uvec3(0u)))) & uvec3(65280u)), uvec3(0u)))) >> mix(uvec3(4u), uvec3(0u), equal((((mix(~(v), v, lessThan(v, uvec3(2147483648u))) >> mix(uvec3(16u), uvec3(0u), equal((mix(~(v), v, lessThan(v, uvec3(2147483648u))) & uvec3(4294901760u)), uvec3(0u)))) >> mix(uvec3(8u), uvec3(0u), equal(((mix(~(v), v, lessThan(v, uvec3(2147483648u))) >> mix(uvec3(16u), uvec3(0u), equal((mix(~(v), v, lessThan(v, uvec3(2147483648u))) & uvec3(4294901760u)), uvec3(0u)))) & uvec3(65280u)), uvec3(0u)))) & uvec3(240u)), uvec3(0u)))) >> mix(uvec3(2u), uvec3(0u), equal(((((mix(~(v), v, lessThan(v, uvec3(2147483648u))) >> mix(uvec3(16u), uvec3(0u), equal((mix(~(v), v, lessThan(v, uvec3(2147483648u))) & uvec3(4294901760u)), uvec3(0u)))) >> mix(uvec3(8u), uvec3(0u), equal(((mix(~(v), v, lessThan(v, uvec3(2147483648u))) >> mix(uvec3(16u), uvec3(0u), equal((mix(~(v), v, lessThan(v, uvec3(2147483648u))) & uvec3(4294901760u)), uvec3(0u)))) & uvec3(65280u)), uvec3(0u)))) >> mix(uvec3(4u), uvec3(0u), equal((((mix(~(v), v, lessThan(v, uvec3(2147483648u))) >> mix(uvec3(16u), uvec3(0u), equal((mix(~(v), v, lessThan(v, uvec3(2147483648u))) & uvec3(4294901760u)), uvec3(0u)))) >> mix(uvec3(8u), uvec3(0u), equal(((mix(~(v), v, lessThan(v, uvec3(2147483648u))) >> mix(uvec3(16u), uvec3(0u), equal((mix(~(v), v, lessThan(v, uvec3(2147483648u))) & uvec3(4294901760u)), uvec3(0u)))) & uvec3(65280u)), uvec3(0u)))) & uvec3(240u)), uvec3(0u)))) & uvec3(12u)), uvec3(0u)))), uvec3(0u))));
return res;
}
VertexOutput vertex_main_inner() {
@@ -71,10 +53,10 @@
return tint_symbol;
}
void main() {
- VertexOutput v_7 = vertex_main_inner();
- gl_Position = v_7.pos;
+ VertexOutput v_1 = vertex_main_inner();
+ gl_Position = v_1.pos;
gl_Position[1u] = -(gl_Position.y);
gl_Position[2u] = ((2.0f * gl_Position.z) - gl_Position.w);
- vertex_main_loc0_Output = v_7.prevent_dce;
+ vertex_main_loc0_Output = v_1.prevent_dce;
gl_PointSize = 1.0f;
}
diff --git a/test/tint/builtins/gen/var/firstLeadingBit/35053e.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/firstLeadingBit/35053e.wgsl.expected.ir.msl
index 8a77010..2325bad 100644
--- a/test/tint/builtins/gen/var/firstLeadingBit/35053e.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/firstLeadingBit/35053e.wgsl.expected.ir.msl
@@ -18,12 +18,7 @@
int3 firstLeadingBit_35053e() {
int3 arg_0 = int3(1);
uint3 const v = as_type<uint3>(arg_0);
- uint3 const v_1 = select(~(v), v, (v < uint3(2147483648u)));
- uint3 const v_2 = select(uint3(16u), uint3(0u), ((v_1 & uint3(4294901760u)) == uint3(0u)));
- uint3 const v_3 = select(uint3(8u), uint3(0u), (((v_1 >> v_2) & uint3(65280u)) == uint3(0u)));
- uint3 const v_4 = select(uint3(4u), uint3(0u), ((((v_1 >> v_2) >> v_3) & uint3(240u)) == uint3(0u)));
- uint3 const v_5 = select(uint3(2u), uint3(0u), (((((v_1 >> v_2) >> v_3) >> v_4) & uint3(12u)) == uint3(0u)));
- int3 res = as_type<int3>(select((v_2 | (v_3 | (v_4 | (v_5 | select(uint3(1u), uint3(0u), ((((((v_1 >> v_2) >> v_3) >> v_4) >> v_5) & uint3(2u)) == uint3(0u))))))), uint3(4294967295u), (((((v_1 >> v_2) >> v_3) >> v_4) >> v_5) == uint3(0u))));
+ int3 res = as_type<int3>(select((select(uint3(16u), uint3(0u), ((select(~(v), v, (v < uint3(2147483648u))) & uint3(4294901760u)) == uint3(0u))) | (select(uint3(8u), uint3(0u), (((select(~(v), v, (v < uint3(2147483648u))) >> select(uint3(16u), uint3(0u), ((select(~(v), v, (v < uint3(2147483648u))) & uint3(4294901760u)) == uint3(0u)))) & uint3(65280u)) == uint3(0u))) | (select(uint3(4u), uint3(0u), ((((select(~(v), v, (v < uint3(2147483648u))) >> select(uint3(16u), uint3(0u), ((select(~(v), v, (v < uint3(2147483648u))) & uint3(4294901760u)) == uint3(0u)))) >> select(uint3(8u), uint3(0u), (((select(~(v), v, (v < uint3(2147483648u))) >> select(uint3(16u), uint3(0u), ((select(~(v), v, (v < uint3(2147483648u))) & uint3(4294901760u)) == uint3(0u)))) & uint3(65280u)) == uint3(0u)))) & uint3(240u)) == uint3(0u))) | (select(uint3(2u), uint3(0u), (((((select(~(v), v, (v < uint3(2147483648u))) >> select(uint3(16u), uint3(0u), ((select(~(v), v, (v < uint3(2147483648u))) & uint3(4294901760u)) == uint3(0u)))) >> select(uint3(8u), uint3(0u), (((select(~(v), v, (v < uint3(2147483648u))) >> select(uint3(16u), uint3(0u), ((select(~(v), v, (v < uint3(2147483648u))) & uint3(4294901760u)) == uint3(0u)))) & uint3(65280u)) == uint3(0u)))) >> select(uint3(4u), uint3(0u), ((((select(~(v), v, (v < uint3(2147483648u))) >> select(uint3(16u), uint3(0u), ((select(~(v), v, (v < uint3(2147483648u))) & uint3(4294901760u)) == uint3(0u)))) >> select(uint3(8u), uint3(0u), (((select(~(v), v, (v < uint3(2147483648u))) >> select(uint3(16u), uint3(0u), ((select(~(v), v, (v < uint3(2147483648u))) & uint3(4294901760u)) == uint3(0u)))) & uint3(65280u)) == uint3(0u)))) & uint3(240u)) == uint3(0u)))) & uint3(12u)) == uint3(0u))) | select(uint3(1u), uint3(0u), ((((((select(~(v), v, (v < uint3(2147483648u))) >> select(uint3(16u), uint3(0u), ((select(~(v), v, (v < uint3(2147483648u))) & uint3(4294901760u)) == uint3(0u)))) >> select(uint3(8u), uint3(0u), (((select(~(v), v, (v < uint3(2147483648u))) >> select(uint3(16u), uint3(0u), ((select(~(v), v, (v < uint3(2147483648u))) & uint3(4294901760u)) == uint3(0u)))) & uint3(65280u)) == uint3(0u)))) >> select(uint3(4u), uint3(0u), ((((select(~(v), v, (v < uint3(2147483648u))) >> select(uint3(16u), uint3(0u), ((select(~(v), v, (v < uint3(2147483648u))) & uint3(4294901760u)) == uint3(0u)))) >> select(uint3(8u), uint3(0u), (((select(~(v), v, (v < uint3(2147483648u))) >> select(uint3(16u), uint3(0u), ((select(~(v), v, (v < uint3(2147483648u))) & uint3(4294901760u)) == uint3(0u)))) & uint3(65280u)) == uint3(0u)))) & uint3(240u)) == uint3(0u)))) >> select(uint3(2u), uint3(0u), (((((select(~(v), v, (v < uint3(2147483648u))) >> select(uint3(16u), uint3(0u), ((select(~(v), v, (v < uint3(2147483648u))) & uint3(4294901760u)) == uint3(0u)))) >> select(uint3(8u), uint3(0u), (((select(~(v), v, (v < uint3(2147483648u))) >> select(uint3(16u), uint3(0u), ((select(~(v), v, (v < uint3(2147483648u))) & uint3(4294901760u)) == uint3(0u)))) & uint3(65280u)) == uint3(0u)))) >> select(uint3(4u), uint3(0u), ((((select(~(v), v, (v < uint3(2147483648u))) >> select(uint3(16u), uint3(0u), ((select(~(v), v, (v < uint3(2147483648u))) & uint3(4294901760u)) == uint3(0u)))) >> select(uint3(8u), uint3(0u), (((select(~(v), v, (v < uint3(2147483648u))) >> select(uint3(16u), uint3(0u), ((select(~(v), v, (v < uint3(2147483648u))) & uint3(4294901760u)) == uint3(0u)))) & uint3(65280u)) == uint3(0u)))) & uint3(240u)) == uint3(0u)))) & uint3(12u)) == uint3(0u)))) & uint3(2u)) == uint3(0u))))))), uint3(4294967295u), (((((select(~(v), v, (v < uint3(2147483648u))) >> select(uint3(16u), uint3(0u), ((select(~(v), v, (v < uint3(2147483648u))) & uint3(4294901760u)) == uint3(0u)))) >> select(uint3(8u), uint3(0u), (((select(~(v), v, (v < uint3(2147483648u))) >> select(uint3(16u), uint3(0u), ((select(~(v), v, (v < uint3(2147483648u))) & uint3(4294901760u)) == uint3(0u)))) & uint3(65280u)) == uint3(0u)))) >> select(uint3(4u), uint3(0u), ((((select(~(v), v, (v < uint3(2147483648u))) >> select(uint3(16u), uint3(0u), ((select(~(v), v, (v < uint3(2147483648u))) & uint3(4294901760u)) == uint3(0u)))) >> select(uint3(8u), uint3(0u), (((select(~(v), v, (v < uint3(2147483648u))) >> select(uint3(16u), uint3(0u), ((select(~(v), v, (v < uint3(2147483648u))) & uint3(4294901760u)) == uint3(0u)))) & uint3(65280u)) == uint3(0u)))) & uint3(240u)) == uint3(0u)))) >> select(uint3(2u), uint3(0u), (((((select(~(v), v, (v < uint3(2147483648u))) >> select(uint3(16u), uint3(0u), ((select(~(v), v, (v < uint3(2147483648u))) & uint3(4294901760u)) == uint3(0u)))) >> select(uint3(8u), uint3(0u), (((select(~(v), v, (v < uint3(2147483648u))) >> select(uint3(16u), uint3(0u), ((select(~(v), v, (v < uint3(2147483648u))) & uint3(4294901760u)) == uint3(0u)))) & uint3(65280u)) == uint3(0u)))) >> select(uint3(4u), uint3(0u), ((((select(~(v), v, (v < uint3(2147483648u))) >> select(uint3(16u), uint3(0u), ((select(~(v), v, (v < uint3(2147483648u))) & uint3(4294901760u)) == uint3(0u)))) >> select(uint3(8u), uint3(0u), (((select(~(v), v, (v < uint3(2147483648u))) >> select(uint3(16u), uint3(0u), ((select(~(v), v, (v < uint3(2147483648u))) & uint3(4294901760u)) == uint3(0u)))) & uint3(65280u)) == uint3(0u)))) & uint3(240u)) == uint3(0u)))) & uint3(12u)) == uint3(0u)))) == uint3(0u))));
return res;
}
@@ -45,9 +40,9 @@
}
vertex vertex_main_outputs vertex_main() {
- VertexOutput const v_6 = vertex_main_inner();
+ VertexOutput const v_1 = vertex_main_inner();
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_6.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_6.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v_1.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/firstLeadingBit/3fd7d0.wgsl.expected.glsl b/test/tint/builtins/gen/var/firstLeadingBit/3fd7d0.wgsl.expected.glsl
index 7437626..6bcb815 100644
--- a/test/tint/builtins/gen/var/firstLeadingBit/3fd7d0.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/firstLeadingBit/3fd7d0.wgsl.expected.glsl
@@ -9,12 +9,7 @@
uvec3 firstLeadingBit_3fd7d0() {
uvec3 arg_0 = uvec3(1u);
uvec3 v_1 = arg_0;
- uvec3 v_2 = mix(uvec3(16u), uvec3(0u), equal((v_1 & uvec3(4294901760u)), uvec3(0u)));
- uvec3 v_3 = mix(uvec3(8u), uvec3(0u), equal(((v_1 >> v_2) & uvec3(65280u)), uvec3(0u)));
- uvec3 v_4 = mix(uvec3(4u), uvec3(0u), equal((((v_1 >> v_2) >> v_3) & uvec3(240u)), uvec3(0u)));
- uvec3 v_5 = mix(uvec3(2u), uvec3(0u), equal(((((v_1 >> v_2) >> v_3) >> v_4) & uvec3(12u)), uvec3(0u)));
- uvec3 v_6 = (v_2 | (v_3 | (v_4 | (v_5 | mix(uvec3(1u), uvec3(0u), equal((((((v_1 >> v_2) >> v_3) >> v_4) >> v_5) & uvec3(2u)), uvec3(0u)))))));
- uvec3 res = mix(v_6, uvec3(4294967295u), equal(((((v_1 >> v_2) >> v_3) >> v_4) >> v_5), uvec3(0u)));
+ uvec3 res = mix((mix(uvec3(16u), uvec3(0u), equal((v_1 & uvec3(4294901760u)), uvec3(0u))) | (mix(uvec3(8u), uvec3(0u), equal(((v_1 >> mix(uvec3(16u), uvec3(0u), equal((v_1 & uvec3(4294901760u)), uvec3(0u)))) & uvec3(65280u)), uvec3(0u))) | (mix(uvec3(4u), uvec3(0u), equal((((v_1 >> mix(uvec3(16u), uvec3(0u), equal((v_1 & uvec3(4294901760u)), uvec3(0u)))) >> mix(uvec3(8u), uvec3(0u), equal(((v_1 >> mix(uvec3(16u), uvec3(0u), equal((v_1 & uvec3(4294901760u)), uvec3(0u)))) & uvec3(65280u)), uvec3(0u)))) & uvec3(240u)), uvec3(0u))) | (mix(uvec3(2u), uvec3(0u), equal(((((v_1 >> mix(uvec3(16u), uvec3(0u), equal((v_1 & uvec3(4294901760u)), uvec3(0u)))) >> mix(uvec3(8u), uvec3(0u), equal(((v_1 >> mix(uvec3(16u), uvec3(0u), equal((v_1 & uvec3(4294901760u)), uvec3(0u)))) & uvec3(65280u)), uvec3(0u)))) >> mix(uvec3(4u), uvec3(0u), equal((((v_1 >> mix(uvec3(16u), uvec3(0u), equal((v_1 & uvec3(4294901760u)), uvec3(0u)))) >> mix(uvec3(8u), uvec3(0u), equal(((v_1 >> mix(uvec3(16u), uvec3(0u), equal((v_1 & uvec3(4294901760u)), uvec3(0u)))) & uvec3(65280u)), uvec3(0u)))) & uvec3(240u)), uvec3(0u)))) & uvec3(12u)), uvec3(0u))) | mix(uvec3(1u), uvec3(0u), equal((((((v_1 >> mix(uvec3(16u), uvec3(0u), equal((v_1 & uvec3(4294901760u)), uvec3(0u)))) >> mix(uvec3(8u), uvec3(0u), equal(((v_1 >> mix(uvec3(16u), uvec3(0u), equal((v_1 & uvec3(4294901760u)), uvec3(0u)))) & uvec3(65280u)), uvec3(0u)))) >> mix(uvec3(4u), uvec3(0u), equal((((v_1 >> mix(uvec3(16u), uvec3(0u), equal((v_1 & uvec3(4294901760u)), uvec3(0u)))) >> mix(uvec3(8u), uvec3(0u), equal(((v_1 >> mix(uvec3(16u), uvec3(0u), equal((v_1 & uvec3(4294901760u)), uvec3(0u)))) & uvec3(65280u)), uvec3(0u)))) & uvec3(240u)), uvec3(0u)))) >> mix(uvec3(2u), uvec3(0u), equal(((((v_1 >> mix(uvec3(16u), uvec3(0u), equal((v_1 & uvec3(4294901760u)), uvec3(0u)))) >> mix(uvec3(8u), uvec3(0u), equal(((v_1 >> mix(uvec3(16u), uvec3(0u), equal((v_1 & uvec3(4294901760u)), uvec3(0u)))) & uvec3(65280u)), uvec3(0u)))) >> mix(uvec3(4u), uvec3(0u), equal((((v_1 >> mix(uvec3(16u), uvec3(0u), equal((v_1 & uvec3(4294901760u)), uvec3(0u)))) >> mix(uvec3(8u), uvec3(0u), equal(((v_1 >> mix(uvec3(16u), uvec3(0u), equal((v_1 & uvec3(4294901760u)), uvec3(0u)))) & uvec3(65280u)), uvec3(0u)))) & uvec3(240u)), uvec3(0u)))) & uvec3(12u)), uvec3(0u)))) & uvec3(2u)), uvec3(0u))))))), uvec3(4294967295u), equal(((((v_1 >> mix(uvec3(16u), uvec3(0u), equal((v_1 & uvec3(4294901760u)), uvec3(0u)))) >> mix(uvec3(8u), uvec3(0u), equal(((v_1 >> mix(uvec3(16u), uvec3(0u), equal((v_1 & uvec3(4294901760u)), uvec3(0u)))) & uvec3(65280u)), uvec3(0u)))) >> mix(uvec3(4u), uvec3(0u), equal((((v_1 >> mix(uvec3(16u), uvec3(0u), equal((v_1 & uvec3(4294901760u)), uvec3(0u)))) >> mix(uvec3(8u), uvec3(0u), equal(((v_1 >> mix(uvec3(16u), uvec3(0u), equal((v_1 & uvec3(4294901760u)), uvec3(0u)))) & uvec3(65280u)), uvec3(0u)))) & uvec3(240u)), uvec3(0u)))) >> mix(uvec3(2u), uvec3(0u), equal(((((v_1 >> mix(uvec3(16u), uvec3(0u), equal((v_1 & uvec3(4294901760u)), uvec3(0u)))) >> mix(uvec3(8u), uvec3(0u), equal(((v_1 >> mix(uvec3(16u), uvec3(0u), equal((v_1 & uvec3(4294901760u)), uvec3(0u)))) & uvec3(65280u)), uvec3(0u)))) >> mix(uvec3(4u), uvec3(0u), equal((((v_1 >> mix(uvec3(16u), uvec3(0u), equal((v_1 & uvec3(4294901760u)), uvec3(0u)))) >> mix(uvec3(8u), uvec3(0u), equal(((v_1 >> mix(uvec3(16u), uvec3(0u), equal((v_1 & uvec3(4294901760u)), uvec3(0u)))) & uvec3(65280u)), uvec3(0u)))) & uvec3(240u)), uvec3(0u)))) & uvec3(12u)), uvec3(0u)))), uvec3(0u)));
return res;
}
void main() {
@@ -29,12 +24,7 @@
uvec3 firstLeadingBit_3fd7d0() {
uvec3 arg_0 = uvec3(1u);
uvec3 v_1 = arg_0;
- uvec3 v_2 = mix(uvec3(16u), uvec3(0u), equal((v_1 & uvec3(4294901760u)), uvec3(0u)));
- uvec3 v_3 = mix(uvec3(8u), uvec3(0u), equal(((v_1 >> v_2) & uvec3(65280u)), uvec3(0u)));
- uvec3 v_4 = mix(uvec3(4u), uvec3(0u), equal((((v_1 >> v_2) >> v_3) & uvec3(240u)), uvec3(0u)));
- uvec3 v_5 = mix(uvec3(2u), uvec3(0u), equal(((((v_1 >> v_2) >> v_3) >> v_4) & uvec3(12u)), uvec3(0u)));
- uvec3 v_6 = (v_2 | (v_3 | (v_4 | (v_5 | mix(uvec3(1u), uvec3(0u), equal((((((v_1 >> v_2) >> v_3) >> v_4) >> v_5) & uvec3(2u)), uvec3(0u)))))));
- uvec3 res = mix(v_6, uvec3(4294967295u), equal(((((v_1 >> v_2) >> v_3) >> v_4) >> v_5), uvec3(0u)));
+ uvec3 res = mix((mix(uvec3(16u), uvec3(0u), equal((v_1 & uvec3(4294901760u)), uvec3(0u))) | (mix(uvec3(8u), uvec3(0u), equal(((v_1 >> mix(uvec3(16u), uvec3(0u), equal((v_1 & uvec3(4294901760u)), uvec3(0u)))) & uvec3(65280u)), uvec3(0u))) | (mix(uvec3(4u), uvec3(0u), equal((((v_1 >> mix(uvec3(16u), uvec3(0u), equal((v_1 & uvec3(4294901760u)), uvec3(0u)))) >> mix(uvec3(8u), uvec3(0u), equal(((v_1 >> mix(uvec3(16u), uvec3(0u), equal((v_1 & uvec3(4294901760u)), uvec3(0u)))) & uvec3(65280u)), uvec3(0u)))) & uvec3(240u)), uvec3(0u))) | (mix(uvec3(2u), uvec3(0u), equal(((((v_1 >> mix(uvec3(16u), uvec3(0u), equal((v_1 & uvec3(4294901760u)), uvec3(0u)))) >> mix(uvec3(8u), uvec3(0u), equal(((v_1 >> mix(uvec3(16u), uvec3(0u), equal((v_1 & uvec3(4294901760u)), uvec3(0u)))) & uvec3(65280u)), uvec3(0u)))) >> mix(uvec3(4u), uvec3(0u), equal((((v_1 >> mix(uvec3(16u), uvec3(0u), equal((v_1 & uvec3(4294901760u)), uvec3(0u)))) >> mix(uvec3(8u), uvec3(0u), equal(((v_1 >> mix(uvec3(16u), uvec3(0u), equal((v_1 & uvec3(4294901760u)), uvec3(0u)))) & uvec3(65280u)), uvec3(0u)))) & uvec3(240u)), uvec3(0u)))) & uvec3(12u)), uvec3(0u))) | mix(uvec3(1u), uvec3(0u), equal((((((v_1 >> mix(uvec3(16u), uvec3(0u), equal((v_1 & uvec3(4294901760u)), uvec3(0u)))) >> mix(uvec3(8u), uvec3(0u), equal(((v_1 >> mix(uvec3(16u), uvec3(0u), equal((v_1 & uvec3(4294901760u)), uvec3(0u)))) & uvec3(65280u)), uvec3(0u)))) >> mix(uvec3(4u), uvec3(0u), equal((((v_1 >> mix(uvec3(16u), uvec3(0u), equal((v_1 & uvec3(4294901760u)), uvec3(0u)))) >> mix(uvec3(8u), uvec3(0u), equal(((v_1 >> mix(uvec3(16u), uvec3(0u), equal((v_1 & uvec3(4294901760u)), uvec3(0u)))) & uvec3(65280u)), uvec3(0u)))) & uvec3(240u)), uvec3(0u)))) >> mix(uvec3(2u), uvec3(0u), equal(((((v_1 >> mix(uvec3(16u), uvec3(0u), equal((v_1 & uvec3(4294901760u)), uvec3(0u)))) >> mix(uvec3(8u), uvec3(0u), equal(((v_1 >> mix(uvec3(16u), uvec3(0u), equal((v_1 & uvec3(4294901760u)), uvec3(0u)))) & uvec3(65280u)), uvec3(0u)))) >> mix(uvec3(4u), uvec3(0u), equal((((v_1 >> mix(uvec3(16u), uvec3(0u), equal((v_1 & uvec3(4294901760u)), uvec3(0u)))) >> mix(uvec3(8u), uvec3(0u), equal(((v_1 >> mix(uvec3(16u), uvec3(0u), equal((v_1 & uvec3(4294901760u)), uvec3(0u)))) & uvec3(65280u)), uvec3(0u)))) & uvec3(240u)), uvec3(0u)))) & uvec3(12u)), uvec3(0u)))) & uvec3(2u)), uvec3(0u))))))), uvec3(4294967295u), equal(((((v_1 >> mix(uvec3(16u), uvec3(0u), equal((v_1 & uvec3(4294901760u)), uvec3(0u)))) >> mix(uvec3(8u), uvec3(0u), equal(((v_1 >> mix(uvec3(16u), uvec3(0u), equal((v_1 & uvec3(4294901760u)), uvec3(0u)))) & uvec3(65280u)), uvec3(0u)))) >> mix(uvec3(4u), uvec3(0u), equal((((v_1 >> mix(uvec3(16u), uvec3(0u), equal((v_1 & uvec3(4294901760u)), uvec3(0u)))) >> mix(uvec3(8u), uvec3(0u), equal(((v_1 >> mix(uvec3(16u), uvec3(0u), equal((v_1 & uvec3(4294901760u)), uvec3(0u)))) & uvec3(65280u)), uvec3(0u)))) & uvec3(240u)), uvec3(0u)))) >> mix(uvec3(2u), uvec3(0u), equal(((((v_1 >> mix(uvec3(16u), uvec3(0u), equal((v_1 & uvec3(4294901760u)), uvec3(0u)))) >> mix(uvec3(8u), uvec3(0u), equal(((v_1 >> mix(uvec3(16u), uvec3(0u), equal((v_1 & uvec3(4294901760u)), uvec3(0u)))) & uvec3(65280u)), uvec3(0u)))) >> mix(uvec3(4u), uvec3(0u), equal((((v_1 >> mix(uvec3(16u), uvec3(0u), equal((v_1 & uvec3(4294901760u)), uvec3(0u)))) >> mix(uvec3(8u), uvec3(0u), equal(((v_1 >> mix(uvec3(16u), uvec3(0u), equal((v_1 & uvec3(4294901760u)), uvec3(0u)))) & uvec3(65280u)), uvec3(0u)))) & uvec3(240u)), uvec3(0u)))) & uvec3(12u)), uvec3(0u)))), uvec3(0u)));
return res;
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
@@ -53,12 +43,7 @@
uvec3 firstLeadingBit_3fd7d0() {
uvec3 arg_0 = uvec3(1u);
uvec3 v = arg_0;
- uvec3 v_1 = mix(uvec3(16u), uvec3(0u), equal((v & uvec3(4294901760u)), uvec3(0u)));
- uvec3 v_2 = mix(uvec3(8u), uvec3(0u), equal(((v >> v_1) & uvec3(65280u)), uvec3(0u)));
- uvec3 v_3 = mix(uvec3(4u), uvec3(0u), equal((((v >> v_1) >> v_2) & uvec3(240u)), uvec3(0u)));
- uvec3 v_4 = mix(uvec3(2u), uvec3(0u), equal(((((v >> v_1) >> v_2) >> v_3) & uvec3(12u)), uvec3(0u)));
- uvec3 v_5 = (v_1 | (v_2 | (v_3 | (v_4 | mix(uvec3(1u), uvec3(0u), equal((((((v >> v_1) >> v_2) >> v_3) >> v_4) & uvec3(2u)), uvec3(0u)))))));
- uvec3 res = mix(v_5, uvec3(4294967295u), equal(((((v >> v_1) >> v_2) >> v_3) >> v_4), uvec3(0u)));
+ uvec3 res = mix((mix(uvec3(16u), uvec3(0u), equal((v & uvec3(4294901760u)), uvec3(0u))) | (mix(uvec3(8u), uvec3(0u), equal(((v >> mix(uvec3(16u), uvec3(0u), equal((v & uvec3(4294901760u)), uvec3(0u)))) & uvec3(65280u)), uvec3(0u))) | (mix(uvec3(4u), uvec3(0u), equal((((v >> mix(uvec3(16u), uvec3(0u), equal((v & uvec3(4294901760u)), uvec3(0u)))) >> mix(uvec3(8u), uvec3(0u), equal(((v >> mix(uvec3(16u), uvec3(0u), equal((v & uvec3(4294901760u)), uvec3(0u)))) & uvec3(65280u)), uvec3(0u)))) & uvec3(240u)), uvec3(0u))) | (mix(uvec3(2u), uvec3(0u), equal(((((v >> mix(uvec3(16u), uvec3(0u), equal((v & uvec3(4294901760u)), uvec3(0u)))) >> mix(uvec3(8u), uvec3(0u), equal(((v >> mix(uvec3(16u), uvec3(0u), equal((v & uvec3(4294901760u)), uvec3(0u)))) & uvec3(65280u)), uvec3(0u)))) >> mix(uvec3(4u), uvec3(0u), equal((((v >> mix(uvec3(16u), uvec3(0u), equal((v & uvec3(4294901760u)), uvec3(0u)))) >> mix(uvec3(8u), uvec3(0u), equal(((v >> mix(uvec3(16u), uvec3(0u), equal((v & uvec3(4294901760u)), uvec3(0u)))) & uvec3(65280u)), uvec3(0u)))) & uvec3(240u)), uvec3(0u)))) & uvec3(12u)), uvec3(0u))) | mix(uvec3(1u), uvec3(0u), equal((((((v >> mix(uvec3(16u), uvec3(0u), equal((v & uvec3(4294901760u)), uvec3(0u)))) >> mix(uvec3(8u), uvec3(0u), equal(((v >> mix(uvec3(16u), uvec3(0u), equal((v & uvec3(4294901760u)), uvec3(0u)))) & uvec3(65280u)), uvec3(0u)))) >> mix(uvec3(4u), uvec3(0u), equal((((v >> mix(uvec3(16u), uvec3(0u), equal((v & uvec3(4294901760u)), uvec3(0u)))) >> mix(uvec3(8u), uvec3(0u), equal(((v >> mix(uvec3(16u), uvec3(0u), equal((v & uvec3(4294901760u)), uvec3(0u)))) & uvec3(65280u)), uvec3(0u)))) & uvec3(240u)), uvec3(0u)))) >> mix(uvec3(2u), uvec3(0u), equal(((((v >> mix(uvec3(16u), uvec3(0u), equal((v & uvec3(4294901760u)), uvec3(0u)))) >> mix(uvec3(8u), uvec3(0u), equal(((v >> mix(uvec3(16u), uvec3(0u), equal((v & uvec3(4294901760u)), uvec3(0u)))) & uvec3(65280u)), uvec3(0u)))) >> mix(uvec3(4u), uvec3(0u), equal((((v >> mix(uvec3(16u), uvec3(0u), equal((v & uvec3(4294901760u)), uvec3(0u)))) >> mix(uvec3(8u), uvec3(0u), equal(((v >> mix(uvec3(16u), uvec3(0u), equal((v & uvec3(4294901760u)), uvec3(0u)))) & uvec3(65280u)), uvec3(0u)))) & uvec3(240u)), uvec3(0u)))) & uvec3(12u)), uvec3(0u)))) & uvec3(2u)), uvec3(0u))))))), uvec3(4294967295u), equal(((((v >> mix(uvec3(16u), uvec3(0u), equal((v & uvec3(4294901760u)), uvec3(0u)))) >> mix(uvec3(8u), uvec3(0u), equal(((v >> mix(uvec3(16u), uvec3(0u), equal((v & uvec3(4294901760u)), uvec3(0u)))) & uvec3(65280u)), uvec3(0u)))) >> mix(uvec3(4u), uvec3(0u), equal((((v >> mix(uvec3(16u), uvec3(0u), equal((v & uvec3(4294901760u)), uvec3(0u)))) >> mix(uvec3(8u), uvec3(0u), equal(((v >> mix(uvec3(16u), uvec3(0u), equal((v & uvec3(4294901760u)), uvec3(0u)))) & uvec3(65280u)), uvec3(0u)))) & uvec3(240u)), uvec3(0u)))) >> mix(uvec3(2u), uvec3(0u), equal(((((v >> mix(uvec3(16u), uvec3(0u), equal((v & uvec3(4294901760u)), uvec3(0u)))) >> mix(uvec3(8u), uvec3(0u), equal(((v >> mix(uvec3(16u), uvec3(0u), equal((v & uvec3(4294901760u)), uvec3(0u)))) & uvec3(65280u)), uvec3(0u)))) >> mix(uvec3(4u), uvec3(0u), equal((((v >> mix(uvec3(16u), uvec3(0u), equal((v & uvec3(4294901760u)), uvec3(0u)))) >> mix(uvec3(8u), uvec3(0u), equal(((v >> mix(uvec3(16u), uvec3(0u), equal((v & uvec3(4294901760u)), uvec3(0u)))) & uvec3(65280u)), uvec3(0u)))) & uvec3(240u)), uvec3(0u)))) & uvec3(12u)), uvec3(0u)))), uvec3(0u)));
return res;
}
VertexOutput vertex_main_inner() {
@@ -68,10 +53,10 @@
return tint_symbol;
}
void main() {
- VertexOutput v_6 = vertex_main_inner();
- gl_Position = v_6.pos;
+ VertexOutput v_1 = vertex_main_inner();
+ gl_Position = v_1.pos;
gl_Position[1u] = -(gl_Position.y);
gl_Position[2u] = ((2.0f * gl_Position.z) - gl_Position.w);
- vertex_main_loc0_Output = v_6.prevent_dce;
+ vertex_main_loc0_Output = v_1.prevent_dce;
gl_PointSize = 1.0f;
}
diff --git a/test/tint/builtins/gen/var/firstLeadingBit/3fd7d0.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/firstLeadingBit/3fd7d0.wgsl.expected.ir.msl
index e3e68c5..a6fd431 100644
--- a/test/tint/builtins/gen/var/firstLeadingBit/3fd7d0.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/firstLeadingBit/3fd7d0.wgsl.expected.ir.msl
@@ -18,11 +18,7 @@
uint3 firstLeadingBit_3fd7d0() {
uint3 arg_0 = uint3(1u);
uint3 const v = arg_0;
- uint3 const v_1 = select(uint3(16u), uint3(0u), ((v & uint3(4294901760u)) == uint3(0u)));
- uint3 const v_2 = select(uint3(8u), uint3(0u), (((v >> v_1) & uint3(65280u)) == uint3(0u)));
- uint3 const v_3 = select(uint3(4u), uint3(0u), ((((v >> v_1) >> v_2) & uint3(240u)) == uint3(0u)));
- uint3 const v_4 = select(uint3(2u), uint3(0u), (((((v >> v_1) >> v_2) >> v_3) & uint3(12u)) == uint3(0u)));
- uint3 res = select((v_1 | (v_2 | (v_3 | (v_4 | select(uint3(1u), uint3(0u), ((((((v >> v_1) >> v_2) >> v_3) >> v_4) & uint3(2u)) == uint3(0u))))))), uint3(4294967295u), (((((v >> v_1) >> v_2) >> v_3) >> v_4) == uint3(0u)));
+ uint3 res = select((select(uint3(16u), uint3(0u), ((v & uint3(4294901760u)) == uint3(0u))) | (select(uint3(8u), uint3(0u), (((v >> select(uint3(16u), uint3(0u), ((v & uint3(4294901760u)) == uint3(0u)))) & uint3(65280u)) == uint3(0u))) | (select(uint3(4u), uint3(0u), ((((v >> select(uint3(16u), uint3(0u), ((v & uint3(4294901760u)) == uint3(0u)))) >> select(uint3(8u), uint3(0u), (((v >> select(uint3(16u), uint3(0u), ((v & uint3(4294901760u)) == uint3(0u)))) & uint3(65280u)) == uint3(0u)))) & uint3(240u)) == uint3(0u))) | (select(uint3(2u), uint3(0u), (((((v >> select(uint3(16u), uint3(0u), ((v & uint3(4294901760u)) == uint3(0u)))) >> select(uint3(8u), uint3(0u), (((v >> select(uint3(16u), uint3(0u), ((v & uint3(4294901760u)) == uint3(0u)))) & uint3(65280u)) == uint3(0u)))) >> select(uint3(4u), uint3(0u), ((((v >> select(uint3(16u), uint3(0u), ((v & uint3(4294901760u)) == uint3(0u)))) >> select(uint3(8u), uint3(0u), (((v >> select(uint3(16u), uint3(0u), ((v & uint3(4294901760u)) == uint3(0u)))) & uint3(65280u)) == uint3(0u)))) & uint3(240u)) == uint3(0u)))) & uint3(12u)) == uint3(0u))) | select(uint3(1u), uint3(0u), ((((((v >> select(uint3(16u), uint3(0u), ((v & uint3(4294901760u)) == uint3(0u)))) >> select(uint3(8u), uint3(0u), (((v >> select(uint3(16u), uint3(0u), ((v & uint3(4294901760u)) == uint3(0u)))) & uint3(65280u)) == uint3(0u)))) >> select(uint3(4u), uint3(0u), ((((v >> select(uint3(16u), uint3(0u), ((v & uint3(4294901760u)) == uint3(0u)))) >> select(uint3(8u), uint3(0u), (((v >> select(uint3(16u), uint3(0u), ((v & uint3(4294901760u)) == uint3(0u)))) & uint3(65280u)) == uint3(0u)))) & uint3(240u)) == uint3(0u)))) >> select(uint3(2u), uint3(0u), (((((v >> select(uint3(16u), uint3(0u), ((v & uint3(4294901760u)) == uint3(0u)))) >> select(uint3(8u), uint3(0u), (((v >> select(uint3(16u), uint3(0u), ((v & uint3(4294901760u)) == uint3(0u)))) & uint3(65280u)) == uint3(0u)))) >> select(uint3(4u), uint3(0u), ((((v >> select(uint3(16u), uint3(0u), ((v & uint3(4294901760u)) == uint3(0u)))) >> select(uint3(8u), uint3(0u), (((v >> select(uint3(16u), uint3(0u), ((v & uint3(4294901760u)) == uint3(0u)))) & uint3(65280u)) == uint3(0u)))) & uint3(240u)) == uint3(0u)))) & uint3(12u)) == uint3(0u)))) & uint3(2u)) == uint3(0u))))))), uint3(4294967295u), (((((v >> select(uint3(16u), uint3(0u), ((v & uint3(4294901760u)) == uint3(0u)))) >> select(uint3(8u), uint3(0u), (((v >> select(uint3(16u), uint3(0u), ((v & uint3(4294901760u)) == uint3(0u)))) & uint3(65280u)) == uint3(0u)))) >> select(uint3(4u), uint3(0u), ((((v >> select(uint3(16u), uint3(0u), ((v & uint3(4294901760u)) == uint3(0u)))) >> select(uint3(8u), uint3(0u), (((v >> select(uint3(16u), uint3(0u), ((v & uint3(4294901760u)) == uint3(0u)))) & uint3(65280u)) == uint3(0u)))) & uint3(240u)) == uint3(0u)))) >> select(uint3(2u), uint3(0u), (((((v >> select(uint3(16u), uint3(0u), ((v & uint3(4294901760u)) == uint3(0u)))) >> select(uint3(8u), uint3(0u), (((v >> select(uint3(16u), uint3(0u), ((v & uint3(4294901760u)) == uint3(0u)))) & uint3(65280u)) == uint3(0u)))) >> select(uint3(4u), uint3(0u), ((((v >> select(uint3(16u), uint3(0u), ((v & uint3(4294901760u)) == uint3(0u)))) >> select(uint3(8u), uint3(0u), (((v >> select(uint3(16u), uint3(0u), ((v & uint3(4294901760u)) == uint3(0u)))) & uint3(65280u)) == uint3(0u)))) & uint3(240u)) == uint3(0u)))) & uint3(12u)) == uint3(0u)))) == uint3(0u)));
return res;
}
@@ -44,9 +40,9 @@
}
vertex vertex_main_outputs vertex_main() {
- VertexOutput const v_5 = vertex_main_inner();
+ VertexOutput const v_1 = vertex_main_inner();
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_5.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_5.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v_1.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/firstLeadingBit/57a1a3.wgsl.expected.glsl b/test/tint/builtins/gen/var/firstLeadingBit/57a1a3.wgsl.expected.glsl
index 2c0c6d3..e5a8c41 100644
--- a/test/tint/builtins/gen/var/firstLeadingBit/57a1a3.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/firstLeadingBit/57a1a3.wgsl.expected.glsl
@@ -9,12 +9,7 @@
int firstLeadingBit_57a1a3() {
int arg_0 = 1;
uint v_1 = uint(arg_0);
- uint v_2 = mix(~(v_1), v_1, (v_1 < 2147483648u));
- uint v_3 = mix(16u, 0u, ((v_2 & 4294901760u) == 0u));
- uint v_4 = mix(8u, 0u, (((v_2 >> v_3) & 65280u) == 0u));
- uint v_5 = mix(4u, 0u, ((((v_2 >> v_3) >> v_4) & 240u) == 0u));
- uint v_6 = mix(2u, 0u, (((((v_2 >> v_3) >> v_4) >> v_5) & 12u) == 0u));
- int res = int(mix((v_3 | (v_4 | (v_5 | (v_6 | mix(1u, 0u, ((((((v_2 >> v_3) >> v_4) >> v_5) >> v_6) & 2u) == 0u)))))), 4294967295u, (((((v_2 >> v_3) >> v_4) >> v_5) >> v_6) == 0u)));
+ int res = int(mix((mix(16u, 0u, ((mix(~(v_1), v_1, (v_1 < 2147483648u)) & 4294901760u) == 0u)) | (mix(8u, 0u, (((mix(~(v_1), v_1, (v_1 < 2147483648u)) >> mix(16u, 0u, ((mix(~(v_1), v_1, (v_1 < 2147483648u)) & 4294901760u) == 0u))) & 65280u) == 0u)) | (mix(4u, 0u, ((((mix(~(v_1), v_1, (v_1 < 2147483648u)) >> mix(16u, 0u, ((mix(~(v_1), v_1, (v_1 < 2147483648u)) & 4294901760u) == 0u))) >> mix(8u, 0u, (((mix(~(v_1), v_1, (v_1 < 2147483648u)) >> mix(16u, 0u, ((mix(~(v_1), v_1, (v_1 < 2147483648u)) & 4294901760u) == 0u))) & 65280u) == 0u))) & 240u) == 0u)) | (mix(2u, 0u, (((((mix(~(v_1), v_1, (v_1 < 2147483648u)) >> mix(16u, 0u, ((mix(~(v_1), v_1, (v_1 < 2147483648u)) & 4294901760u) == 0u))) >> mix(8u, 0u, (((mix(~(v_1), v_1, (v_1 < 2147483648u)) >> mix(16u, 0u, ((mix(~(v_1), v_1, (v_1 < 2147483648u)) & 4294901760u) == 0u))) & 65280u) == 0u))) >> mix(4u, 0u, ((((mix(~(v_1), v_1, (v_1 < 2147483648u)) >> mix(16u, 0u, ((mix(~(v_1), v_1, (v_1 < 2147483648u)) & 4294901760u) == 0u))) >> mix(8u, 0u, (((mix(~(v_1), v_1, (v_1 < 2147483648u)) >> mix(16u, 0u, ((mix(~(v_1), v_1, (v_1 < 2147483648u)) & 4294901760u) == 0u))) & 65280u) == 0u))) & 240u) == 0u))) & 12u) == 0u)) | mix(1u, 0u, ((((((mix(~(v_1), v_1, (v_1 < 2147483648u)) >> mix(16u, 0u, ((mix(~(v_1), v_1, (v_1 < 2147483648u)) & 4294901760u) == 0u))) >> mix(8u, 0u, (((mix(~(v_1), v_1, (v_1 < 2147483648u)) >> mix(16u, 0u, ((mix(~(v_1), v_1, (v_1 < 2147483648u)) & 4294901760u) == 0u))) & 65280u) == 0u))) >> mix(4u, 0u, ((((mix(~(v_1), v_1, (v_1 < 2147483648u)) >> mix(16u, 0u, ((mix(~(v_1), v_1, (v_1 < 2147483648u)) & 4294901760u) == 0u))) >> mix(8u, 0u, (((mix(~(v_1), v_1, (v_1 < 2147483648u)) >> mix(16u, 0u, ((mix(~(v_1), v_1, (v_1 < 2147483648u)) & 4294901760u) == 0u))) & 65280u) == 0u))) & 240u) == 0u))) >> mix(2u, 0u, (((((mix(~(v_1), v_1, (v_1 < 2147483648u)) >> mix(16u, 0u, ((mix(~(v_1), v_1, (v_1 < 2147483648u)) & 4294901760u) == 0u))) >> mix(8u, 0u, (((mix(~(v_1), v_1, (v_1 < 2147483648u)) >> mix(16u, 0u, ((mix(~(v_1), v_1, (v_1 < 2147483648u)) & 4294901760u) == 0u))) & 65280u) == 0u))) >> mix(4u, 0u, ((((mix(~(v_1), v_1, (v_1 < 2147483648u)) >> mix(16u, 0u, ((mix(~(v_1), v_1, (v_1 < 2147483648u)) & 4294901760u) == 0u))) >> mix(8u, 0u, (((mix(~(v_1), v_1, (v_1 < 2147483648u)) >> mix(16u, 0u, ((mix(~(v_1), v_1, (v_1 < 2147483648u)) & 4294901760u) == 0u))) & 65280u) == 0u))) & 240u) == 0u))) & 12u) == 0u))) & 2u) == 0u)))))), 4294967295u, (((((mix(~(v_1), v_1, (v_1 < 2147483648u)) >> mix(16u, 0u, ((mix(~(v_1), v_1, (v_1 < 2147483648u)) & 4294901760u) == 0u))) >> mix(8u, 0u, (((mix(~(v_1), v_1, (v_1 < 2147483648u)) >> mix(16u, 0u, ((mix(~(v_1), v_1, (v_1 < 2147483648u)) & 4294901760u) == 0u))) & 65280u) == 0u))) >> mix(4u, 0u, ((((mix(~(v_1), v_1, (v_1 < 2147483648u)) >> mix(16u, 0u, ((mix(~(v_1), v_1, (v_1 < 2147483648u)) & 4294901760u) == 0u))) >> mix(8u, 0u, (((mix(~(v_1), v_1, (v_1 < 2147483648u)) >> mix(16u, 0u, ((mix(~(v_1), v_1, (v_1 < 2147483648u)) & 4294901760u) == 0u))) & 65280u) == 0u))) & 240u) == 0u))) >> mix(2u, 0u, (((((mix(~(v_1), v_1, (v_1 < 2147483648u)) >> mix(16u, 0u, ((mix(~(v_1), v_1, (v_1 < 2147483648u)) & 4294901760u) == 0u))) >> mix(8u, 0u, (((mix(~(v_1), v_1, (v_1 < 2147483648u)) >> mix(16u, 0u, ((mix(~(v_1), v_1, (v_1 < 2147483648u)) & 4294901760u) == 0u))) & 65280u) == 0u))) >> mix(4u, 0u, ((((mix(~(v_1), v_1, (v_1 < 2147483648u)) >> mix(16u, 0u, ((mix(~(v_1), v_1, (v_1 < 2147483648u)) & 4294901760u) == 0u))) >> mix(8u, 0u, (((mix(~(v_1), v_1, (v_1 < 2147483648u)) >> mix(16u, 0u, ((mix(~(v_1), v_1, (v_1 < 2147483648u)) & 4294901760u) == 0u))) & 65280u) == 0u))) & 240u) == 0u))) & 12u) == 0u))) == 0u)));
return res;
}
void main() {
@@ -29,12 +24,7 @@
int firstLeadingBit_57a1a3() {
int arg_0 = 1;
uint v_1 = uint(arg_0);
- uint v_2 = mix(~(v_1), v_1, (v_1 < 2147483648u));
- uint v_3 = mix(16u, 0u, ((v_2 & 4294901760u) == 0u));
- uint v_4 = mix(8u, 0u, (((v_2 >> v_3) & 65280u) == 0u));
- uint v_5 = mix(4u, 0u, ((((v_2 >> v_3) >> v_4) & 240u) == 0u));
- uint v_6 = mix(2u, 0u, (((((v_2 >> v_3) >> v_4) >> v_5) & 12u) == 0u));
- int res = int(mix((v_3 | (v_4 | (v_5 | (v_6 | mix(1u, 0u, ((((((v_2 >> v_3) >> v_4) >> v_5) >> v_6) & 2u) == 0u)))))), 4294967295u, (((((v_2 >> v_3) >> v_4) >> v_5) >> v_6) == 0u)));
+ int res = int(mix((mix(16u, 0u, ((mix(~(v_1), v_1, (v_1 < 2147483648u)) & 4294901760u) == 0u)) | (mix(8u, 0u, (((mix(~(v_1), v_1, (v_1 < 2147483648u)) >> mix(16u, 0u, ((mix(~(v_1), v_1, (v_1 < 2147483648u)) & 4294901760u) == 0u))) & 65280u) == 0u)) | (mix(4u, 0u, ((((mix(~(v_1), v_1, (v_1 < 2147483648u)) >> mix(16u, 0u, ((mix(~(v_1), v_1, (v_1 < 2147483648u)) & 4294901760u) == 0u))) >> mix(8u, 0u, (((mix(~(v_1), v_1, (v_1 < 2147483648u)) >> mix(16u, 0u, ((mix(~(v_1), v_1, (v_1 < 2147483648u)) & 4294901760u) == 0u))) & 65280u) == 0u))) & 240u) == 0u)) | (mix(2u, 0u, (((((mix(~(v_1), v_1, (v_1 < 2147483648u)) >> mix(16u, 0u, ((mix(~(v_1), v_1, (v_1 < 2147483648u)) & 4294901760u) == 0u))) >> mix(8u, 0u, (((mix(~(v_1), v_1, (v_1 < 2147483648u)) >> mix(16u, 0u, ((mix(~(v_1), v_1, (v_1 < 2147483648u)) & 4294901760u) == 0u))) & 65280u) == 0u))) >> mix(4u, 0u, ((((mix(~(v_1), v_1, (v_1 < 2147483648u)) >> mix(16u, 0u, ((mix(~(v_1), v_1, (v_1 < 2147483648u)) & 4294901760u) == 0u))) >> mix(8u, 0u, (((mix(~(v_1), v_1, (v_1 < 2147483648u)) >> mix(16u, 0u, ((mix(~(v_1), v_1, (v_1 < 2147483648u)) & 4294901760u) == 0u))) & 65280u) == 0u))) & 240u) == 0u))) & 12u) == 0u)) | mix(1u, 0u, ((((((mix(~(v_1), v_1, (v_1 < 2147483648u)) >> mix(16u, 0u, ((mix(~(v_1), v_1, (v_1 < 2147483648u)) & 4294901760u) == 0u))) >> mix(8u, 0u, (((mix(~(v_1), v_1, (v_1 < 2147483648u)) >> mix(16u, 0u, ((mix(~(v_1), v_1, (v_1 < 2147483648u)) & 4294901760u) == 0u))) & 65280u) == 0u))) >> mix(4u, 0u, ((((mix(~(v_1), v_1, (v_1 < 2147483648u)) >> mix(16u, 0u, ((mix(~(v_1), v_1, (v_1 < 2147483648u)) & 4294901760u) == 0u))) >> mix(8u, 0u, (((mix(~(v_1), v_1, (v_1 < 2147483648u)) >> mix(16u, 0u, ((mix(~(v_1), v_1, (v_1 < 2147483648u)) & 4294901760u) == 0u))) & 65280u) == 0u))) & 240u) == 0u))) >> mix(2u, 0u, (((((mix(~(v_1), v_1, (v_1 < 2147483648u)) >> mix(16u, 0u, ((mix(~(v_1), v_1, (v_1 < 2147483648u)) & 4294901760u) == 0u))) >> mix(8u, 0u, (((mix(~(v_1), v_1, (v_1 < 2147483648u)) >> mix(16u, 0u, ((mix(~(v_1), v_1, (v_1 < 2147483648u)) & 4294901760u) == 0u))) & 65280u) == 0u))) >> mix(4u, 0u, ((((mix(~(v_1), v_1, (v_1 < 2147483648u)) >> mix(16u, 0u, ((mix(~(v_1), v_1, (v_1 < 2147483648u)) & 4294901760u) == 0u))) >> mix(8u, 0u, (((mix(~(v_1), v_1, (v_1 < 2147483648u)) >> mix(16u, 0u, ((mix(~(v_1), v_1, (v_1 < 2147483648u)) & 4294901760u) == 0u))) & 65280u) == 0u))) & 240u) == 0u))) & 12u) == 0u))) & 2u) == 0u)))))), 4294967295u, (((((mix(~(v_1), v_1, (v_1 < 2147483648u)) >> mix(16u, 0u, ((mix(~(v_1), v_1, (v_1 < 2147483648u)) & 4294901760u) == 0u))) >> mix(8u, 0u, (((mix(~(v_1), v_1, (v_1 < 2147483648u)) >> mix(16u, 0u, ((mix(~(v_1), v_1, (v_1 < 2147483648u)) & 4294901760u) == 0u))) & 65280u) == 0u))) >> mix(4u, 0u, ((((mix(~(v_1), v_1, (v_1 < 2147483648u)) >> mix(16u, 0u, ((mix(~(v_1), v_1, (v_1 < 2147483648u)) & 4294901760u) == 0u))) >> mix(8u, 0u, (((mix(~(v_1), v_1, (v_1 < 2147483648u)) >> mix(16u, 0u, ((mix(~(v_1), v_1, (v_1 < 2147483648u)) & 4294901760u) == 0u))) & 65280u) == 0u))) & 240u) == 0u))) >> mix(2u, 0u, (((((mix(~(v_1), v_1, (v_1 < 2147483648u)) >> mix(16u, 0u, ((mix(~(v_1), v_1, (v_1 < 2147483648u)) & 4294901760u) == 0u))) >> mix(8u, 0u, (((mix(~(v_1), v_1, (v_1 < 2147483648u)) >> mix(16u, 0u, ((mix(~(v_1), v_1, (v_1 < 2147483648u)) & 4294901760u) == 0u))) & 65280u) == 0u))) >> mix(4u, 0u, ((((mix(~(v_1), v_1, (v_1 < 2147483648u)) >> mix(16u, 0u, ((mix(~(v_1), v_1, (v_1 < 2147483648u)) & 4294901760u) == 0u))) >> mix(8u, 0u, (((mix(~(v_1), v_1, (v_1 < 2147483648u)) >> mix(16u, 0u, ((mix(~(v_1), v_1, (v_1 < 2147483648u)) & 4294901760u) == 0u))) & 65280u) == 0u))) & 240u) == 0u))) & 12u) == 0u))) == 0u)));
return res;
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
@@ -53,12 +43,7 @@
int firstLeadingBit_57a1a3() {
int arg_0 = 1;
uint v = uint(arg_0);
- uint v_1 = mix(~(v), v, (v < 2147483648u));
- uint v_2 = mix(16u, 0u, ((v_1 & 4294901760u) == 0u));
- uint v_3 = mix(8u, 0u, (((v_1 >> v_2) & 65280u) == 0u));
- uint v_4 = mix(4u, 0u, ((((v_1 >> v_2) >> v_3) & 240u) == 0u));
- uint v_5 = mix(2u, 0u, (((((v_1 >> v_2) >> v_3) >> v_4) & 12u) == 0u));
- int res = int(mix((v_2 | (v_3 | (v_4 | (v_5 | mix(1u, 0u, ((((((v_1 >> v_2) >> v_3) >> v_4) >> v_5) & 2u) == 0u)))))), 4294967295u, (((((v_1 >> v_2) >> v_3) >> v_4) >> v_5) == 0u)));
+ int res = int(mix((mix(16u, 0u, ((mix(~(v), v, (v < 2147483648u)) & 4294901760u) == 0u)) | (mix(8u, 0u, (((mix(~(v), v, (v < 2147483648u)) >> mix(16u, 0u, ((mix(~(v), v, (v < 2147483648u)) & 4294901760u) == 0u))) & 65280u) == 0u)) | (mix(4u, 0u, ((((mix(~(v), v, (v < 2147483648u)) >> mix(16u, 0u, ((mix(~(v), v, (v < 2147483648u)) & 4294901760u) == 0u))) >> mix(8u, 0u, (((mix(~(v), v, (v < 2147483648u)) >> mix(16u, 0u, ((mix(~(v), v, (v < 2147483648u)) & 4294901760u) == 0u))) & 65280u) == 0u))) & 240u) == 0u)) | (mix(2u, 0u, (((((mix(~(v), v, (v < 2147483648u)) >> mix(16u, 0u, ((mix(~(v), v, (v < 2147483648u)) & 4294901760u) == 0u))) >> mix(8u, 0u, (((mix(~(v), v, (v < 2147483648u)) >> mix(16u, 0u, ((mix(~(v), v, (v < 2147483648u)) & 4294901760u) == 0u))) & 65280u) == 0u))) >> mix(4u, 0u, ((((mix(~(v), v, (v < 2147483648u)) >> mix(16u, 0u, ((mix(~(v), v, (v < 2147483648u)) & 4294901760u) == 0u))) >> mix(8u, 0u, (((mix(~(v), v, (v < 2147483648u)) >> mix(16u, 0u, ((mix(~(v), v, (v < 2147483648u)) & 4294901760u) == 0u))) & 65280u) == 0u))) & 240u) == 0u))) & 12u) == 0u)) | mix(1u, 0u, ((((((mix(~(v), v, (v < 2147483648u)) >> mix(16u, 0u, ((mix(~(v), v, (v < 2147483648u)) & 4294901760u) == 0u))) >> mix(8u, 0u, (((mix(~(v), v, (v < 2147483648u)) >> mix(16u, 0u, ((mix(~(v), v, (v < 2147483648u)) & 4294901760u) == 0u))) & 65280u) == 0u))) >> mix(4u, 0u, ((((mix(~(v), v, (v < 2147483648u)) >> mix(16u, 0u, ((mix(~(v), v, (v < 2147483648u)) & 4294901760u) == 0u))) >> mix(8u, 0u, (((mix(~(v), v, (v < 2147483648u)) >> mix(16u, 0u, ((mix(~(v), v, (v < 2147483648u)) & 4294901760u) == 0u))) & 65280u) == 0u))) & 240u) == 0u))) >> mix(2u, 0u, (((((mix(~(v), v, (v < 2147483648u)) >> mix(16u, 0u, ((mix(~(v), v, (v < 2147483648u)) & 4294901760u) == 0u))) >> mix(8u, 0u, (((mix(~(v), v, (v < 2147483648u)) >> mix(16u, 0u, ((mix(~(v), v, (v < 2147483648u)) & 4294901760u) == 0u))) & 65280u) == 0u))) >> mix(4u, 0u, ((((mix(~(v), v, (v < 2147483648u)) >> mix(16u, 0u, ((mix(~(v), v, (v < 2147483648u)) & 4294901760u) == 0u))) >> mix(8u, 0u, (((mix(~(v), v, (v < 2147483648u)) >> mix(16u, 0u, ((mix(~(v), v, (v < 2147483648u)) & 4294901760u) == 0u))) & 65280u) == 0u))) & 240u) == 0u))) & 12u) == 0u))) & 2u) == 0u)))))), 4294967295u, (((((mix(~(v), v, (v < 2147483648u)) >> mix(16u, 0u, ((mix(~(v), v, (v < 2147483648u)) & 4294901760u) == 0u))) >> mix(8u, 0u, (((mix(~(v), v, (v < 2147483648u)) >> mix(16u, 0u, ((mix(~(v), v, (v < 2147483648u)) & 4294901760u) == 0u))) & 65280u) == 0u))) >> mix(4u, 0u, ((((mix(~(v), v, (v < 2147483648u)) >> mix(16u, 0u, ((mix(~(v), v, (v < 2147483648u)) & 4294901760u) == 0u))) >> mix(8u, 0u, (((mix(~(v), v, (v < 2147483648u)) >> mix(16u, 0u, ((mix(~(v), v, (v < 2147483648u)) & 4294901760u) == 0u))) & 65280u) == 0u))) & 240u) == 0u))) >> mix(2u, 0u, (((((mix(~(v), v, (v < 2147483648u)) >> mix(16u, 0u, ((mix(~(v), v, (v < 2147483648u)) & 4294901760u) == 0u))) >> mix(8u, 0u, (((mix(~(v), v, (v < 2147483648u)) >> mix(16u, 0u, ((mix(~(v), v, (v < 2147483648u)) & 4294901760u) == 0u))) & 65280u) == 0u))) >> mix(4u, 0u, ((((mix(~(v), v, (v < 2147483648u)) >> mix(16u, 0u, ((mix(~(v), v, (v < 2147483648u)) & 4294901760u) == 0u))) >> mix(8u, 0u, (((mix(~(v), v, (v < 2147483648u)) >> mix(16u, 0u, ((mix(~(v), v, (v < 2147483648u)) & 4294901760u) == 0u))) & 65280u) == 0u))) & 240u) == 0u))) & 12u) == 0u))) == 0u)));
return res;
}
VertexOutput vertex_main_inner() {
@@ -68,10 +53,10 @@
return tint_symbol;
}
void main() {
- VertexOutput v_6 = vertex_main_inner();
- gl_Position = v_6.pos;
+ VertexOutput v_1 = vertex_main_inner();
+ gl_Position = v_1.pos;
gl_Position[1u] = -(gl_Position.y);
gl_Position[2u] = ((2.0f * gl_Position.z) - gl_Position.w);
- vertex_main_loc0_Output = v_6.prevent_dce;
+ vertex_main_loc0_Output = v_1.prevent_dce;
gl_PointSize = 1.0f;
}
diff --git a/test/tint/builtins/gen/var/firstLeadingBit/57a1a3.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/firstLeadingBit/57a1a3.wgsl.expected.ir.msl
index 961426e..8a341bf 100644
--- a/test/tint/builtins/gen/var/firstLeadingBit/57a1a3.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/firstLeadingBit/57a1a3.wgsl.expected.ir.msl
@@ -18,12 +18,7 @@
int firstLeadingBit_57a1a3() {
int arg_0 = 1;
uint const v = as_type<uint>(arg_0);
- uint const v_1 = select(~(v), v, (v < 2147483648u));
- uint const v_2 = select(16u, 0u, ((v_1 & 4294901760u) == 0u));
- uint const v_3 = select(8u, 0u, (((v_1 >> v_2) & 65280u) == 0u));
- uint const v_4 = select(4u, 0u, ((((v_1 >> v_2) >> v_3) & 240u) == 0u));
- uint const v_5 = select(2u, 0u, (((((v_1 >> v_2) >> v_3) >> v_4) & 12u) == 0u));
- int res = as_type<int>(select((v_2 | (v_3 | (v_4 | (v_5 | select(1u, 0u, ((((((v_1 >> v_2) >> v_3) >> v_4) >> v_5) & 2u) == 0u)))))), 4294967295u, (((((v_1 >> v_2) >> v_3) >> v_4) >> v_5) == 0u)));
+ int res = as_type<int>(select((select(16u, 0u, ((select(~(v), v, (v < 2147483648u)) & 4294901760u) == 0u)) | (select(8u, 0u, (((select(~(v), v, (v < 2147483648u)) >> select(16u, 0u, ((select(~(v), v, (v < 2147483648u)) & 4294901760u) == 0u))) & 65280u) == 0u)) | (select(4u, 0u, ((((select(~(v), v, (v < 2147483648u)) >> select(16u, 0u, ((select(~(v), v, (v < 2147483648u)) & 4294901760u) == 0u))) >> select(8u, 0u, (((select(~(v), v, (v < 2147483648u)) >> select(16u, 0u, ((select(~(v), v, (v < 2147483648u)) & 4294901760u) == 0u))) & 65280u) == 0u))) & 240u) == 0u)) | (select(2u, 0u, (((((select(~(v), v, (v < 2147483648u)) >> select(16u, 0u, ((select(~(v), v, (v < 2147483648u)) & 4294901760u) == 0u))) >> select(8u, 0u, (((select(~(v), v, (v < 2147483648u)) >> select(16u, 0u, ((select(~(v), v, (v < 2147483648u)) & 4294901760u) == 0u))) & 65280u) == 0u))) >> select(4u, 0u, ((((select(~(v), v, (v < 2147483648u)) >> select(16u, 0u, ((select(~(v), v, (v < 2147483648u)) & 4294901760u) == 0u))) >> select(8u, 0u, (((select(~(v), v, (v < 2147483648u)) >> select(16u, 0u, ((select(~(v), v, (v < 2147483648u)) & 4294901760u) == 0u))) & 65280u) == 0u))) & 240u) == 0u))) & 12u) == 0u)) | select(1u, 0u, ((((((select(~(v), v, (v < 2147483648u)) >> select(16u, 0u, ((select(~(v), v, (v < 2147483648u)) & 4294901760u) == 0u))) >> select(8u, 0u, (((select(~(v), v, (v < 2147483648u)) >> select(16u, 0u, ((select(~(v), v, (v < 2147483648u)) & 4294901760u) == 0u))) & 65280u) == 0u))) >> select(4u, 0u, ((((select(~(v), v, (v < 2147483648u)) >> select(16u, 0u, ((select(~(v), v, (v < 2147483648u)) & 4294901760u) == 0u))) >> select(8u, 0u, (((select(~(v), v, (v < 2147483648u)) >> select(16u, 0u, ((select(~(v), v, (v < 2147483648u)) & 4294901760u) == 0u))) & 65280u) == 0u))) & 240u) == 0u))) >> select(2u, 0u, (((((select(~(v), v, (v < 2147483648u)) >> select(16u, 0u, ((select(~(v), v, (v < 2147483648u)) & 4294901760u) == 0u))) >> select(8u, 0u, (((select(~(v), v, (v < 2147483648u)) >> select(16u, 0u, ((select(~(v), v, (v < 2147483648u)) & 4294901760u) == 0u))) & 65280u) == 0u))) >> select(4u, 0u, ((((select(~(v), v, (v < 2147483648u)) >> select(16u, 0u, ((select(~(v), v, (v < 2147483648u)) & 4294901760u) == 0u))) >> select(8u, 0u, (((select(~(v), v, (v < 2147483648u)) >> select(16u, 0u, ((select(~(v), v, (v < 2147483648u)) & 4294901760u) == 0u))) & 65280u) == 0u))) & 240u) == 0u))) & 12u) == 0u))) & 2u) == 0u)))))), 4294967295u, (((((select(~(v), v, (v < 2147483648u)) >> select(16u, 0u, ((select(~(v), v, (v < 2147483648u)) & 4294901760u) == 0u))) >> select(8u, 0u, (((select(~(v), v, (v < 2147483648u)) >> select(16u, 0u, ((select(~(v), v, (v < 2147483648u)) & 4294901760u) == 0u))) & 65280u) == 0u))) >> select(4u, 0u, ((((select(~(v), v, (v < 2147483648u)) >> select(16u, 0u, ((select(~(v), v, (v < 2147483648u)) & 4294901760u) == 0u))) >> select(8u, 0u, (((select(~(v), v, (v < 2147483648u)) >> select(16u, 0u, ((select(~(v), v, (v < 2147483648u)) & 4294901760u) == 0u))) & 65280u) == 0u))) & 240u) == 0u))) >> select(2u, 0u, (((((select(~(v), v, (v < 2147483648u)) >> select(16u, 0u, ((select(~(v), v, (v < 2147483648u)) & 4294901760u) == 0u))) >> select(8u, 0u, (((select(~(v), v, (v < 2147483648u)) >> select(16u, 0u, ((select(~(v), v, (v < 2147483648u)) & 4294901760u) == 0u))) & 65280u) == 0u))) >> select(4u, 0u, ((((select(~(v), v, (v < 2147483648u)) >> select(16u, 0u, ((select(~(v), v, (v < 2147483648u)) & 4294901760u) == 0u))) >> select(8u, 0u, (((select(~(v), v, (v < 2147483648u)) >> select(16u, 0u, ((select(~(v), v, (v < 2147483648u)) & 4294901760u) == 0u))) & 65280u) == 0u))) & 240u) == 0u))) & 12u) == 0u))) == 0u)));
return res;
}
@@ -45,9 +40,9 @@
}
vertex vertex_main_outputs vertex_main() {
- VertexOutput const v_6 = vertex_main_inner();
+ VertexOutput const v_1 = vertex_main_inner();
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_6.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_6.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v_1.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/firstLeadingBit/6fe804.wgsl.expected.glsl b/test/tint/builtins/gen/var/firstLeadingBit/6fe804.wgsl.expected.glsl
index 03148a2..15ae702 100644
--- a/test/tint/builtins/gen/var/firstLeadingBit/6fe804.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/firstLeadingBit/6fe804.wgsl.expected.glsl
@@ -9,12 +9,7 @@
uvec2 firstLeadingBit_6fe804() {
uvec2 arg_0 = uvec2(1u);
uvec2 v_1 = arg_0;
- uvec2 v_2 = mix(uvec2(16u), uvec2(0u), equal((v_1 & uvec2(4294901760u)), uvec2(0u)));
- uvec2 v_3 = mix(uvec2(8u), uvec2(0u), equal(((v_1 >> v_2) & uvec2(65280u)), uvec2(0u)));
- uvec2 v_4 = mix(uvec2(4u), uvec2(0u), equal((((v_1 >> v_2) >> v_3) & uvec2(240u)), uvec2(0u)));
- uvec2 v_5 = mix(uvec2(2u), uvec2(0u), equal(((((v_1 >> v_2) >> v_3) >> v_4) & uvec2(12u)), uvec2(0u)));
- uvec2 v_6 = (v_2 | (v_3 | (v_4 | (v_5 | mix(uvec2(1u), uvec2(0u), equal((((((v_1 >> v_2) >> v_3) >> v_4) >> v_5) & uvec2(2u)), uvec2(0u)))))));
- uvec2 res = mix(v_6, uvec2(4294967295u), equal(((((v_1 >> v_2) >> v_3) >> v_4) >> v_5), uvec2(0u)));
+ uvec2 res = mix((mix(uvec2(16u), uvec2(0u), equal((v_1 & uvec2(4294901760u)), uvec2(0u))) | (mix(uvec2(8u), uvec2(0u), equal(((v_1 >> mix(uvec2(16u), uvec2(0u), equal((v_1 & uvec2(4294901760u)), uvec2(0u)))) & uvec2(65280u)), uvec2(0u))) | (mix(uvec2(4u), uvec2(0u), equal((((v_1 >> mix(uvec2(16u), uvec2(0u), equal((v_1 & uvec2(4294901760u)), uvec2(0u)))) >> mix(uvec2(8u), uvec2(0u), equal(((v_1 >> mix(uvec2(16u), uvec2(0u), equal((v_1 & uvec2(4294901760u)), uvec2(0u)))) & uvec2(65280u)), uvec2(0u)))) & uvec2(240u)), uvec2(0u))) | (mix(uvec2(2u), uvec2(0u), equal(((((v_1 >> mix(uvec2(16u), uvec2(0u), equal((v_1 & uvec2(4294901760u)), uvec2(0u)))) >> mix(uvec2(8u), uvec2(0u), equal(((v_1 >> mix(uvec2(16u), uvec2(0u), equal((v_1 & uvec2(4294901760u)), uvec2(0u)))) & uvec2(65280u)), uvec2(0u)))) >> mix(uvec2(4u), uvec2(0u), equal((((v_1 >> mix(uvec2(16u), uvec2(0u), equal((v_1 & uvec2(4294901760u)), uvec2(0u)))) >> mix(uvec2(8u), uvec2(0u), equal(((v_1 >> mix(uvec2(16u), uvec2(0u), equal((v_1 & uvec2(4294901760u)), uvec2(0u)))) & uvec2(65280u)), uvec2(0u)))) & uvec2(240u)), uvec2(0u)))) & uvec2(12u)), uvec2(0u))) | mix(uvec2(1u), uvec2(0u), equal((((((v_1 >> mix(uvec2(16u), uvec2(0u), equal((v_1 & uvec2(4294901760u)), uvec2(0u)))) >> mix(uvec2(8u), uvec2(0u), equal(((v_1 >> mix(uvec2(16u), uvec2(0u), equal((v_1 & uvec2(4294901760u)), uvec2(0u)))) & uvec2(65280u)), uvec2(0u)))) >> mix(uvec2(4u), uvec2(0u), equal((((v_1 >> mix(uvec2(16u), uvec2(0u), equal((v_1 & uvec2(4294901760u)), uvec2(0u)))) >> mix(uvec2(8u), uvec2(0u), equal(((v_1 >> mix(uvec2(16u), uvec2(0u), equal((v_1 & uvec2(4294901760u)), uvec2(0u)))) & uvec2(65280u)), uvec2(0u)))) & uvec2(240u)), uvec2(0u)))) >> mix(uvec2(2u), uvec2(0u), equal(((((v_1 >> mix(uvec2(16u), uvec2(0u), equal((v_1 & uvec2(4294901760u)), uvec2(0u)))) >> mix(uvec2(8u), uvec2(0u), equal(((v_1 >> mix(uvec2(16u), uvec2(0u), equal((v_1 & uvec2(4294901760u)), uvec2(0u)))) & uvec2(65280u)), uvec2(0u)))) >> mix(uvec2(4u), uvec2(0u), equal((((v_1 >> mix(uvec2(16u), uvec2(0u), equal((v_1 & uvec2(4294901760u)), uvec2(0u)))) >> mix(uvec2(8u), uvec2(0u), equal(((v_1 >> mix(uvec2(16u), uvec2(0u), equal((v_1 & uvec2(4294901760u)), uvec2(0u)))) & uvec2(65280u)), uvec2(0u)))) & uvec2(240u)), uvec2(0u)))) & uvec2(12u)), uvec2(0u)))) & uvec2(2u)), uvec2(0u))))))), uvec2(4294967295u), equal(((((v_1 >> mix(uvec2(16u), uvec2(0u), equal((v_1 & uvec2(4294901760u)), uvec2(0u)))) >> mix(uvec2(8u), uvec2(0u), equal(((v_1 >> mix(uvec2(16u), uvec2(0u), equal((v_1 & uvec2(4294901760u)), uvec2(0u)))) & uvec2(65280u)), uvec2(0u)))) >> mix(uvec2(4u), uvec2(0u), equal((((v_1 >> mix(uvec2(16u), uvec2(0u), equal((v_1 & uvec2(4294901760u)), uvec2(0u)))) >> mix(uvec2(8u), uvec2(0u), equal(((v_1 >> mix(uvec2(16u), uvec2(0u), equal((v_1 & uvec2(4294901760u)), uvec2(0u)))) & uvec2(65280u)), uvec2(0u)))) & uvec2(240u)), uvec2(0u)))) >> mix(uvec2(2u), uvec2(0u), equal(((((v_1 >> mix(uvec2(16u), uvec2(0u), equal((v_1 & uvec2(4294901760u)), uvec2(0u)))) >> mix(uvec2(8u), uvec2(0u), equal(((v_1 >> mix(uvec2(16u), uvec2(0u), equal((v_1 & uvec2(4294901760u)), uvec2(0u)))) & uvec2(65280u)), uvec2(0u)))) >> mix(uvec2(4u), uvec2(0u), equal((((v_1 >> mix(uvec2(16u), uvec2(0u), equal((v_1 & uvec2(4294901760u)), uvec2(0u)))) >> mix(uvec2(8u), uvec2(0u), equal(((v_1 >> mix(uvec2(16u), uvec2(0u), equal((v_1 & uvec2(4294901760u)), uvec2(0u)))) & uvec2(65280u)), uvec2(0u)))) & uvec2(240u)), uvec2(0u)))) & uvec2(12u)), uvec2(0u)))), uvec2(0u)));
return res;
}
void main() {
@@ -29,12 +24,7 @@
uvec2 firstLeadingBit_6fe804() {
uvec2 arg_0 = uvec2(1u);
uvec2 v_1 = arg_0;
- uvec2 v_2 = mix(uvec2(16u), uvec2(0u), equal((v_1 & uvec2(4294901760u)), uvec2(0u)));
- uvec2 v_3 = mix(uvec2(8u), uvec2(0u), equal(((v_1 >> v_2) & uvec2(65280u)), uvec2(0u)));
- uvec2 v_4 = mix(uvec2(4u), uvec2(0u), equal((((v_1 >> v_2) >> v_3) & uvec2(240u)), uvec2(0u)));
- uvec2 v_5 = mix(uvec2(2u), uvec2(0u), equal(((((v_1 >> v_2) >> v_3) >> v_4) & uvec2(12u)), uvec2(0u)));
- uvec2 v_6 = (v_2 | (v_3 | (v_4 | (v_5 | mix(uvec2(1u), uvec2(0u), equal((((((v_1 >> v_2) >> v_3) >> v_4) >> v_5) & uvec2(2u)), uvec2(0u)))))));
- uvec2 res = mix(v_6, uvec2(4294967295u), equal(((((v_1 >> v_2) >> v_3) >> v_4) >> v_5), uvec2(0u)));
+ uvec2 res = mix((mix(uvec2(16u), uvec2(0u), equal((v_1 & uvec2(4294901760u)), uvec2(0u))) | (mix(uvec2(8u), uvec2(0u), equal(((v_1 >> mix(uvec2(16u), uvec2(0u), equal((v_1 & uvec2(4294901760u)), uvec2(0u)))) & uvec2(65280u)), uvec2(0u))) | (mix(uvec2(4u), uvec2(0u), equal((((v_1 >> mix(uvec2(16u), uvec2(0u), equal((v_1 & uvec2(4294901760u)), uvec2(0u)))) >> mix(uvec2(8u), uvec2(0u), equal(((v_1 >> mix(uvec2(16u), uvec2(0u), equal((v_1 & uvec2(4294901760u)), uvec2(0u)))) & uvec2(65280u)), uvec2(0u)))) & uvec2(240u)), uvec2(0u))) | (mix(uvec2(2u), uvec2(0u), equal(((((v_1 >> mix(uvec2(16u), uvec2(0u), equal((v_1 & uvec2(4294901760u)), uvec2(0u)))) >> mix(uvec2(8u), uvec2(0u), equal(((v_1 >> mix(uvec2(16u), uvec2(0u), equal((v_1 & uvec2(4294901760u)), uvec2(0u)))) & uvec2(65280u)), uvec2(0u)))) >> mix(uvec2(4u), uvec2(0u), equal((((v_1 >> mix(uvec2(16u), uvec2(0u), equal((v_1 & uvec2(4294901760u)), uvec2(0u)))) >> mix(uvec2(8u), uvec2(0u), equal(((v_1 >> mix(uvec2(16u), uvec2(0u), equal((v_1 & uvec2(4294901760u)), uvec2(0u)))) & uvec2(65280u)), uvec2(0u)))) & uvec2(240u)), uvec2(0u)))) & uvec2(12u)), uvec2(0u))) | mix(uvec2(1u), uvec2(0u), equal((((((v_1 >> mix(uvec2(16u), uvec2(0u), equal((v_1 & uvec2(4294901760u)), uvec2(0u)))) >> mix(uvec2(8u), uvec2(0u), equal(((v_1 >> mix(uvec2(16u), uvec2(0u), equal((v_1 & uvec2(4294901760u)), uvec2(0u)))) & uvec2(65280u)), uvec2(0u)))) >> mix(uvec2(4u), uvec2(0u), equal((((v_1 >> mix(uvec2(16u), uvec2(0u), equal((v_1 & uvec2(4294901760u)), uvec2(0u)))) >> mix(uvec2(8u), uvec2(0u), equal(((v_1 >> mix(uvec2(16u), uvec2(0u), equal((v_1 & uvec2(4294901760u)), uvec2(0u)))) & uvec2(65280u)), uvec2(0u)))) & uvec2(240u)), uvec2(0u)))) >> mix(uvec2(2u), uvec2(0u), equal(((((v_1 >> mix(uvec2(16u), uvec2(0u), equal((v_1 & uvec2(4294901760u)), uvec2(0u)))) >> mix(uvec2(8u), uvec2(0u), equal(((v_1 >> mix(uvec2(16u), uvec2(0u), equal((v_1 & uvec2(4294901760u)), uvec2(0u)))) & uvec2(65280u)), uvec2(0u)))) >> mix(uvec2(4u), uvec2(0u), equal((((v_1 >> mix(uvec2(16u), uvec2(0u), equal((v_1 & uvec2(4294901760u)), uvec2(0u)))) >> mix(uvec2(8u), uvec2(0u), equal(((v_1 >> mix(uvec2(16u), uvec2(0u), equal((v_1 & uvec2(4294901760u)), uvec2(0u)))) & uvec2(65280u)), uvec2(0u)))) & uvec2(240u)), uvec2(0u)))) & uvec2(12u)), uvec2(0u)))) & uvec2(2u)), uvec2(0u))))))), uvec2(4294967295u), equal(((((v_1 >> mix(uvec2(16u), uvec2(0u), equal((v_1 & uvec2(4294901760u)), uvec2(0u)))) >> mix(uvec2(8u), uvec2(0u), equal(((v_1 >> mix(uvec2(16u), uvec2(0u), equal((v_1 & uvec2(4294901760u)), uvec2(0u)))) & uvec2(65280u)), uvec2(0u)))) >> mix(uvec2(4u), uvec2(0u), equal((((v_1 >> mix(uvec2(16u), uvec2(0u), equal((v_1 & uvec2(4294901760u)), uvec2(0u)))) >> mix(uvec2(8u), uvec2(0u), equal(((v_1 >> mix(uvec2(16u), uvec2(0u), equal((v_1 & uvec2(4294901760u)), uvec2(0u)))) & uvec2(65280u)), uvec2(0u)))) & uvec2(240u)), uvec2(0u)))) >> mix(uvec2(2u), uvec2(0u), equal(((((v_1 >> mix(uvec2(16u), uvec2(0u), equal((v_1 & uvec2(4294901760u)), uvec2(0u)))) >> mix(uvec2(8u), uvec2(0u), equal(((v_1 >> mix(uvec2(16u), uvec2(0u), equal((v_1 & uvec2(4294901760u)), uvec2(0u)))) & uvec2(65280u)), uvec2(0u)))) >> mix(uvec2(4u), uvec2(0u), equal((((v_1 >> mix(uvec2(16u), uvec2(0u), equal((v_1 & uvec2(4294901760u)), uvec2(0u)))) >> mix(uvec2(8u), uvec2(0u), equal(((v_1 >> mix(uvec2(16u), uvec2(0u), equal((v_1 & uvec2(4294901760u)), uvec2(0u)))) & uvec2(65280u)), uvec2(0u)))) & uvec2(240u)), uvec2(0u)))) & uvec2(12u)), uvec2(0u)))), uvec2(0u)));
return res;
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
@@ -53,12 +43,7 @@
uvec2 firstLeadingBit_6fe804() {
uvec2 arg_0 = uvec2(1u);
uvec2 v = arg_0;
- uvec2 v_1 = mix(uvec2(16u), uvec2(0u), equal((v & uvec2(4294901760u)), uvec2(0u)));
- uvec2 v_2 = mix(uvec2(8u), uvec2(0u), equal(((v >> v_1) & uvec2(65280u)), uvec2(0u)));
- uvec2 v_3 = mix(uvec2(4u), uvec2(0u), equal((((v >> v_1) >> v_2) & uvec2(240u)), uvec2(0u)));
- uvec2 v_4 = mix(uvec2(2u), uvec2(0u), equal(((((v >> v_1) >> v_2) >> v_3) & uvec2(12u)), uvec2(0u)));
- uvec2 v_5 = (v_1 | (v_2 | (v_3 | (v_4 | mix(uvec2(1u), uvec2(0u), equal((((((v >> v_1) >> v_2) >> v_3) >> v_4) & uvec2(2u)), uvec2(0u)))))));
- uvec2 res = mix(v_5, uvec2(4294967295u), equal(((((v >> v_1) >> v_2) >> v_3) >> v_4), uvec2(0u)));
+ uvec2 res = mix((mix(uvec2(16u), uvec2(0u), equal((v & uvec2(4294901760u)), uvec2(0u))) | (mix(uvec2(8u), uvec2(0u), equal(((v >> mix(uvec2(16u), uvec2(0u), equal((v & uvec2(4294901760u)), uvec2(0u)))) & uvec2(65280u)), uvec2(0u))) | (mix(uvec2(4u), uvec2(0u), equal((((v >> mix(uvec2(16u), uvec2(0u), equal((v & uvec2(4294901760u)), uvec2(0u)))) >> mix(uvec2(8u), uvec2(0u), equal(((v >> mix(uvec2(16u), uvec2(0u), equal((v & uvec2(4294901760u)), uvec2(0u)))) & uvec2(65280u)), uvec2(0u)))) & uvec2(240u)), uvec2(0u))) | (mix(uvec2(2u), uvec2(0u), equal(((((v >> mix(uvec2(16u), uvec2(0u), equal((v & uvec2(4294901760u)), uvec2(0u)))) >> mix(uvec2(8u), uvec2(0u), equal(((v >> mix(uvec2(16u), uvec2(0u), equal((v & uvec2(4294901760u)), uvec2(0u)))) & uvec2(65280u)), uvec2(0u)))) >> mix(uvec2(4u), uvec2(0u), equal((((v >> mix(uvec2(16u), uvec2(0u), equal((v & uvec2(4294901760u)), uvec2(0u)))) >> mix(uvec2(8u), uvec2(0u), equal(((v >> mix(uvec2(16u), uvec2(0u), equal((v & uvec2(4294901760u)), uvec2(0u)))) & uvec2(65280u)), uvec2(0u)))) & uvec2(240u)), uvec2(0u)))) & uvec2(12u)), uvec2(0u))) | mix(uvec2(1u), uvec2(0u), equal((((((v >> mix(uvec2(16u), uvec2(0u), equal((v & uvec2(4294901760u)), uvec2(0u)))) >> mix(uvec2(8u), uvec2(0u), equal(((v >> mix(uvec2(16u), uvec2(0u), equal((v & uvec2(4294901760u)), uvec2(0u)))) & uvec2(65280u)), uvec2(0u)))) >> mix(uvec2(4u), uvec2(0u), equal((((v >> mix(uvec2(16u), uvec2(0u), equal((v & uvec2(4294901760u)), uvec2(0u)))) >> mix(uvec2(8u), uvec2(0u), equal(((v >> mix(uvec2(16u), uvec2(0u), equal((v & uvec2(4294901760u)), uvec2(0u)))) & uvec2(65280u)), uvec2(0u)))) & uvec2(240u)), uvec2(0u)))) >> mix(uvec2(2u), uvec2(0u), equal(((((v >> mix(uvec2(16u), uvec2(0u), equal((v & uvec2(4294901760u)), uvec2(0u)))) >> mix(uvec2(8u), uvec2(0u), equal(((v >> mix(uvec2(16u), uvec2(0u), equal((v & uvec2(4294901760u)), uvec2(0u)))) & uvec2(65280u)), uvec2(0u)))) >> mix(uvec2(4u), uvec2(0u), equal((((v >> mix(uvec2(16u), uvec2(0u), equal((v & uvec2(4294901760u)), uvec2(0u)))) >> mix(uvec2(8u), uvec2(0u), equal(((v >> mix(uvec2(16u), uvec2(0u), equal((v & uvec2(4294901760u)), uvec2(0u)))) & uvec2(65280u)), uvec2(0u)))) & uvec2(240u)), uvec2(0u)))) & uvec2(12u)), uvec2(0u)))) & uvec2(2u)), uvec2(0u))))))), uvec2(4294967295u), equal(((((v >> mix(uvec2(16u), uvec2(0u), equal((v & uvec2(4294901760u)), uvec2(0u)))) >> mix(uvec2(8u), uvec2(0u), equal(((v >> mix(uvec2(16u), uvec2(0u), equal((v & uvec2(4294901760u)), uvec2(0u)))) & uvec2(65280u)), uvec2(0u)))) >> mix(uvec2(4u), uvec2(0u), equal((((v >> mix(uvec2(16u), uvec2(0u), equal((v & uvec2(4294901760u)), uvec2(0u)))) >> mix(uvec2(8u), uvec2(0u), equal(((v >> mix(uvec2(16u), uvec2(0u), equal((v & uvec2(4294901760u)), uvec2(0u)))) & uvec2(65280u)), uvec2(0u)))) & uvec2(240u)), uvec2(0u)))) >> mix(uvec2(2u), uvec2(0u), equal(((((v >> mix(uvec2(16u), uvec2(0u), equal((v & uvec2(4294901760u)), uvec2(0u)))) >> mix(uvec2(8u), uvec2(0u), equal(((v >> mix(uvec2(16u), uvec2(0u), equal((v & uvec2(4294901760u)), uvec2(0u)))) & uvec2(65280u)), uvec2(0u)))) >> mix(uvec2(4u), uvec2(0u), equal((((v >> mix(uvec2(16u), uvec2(0u), equal((v & uvec2(4294901760u)), uvec2(0u)))) >> mix(uvec2(8u), uvec2(0u), equal(((v >> mix(uvec2(16u), uvec2(0u), equal((v & uvec2(4294901760u)), uvec2(0u)))) & uvec2(65280u)), uvec2(0u)))) & uvec2(240u)), uvec2(0u)))) & uvec2(12u)), uvec2(0u)))), uvec2(0u)));
return res;
}
VertexOutput vertex_main_inner() {
@@ -68,10 +53,10 @@
return tint_symbol;
}
void main() {
- VertexOutput v_6 = vertex_main_inner();
- gl_Position = v_6.pos;
+ VertexOutput v_1 = vertex_main_inner();
+ gl_Position = v_1.pos;
gl_Position[1u] = -(gl_Position.y);
gl_Position[2u] = ((2.0f * gl_Position.z) - gl_Position.w);
- vertex_main_loc0_Output = v_6.prevent_dce;
+ vertex_main_loc0_Output = v_1.prevent_dce;
gl_PointSize = 1.0f;
}
diff --git a/test/tint/builtins/gen/var/firstLeadingBit/6fe804.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/firstLeadingBit/6fe804.wgsl.expected.ir.msl
index 1bbd002..ec3f21f 100644
--- a/test/tint/builtins/gen/var/firstLeadingBit/6fe804.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/firstLeadingBit/6fe804.wgsl.expected.ir.msl
@@ -18,11 +18,7 @@
uint2 firstLeadingBit_6fe804() {
uint2 arg_0 = uint2(1u);
uint2 const v = arg_0;
- uint2 const v_1 = select(uint2(16u), uint2(0u), ((v & uint2(4294901760u)) == uint2(0u)));
- uint2 const v_2 = select(uint2(8u), uint2(0u), (((v >> v_1) & uint2(65280u)) == uint2(0u)));
- uint2 const v_3 = select(uint2(4u), uint2(0u), ((((v >> v_1) >> v_2) & uint2(240u)) == uint2(0u)));
- uint2 const v_4 = select(uint2(2u), uint2(0u), (((((v >> v_1) >> v_2) >> v_3) & uint2(12u)) == uint2(0u)));
- uint2 res = select((v_1 | (v_2 | (v_3 | (v_4 | select(uint2(1u), uint2(0u), ((((((v >> v_1) >> v_2) >> v_3) >> v_4) & uint2(2u)) == uint2(0u))))))), uint2(4294967295u), (((((v >> v_1) >> v_2) >> v_3) >> v_4) == uint2(0u)));
+ uint2 res = select((select(uint2(16u), uint2(0u), ((v & uint2(4294901760u)) == uint2(0u))) | (select(uint2(8u), uint2(0u), (((v >> select(uint2(16u), uint2(0u), ((v & uint2(4294901760u)) == uint2(0u)))) & uint2(65280u)) == uint2(0u))) | (select(uint2(4u), uint2(0u), ((((v >> select(uint2(16u), uint2(0u), ((v & uint2(4294901760u)) == uint2(0u)))) >> select(uint2(8u), uint2(0u), (((v >> select(uint2(16u), uint2(0u), ((v & uint2(4294901760u)) == uint2(0u)))) & uint2(65280u)) == uint2(0u)))) & uint2(240u)) == uint2(0u))) | (select(uint2(2u), uint2(0u), (((((v >> select(uint2(16u), uint2(0u), ((v & uint2(4294901760u)) == uint2(0u)))) >> select(uint2(8u), uint2(0u), (((v >> select(uint2(16u), uint2(0u), ((v & uint2(4294901760u)) == uint2(0u)))) & uint2(65280u)) == uint2(0u)))) >> select(uint2(4u), uint2(0u), ((((v >> select(uint2(16u), uint2(0u), ((v & uint2(4294901760u)) == uint2(0u)))) >> select(uint2(8u), uint2(0u), (((v >> select(uint2(16u), uint2(0u), ((v & uint2(4294901760u)) == uint2(0u)))) & uint2(65280u)) == uint2(0u)))) & uint2(240u)) == uint2(0u)))) & uint2(12u)) == uint2(0u))) | select(uint2(1u), uint2(0u), ((((((v >> select(uint2(16u), uint2(0u), ((v & uint2(4294901760u)) == uint2(0u)))) >> select(uint2(8u), uint2(0u), (((v >> select(uint2(16u), uint2(0u), ((v & uint2(4294901760u)) == uint2(0u)))) & uint2(65280u)) == uint2(0u)))) >> select(uint2(4u), uint2(0u), ((((v >> select(uint2(16u), uint2(0u), ((v & uint2(4294901760u)) == uint2(0u)))) >> select(uint2(8u), uint2(0u), (((v >> select(uint2(16u), uint2(0u), ((v & uint2(4294901760u)) == uint2(0u)))) & uint2(65280u)) == uint2(0u)))) & uint2(240u)) == uint2(0u)))) >> select(uint2(2u), uint2(0u), (((((v >> select(uint2(16u), uint2(0u), ((v & uint2(4294901760u)) == uint2(0u)))) >> select(uint2(8u), uint2(0u), (((v >> select(uint2(16u), uint2(0u), ((v & uint2(4294901760u)) == uint2(0u)))) & uint2(65280u)) == uint2(0u)))) >> select(uint2(4u), uint2(0u), ((((v >> select(uint2(16u), uint2(0u), ((v & uint2(4294901760u)) == uint2(0u)))) >> select(uint2(8u), uint2(0u), (((v >> select(uint2(16u), uint2(0u), ((v & uint2(4294901760u)) == uint2(0u)))) & uint2(65280u)) == uint2(0u)))) & uint2(240u)) == uint2(0u)))) & uint2(12u)) == uint2(0u)))) & uint2(2u)) == uint2(0u))))))), uint2(4294967295u), (((((v >> select(uint2(16u), uint2(0u), ((v & uint2(4294901760u)) == uint2(0u)))) >> select(uint2(8u), uint2(0u), (((v >> select(uint2(16u), uint2(0u), ((v & uint2(4294901760u)) == uint2(0u)))) & uint2(65280u)) == uint2(0u)))) >> select(uint2(4u), uint2(0u), ((((v >> select(uint2(16u), uint2(0u), ((v & uint2(4294901760u)) == uint2(0u)))) >> select(uint2(8u), uint2(0u), (((v >> select(uint2(16u), uint2(0u), ((v & uint2(4294901760u)) == uint2(0u)))) & uint2(65280u)) == uint2(0u)))) & uint2(240u)) == uint2(0u)))) >> select(uint2(2u), uint2(0u), (((((v >> select(uint2(16u), uint2(0u), ((v & uint2(4294901760u)) == uint2(0u)))) >> select(uint2(8u), uint2(0u), (((v >> select(uint2(16u), uint2(0u), ((v & uint2(4294901760u)) == uint2(0u)))) & uint2(65280u)) == uint2(0u)))) >> select(uint2(4u), uint2(0u), ((((v >> select(uint2(16u), uint2(0u), ((v & uint2(4294901760u)) == uint2(0u)))) >> select(uint2(8u), uint2(0u), (((v >> select(uint2(16u), uint2(0u), ((v & uint2(4294901760u)) == uint2(0u)))) & uint2(65280u)) == uint2(0u)))) & uint2(240u)) == uint2(0u)))) & uint2(12u)) == uint2(0u)))) == uint2(0u)));
return res;
}
@@ -44,9 +40,9 @@
}
vertex vertex_main_outputs vertex_main() {
- VertexOutput const v_5 = vertex_main_inner();
+ VertexOutput const v_1 = vertex_main_inner();
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_5.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_5.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v_1.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/firstLeadingBit/a622c2.wgsl.expected.glsl b/test/tint/builtins/gen/var/firstLeadingBit/a622c2.wgsl.expected.glsl
index 7e4e352..ed8df3a 100644
--- a/test/tint/builtins/gen/var/firstLeadingBit/a622c2.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/firstLeadingBit/a622c2.wgsl.expected.glsl
@@ -9,13 +9,7 @@
ivec2 firstLeadingBit_a622c2() {
ivec2 arg_0 = ivec2(1);
uvec2 v_1 = uvec2(arg_0);
- uvec2 v_2 = mix(~(v_1), v_1, lessThan(v_1, uvec2(2147483648u)));
- uvec2 v_3 = mix(uvec2(16u), uvec2(0u), equal((v_2 & uvec2(4294901760u)), uvec2(0u)));
- uvec2 v_4 = mix(uvec2(8u), uvec2(0u), equal(((v_2 >> v_3) & uvec2(65280u)), uvec2(0u)));
- uvec2 v_5 = mix(uvec2(4u), uvec2(0u), equal((((v_2 >> v_3) >> v_4) & uvec2(240u)), uvec2(0u)));
- uvec2 v_6 = mix(uvec2(2u), uvec2(0u), equal(((((v_2 >> v_3) >> v_4) >> v_5) & uvec2(12u)), uvec2(0u)));
- uvec2 v_7 = (v_3 | (v_4 | (v_5 | (v_6 | mix(uvec2(1u), uvec2(0u), equal((((((v_2 >> v_3) >> v_4) >> v_5) >> v_6) & uvec2(2u)), uvec2(0u)))))));
- ivec2 res = ivec2(mix(v_7, uvec2(4294967295u), equal(((((v_2 >> v_3) >> v_4) >> v_5) >> v_6), uvec2(0u))));
+ ivec2 res = ivec2(mix((mix(uvec2(16u), uvec2(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec2(2147483648u))) & uvec2(4294901760u)), uvec2(0u))) | (mix(uvec2(8u), uvec2(0u), equal(((mix(~(v_1), v_1, lessThan(v_1, uvec2(2147483648u))) >> mix(uvec2(16u), uvec2(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec2(2147483648u))) & uvec2(4294901760u)), uvec2(0u)))) & uvec2(65280u)), uvec2(0u))) | (mix(uvec2(4u), uvec2(0u), equal((((mix(~(v_1), v_1, lessThan(v_1, uvec2(2147483648u))) >> mix(uvec2(16u), uvec2(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec2(2147483648u))) & uvec2(4294901760u)), uvec2(0u)))) >> mix(uvec2(8u), uvec2(0u), equal(((mix(~(v_1), v_1, lessThan(v_1, uvec2(2147483648u))) >> mix(uvec2(16u), uvec2(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec2(2147483648u))) & uvec2(4294901760u)), uvec2(0u)))) & uvec2(65280u)), uvec2(0u)))) & uvec2(240u)), uvec2(0u))) | (mix(uvec2(2u), uvec2(0u), equal(((((mix(~(v_1), v_1, lessThan(v_1, uvec2(2147483648u))) >> mix(uvec2(16u), uvec2(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec2(2147483648u))) & uvec2(4294901760u)), uvec2(0u)))) >> mix(uvec2(8u), uvec2(0u), equal(((mix(~(v_1), v_1, lessThan(v_1, uvec2(2147483648u))) >> mix(uvec2(16u), uvec2(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec2(2147483648u))) & uvec2(4294901760u)), uvec2(0u)))) & uvec2(65280u)), uvec2(0u)))) >> mix(uvec2(4u), uvec2(0u), equal((((mix(~(v_1), v_1, lessThan(v_1, uvec2(2147483648u))) >> mix(uvec2(16u), uvec2(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec2(2147483648u))) & uvec2(4294901760u)), uvec2(0u)))) >> mix(uvec2(8u), uvec2(0u), equal(((mix(~(v_1), v_1, lessThan(v_1, uvec2(2147483648u))) >> mix(uvec2(16u), uvec2(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec2(2147483648u))) & uvec2(4294901760u)), uvec2(0u)))) & uvec2(65280u)), uvec2(0u)))) & uvec2(240u)), uvec2(0u)))) & uvec2(12u)), uvec2(0u))) | mix(uvec2(1u), uvec2(0u), equal((((((mix(~(v_1), v_1, lessThan(v_1, uvec2(2147483648u))) >> mix(uvec2(16u), uvec2(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec2(2147483648u))) & uvec2(4294901760u)), uvec2(0u)))) >> mix(uvec2(8u), uvec2(0u), equal(((mix(~(v_1), v_1, lessThan(v_1, uvec2(2147483648u))) >> mix(uvec2(16u), uvec2(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec2(2147483648u))) & uvec2(4294901760u)), uvec2(0u)))) & uvec2(65280u)), uvec2(0u)))) >> mix(uvec2(4u), uvec2(0u), equal((((mix(~(v_1), v_1, lessThan(v_1, uvec2(2147483648u))) >> mix(uvec2(16u), uvec2(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec2(2147483648u))) & uvec2(4294901760u)), uvec2(0u)))) >> mix(uvec2(8u), uvec2(0u), equal(((mix(~(v_1), v_1, lessThan(v_1, uvec2(2147483648u))) >> mix(uvec2(16u), uvec2(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec2(2147483648u))) & uvec2(4294901760u)), uvec2(0u)))) & uvec2(65280u)), uvec2(0u)))) & uvec2(240u)), uvec2(0u)))) >> mix(uvec2(2u), uvec2(0u), equal(((((mix(~(v_1), v_1, lessThan(v_1, uvec2(2147483648u))) >> mix(uvec2(16u), uvec2(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec2(2147483648u))) & uvec2(4294901760u)), uvec2(0u)))) >> mix(uvec2(8u), uvec2(0u), equal(((mix(~(v_1), v_1, lessThan(v_1, uvec2(2147483648u))) >> mix(uvec2(16u), uvec2(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec2(2147483648u))) & uvec2(4294901760u)), uvec2(0u)))) & uvec2(65280u)), uvec2(0u)))) >> mix(uvec2(4u), uvec2(0u), equal((((mix(~(v_1), v_1, lessThan(v_1, uvec2(2147483648u))) >> mix(uvec2(16u), uvec2(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec2(2147483648u))) & uvec2(4294901760u)), uvec2(0u)))) >> mix(uvec2(8u), uvec2(0u), equal(((mix(~(v_1), v_1, lessThan(v_1, uvec2(2147483648u))) >> mix(uvec2(16u), uvec2(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec2(2147483648u))) & uvec2(4294901760u)), uvec2(0u)))) & uvec2(65280u)), uvec2(0u)))) & uvec2(240u)), uvec2(0u)))) & uvec2(12u)), uvec2(0u)))) & uvec2(2u)), uvec2(0u))))))), uvec2(4294967295u), equal(((((mix(~(v_1), v_1, lessThan(v_1, uvec2(2147483648u))) >> mix(uvec2(16u), uvec2(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec2(2147483648u))) & uvec2(4294901760u)), uvec2(0u)))) >> mix(uvec2(8u), uvec2(0u), equal(((mix(~(v_1), v_1, lessThan(v_1, uvec2(2147483648u))) >> mix(uvec2(16u), uvec2(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec2(2147483648u))) & uvec2(4294901760u)), uvec2(0u)))) & uvec2(65280u)), uvec2(0u)))) >> mix(uvec2(4u), uvec2(0u), equal((((mix(~(v_1), v_1, lessThan(v_1, uvec2(2147483648u))) >> mix(uvec2(16u), uvec2(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec2(2147483648u))) & uvec2(4294901760u)), uvec2(0u)))) >> mix(uvec2(8u), uvec2(0u), equal(((mix(~(v_1), v_1, lessThan(v_1, uvec2(2147483648u))) >> mix(uvec2(16u), uvec2(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec2(2147483648u))) & uvec2(4294901760u)), uvec2(0u)))) & uvec2(65280u)), uvec2(0u)))) & uvec2(240u)), uvec2(0u)))) >> mix(uvec2(2u), uvec2(0u), equal(((((mix(~(v_1), v_1, lessThan(v_1, uvec2(2147483648u))) >> mix(uvec2(16u), uvec2(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec2(2147483648u))) & uvec2(4294901760u)), uvec2(0u)))) >> mix(uvec2(8u), uvec2(0u), equal(((mix(~(v_1), v_1, lessThan(v_1, uvec2(2147483648u))) >> mix(uvec2(16u), uvec2(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec2(2147483648u))) & uvec2(4294901760u)), uvec2(0u)))) & uvec2(65280u)), uvec2(0u)))) >> mix(uvec2(4u), uvec2(0u), equal((((mix(~(v_1), v_1, lessThan(v_1, uvec2(2147483648u))) >> mix(uvec2(16u), uvec2(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec2(2147483648u))) & uvec2(4294901760u)), uvec2(0u)))) >> mix(uvec2(8u), uvec2(0u), equal(((mix(~(v_1), v_1, lessThan(v_1, uvec2(2147483648u))) >> mix(uvec2(16u), uvec2(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec2(2147483648u))) & uvec2(4294901760u)), uvec2(0u)))) & uvec2(65280u)), uvec2(0u)))) & uvec2(240u)), uvec2(0u)))) & uvec2(12u)), uvec2(0u)))), uvec2(0u))));
return res;
}
void main() {
@@ -30,13 +24,7 @@
ivec2 firstLeadingBit_a622c2() {
ivec2 arg_0 = ivec2(1);
uvec2 v_1 = uvec2(arg_0);
- uvec2 v_2 = mix(~(v_1), v_1, lessThan(v_1, uvec2(2147483648u)));
- uvec2 v_3 = mix(uvec2(16u), uvec2(0u), equal((v_2 & uvec2(4294901760u)), uvec2(0u)));
- uvec2 v_4 = mix(uvec2(8u), uvec2(0u), equal(((v_2 >> v_3) & uvec2(65280u)), uvec2(0u)));
- uvec2 v_5 = mix(uvec2(4u), uvec2(0u), equal((((v_2 >> v_3) >> v_4) & uvec2(240u)), uvec2(0u)));
- uvec2 v_6 = mix(uvec2(2u), uvec2(0u), equal(((((v_2 >> v_3) >> v_4) >> v_5) & uvec2(12u)), uvec2(0u)));
- uvec2 v_7 = (v_3 | (v_4 | (v_5 | (v_6 | mix(uvec2(1u), uvec2(0u), equal((((((v_2 >> v_3) >> v_4) >> v_5) >> v_6) & uvec2(2u)), uvec2(0u)))))));
- ivec2 res = ivec2(mix(v_7, uvec2(4294967295u), equal(((((v_2 >> v_3) >> v_4) >> v_5) >> v_6), uvec2(0u))));
+ ivec2 res = ivec2(mix((mix(uvec2(16u), uvec2(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec2(2147483648u))) & uvec2(4294901760u)), uvec2(0u))) | (mix(uvec2(8u), uvec2(0u), equal(((mix(~(v_1), v_1, lessThan(v_1, uvec2(2147483648u))) >> mix(uvec2(16u), uvec2(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec2(2147483648u))) & uvec2(4294901760u)), uvec2(0u)))) & uvec2(65280u)), uvec2(0u))) | (mix(uvec2(4u), uvec2(0u), equal((((mix(~(v_1), v_1, lessThan(v_1, uvec2(2147483648u))) >> mix(uvec2(16u), uvec2(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec2(2147483648u))) & uvec2(4294901760u)), uvec2(0u)))) >> mix(uvec2(8u), uvec2(0u), equal(((mix(~(v_1), v_1, lessThan(v_1, uvec2(2147483648u))) >> mix(uvec2(16u), uvec2(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec2(2147483648u))) & uvec2(4294901760u)), uvec2(0u)))) & uvec2(65280u)), uvec2(0u)))) & uvec2(240u)), uvec2(0u))) | (mix(uvec2(2u), uvec2(0u), equal(((((mix(~(v_1), v_1, lessThan(v_1, uvec2(2147483648u))) >> mix(uvec2(16u), uvec2(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec2(2147483648u))) & uvec2(4294901760u)), uvec2(0u)))) >> mix(uvec2(8u), uvec2(0u), equal(((mix(~(v_1), v_1, lessThan(v_1, uvec2(2147483648u))) >> mix(uvec2(16u), uvec2(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec2(2147483648u))) & uvec2(4294901760u)), uvec2(0u)))) & uvec2(65280u)), uvec2(0u)))) >> mix(uvec2(4u), uvec2(0u), equal((((mix(~(v_1), v_1, lessThan(v_1, uvec2(2147483648u))) >> mix(uvec2(16u), uvec2(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec2(2147483648u))) & uvec2(4294901760u)), uvec2(0u)))) >> mix(uvec2(8u), uvec2(0u), equal(((mix(~(v_1), v_1, lessThan(v_1, uvec2(2147483648u))) >> mix(uvec2(16u), uvec2(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec2(2147483648u))) & uvec2(4294901760u)), uvec2(0u)))) & uvec2(65280u)), uvec2(0u)))) & uvec2(240u)), uvec2(0u)))) & uvec2(12u)), uvec2(0u))) | mix(uvec2(1u), uvec2(0u), equal((((((mix(~(v_1), v_1, lessThan(v_1, uvec2(2147483648u))) >> mix(uvec2(16u), uvec2(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec2(2147483648u))) & uvec2(4294901760u)), uvec2(0u)))) >> mix(uvec2(8u), uvec2(0u), equal(((mix(~(v_1), v_1, lessThan(v_1, uvec2(2147483648u))) >> mix(uvec2(16u), uvec2(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec2(2147483648u))) & uvec2(4294901760u)), uvec2(0u)))) & uvec2(65280u)), uvec2(0u)))) >> mix(uvec2(4u), uvec2(0u), equal((((mix(~(v_1), v_1, lessThan(v_1, uvec2(2147483648u))) >> mix(uvec2(16u), uvec2(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec2(2147483648u))) & uvec2(4294901760u)), uvec2(0u)))) >> mix(uvec2(8u), uvec2(0u), equal(((mix(~(v_1), v_1, lessThan(v_1, uvec2(2147483648u))) >> mix(uvec2(16u), uvec2(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec2(2147483648u))) & uvec2(4294901760u)), uvec2(0u)))) & uvec2(65280u)), uvec2(0u)))) & uvec2(240u)), uvec2(0u)))) >> mix(uvec2(2u), uvec2(0u), equal(((((mix(~(v_1), v_1, lessThan(v_1, uvec2(2147483648u))) >> mix(uvec2(16u), uvec2(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec2(2147483648u))) & uvec2(4294901760u)), uvec2(0u)))) >> mix(uvec2(8u), uvec2(0u), equal(((mix(~(v_1), v_1, lessThan(v_1, uvec2(2147483648u))) >> mix(uvec2(16u), uvec2(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec2(2147483648u))) & uvec2(4294901760u)), uvec2(0u)))) & uvec2(65280u)), uvec2(0u)))) >> mix(uvec2(4u), uvec2(0u), equal((((mix(~(v_1), v_1, lessThan(v_1, uvec2(2147483648u))) >> mix(uvec2(16u), uvec2(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec2(2147483648u))) & uvec2(4294901760u)), uvec2(0u)))) >> mix(uvec2(8u), uvec2(0u), equal(((mix(~(v_1), v_1, lessThan(v_1, uvec2(2147483648u))) >> mix(uvec2(16u), uvec2(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec2(2147483648u))) & uvec2(4294901760u)), uvec2(0u)))) & uvec2(65280u)), uvec2(0u)))) & uvec2(240u)), uvec2(0u)))) & uvec2(12u)), uvec2(0u)))) & uvec2(2u)), uvec2(0u))))))), uvec2(4294967295u), equal(((((mix(~(v_1), v_1, lessThan(v_1, uvec2(2147483648u))) >> mix(uvec2(16u), uvec2(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec2(2147483648u))) & uvec2(4294901760u)), uvec2(0u)))) >> mix(uvec2(8u), uvec2(0u), equal(((mix(~(v_1), v_1, lessThan(v_1, uvec2(2147483648u))) >> mix(uvec2(16u), uvec2(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec2(2147483648u))) & uvec2(4294901760u)), uvec2(0u)))) & uvec2(65280u)), uvec2(0u)))) >> mix(uvec2(4u), uvec2(0u), equal((((mix(~(v_1), v_1, lessThan(v_1, uvec2(2147483648u))) >> mix(uvec2(16u), uvec2(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec2(2147483648u))) & uvec2(4294901760u)), uvec2(0u)))) >> mix(uvec2(8u), uvec2(0u), equal(((mix(~(v_1), v_1, lessThan(v_1, uvec2(2147483648u))) >> mix(uvec2(16u), uvec2(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec2(2147483648u))) & uvec2(4294901760u)), uvec2(0u)))) & uvec2(65280u)), uvec2(0u)))) & uvec2(240u)), uvec2(0u)))) >> mix(uvec2(2u), uvec2(0u), equal(((((mix(~(v_1), v_1, lessThan(v_1, uvec2(2147483648u))) >> mix(uvec2(16u), uvec2(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec2(2147483648u))) & uvec2(4294901760u)), uvec2(0u)))) >> mix(uvec2(8u), uvec2(0u), equal(((mix(~(v_1), v_1, lessThan(v_1, uvec2(2147483648u))) >> mix(uvec2(16u), uvec2(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec2(2147483648u))) & uvec2(4294901760u)), uvec2(0u)))) & uvec2(65280u)), uvec2(0u)))) >> mix(uvec2(4u), uvec2(0u), equal((((mix(~(v_1), v_1, lessThan(v_1, uvec2(2147483648u))) >> mix(uvec2(16u), uvec2(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec2(2147483648u))) & uvec2(4294901760u)), uvec2(0u)))) >> mix(uvec2(8u), uvec2(0u), equal(((mix(~(v_1), v_1, lessThan(v_1, uvec2(2147483648u))) >> mix(uvec2(16u), uvec2(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec2(2147483648u))) & uvec2(4294901760u)), uvec2(0u)))) & uvec2(65280u)), uvec2(0u)))) & uvec2(240u)), uvec2(0u)))) & uvec2(12u)), uvec2(0u)))), uvec2(0u))));
return res;
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
@@ -55,13 +43,7 @@
ivec2 firstLeadingBit_a622c2() {
ivec2 arg_0 = ivec2(1);
uvec2 v = uvec2(arg_0);
- uvec2 v_1 = mix(~(v), v, lessThan(v, uvec2(2147483648u)));
- uvec2 v_2 = mix(uvec2(16u), uvec2(0u), equal((v_1 & uvec2(4294901760u)), uvec2(0u)));
- uvec2 v_3 = mix(uvec2(8u), uvec2(0u), equal(((v_1 >> v_2) & uvec2(65280u)), uvec2(0u)));
- uvec2 v_4 = mix(uvec2(4u), uvec2(0u), equal((((v_1 >> v_2) >> v_3) & uvec2(240u)), uvec2(0u)));
- uvec2 v_5 = mix(uvec2(2u), uvec2(0u), equal(((((v_1 >> v_2) >> v_3) >> v_4) & uvec2(12u)), uvec2(0u)));
- uvec2 v_6 = (v_2 | (v_3 | (v_4 | (v_5 | mix(uvec2(1u), uvec2(0u), equal((((((v_1 >> v_2) >> v_3) >> v_4) >> v_5) & uvec2(2u)), uvec2(0u)))))));
- ivec2 res = ivec2(mix(v_6, uvec2(4294967295u), equal(((((v_1 >> v_2) >> v_3) >> v_4) >> v_5), uvec2(0u))));
+ ivec2 res = ivec2(mix((mix(uvec2(16u), uvec2(0u), equal((mix(~(v), v, lessThan(v, uvec2(2147483648u))) & uvec2(4294901760u)), uvec2(0u))) | (mix(uvec2(8u), uvec2(0u), equal(((mix(~(v), v, lessThan(v, uvec2(2147483648u))) >> mix(uvec2(16u), uvec2(0u), equal((mix(~(v), v, lessThan(v, uvec2(2147483648u))) & uvec2(4294901760u)), uvec2(0u)))) & uvec2(65280u)), uvec2(0u))) | (mix(uvec2(4u), uvec2(0u), equal((((mix(~(v), v, lessThan(v, uvec2(2147483648u))) >> mix(uvec2(16u), uvec2(0u), equal((mix(~(v), v, lessThan(v, uvec2(2147483648u))) & uvec2(4294901760u)), uvec2(0u)))) >> mix(uvec2(8u), uvec2(0u), equal(((mix(~(v), v, lessThan(v, uvec2(2147483648u))) >> mix(uvec2(16u), uvec2(0u), equal((mix(~(v), v, lessThan(v, uvec2(2147483648u))) & uvec2(4294901760u)), uvec2(0u)))) & uvec2(65280u)), uvec2(0u)))) & uvec2(240u)), uvec2(0u))) | (mix(uvec2(2u), uvec2(0u), equal(((((mix(~(v), v, lessThan(v, uvec2(2147483648u))) >> mix(uvec2(16u), uvec2(0u), equal((mix(~(v), v, lessThan(v, uvec2(2147483648u))) & uvec2(4294901760u)), uvec2(0u)))) >> mix(uvec2(8u), uvec2(0u), equal(((mix(~(v), v, lessThan(v, uvec2(2147483648u))) >> mix(uvec2(16u), uvec2(0u), equal((mix(~(v), v, lessThan(v, uvec2(2147483648u))) & uvec2(4294901760u)), uvec2(0u)))) & uvec2(65280u)), uvec2(0u)))) >> mix(uvec2(4u), uvec2(0u), equal((((mix(~(v), v, lessThan(v, uvec2(2147483648u))) >> mix(uvec2(16u), uvec2(0u), equal((mix(~(v), v, lessThan(v, uvec2(2147483648u))) & uvec2(4294901760u)), uvec2(0u)))) >> mix(uvec2(8u), uvec2(0u), equal(((mix(~(v), v, lessThan(v, uvec2(2147483648u))) >> mix(uvec2(16u), uvec2(0u), equal((mix(~(v), v, lessThan(v, uvec2(2147483648u))) & uvec2(4294901760u)), uvec2(0u)))) & uvec2(65280u)), uvec2(0u)))) & uvec2(240u)), uvec2(0u)))) & uvec2(12u)), uvec2(0u))) | mix(uvec2(1u), uvec2(0u), equal((((((mix(~(v), v, lessThan(v, uvec2(2147483648u))) >> mix(uvec2(16u), uvec2(0u), equal((mix(~(v), v, lessThan(v, uvec2(2147483648u))) & uvec2(4294901760u)), uvec2(0u)))) >> mix(uvec2(8u), uvec2(0u), equal(((mix(~(v), v, lessThan(v, uvec2(2147483648u))) >> mix(uvec2(16u), uvec2(0u), equal((mix(~(v), v, lessThan(v, uvec2(2147483648u))) & uvec2(4294901760u)), uvec2(0u)))) & uvec2(65280u)), uvec2(0u)))) >> mix(uvec2(4u), uvec2(0u), equal((((mix(~(v), v, lessThan(v, uvec2(2147483648u))) >> mix(uvec2(16u), uvec2(0u), equal((mix(~(v), v, lessThan(v, uvec2(2147483648u))) & uvec2(4294901760u)), uvec2(0u)))) >> mix(uvec2(8u), uvec2(0u), equal(((mix(~(v), v, lessThan(v, uvec2(2147483648u))) >> mix(uvec2(16u), uvec2(0u), equal((mix(~(v), v, lessThan(v, uvec2(2147483648u))) & uvec2(4294901760u)), uvec2(0u)))) & uvec2(65280u)), uvec2(0u)))) & uvec2(240u)), uvec2(0u)))) >> mix(uvec2(2u), uvec2(0u), equal(((((mix(~(v), v, lessThan(v, uvec2(2147483648u))) >> mix(uvec2(16u), uvec2(0u), equal((mix(~(v), v, lessThan(v, uvec2(2147483648u))) & uvec2(4294901760u)), uvec2(0u)))) >> mix(uvec2(8u), uvec2(0u), equal(((mix(~(v), v, lessThan(v, uvec2(2147483648u))) >> mix(uvec2(16u), uvec2(0u), equal((mix(~(v), v, lessThan(v, uvec2(2147483648u))) & uvec2(4294901760u)), uvec2(0u)))) & uvec2(65280u)), uvec2(0u)))) >> mix(uvec2(4u), uvec2(0u), equal((((mix(~(v), v, lessThan(v, uvec2(2147483648u))) >> mix(uvec2(16u), uvec2(0u), equal((mix(~(v), v, lessThan(v, uvec2(2147483648u))) & uvec2(4294901760u)), uvec2(0u)))) >> mix(uvec2(8u), uvec2(0u), equal(((mix(~(v), v, lessThan(v, uvec2(2147483648u))) >> mix(uvec2(16u), uvec2(0u), equal((mix(~(v), v, lessThan(v, uvec2(2147483648u))) & uvec2(4294901760u)), uvec2(0u)))) & uvec2(65280u)), uvec2(0u)))) & uvec2(240u)), uvec2(0u)))) & uvec2(12u)), uvec2(0u)))) & uvec2(2u)), uvec2(0u))))))), uvec2(4294967295u), equal(((((mix(~(v), v, lessThan(v, uvec2(2147483648u))) >> mix(uvec2(16u), uvec2(0u), equal((mix(~(v), v, lessThan(v, uvec2(2147483648u))) & uvec2(4294901760u)), uvec2(0u)))) >> mix(uvec2(8u), uvec2(0u), equal(((mix(~(v), v, lessThan(v, uvec2(2147483648u))) >> mix(uvec2(16u), uvec2(0u), equal((mix(~(v), v, lessThan(v, uvec2(2147483648u))) & uvec2(4294901760u)), uvec2(0u)))) & uvec2(65280u)), uvec2(0u)))) >> mix(uvec2(4u), uvec2(0u), equal((((mix(~(v), v, lessThan(v, uvec2(2147483648u))) >> mix(uvec2(16u), uvec2(0u), equal((mix(~(v), v, lessThan(v, uvec2(2147483648u))) & uvec2(4294901760u)), uvec2(0u)))) >> mix(uvec2(8u), uvec2(0u), equal(((mix(~(v), v, lessThan(v, uvec2(2147483648u))) >> mix(uvec2(16u), uvec2(0u), equal((mix(~(v), v, lessThan(v, uvec2(2147483648u))) & uvec2(4294901760u)), uvec2(0u)))) & uvec2(65280u)), uvec2(0u)))) & uvec2(240u)), uvec2(0u)))) >> mix(uvec2(2u), uvec2(0u), equal(((((mix(~(v), v, lessThan(v, uvec2(2147483648u))) >> mix(uvec2(16u), uvec2(0u), equal((mix(~(v), v, lessThan(v, uvec2(2147483648u))) & uvec2(4294901760u)), uvec2(0u)))) >> mix(uvec2(8u), uvec2(0u), equal(((mix(~(v), v, lessThan(v, uvec2(2147483648u))) >> mix(uvec2(16u), uvec2(0u), equal((mix(~(v), v, lessThan(v, uvec2(2147483648u))) & uvec2(4294901760u)), uvec2(0u)))) & uvec2(65280u)), uvec2(0u)))) >> mix(uvec2(4u), uvec2(0u), equal((((mix(~(v), v, lessThan(v, uvec2(2147483648u))) >> mix(uvec2(16u), uvec2(0u), equal((mix(~(v), v, lessThan(v, uvec2(2147483648u))) & uvec2(4294901760u)), uvec2(0u)))) >> mix(uvec2(8u), uvec2(0u), equal(((mix(~(v), v, lessThan(v, uvec2(2147483648u))) >> mix(uvec2(16u), uvec2(0u), equal((mix(~(v), v, lessThan(v, uvec2(2147483648u))) & uvec2(4294901760u)), uvec2(0u)))) & uvec2(65280u)), uvec2(0u)))) & uvec2(240u)), uvec2(0u)))) & uvec2(12u)), uvec2(0u)))), uvec2(0u))));
return res;
}
VertexOutput vertex_main_inner() {
@@ -71,10 +53,10 @@
return tint_symbol;
}
void main() {
- VertexOutput v_7 = vertex_main_inner();
- gl_Position = v_7.pos;
+ VertexOutput v_1 = vertex_main_inner();
+ gl_Position = v_1.pos;
gl_Position[1u] = -(gl_Position.y);
gl_Position[2u] = ((2.0f * gl_Position.z) - gl_Position.w);
- vertex_main_loc0_Output = v_7.prevent_dce;
+ vertex_main_loc0_Output = v_1.prevent_dce;
gl_PointSize = 1.0f;
}
diff --git a/test/tint/builtins/gen/var/firstLeadingBit/a622c2.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/firstLeadingBit/a622c2.wgsl.expected.ir.msl
index 855fa3c..6ed4226 100644
--- a/test/tint/builtins/gen/var/firstLeadingBit/a622c2.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/firstLeadingBit/a622c2.wgsl.expected.ir.msl
@@ -18,12 +18,7 @@
int2 firstLeadingBit_a622c2() {
int2 arg_0 = int2(1);
uint2 const v = as_type<uint2>(arg_0);
- uint2 const v_1 = select(~(v), v, (v < uint2(2147483648u)));
- uint2 const v_2 = select(uint2(16u), uint2(0u), ((v_1 & uint2(4294901760u)) == uint2(0u)));
- uint2 const v_3 = select(uint2(8u), uint2(0u), (((v_1 >> v_2) & uint2(65280u)) == uint2(0u)));
- uint2 const v_4 = select(uint2(4u), uint2(0u), ((((v_1 >> v_2) >> v_3) & uint2(240u)) == uint2(0u)));
- uint2 const v_5 = select(uint2(2u), uint2(0u), (((((v_1 >> v_2) >> v_3) >> v_4) & uint2(12u)) == uint2(0u)));
- int2 res = as_type<int2>(select((v_2 | (v_3 | (v_4 | (v_5 | select(uint2(1u), uint2(0u), ((((((v_1 >> v_2) >> v_3) >> v_4) >> v_5) & uint2(2u)) == uint2(0u))))))), uint2(4294967295u), (((((v_1 >> v_2) >> v_3) >> v_4) >> v_5) == uint2(0u))));
+ int2 res = as_type<int2>(select((select(uint2(16u), uint2(0u), ((select(~(v), v, (v < uint2(2147483648u))) & uint2(4294901760u)) == uint2(0u))) | (select(uint2(8u), uint2(0u), (((select(~(v), v, (v < uint2(2147483648u))) >> select(uint2(16u), uint2(0u), ((select(~(v), v, (v < uint2(2147483648u))) & uint2(4294901760u)) == uint2(0u)))) & uint2(65280u)) == uint2(0u))) | (select(uint2(4u), uint2(0u), ((((select(~(v), v, (v < uint2(2147483648u))) >> select(uint2(16u), uint2(0u), ((select(~(v), v, (v < uint2(2147483648u))) & uint2(4294901760u)) == uint2(0u)))) >> select(uint2(8u), uint2(0u), (((select(~(v), v, (v < uint2(2147483648u))) >> select(uint2(16u), uint2(0u), ((select(~(v), v, (v < uint2(2147483648u))) & uint2(4294901760u)) == uint2(0u)))) & uint2(65280u)) == uint2(0u)))) & uint2(240u)) == uint2(0u))) | (select(uint2(2u), uint2(0u), (((((select(~(v), v, (v < uint2(2147483648u))) >> select(uint2(16u), uint2(0u), ((select(~(v), v, (v < uint2(2147483648u))) & uint2(4294901760u)) == uint2(0u)))) >> select(uint2(8u), uint2(0u), (((select(~(v), v, (v < uint2(2147483648u))) >> select(uint2(16u), uint2(0u), ((select(~(v), v, (v < uint2(2147483648u))) & uint2(4294901760u)) == uint2(0u)))) & uint2(65280u)) == uint2(0u)))) >> select(uint2(4u), uint2(0u), ((((select(~(v), v, (v < uint2(2147483648u))) >> select(uint2(16u), uint2(0u), ((select(~(v), v, (v < uint2(2147483648u))) & uint2(4294901760u)) == uint2(0u)))) >> select(uint2(8u), uint2(0u), (((select(~(v), v, (v < uint2(2147483648u))) >> select(uint2(16u), uint2(0u), ((select(~(v), v, (v < uint2(2147483648u))) & uint2(4294901760u)) == uint2(0u)))) & uint2(65280u)) == uint2(0u)))) & uint2(240u)) == uint2(0u)))) & uint2(12u)) == uint2(0u))) | select(uint2(1u), uint2(0u), ((((((select(~(v), v, (v < uint2(2147483648u))) >> select(uint2(16u), uint2(0u), ((select(~(v), v, (v < uint2(2147483648u))) & uint2(4294901760u)) == uint2(0u)))) >> select(uint2(8u), uint2(0u), (((select(~(v), v, (v < uint2(2147483648u))) >> select(uint2(16u), uint2(0u), ((select(~(v), v, (v < uint2(2147483648u))) & uint2(4294901760u)) == uint2(0u)))) & uint2(65280u)) == uint2(0u)))) >> select(uint2(4u), uint2(0u), ((((select(~(v), v, (v < uint2(2147483648u))) >> select(uint2(16u), uint2(0u), ((select(~(v), v, (v < uint2(2147483648u))) & uint2(4294901760u)) == uint2(0u)))) >> select(uint2(8u), uint2(0u), (((select(~(v), v, (v < uint2(2147483648u))) >> select(uint2(16u), uint2(0u), ((select(~(v), v, (v < uint2(2147483648u))) & uint2(4294901760u)) == uint2(0u)))) & uint2(65280u)) == uint2(0u)))) & uint2(240u)) == uint2(0u)))) >> select(uint2(2u), uint2(0u), (((((select(~(v), v, (v < uint2(2147483648u))) >> select(uint2(16u), uint2(0u), ((select(~(v), v, (v < uint2(2147483648u))) & uint2(4294901760u)) == uint2(0u)))) >> select(uint2(8u), uint2(0u), (((select(~(v), v, (v < uint2(2147483648u))) >> select(uint2(16u), uint2(0u), ((select(~(v), v, (v < uint2(2147483648u))) & uint2(4294901760u)) == uint2(0u)))) & uint2(65280u)) == uint2(0u)))) >> select(uint2(4u), uint2(0u), ((((select(~(v), v, (v < uint2(2147483648u))) >> select(uint2(16u), uint2(0u), ((select(~(v), v, (v < uint2(2147483648u))) & uint2(4294901760u)) == uint2(0u)))) >> select(uint2(8u), uint2(0u), (((select(~(v), v, (v < uint2(2147483648u))) >> select(uint2(16u), uint2(0u), ((select(~(v), v, (v < uint2(2147483648u))) & uint2(4294901760u)) == uint2(0u)))) & uint2(65280u)) == uint2(0u)))) & uint2(240u)) == uint2(0u)))) & uint2(12u)) == uint2(0u)))) & uint2(2u)) == uint2(0u))))))), uint2(4294967295u), (((((select(~(v), v, (v < uint2(2147483648u))) >> select(uint2(16u), uint2(0u), ((select(~(v), v, (v < uint2(2147483648u))) & uint2(4294901760u)) == uint2(0u)))) >> select(uint2(8u), uint2(0u), (((select(~(v), v, (v < uint2(2147483648u))) >> select(uint2(16u), uint2(0u), ((select(~(v), v, (v < uint2(2147483648u))) & uint2(4294901760u)) == uint2(0u)))) & uint2(65280u)) == uint2(0u)))) >> select(uint2(4u), uint2(0u), ((((select(~(v), v, (v < uint2(2147483648u))) >> select(uint2(16u), uint2(0u), ((select(~(v), v, (v < uint2(2147483648u))) & uint2(4294901760u)) == uint2(0u)))) >> select(uint2(8u), uint2(0u), (((select(~(v), v, (v < uint2(2147483648u))) >> select(uint2(16u), uint2(0u), ((select(~(v), v, (v < uint2(2147483648u))) & uint2(4294901760u)) == uint2(0u)))) & uint2(65280u)) == uint2(0u)))) & uint2(240u)) == uint2(0u)))) >> select(uint2(2u), uint2(0u), (((((select(~(v), v, (v < uint2(2147483648u))) >> select(uint2(16u), uint2(0u), ((select(~(v), v, (v < uint2(2147483648u))) & uint2(4294901760u)) == uint2(0u)))) >> select(uint2(8u), uint2(0u), (((select(~(v), v, (v < uint2(2147483648u))) >> select(uint2(16u), uint2(0u), ((select(~(v), v, (v < uint2(2147483648u))) & uint2(4294901760u)) == uint2(0u)))) & uint2(65280u)) == uint2(0u)))) >> select(uint2(4u), uint2(0u), ((((select(~(v), v, (v < uint2(2147483648u))) >> select(uint2(16u), uint2(0u), ((select(~(v), v, (v < uint2(2147483648u))) & uint2(4294901760u)) == uint2(0u)))) >> select(uint2(8u), uint2(0u), (((select(~(v), v, (v < uint2(2147483648u))) >> select(uint2(16u), uint2(0u), ((select(~(v), v, (v < uint2(2147483648u))) & uint2(4294901760u)) == uint2(0u)))) & uint2(65280u)) == uint2(0u)))) & uint2(240u)) == uint2(0u)))) & uint2(12u)) == uint2(0u)))) == uint2(0u))));
return res;
}
@@ -45,9 +40,9 @@
}
vertex vertex_main_outputs vertex_main() {
- VertexOutput const v_6 = vertex_main_inner();
+ VertexOutput const v_1 = vertex_main_inner();
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_6.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_6.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v_1.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/firstLeadingBit/c1f940.wgsl.expected.glsl b/test/tint/builtins/gen/var/firstLeadingBit/c1f940.wgsl.expected.glsl
index d5e8de1..3e62600 100644
--- a/test/tint/builtins/gen/var/firstLeadingBit/c1f940.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/firstLeadingBit/c1f940.wgsl.expected.glsl
@@ -9,13 +9,7 @@
ivec4 firstLeadingBit_c1f940() {
ivec4 arg_0 = ivec4(1);
uvec4 v_1 = uvec4(arg_0);
- uvec4 v_2 = mix(~(v_1), v_1, lessThan(v_1, uvec4(2147483648u)));
- uvec4 v_3 = mix(uvec4(16u), uvec4(0u), equal((v_2 & uvec4(4294901760u)), uvec4(0u)));
- uvec4 v_4 = mix(uvec4(8u), uvec4(0u), equal(((v_2 >> v_3) & uvec4(65280u)), uvec4(0u)));
- uvec4 v_5 = mix(uvec4(4u), uvec4(0u), equal((((v_2 >> v_3) >> v_4) & uvec4(240u)), uvec4(0u)));
- uvec4 v_6 = mix(uvec4(2u), uvec4(0u), equal(((((v_2 >> v_3) >> v_4) >> v_5) & uvec4(12u)), uvec4(0u)));
- uvec4 v_7 = (v_3 | (v_4 | (v_5 | (v_6 | mix(uvec4(1u), uvec4(0u), equal((((((v_2 >> v_3) >> v_4) >> v_5) >> v_6) & uvec4(2u)), uvec4(0u)))))));
- ivec4 res = ivec4(mix(v_7, uvec4(4294967295u), equal(((((v_2 >> v_3) >> v_4) >> v_5) >> v_6), uvec4(0u))));
+ ivec4 res = ivec4(mix((mix(uvec4(16u), uvec4(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec4(2147483648u))) & uvec4(4294901760u)), uvec4(0u))) | (mix(uvec4(8u), uvec4(0u), equal(((mix(~(v_1), v_1, lessThan(v_1, uvec4(2147483648u))) >> mix(uvec4(16u), uvec4(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec4(2147483648u))) & uvec4(4294901760u)), uvec4(0u)))) & uvec4(65280u)), uvec4(0u))) | (mix(uvec4(4u), uvec4(0u), equal((((mix(~(v_1), v_1, lessThan(v_1, uvec4(2147483648u))) >> mix(uvec4(16u), uvec4(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec4(2147483648u))) & uvec4(4294901760u)), uvec4(0u)))) >> mix(uvec4(8u), uvec4(0u), equal(((mix(~(v_1), v_1, lessThan(v_1, uvec4(2147483648u))) >> mix(uvec4(16u), uvec4(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec4(2147483648u))) & uvec4(4294901760u)), uvec4(0u)))) & uvec4(65280u)), uvec4(0u)))) & uvec4(240u)), uvec4(0u))) | (mix(uvec4(2u), uvec4(0u), equal(((((mix(~(v_1), v_1, lessThan(v_1, uvec4(2147483648u))) >> mix(uvec4(16u), uvec4(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec4(2147483648u))) & uvec4(4294901760u)), uvec4(0u)))) >> mix(uvec4(8u), uvec4(0u), equal(((mix(~(v_1), v_1, lessThan(v_1, uvec4(2147483648u))) >> mix(uvec4(16u), uvec4(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec4(2147483648u))) & uvec4(4294901760u)), uvec4(0u)))) & uvec4(65280u)), uvec4(0u)))) >> mix(uvec4(4u), uvec4(0u), equal((((mix(~(v_1), v_1, lessThan(v_1, uvec4(2147483648u))) >> mix(uvec4(16u), uvec4(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec4(2147483648u))) & uvec4(4294901760u)), uvec4(0u)))) >> mix(uvec4(8u), uvec4(0u), equal(((mix(~(v_1), v_1, lessThan(v_1, uvec4(2147483648u))) >> mix(uvec4(16u), uvec4(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec4(2147483648u))) & uvec4(4294901760u)), uvec4(0u)))) & uvec4(65280u)), uvec4(0u)))) & uvec4(240u)), uvec4(0u)))) & uvec4(12u)), uvec4(0u))) | mix(uvec4(1u), uvec4(0u), equal((((((mix(~(v_1), v_1, lessThan(v_1, uvec4(2147483648u))) >> mix(uvec4(16u), uvec4(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec4(2147483648u))) & uvec4(4294901760u)), uvec4(0u)))) >> mix(uvec4(8u), uvec4(0u), equal(((mix(~(v_1), v_1, lessThan(v_1, uvec4(2147483648u))) >> mix(uvec4(16u), uvec4(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec4(2147483648u))) & uvec4(4294901760u)), uvec4(0u)))) & uvec4(65280u)), uvec4(0u)))) >> mix(uvec4(4u), uvec4(0u), equal((((mix(~(v_1), v_1, lessThan(v_1, uvec4(2147483648u))) >> mix(uvec4(16u), uvec4(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec4(2147483648u))) & uvec4(4294901760u)), uvec4(0u)))) >> mix(uvec4(8u), uvec4(0u), equal(((mix(~(v_1), v_1, lessThan(v_1, uvec4(2147483648u))) >> mix(uvec4(16u), uvec4(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec4(2147483648u))) & uvec4(4294901760u)), uvec4(0u)))) & uvec4(65280u)), uvec4(0u)))) & uvec4(240u)), uvec4(0u)))) >> mix(uvec4(2u), uvec4(0u), equal(((((mix(~(v_1), v_1, lessThan(v_1, uvec4(2147483648u))) >> mix(uvec4(16u), uvec4(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec4(2147483648u))) & uvec4(4294901760u)), uvec4(0u)))) >> mix(uvec4(8u), uvec4(0u), equal(((mix(~(v_1), v_1, lessThan(v_1, uvec4(2147483648u))) >> mix(uvec4(16u), uvec4(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec4(2147483648u))) & uvec4(4294901760u)), uvec4(0u)))) & uvec4(65280u)), uvec4(0u)))) >> mix(uvec4(4u), uvec4(0u), equal((((mix(~(v_1), v_1, lessThan(v_1, uvec4(2147483648u))) >> mix(uvec4(16u), uvec4(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec4(2147483648u))) & uvec4(4294901760u)), uvec4(0u)))) >> mix(uvec4(8u), uvec4(0u), equal(((mix(~(v_1), v_1, lessThan(v_1, uvec4(2147483648u))) >> mix(uvec4(16u), uvec4(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec4(2147483648u))) & uvec4(4294901760u)), uvec4(0u)))) & uvec4(65280u)), uvec4(0u)))) & uvec4(240u)), uvec4(0u)))) & uvec4(12u)), uvec4(0u)))) & uvec4(2u)), uvec4(0u))))))), uvec4(4294967295u), equal(((((mix(~(v_1), v_1, lessThan(v_1, uvec4(2147483648u))) >> mix(uvec4(16u), uvec4(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec4(2147483648u))) & uvec4(4294901760u)), uvec4(0u)))) >> mix(uvec4(8u), uvec4(0u), equal(((mix(~(v_1), v_1, lessThan(v_1, uvec4(2147483648u))) >> mix(uvec4(16u), uvec4(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec4(2147483648u))) & uvec4(4294901760u)), uvec4(0u)))) & uvec4(65280u)), uvec4(0u)))) >> mix(uvec4(4u), uvec4(0u), equal((((mix(~(v_1), v_1, lessThan(v_1, uvec4(2147483648u))) >> mix(uvec4(16u), uvec4(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec4(2147483648u))) & uvec4(4294901760u)), uvec4(0u)))) >> mix(uvec4(8u), uvec4(0u), equal(((mix(~(v_1), v_1, lessThan(v_1, uvec4(2147483648u))) >> mix(uvec4(16u), uvec4(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec4(2147483648u))) & uvec4(4294901760u)), uvec4(0u)))) & uvec4(65280u)), uvec4(0u)))) & uvec4(240u)), uvec4(0u)))) >> mix(uvec4(2u), uvec4(0u), equal(((((mix(~(v_1), v_1, lessThan(v_1, uvec4(2147483648u))) >> mix(uvec4(16u), uvec4(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec4(2147483648u))) & uvec4(4294901760u)), uvec4(0u)))) >> mix(uvec4(8u), uvec4(0u), equal(((mix(~(v_1), v_1, lessThan(v_1, uvec4(2147483648u))) >> mix(uvec4(16u), uvec4(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec4(2147483648u))) & uvec4(4294901760u)), uvec4(0u)))) & uvec4(65280u)), uvec4(0u)))) >> mix(uvec4(4u), uvec4(0u), equal((((mix(~(v_1), v_1, lessThan(v_1, uvec4(2147483648u))) >> mix(uvec4(16u), uvec4(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec4(2147483648u))) & uvec4(4294901760u)), uvec4(0u)))) >> mix(uvec4(8u), uvec4(0u), equal(((mix(~(v_1), v_1, lessThan(v_1, uvec4(2147483648u))) >> mix(uvec4(16u), uvec4(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec4(2147483648u))) & uvec4(4294901760u)), uvec4(0u)))) & uvec4(65280u)), uvec4(0u)))) & uvec4(240u)), uvec4(0u)))) & uvec4(12u)), uvec4(0u)))), uvec4(0u))));
return res;
}
void main() {
@@ -30,13 +24,7 @@
ivec4 firstLeadingBit_c1f940() {
ivec4 arg_0 = ivec4(1);
uvec4 v_1 = uvec4(arg_0);
- uvec4 v_2 = mix(~(v_1), v_1, lessThan(v_1, uvec4(2147483648u)));
- uvec4 v_3 = mix(uvec4(16u), uvec4(0u), equal((v_2 & uvec4(4294901760u)), uvec4(0u)));
- uvec4 v_4 = mix(uvec4(8u), uvec4(0u), equal(((v_2 >> v_3) & uvec4(65280u)), uvec4(0u)));
- uvec4 v_5 = mix(uvec4(4u), uvec4(0u), equal((((v_2 >> v_3) >> v_4) & uvec4(240u)), uvec4(0u)));
- uvec4 v_6 = mix(uvec4(2u), uvec4(0u), equal(((((v_2 >> v_3) >> v_4) >> v_5) & uvec4(12u)), uvec4(0u)));
- uvec4 v_7 = (v_3 | (v_4 | (v_5 | (v_6 | mix(uvec4(1u), uvec4(0u), equal((((((v_2 >> v_3) >> v_4) >> v_5) >> v_6) & uvec4(2u)), uvec4(0u)))))));
- ivec4 res = ivec4(mix(v_7, uvec4(4294967295u), equal(((((v_2 >> v_3) >> v_4) >> v_5) >> v_6), uvec4(0u))));
+ ivec4 res = ivec4(mix((mix(uvec4(16u), uvec4(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec4(2147483648u))) & uvec4(4294901760u)), uvec4(0u))) | (mix(uvec4(8u), uvec4(0u), equal(((mix(~(v_1), v_1, lessThan(v_1, uvec4(2147483648u))) >> mix(uvec4(16u), uvec4(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec4(2147483648u))) & uvec4(4294901760u)), uvec4(0u)))) & uvec4(65280u)), uvec4(0u))) | (mix(uvec4(4u), uvec4(0u), equal((((mix(~(v_1), v_1, lessThan(v_1, uvec4(2147483648u))) >> mix(uvec4(16u), uvec4(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec4(2147483648u))) & uvec4(4294901760u)), uvec4(0u)))) >> mix(uvec4(8u), uvec4(0u), equal(((mix(~(v_1), v_1, lessThan(v_1, uvec4(2147483648u))) >> mix(uvec4(16u), uvec4(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec4(2147483648u))) & uvec4(4294901760u)), uvec4(0u)))) & uvec4(65280u)), uvec4(0u)))) & uvec4(240u)), uvec4(0u))) | (mix(uvec4(2u), uvec4(0u), equal(((((mix(~(v_1), v_1, lessThan(v_1, uvec4(2147483648u))) >> mix(uvec4(16u), uvec4(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec4(2147483648u))) & uvec4(4294901760u)), uvec4(0u)))) >> mix(uvec4(8u), uvec4(0u), equal(((mix(~(v_1), v_1, lessThan(v_1, uvec4(2147483648u))) >> mix(uvec4(16u), uvec4(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec4(2147483648u))) & uvec4(4294901760u)), uvec4(0u)))) & uvec4(65280u)), uvec4(0u)))) >> mix(uvec4(4u), uvec4(0u), equal((((mix(~(v_1), v_1, lessThan(v_1, uvec4(2147483648u))) >> mix(uvec4(16u), uvec4(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec4(2147483648u))) & uvec4(4294901760u)), uvec4(0u)))) >> mix(uvec4(8u), uvec4(0u), equal(((mix(~(v_1), v_1, lessThan(v_1, uvec4(2147483648u))) >> mix(uvec4(16u), uvec4(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec4(2147483648u))) & uvec4(4294901760u)), uvec4(0u)))) & uvec4(65280u)), uvec4(0u)))) & uvec4(240u)), uvec4(0u)))) & uvec4(12u)), uvec4(0u))) | mix(uvec4(1u), uvec4(0u), equal((((((mix(~(v_1), v_1, lessThan(v_1, uvec4(2147483648u))) >> mix(uvec4(16u), uvec4(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec4(2147483648u))) & uvec4(4294901760u)), uvec4(0u)))) >> mix(uvec4(8u), uvec4(0u), equal(((mix(~(v_1), v_1, lessThan(v_1, uvec4(2147483648u))) >> mix(uvec4(16u), uvec4(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec4(2147483648u))) & uvec4(4294901760u)), uvec4(0u)))) & uvec4(65280u)), uvec4(0u)))) >> mix(uvec4(4u), uvec4(0u), equal((((mix(~(v_1), v_1, lessThan(v_1, uvec4(2147483648u))) >> mix(uvec4(16u), uvec4(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec4(2147483648u))) & uvec4(4294901760u)), uvec4(0u)))) >> mix(uvec4(8u), uvec4(0u), equal(((mix(~(v_1), v_1, lessThan(v_1, uvec4(2147483648u))) >> mix(uvec4(16u), uvec4(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec4(2147483648u))) & uvec4(4294901760u)), uvec4(0u)))) & uvec4(65280u)), uvec4(0u)))) & uvec4(240u)), uvec4(0u)))) >> mix(uvec4(2u), uvec4(0u), equal(((((mix(~(v_1), v_1, lessThan(v_1, uvec4(2147483648u))) >> mix(uvec4(16u), uvec4(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec4(2147483648u))) & uvec4(4294901760u)), uvec4(0u)))) >> mix(uvec4(8u), uvec4(0u), equal(((mix(~(v_1), v_1, lessThan(v_1, uvec4(2147483648u))) >> mix(uvec4(16u), uvec4(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec4(2147483648u))) & uvec4(4294901760u)), uvec4(0u)))) & uvec4(65280u)), uvec4(0u)))) >> mix(uvec4(4u), uvec4(0u), equal((((mix(~(v_1), v_1, lessThan(v_1, uvec4(2147483648u))) >> mix(uvec4(16u), uvec4(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec4(2147483648u))) & uvec4(4294901760u)), uvec4(0u)))) >> mix(uvec4(8u), uvec4(0u), equal(((mix(~(v_1), v_1, lessThan(v_1, uvec4(2147483648u))) >> mix(uvec4(16u), uvec4(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec4(2147483648u))) & uvec4(4294901760u)), uvec4(0u)))) & uvec4(65280u)), uvec4(0u)))) & uvec4(240u)), uvec4(0u)))) & uvec4(12u)), uvec4(0u)))) & uvec4(2u)), uvec4(0u))))))), uvec4(4294967295u), equal(((((mix(~(v_1), v_1, lessThan(v_1, uvec4(2147483648u))) >> mix(uvec4(16u), uvec4(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec4(2147483648u))) & uvec4(4294901760u)), uvec4(0u)))) >> mix(uvec4(8u), uvec4(0u), equal(((mix(~(v_1), v_1, lessThan(v_1, uvec4(2147483648u))) >> mix(uvec4(16u), uvec4(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec4(2147483648u))) & uvec4(4294901760u)), uvec4(0u)))) & uvec4(65280u)), uvec4(0u)))) >> mix(uvec4(4u), uvec4(0u), equal((((mix(~(v_1), v_1, lessThan(v_1, uvec4(2147483648u))) >> mix(uvec4(16u), uvec4(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec4(2147483648u))) & uvec4(4294901760u)), uvec4(0u)))) >> mix(uvec4(8u), uvec4(0u), equal(((mix(~(v_1), v_1, lessThan(v_1, uvec4(2147483648u))) >> mix(uvec4(16u), uvec4(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec4(2147483648u))) & uvec4(4294901760u)), uvec4(0u)))) & uvec4(65280u)), uvec4(0u)))) & uvec4(240u)), uvec4(0u)))) >> mix(uvec4(2u), uvec4(0u), equal(((((mix(~(v_1), v_1, lessThan(v_1, uvec4(2147483648u))) >> mix(uvec4(16u), uvec4(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec4(2147483648u))) & uvec4(4294901760u)), uvec4(0u)))) >> mix(uvec4(8u), uvec4(0u), equal(((mix(~(v_1), v_1, lessThan(v_1, uvec4(2147483648u))) >> mix(uvec4(16u), uvec4(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec4(2147483648u))) & uvec4(4294901760u)), uvec4(0u)))) & uvec4(65280u)), uvec4(0u)))) >> mix(uvec4(4u), uvec4(0u), equal((((mix(~(v_1), v_1, lessThan(v_1, uvec4(2147483648u))) >> mix(uvec4(16u), uvec4(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec4(2147483648u))) & uvec4(4294901760u)), uvec4(0u)))) >> mix(uvec4(8u), uvec4(0u), equal(((mix(~(v_1), v_1, lessThan(v_1, uvec4(2147483648u))) >> mix(uvec4(16u), uvec4(0u), equal((mix(~(v_1), v_1, lessThan(v_1, uvec4(2147483648u))) & uvec4(4294901760u)), uvec4(0u)))) & uvec4(65280u)), uvec4(0u)))) & uvec4(240u)), uvec4(0u)))) & uvec4(12u)), uvec4(0u)))), uvec4(0u))));
return res;
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
@@ -55,13 +43,7 @@
ivec4 firstLeadingBit_c1f940() {
ivec4 arg_0 = ivec4(1);
uvec4 v = uvec4(arg_0);
- uvec4 v_1 = mix(~(v), v, lessThan(v, uvec4(2147483648u)));
- uvec4 v_2 = mix(uvec4(16u), uvec4(0u), equal((v_1 & uvec4(4294901760u)), uvec4(0u)));
- uvec4 v_3 = mix(uvec4(8u), uvec4(0u), equal(((v_1 >> v_2) & uvec4(65280u)), uvec4(0u)));
- uvec4 v_4 = mix(uvec4(4u), uvec4(0u), equal((((v_1 >> v_2) >> v_3) & uvec4(240u)), uvec4(0u)));
- uvec4 v_5 = mix(uvec4(2u), uvec4(0u), equal(((((v_1 >> v_2) >> v_3) >> v_4) & uvec4(12u)), uvec4(0u)));
- uvec4 v_6 = (v_2 | (v_3 | (v_4 | (v_5 | mix(uvec4(1u), uvec4(0u), equal((((((v_1 >> v_2) >> v_3) >> v_4) >> v_5) & uvec4(2u)), uvec4(0u)))))));
- ivec4 res = ivec4(mix(v_6, uvec4(4294967295u), equal(((((v_1 >> v_2) >> v_3) >> v_4) >> v_5), uvec4(0u))));
+ ivec4 res = ivec4(mix((mix(uvec4(16u), uvec4(0u), equal((mix(~(v), v, lessThan(v, uvec4(2147483648u))) & uvec4(4294901760u)), uvec4(0u))) | (mix(uvec4(8u), uvec4(0u), equal(((mix(~(v), v, lessThan(v, uvec4(2147483648u))) >> mix(uvec4(16u), uvec4(0u), equal((mix(~(v), v, lessThan(v, uvec4(2147483648u))) & uvec4(4294901760u)), uvec4(0u)))) & uvec4(65280u)), uvec4(0u))) | (mix(uvec4(4u), uvec4(0u), equal((((mix(~(v), v, lessThan(v, uvec4(2147483648u))) >> mix(uvec4(16u), uvec4(0u), equal((mix(~(v), v, lessThan(v, uvec4(2147483648u))) & uvec4(4294901760u)), uvec4(0u)))) >> mix(uvec4(8u), uvec4(0u), equal(((mix(~(v), v, lessThan(v, uvec4(2147483648u))) >> mix(uvec4(16u), uvec4(0u), equal((mix(~(v), v, lessThan(v, uvec4(2147483648u))) & uvec4(4294901760u)), uvec4(0u)))) & uvec4(65280u)), uvec4(0u)))) & uvec4(240u)), uvec4(0u))) | (mix(uvec4(2u), uvec4(0u), equal(((((mix(~(v), v, lessThan(v, uvec4(2147483648u))) >> mix(uvec4(16u), uvec4(0u), equal((mix(~(v), v, lessThan(v, uvec4(2147483648u))) & uvec4(4294901760u)), uvec4(0u)))) >> mix(uvec4(8u), uvec4(0u), equal(((mix(~(v), v, lessThan(v, uvec4(2147483648u))) >> mix(uvec4(16u), uvec4(0u), equal((mix(~(v), v, lessThan(v, uvec4(2147483648u))) & uvec4(4294901760u)), uvec4(0u)))) & uvec4(65280u)), uvec4(0u)))) >> mix(uvec4(4u), uvec4(0u), equal((((mix(~(v), v, lessThan(v, uvec4(2147483648u))) >> mix(uvec4(16u), uvec4(0u), equal((mix(~(v), v, lessThan(v, uvec4(2147483648u))) & uvec4(4294901760u)), uvec4(0u)))) >> mix(uvec4(8u), uvec4(0u), equal(((mix(~(v), v, lessThan(v, uvec4(2147483648u))) >> mix(uvec4(16u), uvec4(0u), equal((mix(~(v), v, lessThan(v, uvec4(2147483648u))) & uvec4(4294901760u)), uvec4(0u)))) & uvec4(65280u)), uvec4(0u)))) & uvec4(240u)), uvec4(0u)))) & uvec4(12u)), uvec4(0u))) | mix(uvec4(1u), uvec4(0u), equal((((((mix(~(v), v, lessThan(v, uvec4(2147483648u))) >> mix(uvec4(16u), uvec4(0u), equal((mix(~(v), v, lessThan(v, uvec4(2147483648u))) & uvec4(4294901760u)), uvec4(0u)))) >> mix(uvec4(8u), uvec4(0u), equal(((mix(~(v), v, lessThan(v, uvec4(2147483648u))) >> mix(uvec4(16u), uvec4(0u), equal((mix(~(v), v, lessThan(v, uvec4(2147483648u))) & uvec4(4294901760u)), uvec4(0u)))) & uvec4(65280u)), uvec4(0u)))) >> mix(uvec4(4u), uvec4(0u), equal((((mix(~(v), v, lessThan(v, uvec4(2147483648u))) >> mix(uvec4(16u), uvec4(0u), equal((mix(~(v), v, lessThan(v, uvec4(2147483648u))) & uvec4(4294901760u)), uvec4(0u)))) >> mix(uvec4(8u), uvec4(0u), equal(((mix(~(v), v, lessThan(v, uvec4(2147483648u))) >> mix(uvec4(16u), uvec4(0u), equal((mix(~(v), v, lessThan(v, uvec4(2147483648u))) & uvec4(4294901760u)), uvec4(0u)))) & uvec4(65280u)), uvec4(0u)))) & uvec4(240u)), uvec4(0u)))) >> mix(uvec4(2u), uvec4(0u), equal(((((mix(~(v), v, lessThan(v, uvec4(2147483648u))) >> mix(uvec4(16u), uvec4(0u), equal((mix(~(v), v, lessThan(v, uvec4(2147483648u))) & uvec4(4294901760u)), uvec4(0u)))) >> mix(uvec4(8u), uvec4(0u), equal(((mix(~(v), v, lessThan(v, uvec4(2147483648u))) >> mix(uvec4(16u), uvec4(0u), equal((mix(~(v), v, lessThan(v, uvec4(2147483648u))) & uvec4(4294901760u)), uvec4(0u)))) & uvec4(65280u)), uvec4(0u)))) >> mix(uvec4(4u), uvec4(0u), equal((((mix(~(v), v, lessThan(v, uvec4(2147483648u))) >> mix(uvec4(16u), uvec4(0u), equal((mix(~(v), v, lessThan(v, uvec4(2147483648u))) & uvec4(4294901760u)), uvec4(0u)))) >> mix(uvec4(8u), uvec4(0u), equal(((mix(~(v), v, lessThan(v, uvec4(2147483648u))) >> mix(uvec4(16u), uvec4(0u), equal((mix(~(v), v, lessThan(v, uvec4(2147483648u))) & uvec4(4294901760u)), uvec4(0u)))) & uvec4(65280u)), uvec4(0u)))) & uvec4(240u)), uvec4(0u)))) & uvec4(12u)), uvec4(0u)))) & uvec4(2u)), uvec4(0u))))))), uvec4(4294967295u), equal(((((mix(~(v), v, lessThan(v, uvec4(2147483648u))) >> mix(uvec4(16u), uvec4(0u), equal((mix(~(v), v, lessThan(v, uvec4(2147483648u))) & uvec4(4294901760u)), uvec4(0u)))) >> mix(uvec4(8u), uvec4(0u), equal(((mix(~(v), v, lessThan(v, uvec4(2147483648u))) >> mix(uvec4(16u), uvec4(0u), equal((mix(~(v), v, lessThan(v, uvec4(2147483648u))) & uvec4(4294901760u)), uvec4(0u)))) & uvec4(65280u)), uvec4(0u)))) >> mix(uvec4(4u), uvec4(0u), equal((((mix(~(v), v, lessThan(v, uvec4(2147483648u))) >> mix(uvec4(16u), uvec4(0u), equal((mix(~(v), v, lessThan(v, uvec4(2147483648u))) & uvec4(4294901760u)), uvec4(0u)))) >> mix(uvec4(8u), uvec4(0u), equal(((mix(~(v), v, lessThan(v, uvec4(2147483648u))) >> mix(uvec4(16u), uvec4(0u), equal((mix(~(v), v, lessThan(v, uvec4(2147483648u))) & uvec4(4294901760u)), uvec4(0u)))) & uvec4(65280u)), uvec4(0u)))) & uvec4(240u)), uvec4(0u)))) >> mix(uvec4(2u), uvec4(0u), equal(((((mix(~(v), v, lessThan(v, uvec4(2147483648u))) >> mix(uvec4(16u), uvec4(0u), equal((mix(~(v), v, lessThan(v, uvec4(2147483648u))) & uvec4(4294901760u)), uvec4(0u)))) >> mix(uvec4(8u), uvec4(0u), equal(((mix(~(v), v, lessThan(v, uvec4(2147483648u))) >> mix(uvec4(16u), uvec4(0u), equal((mix(~(v), v, lessThan(v, uvec4(2147483648u))) & uvec4(4294901760u)), uvec4(0u)))) & uvec4(65280u)), uvec4(0u)))) >> mix(uvec4(4u), uvec4(0u), equal((((mix(~(v), v, lessThan(v, uvec4(2147483648u))) >> mix(uvec4(16u), uvec4(0u), equal((mix(~(v), v, lessThan(v, uvec4(2147483648u))) & uvec4(4294901760u)), uvec4(0u)))) >> mix(uvec4(8u), uvec4(0u), equal(((mix(~(v), v, lessThan(v, uvec4(2147483648u))) >> mix(uvec4(16u), uvec4(0u), equal((mix(~(v), v, lessThan(v, uvec4(2147483648u))) & uvec4(4294901760u)), uvec4(0u)))) & uvec4(65280u)), uvec4(0u)))) & uvec4(240u)), uvec4(0u)))) & uvec4(12u)), uvec4(0u)))), uvec4(0u))));
return res;
}
VertexOutput vertex_main_inner() {
@@ -71,10 +53,10 @@
return tint_symbol;
}
void main() {
- VertexOutput v_7 = vertex_main_inner();
- gl_Position = v_7.pos;
+ VertexOutput v_1 = vertex_main_inner();
+ gl_Position = v_1.pos;
gl_Position[1u] = -(gl_Position.y);
gl_Position[2u] = ((2.0f * gl_Position.z) - gl_Position.w);
- vertex_main_loc0_Output = v_7.prevent_dce;
+ vertex_main_loc0_Output = v_1.prevent_dce;
gl_PointSize = 1.0f;
}
diff --git a/test/tint/builtins/gen/var/firstLeadingBit/c1f940.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/firstLeadingBit/c1f940.wgsl.expected.ir.msl
index e5cd5cb..ba0fd43 100644
--- a/test/tint/builtins/gen/var/firstLeadingBit/c1f940.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/firstLeadingBit/c1f940.wgsl.expected.ir.msl
@@ -18,12 +18,7 @@
int4 firstLeadingBit_c1f940() {
int4 arg_0 = int4(1);
uint4 const v = as_type<uint4>(arg_0);
- uint4 const v_1 = select(~(v), v, (v < uint4(2147483648u)));
- uint4 const v_2 = select(uint4(16u), uint4(0u), ((v_1 & uint4(4294901760u)) == uint4(0u)));
- uint4 const v_3 = select(uint4(8u), uint4(0u), (((v_1 >> v_2) & uint4(65280u)) == uint4(0u)));
- uint4 const v_4 = select(uint4(4u), uint4(0u), ((((v_1 >> v_2) >> v_3) & uint4(240u)) == uint4(0u)));
- uint4 const v_5 = select(uint4(2u), uint4(0u), (((((v_1 >> v_2) >> v_3) >> v_4) & uint4(12u)) == uint4(0u)));
- int4 res = as_type<int4>(select((v_2 | (v_3 | (v_4 | (v_5 | select(uint4(1u), uint4(0u), ((((((v_1 >> v_2) >> v_3) >> v_4) >> v_5) & uint4(2u)) == uint4(0u))))))), uint4(4294967295u), (((((v_1 >> v_2) >> v_3) >> v_4) >> v_5) == uint4(0u))));
+ int4 res = as_type<int4>(select((select(uint4(16u), uint4(0u), ((select(~(v), v, (v < uint4(2147483648u))) & uint4(4294901760u)) == uint4(0u))) | (select(uint4(8u), uint4(0u), (((select(~(v), v, (v < uint4(2147483648u))) >> select(uint4(16u), uint4(0u), ((select(~(v), v, (v < uint4(2147483648u))) & uint4(4294901760u)) == uint4(0u)))) & uint4(65280u)) == uint4(0u))) | (select(uint4(4u), uint4(0u), ((((select(~(v), v, (v < uint4(2147483648u))) >> select(uint4(16u), uint4(0u), ((select(~(v), v, (v < uint4(2147483648u))) & uint4(4294901760u)) == uint4(0u)))) >> select(uint4(8u), uint4(0u), (((select(~(v), v, (v < uint4(2147483648u))) >> select(uint4(16u), uint4(0u), ((select(~(v), v, (v < uint4(2147483648u))) & uint4(4294901760u)) == uint4(0u)))) & uint4(65280u)) == uint4(0u)))) & uint4(240u)) == uint4(0u))) | (select(uint4(2u), uint4(0u), (((((select(~(v), v, (v < uint4(2147483648u))) >> select(uint4(16u), uint4(0u), ((select(~(v), v, (v < uint4(2147483648u))) & uint4(4294901760u)) == uint4(0u)))) >> select(uint4(8u), uint4(0u), (((select(~(v), v, (v < uint4(2147483648u))) >> select(uint4(16u), uint4(0u), ((select(~(v), v, (v < uint4(2147483648u))) & uint4(4294901760u)) == uint4(0u)))) & uint4(65280u)) == uint4(0u)))) >> select(uint4(4u), uint4(0u), ((((select(~(v), v, (v < uint4(2147483648u))) >> select(uint4(16u), uint4(0u), ((select(~(v), v, (v < uint4(2147483648u))) & uint4(4294901760u)) == uint4(0u)))) >> select(uint4(8u), uint4(0u), (((select(~(v), v, (v < uint4(2147483648u))) >> select(uint4(16u), uint4(0u), ((select(~(v), v, (v < uint4(2147483648u))) & uint4(4294901760u)) == uint4(0u)))) & uint4(65280u)) == uint4(0u)))) & uint4(240u)) == uint4(0u)))) & uint4(12u)) == uint4(0u))) | select(uint4(1u), uint4(0u), ((((((select(~(v), v, (v < uint4(2147483648u))) >> select(uint4(16u), uint4(0u), ((select(~(v), v, (v < uint4(2147483648u))) & uint4(4294901760u)) == uint4(0u)))) >> select(uint4(8u), uint4(0u), (((select(~(v), v, (v < uint4(2147483648u))) >> select(uint4(16u), uint4(0u), ((select(~(v), v, (v < uint4(2147483648u))) & uint4(4294901760u)) == uint4(0u)))) & uint4(65280u)) == uint4(0u)))) >> select(uint4(4u), uint4(0u), ((((select(~(v), v, (v < uint4(2147483648u))) >> select(uint4(16u), uint4(0u), ((select(~(v), v, (v < uint4(2147483648u))) & uint4(4294901760u)) == uint4(0u)))) >> select(uint4(8u), uint4(0u), (((select(~(v), v, (v < uint4(2147483648u))) >> select(uint4(16u), uint4(0u), ((select(~(v), v, (v < uint4(2147483648u))) & uint4(4294901760u)) == uint4(0u)))) & uint4(65280u)) == uint4(0u)))) & uint4(240u)) == uint4(0u)))) >> select(uint4(2u), uint4(0u), (((((select(~(v), v, (v < uint4(2147483648u))) >> select(uint4(16u), uint4(0u), ((select(~(v), v, (v < uint4(2147483648u))) & uint4(4294901760u)) == uint4(0u)))) >> select(uint4(8u), uint4(0u), (((select(~(v), v, (v < uint4(2147483648u))) >> select(uint4(16u), uint4(0u), ((select(~(v), v, (v < uint4(2147483648u))) & uint4(4294901760u)) == uint4(0u)))) & uint4(65280u)) == uint4(0u)))) >> select(uint4(4u), uint4(0u), ((((select(~(v), v, (v < uint4(2147483648u))) >> select(uint4(16u), uint4(0u), ((select(~(v), v, (v < uint4(2147483648u))) & uint4(4294901760u)) == uint4(0u)))) >> select(uint4(8u), uint4(0u), (((select(~(v), v, (v < uint4(2147483648u))) >> select(uint4(16u), uint4(0u), ((select(~(v), v, (v < uint4(2147483648u))) & uint4(4294901760u)) == uint4(0u)))) & uint4(65280u)) == uint4(0u)))) & uint4(240u)) == uint4(0u)))) & uint4(12u)) == uint4(0u)))) & uint4(2u)) == uint4(0u))))))), uint4(4294967295u), (((((select(~(v), v, (v < uint4(2147483648u))) >> select(uint4(16u), uint4(0u), ((select(~(v), v, (v < uint4(2147483648u))) & uint4(4294901760u)) == uint4(0u)))) >> select(uint4(8u), uint4(0u), (((select(~(v), v, (v < uint4(2147483648u))) >> select(uint4(16u), uint4(0u), ((select(~(v), v, (v < uint4(2147483648u))) & uint4(4294901760u)) == uint4(0u)))) & uint4(65280u)) == uint4(0u)))) >> select(uint4(4u), uint4(0u), ((((select(~(v), v, (v < uint4(2147483648u))) >> select(uint4(16u), uint4(0u), ((select(~(v), v, (v < uint4(2147483648u))) & uint4(4294901760u)) == uint4(0u)))) >> select(uint4(8u), uint4(0u), (((select(~(v), v, (v < uint4(2147483648u))) >> select(uint4(16u), uint4(0u), ((select(~(v), v, (v < uint4(2147483648u))) & uint4(4294901760u)) == uint4(0u)))) & uint4(65280u)) == uint4(0u)))) & uint4(240u)) == uint4(0u)))) >> select(uint4(2u), uint4(0u), (((((select(~(v), v, (v < uint4(2147483648u))) >> select(uint4(16u), uint4(0u), ((select(~(v), v, (v < uint4(2147483648u))) & uint4(4294901760u)) == uint4(0u)))) >> select(uint4(8u), uint4(0u), (((select(~(v), v, (v < uint4(2147483648u))) >> select(uint4(16u), uint4(0u), ((select(~(v), v, (v < uint4(2147483648u))) & uint4(4294901760u)) == uint4(0u)))) & uint4(65280u)) == uint4(0u)))) >> select(uint4(4u), uint4(0u), ((((select(~(v), v, (v < uint4(2147483648u))) >> select(uint4(16u), uint4(0u), ((select(~(v), v, (v < uint4(2147483648u))) & uint4(4294901760u)) == uint4(0u)))) >> select(uint4(8u), uint4(0u), (((select(~(v), v, (v < uint4(2147483648u))) >> select(uint4(16u), uint4(0u), ((select(~(v), v, (v < uint4(2147483648u))) & uint4(4294901760u)) == uint4(0u)))) & uint4(65280u)) == uint4(0u)))) & uint4(240u)) == uint4(0u)))) & uint4(12u)) == uint4(0u)))) == uint4(0u))));
return res;
}
@@ -45,9 +40,9 @@
}
vertex vertex_main_outputs vertex_main() {
- VertexOutput const v_6 = vertex_main_inner();
+ VertexOutput const v_1 = vertex_main_inner();
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_6.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_6.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v_1.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/firstLeadingBit/f0779d.wgsl.expected.glsl b/test/tint/builtins/gen/var/firstLeadingBit/f0779d.wgsl.expected.glsl
index 2aea99e..2fb2417 100644
--- a/test/tint/builtins/gen/var/firstLeadingBit/f0779d.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/firstLeadingBit/f0779d.wgsl.expected.glsl
@@ -9,11 +9,7 @@
uint firstLeadingBit_f0779d() {
uint arg_0 = 1u;
uint v_1 = arg_0;
- uint v_2 = mix(16u, 0u, ((v_1 & 4294901760u) == 0u));
- uint v_3 = mix(8u, 0u, (((v_1 >> v_2) & 65280u) == 0u));
- uint v_4 = mix(4u, 0u, ((((v_1 >> v_2) >> v_3) & 240u) == 0u));
- uint v_5 = mix(2u, 0u, (((((v_1 >> v_2) >> v_3) >> v_4) & 12u) == 0u));
- uint res = mix((v_2 | (v_3 | (v_4 | (v_5 | mix(1u, 0u, ((((((v_1 >> v_2) >> v_3) >> v_4) >> v_5) & 2u) == 0u)))))), 4294967295u, (((((v_1 >> v_2) >> v_3) >> v_4) >> v_5) == 0u));
+ uint res = mix((mix(16u, 0u, ((v_1 & 4294901760u) == 0u)) | (mix(8u, 0u, (((v_1 >> mix(16u, 0u, ((v_1 & 4294901760u) == 0u))) & 65280u) == 0u)) | (mix(4u, 0u, ((((v_1 >> mix(16u, 0u, ((v_1 & 4294901760u) == 0u))) >> mix(8u, 0u, (((v_1 >> mix(16u, 0u, ((v_1 & 4294901760u) == 0u))) & 65280u) == 0u))) & 240u) == 0u)) | (mix(2u, 0u, (((((v_1 >> mix(16u, 0u, ((v_1 & 4294901760u) == 0u))) >> mix(8u, 0u, (((v_1 >> mix(16u, 0u, ((v_1 & 4294901760u) == 0u))) & 65280u) == 0u))) >> mix(4u, 0u, ((((v_1 >> mix(16u, 0u, ((v_1 & 4294901760u) == 0u))) >> mix(8u, 0u, (((v_1 >> mix(16u, 0u, ((v_1 & 4294901760u) == 0u))) & 65280u) == 0u))) & 240u) == 0u))) & 12u) == 0u)) | mix(1u, 0u, ((((((v_1 >> mix(16u, 0u, ((v_1 & 4294901760u) == 0u))) >> mix(8u, 0u, (((v_1 >> mix(16u, 0u, ((v_1 & 4294901760u) == 0u))) & 65280u) == 0u))) >> mix(4u, 0u, ((((v_1 >> mix(16u, 0u, ((v_1 & 4294901760u) == 0u))) >> mix(8u, 0u, (((v_1 >> mix(16u, 0u, ((v_1 & 4294901760u) == 0u))) & 65280u) == 0u))) & 240u) == 0u))) >> mix(2u, 0u, (((((v_1 >> mix(16u, 0u, ((v_1 & 4294901760u) == 0u))) >> mix(8u, 0u, (((v_1 >> mix(16u, 0u, ((v_1 & 4294901760u) == 0u))) & 65280u) == 0u))) >> mix(4u, 0u, ((((v_1 >> mix(16u, 0u, ((v_1 & 4294901760u) == 0u))) >> mix(8u, 0u, (((v_1 >> mix(16u, 0u, ((v_1 & 4294901760u) == 0u))) & 65280u) == 0u))) & 240u) == 0u))) & 12u) == 0u))) & 2u) == 0u)))))), 4294967295u, (((((v_1 >> mix(16u, 0u, ((v_1 & 4294901760u) == 0u))) >> mix(8u, 0u, (((v_1 >> mix(16u, 0u, ((v_1 & 4294901760u) == 0u))) & 65280u) == 0u))) >> mix(4u, 0u, ((((v_1 >> mix(16u, 0u, ((v_1 & 4294901760u) == 0u))) >> mix(8u, 0u, (((v_1 >> mix(16u, 0u, ((v_1 & 4294901760u) == 0u))) & 65280u) == 0u))) & 240u) == 0u))) >> mix(2u, 0u, (((((v_1 >> mix(16u, 0u, ((v_1 & 4294901760u) == 0u))) >> mix(8u, 0u, (((v_1 >> mix(16u, 0u, ((v_1 & 4294901760u) == 0u))) & 65280u) == 0u))) >> mix(4u, 0u, ((((v_1 >> mix(16u, 0u, ((v_1 & 4294901760u) == 0u))) >> mix(8u, 0u, (((v_1 >> mix(16u, 0u, ((v_1 & 4294901760u) == 0u))) & 65280u) == 0u))) & 240u) == 0u))) & 12u) == 0u))) == 0u));
return res;
}
void main() {
@@ -28,11 +24,7 @@
uint firstLeadingBit_f0779d() {
uint arg_0 = 1u;
uint v_1 = arg_0;
- uint v_2 = mix(16u, 0u, ((v_1 & 4294901760u) == 0u));
- uint v_3 = mix(8u, 0u, (((v_1 >> v_2) & 65280u) == 0u));
- uint v_4 = mix(4u, 0u, ((((v_1 >> v_2) >> v_3) & 240u) == 0u));
- uint v_5 = mix(2u, 0u, (((((v_1 >> v_2) >> v_3) >> v_4) & 12u) == 0u));
- uint res = mix((v_2 | (v_3 | (v_4 | (v_5 | mix(1u, 0u, ((((((v_1 >> v_2) >> v_3) >> v_4) >> v_5) & 2u) == 0u)))))), 4294967295u, (((((v_1 >> v_2) >> v_3) >> v_4) >> v_5) == 0u));
+ uint res = mix((mix(16u, 0u, ((v_1 & 4294901760u) == 0u)) | (mix(8u, 0u, (((v_1 >> mix(16u, 0u, ((v_1 & 4294901760u) == 0u))) & 65280u) == 0u)) | (mix(4u, 0u, ((((v_1 >> mix(16u, 0u, ((v_1 & 4294901760u) == 0u))) >> mix(8u, 0u, (((v_1 >> mix(16u, 0u, ((v_1 & 4294901760u) == 0u))) & 65280u) == 0u))) & 240u) == 0u)) | (mix(2u, 0u, (((((v_1 >> mix(16u, 0u, ((v_1 & 4294901760u) == 0u))) >> mix(8u, 0u, (((v_1 >> mix(16u, 0u, ((v_1 & 4294901760u) == 0u))) & 65280u) == 0u))) >> mix(4u, 0u, ((((v_1 >> mix(16u, 0u, ((v_1 & 4294901760u) == 0u))) >> mix(8u, 0u, (((v_1 >> mix(16u, 0u, ((v_1 & 4294901760u) == 0u))) & 65280u) == 0u))) & 240u) == 0u))) & 12u) == 0u)) | mix(1u, 0u, ((((((v_1 >> mix(16u, 0u, ((v_1 & 4294901760u) == 0u))) >> mix(8u, 0u, (((v_1 >> mix(16u, 0u, ((v_1 & 4294901760u) == 0u))) & 65280u) == 0u))) >> mix(4u, 0u, ((((v_1 >> mix(16u, 0u, ((v_1 & 4294901760u) == 0u))) >> mix(8u, 0u, (((v_1 >> mix(16u, 0u, ((v_1 & 4294901760u) == 0u))) & 65280u) == 0u))) & 240u) == 0u))) >> mix(2u, 0u, (((((v_1 >> mix(16u, 0u, ((v_1 & 4294901760u) == 0u))) >> mix(8u, 0u, (((v_1 >> mix(16u, 0u, ((v_1 & 4294901760u) == 0u))) & 65280u) == 0u))) >> mix(4u, 0u, ((((v_1 >> mix(16u, 0u, ((v_1 & 4294901760u) == 0u))) >> mix(8u, 0u, (((v_1 >> mix(16u, 0u, ((v_1 & 4294901760u) == 0u))) & 65280u) == 0u))) & 240u) == 0u))) & 12u) == 0u))) & 2u) == 0u)))))), 4294967295u, (((((v_1 >> mix(16u, 0u, ((v_1 & 4294901760u) == 0u))) >> mix(8u, 0u, (((v_1 >> mix(16u, 0u, ((v_1 & 4294901760u) == 0u))) & 65280u) == 0u))) >> mix(4u, 0u, ((((v_1 >> mix(16u, 0u, ((v_1 & 4294901760u) == 0u))) >> mix(8u, 0u, (((v_1 >> mix(16u, 0u, ((v_1 & 4294901760u) == 0u))) & 65280u) == 0u))) & 240u) == 0u))) >> mix(2u, 0u, (((((v_1 >> mix(16u, 0u, ((v_1 & 4294901760u) == 0u))) >> mix(8u, 0u, (((v_1 >> mix(16u, 0u, ((v_1 & 4294901760u) == 0u))) & 65280u) == 0u))) >> mix(4u, 0u, ((((v_1 >> mix(16u, 0u, ((v_1 & 4294901760u) == 0u))) >> mix(8u, 0u, (((v_1 >> mix(16u, 0u, ((v_1 & 4294901760u) == 0u))) & 65280u) == 0u))) & 240u) == 0u))) & 12u) == 0u))) == 0u));
return res;
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
@@ -51,11 +43,7 @@
uint firstLeadingBit_f0779d() {
uint arg_0 = 1u;
uint v = arg_0;
- uint v_1 = mix(16u, 0u, ((v & 4294901760u) == 0u));
- uint v_2 = mix(8u, 0u, (((v >> v_1) & 65280u) == 0u));
- uint v_3 = mix(4u, 0u, ((((v >> v_1) >> v_2) & 240u) == 0u));
- uint v_4 = mix(2u, 0u, (((((v >> v_1) >> v_2) >> v_3) & 12u) == 0u));
- uint res = mix((v_1 | (v_2 | (v_3 | (v_4 | mix(1u, 0u, ((((((v >> v_1) >> v_2) >> v_3) >> v_4) & 2u) == 0u)))))), 4294967295u, (((((v >> v_1) >> v_2) >> v_3) >> v_4) == 0u));
+ uint res = mix((mix(16u, 0u, ((v & 4294901760u) == 0u)) | (mix(8u, 0u, (((v >> mix(16u, 0u, ((v & 4294901760u) == 0u))) & 65280u) == 0u)) | (mix(4u, 0u, ((((v >> mix(16u, 0u, ((v & 4294901760u) == 0u))) >> mix(8u, 0u, (((v >> mix(16u, 0u, ((v & 4294901760u) == 0u))) & 65280u) == 0u))) & 240u) == 0u)) | (mix(2u, 0u, (((((v >> mix(16u, 0u, ((v & 4294901760u) == 0u))) >> mix(8u, 0u, (((v >> mix(16u, 0u, ((v & 4294901760u) == 0u))) & 65280u) == 0u))) >> mix(4u, 0u, ((((v >> mix(16u, 0u, ((v & 4294901760u) == 0u))) >> mix(8u, 0u, (((v >> mix(16u, 0u, ((v & 4294901760u) == 0u))) & 65280u) == 0u))) & 240u) == 0u))) & 12u) == 0u)) | mix(1u, 0u, ((((((v >> mix(16u, 0u, ((v & 4294901760u) == 0u))) >> mix(8u, 0u, (((v >> mix(16u, 0u, ((v & 4294901760u) == 0u))) & 65280u) == 0u))) >> mix(4u, 0u, ((((v >> mix(16u, 0u, ((v & 4294901760u) == 0u))) >> mix(8u, 0u, (((v >> mix(16u, 0u, ((v & 4294901760u) == 0u))) & 65280u) == 0u))) & 240u) == 0u))) >> mix(2u, 0u, (((((v >> mix(16u, 0u, ((v & 4294901760u) == 0u))) >> mix(8u, 0u, (((v >> mix(16u, 0u, ((v & 4294901760u) == 0u))) & 65280u) == 0u))) >> mix(4u, 0u, ((((v >> mix(16u, 0u, ((v & 4294901760u) == 0u))) >> mix(8u, 0u, (((v >> mix(16u, 0u, ((v & 4294901760u) == 0u))) & 65280u) == 0u))) & 240u) == 0u))) & 12u) == 0u))) & 2u) == 0u)))))), 4294967295u, (((((v >> mix(16u, 0u, ((v & 4294901760u) == 0u))) >> mix(8u, 0u, (((v >> mix(16u, 0u, ((v & 4294901760u) == 0u))) & 65280u) == 0u))) >> mix(4u, 0u, ((((v >> mix(16u, 0u, ((v & 4294901760u) == 0u))) >> mix(8u, 0u, (((v >> mix(16u, 0u, ((v & 4294901760u) == 0u))) & 65280u) == 0u))) & 240u) == 0u))) >> mix(2u, 0u, (((((v >> mix(16u, 0u, ((v & 4294901760u) == 0u))) >> mix(8u, 0u, (((v >> mix(16u, 0u, ((v & 4294901760u) == 0u))) & 65280u) == 0u))) >> mix(4u, 0u, ((((v >> mix(16u, 0u, ((v & 4294901760u) == 0u))) >> mix(8u, 0u, (((v >> mix(16u, 0u, ((v & 4294901760u) == 0u))) & 65280u) == 0u))) & 240u) == 0u))) & 12u) == 0u))) == 0u));
return res;
}
VertexOutput vertex_main_inner() {
@@ -65,10 +53,10 @@
return tint_symbol;
}
void main() {
- VertexOutput v_5 = vertex_main_inner();
- gl_Position = v_5.pos;
+ VertexOutput v_1 = vertex_main_inner();
+ gl_Position = v_1.pos;
gl_Position[1u] = -(gl_Position.y);
gl_Position[2u] = ((2.0f * gl_Position.z) - gl_Position.w);
- vertex_main_loc0_Output = v_5.prevent_dce;
+ vertex_main_loc0_Output = v_1.prevent_dce;
gl_PointSize = 1.0f;
}
diff --git a/test/tint/builtins/gen/var/firstLeadingBit/f0779d.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/firstLeadingBit/f0779d.wgsl.expected.ir.msl
index 7f3931c..e713e5b 100644
--- a/test/tint/builtins/gen/var/firstLeadingBit/f0779d.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/firstLeadingBit/f0779d.wgsl.expected.ir.msl
@@ -18,11 +18,7 @@
uint firstLeadingBit_f0779d() {
uint arg_0 = 1u;
uint const v = arg_0;
- uint const v_1 = select(16u, 0u, ((v & 4294901760u) == 0u));
- uint const v_2 = select(8u, 0u, (((v >> v_1) & 65280u) == 0u));
- uint const v_3 = select(4u, 0u, ((((v >> v_1) >> v_2) & 240u) == 0u));
- uint const v_4 = select(2u, 0u, (((((v >> v_1) >> v_2) >> v_3) & 12u) == 0u));
- uint res = select((v_1 | (v_2 | (v_3 | (v_4 | select(1u, 0u, ((((((v >> v_1) >> v_2) >> v_3) >> v_4) & 2u) == 0u)))))), 4294967295u, (((((v >> v_1) >> v_2) >> v_3) >> v_4) == 0u));
+ uint res = select((select(16u, 0u, ((v & 4294901760u) == 0u)) | (select(8u, 0u, (((v >> select(16u, 0u, ((v & 4294901760u) == 0u))) & 65280u) == 0u)) | (select(4u, 0u, ((((v >> select(16u, 0u, ((v & 4294901760u) == 0u))) >> select(8u, 0u, (((v >> select(16u, 0u, ((v & 4294901760u) == 0u))) & 65280u) == 0u))) & 240u) == 0u)) | (select(2u, 0u, (((((v >> select(16u, 0u, ((v & 4294901760u) == 0u))) >> select(8u, 0u, (((v >> select(16u, 0u, ((v & 4294901760u) == 0u))) & 65280u) == 0u))) >> select(4u, 0u, ((((v >> select(16u, 0u, ((v & 4294901760u) == 0u))) >> select(8u, 0u, (((v >> select(16u, 0u, ((v & 4294901760u) == 0u))) & 65280u) == 0u))) & 240u) == 0u))) & 12u) == 0u)) | select(1u, 0u, ((((((v >> select(16u, 0u, ((v & 4294901760u) == 0u))) >> select(8u, 0u, (((v >> select(16u, 0u, ((v & 4294901760u) == 0u))) & 65280u) == 0u))) >> select(4u, 0u, ((((v >> select(16u, 0u, ((v & 4294901760u) == 0u))) >> select(8u, 0u, (((v >> select(16u, 0u, ((v & 4294901760u) == 0u))) & 65280u) == 0u))) & 240u) == 0u))) >> select(2u, 0u, (((((v >> select(16u, 0u, ((v & 4294901760u) == 0u))) >> select(8u, 0u, (((v >> select(16u, 0u, ((v & 4294901760u) == 0u))) & 65280u) == 0u))) >> select(4u, 0u, ((((v >> select(16u, 0u, ((v & 4294901760u) == 0u))) >> select(8u, 0u, (((v >> select(16u, 0u, ((v & 4294901760u) == 0u))) & 65280u) == 0u))) & 240u) == 0u))) & 12u) == 0u))) & 2u) == 0u)))))), 4294967295u, (((((v >> select(16u, 0u, ((v & 4294901760u) == 0u))) >> select(8u, 0u, (((v >> select(16u, 0u, ((v & 4294901760u) == 0u))) & 65280u) == 0u))) >> select(4u, 0u, ((((v >> select(16u, 0u, ((v & 4294901760u) == 0u))) >> select(8u, 0u, (((v >> select(16u, 0u, ((v & 4294901760u) == 0u))) & 65280u) == 0u))) & 240u) == 0u))) >> select(2u, 0u, (((((v >> select(16u, 0u, ((v & 4294901760u) == 0u))) >> select(8u, 0u, (((v >> select(16u, 0u, ((v & 4294901760u) == 0u))) & 65280u) == 0u))) >> select(4u, 0u, ((((v >> select(16u, 0u, ((v & 4294901760u) == 0u))) >> select(8u, 0u, (((v >> select(16u, 0u, ((v & 4294901760u) == 0u))) & 65280u) == 0u))) & 240u) == 0u))) & 12u) == 0u))) == 0u));
return res;
}
@@ -44,9 +40,9 @@
}
vertex vertex_main_outputs vertex_main() {
- VertexOutput const v_5 = vertex_main_inner();
+ VertexOutput const v_1 = vertex_main_inner();
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_5.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_5.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v_1.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/firstTrailingBit/110f2c.wgsl.expected.glsl b/test/tint/builtins/gen/var/firstTrailingBit/110f2c.wgsl.expected.glsl
index 162b275..070e030 100644
--- a/test/tint/builtins/gen/var/firstTrailingBit/110f2c.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/firstTrailingBit/110f2c.wgsl.expected.glsl
@@ -9,12 +9,7 @@
uvec4 firstTrailingBit_110f2c() {
uvec4 arg_0 = uvec4(1u);
uvec4 v_1 = arg_0;
- uvec4 v_2 = mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)));
- uvec4 v_3 = mix(uvec4(0u), uvec4(8u), equal(((v_1 >> v_2) & uvec4(255u)), uvec4(0u)));
- uvec4 v_4 = mix(uvec4(0u), uvec4(4u), equal((((v_1 >> v_2) >> v_3) & uvec4(15u)), uvec4(0u)));
- uvec4 v_5 = mix(uvec4(0u), uvec4(2u), equal(((((v_1 >> v_2) >> v_3) >> v_4) & uvec4(3u)), uvec4(0u)));
- uvec4 v_6 = (v_2 | (v_3 | (v_4 | (v_5 | mix(uvec4(0u), uvec4(1u), equal((((((v_1 >> v_2) >> v_3) >> v_4) >> v_5) & uvec4(1u)), uvec4(0u)))))));
- uvec4 res = mix(v_6, uvec4(4294967295u), equal(((((v_1 >> v_2) >> v_3) >> v_4) >> v_5), uvec4(0u)));
+ uvec4 res = mix((mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u))) | (mix(uvec4(0u), uvec4(8u), equal(((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u))) | (mix(uvec4(0u), uvec4(4u), equal((((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(8u), equal(((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u)))) & uvec4(15u)), uvec4(0u))) | (mix(uvec4(0u), uvec4(2u), equal(((((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(8u), equal(((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(4u), equal((((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(8u), equal(((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u)))) & uvec4(15u)), uvec4(0u)))) & uvec4(3u)), uvec4(0u))) | mix(uvec4(0u), uvec4(1u), equal((((((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(8u), equal(((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(4u), equal((((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(8u), equal(((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u)))) & uvec4(15u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(2u), equal(((((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(8u), equal(((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(4u), equal((((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(8u), equal(((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u)))) & uvec4(15u)), uvec4(0u)))) & uvec4(3u)), uvec4(0u)))) & uvec4(1u)), uvec4(0u))))))), uvec4(4294967295u), equal(((((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(8u), equal(((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(4u), equal((((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(8u), equal(((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u)))) & uvec4(15u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(2u), equal(((((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(8u), equal(((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(4u), equal((((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(8u), equal(((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u)))) & uvec4(15u)), uvec4(0u)))) & uvec4(3u)), uvec4(0u)))), uvec4(0u)));
return res;
}
void main() {
@@ -29,12 +24,7 @@
uvec4 firstTrailingBit_110f2c() {
uvec4 arg_0 = uvec4(1u);
uvec4 v_1 = arg_0;
- uvec4 v_2 = mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)));
- uvec4 v_3 = mix(uvec4(0u), uvec4(8u), equal(((v_1 >> v_2) & uvec4(255u)), uvec4(0u)));
- uvec4 v_4 = mix(uvec4(0u), uvec4(4u), equal((((v_1 >> v_2) >> v_3) & uvec4(15u)), uvec4(0u)));
- uvec4 v_5 = mix(uvec4(0u), uvec4(2u), equal(((((v_1 >> v_2) >> v_3) >> v_4) & uvec4(3u)), uvec4(0u)));
- uvec4 v_6 = (v_2 | (v_3 | (v_4 | (v_5 | mix(uvec4(0u), uvec4(1u), equal((((((v_1 >> v_2) >> v_3) >> v_4) >> v_5) & uvec4(1u)), uvec4(0u)))))));
- uvec4 res = mix(v_6, uvec4(4294967295u), equal(((((v_1 >> v_2) >> v_3) >> v_4) >> v_5), uvec4(0u)));
+ uvec4 res = mix((mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u))) | (mix(uvec4(0u), uvec4(8u), equal(((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u))) | (mix(uvec4(0u), uvec4(4u), equal((((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(8u), equal(((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u)))) & uvec4(15u)), uvec4(0u))) | (mix(uvec4(0u), uvec4(2u), equal(((((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(8u), equal(((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(4u), equal((((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(8u), equal(((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u)))) & uvec4(15u)), uvec4(0u)))) & uvec4(3u)), uvec4(0u))) | mix(uvec4(0u), uvec4(1u), equal((((((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(8u), equal(((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(4u), equal((((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(8u), equal(((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u)))) & uvec4(15u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(2u), equal(((((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(8u), equal(((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(4u), equal((((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(8u), equal(((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u)))) & uvec4(15u)), uvec4(0u)))) & uvec4(3u)), uvec4(0u)))) & uvec4(1u)), uvec4(0u))))))), uvec4(4294967295u), equal(((((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(8u), equal(((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(4u), equal((((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(8u), equal(((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u)))) & uvec4(15u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(2u), equal(((((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(8u), equal(((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(4u), equal((((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(8u), equal(((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u)))) & uvec4(15u)), uvec4(0u)))) & uvec4(3u)), uvec4(0u)))), uvec4(0u)));
return res;
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
@@ -53,12 +43,7 @@
uvec4 firstTrailingBit_110f2c() {
uvec4 arg_0 = uvec4(1u);
uvec4 v = arg_0;
- uvec4 v_1 = mix(uvec4(0u), uvec4(16u), equal((v & uvec4(65535u)), uvec4(0u)));
- uvec4 v_2 = mix(uvec4(0u), uvec4(8u), equal(((v >> v_1) & uvec4(255u)), uvec4(0u)));
- uvec4 v_3 = mix(uvec4(0u), uvec4(4u), equal((((v >> v_1) >> v_2) & uvec4(15u)), uvec4(0u)));
- uvec4 v_4 = mix(uvec4(0u), uvec4(2u), equal(((((v >> v_1) >> v_2) >> v_3) & uvec4(3u)), uvec4(0u)));
- uvec4 v_5 = (v_1 | (v_2 | (v_3 | (v_4 | mix(uvec4(0u), uvec4(1u), equal((((((v >> v_1) >> v_2) >> v_3) >> v_4) & uvec4(1u)), uvec4(0u)))))));
- uvec4 res = mix(v_5, uvec4(4294967295u), equal(((((v >> v_1) >> v_2) >> v_3) >> v_4), uvec4(0u)));
+ uvec4 res = mix((mix(uvec4(0u), uvec4(16u), equal((v & uvec4(65535u)), uvec4(0u))) | (mix(uvec4(0u), uvec4(8u), equal(((v >> mix(uvec4(0u), uvec4(16u), equal((v & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u))) | (mix(uvec4(0u), uvec4(4u), equal((((v >> mix(uvec4(0u), uvec4(16u), equal((v & uvec4(65535u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(8u), equal(((v >> mix(uvec4(0u), uvec4(16u), equal((v & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u)))) & uvec4(15u)), uvec4(0u))) | (mix(uvec4(0u), uvec4(2u), equal(((((v >> mix(uvec4(0u), uvec4(16u), equal((v & uvec4(65535u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(8u), equal(((v >> mix(uvec4(0u), uvec4(16u), equal((v & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(4u), equal((((v >> mix(uvec4(0u), uvec4(16u), equal((v & uvec4(65535u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(8u), equal(((v >> mix(uvec4(0u), uvec4(16u), equal((v & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u)))) & uvec4(15u)), uvec4(0u)))) & uvec4(3u)), uvec4(0u))) | mix(uvec4(0u), uvec4(1u), equal((((((v >> mix(uvec4(0u), uvec4(16u), equal((v & uvec4(65535u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(8u), equal(((v >> mix(uvec4(0u), uvec4(16u), equal((v & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(4u), equal((((v >> mix(uvec4(0u), uvec4(16u), equal((v & uvec4(65535u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(8u), equal(((v >> mix(uvec4(0u), uvec4(16u), equal((v & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u)))) & uvec4(15u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(2u), equal(((((v >> mix(uvec4(0u), uvec4(16u), equal((v & uvec4(65535u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(8u), equal(((v >> mix(uvec4(0u), uvec4(16u), equal((v & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(4u), equal((((v >> mix(uvec4(0u), uvec4(16u), equal((v & uvec4(65535u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(8u), equal(((v >> mix(uvec4(0u), uvec4(16u), equal((v & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u)))) & uvec4(15u)), uvec4(0u)))) & uvec4(3u)), uvec4(0u)))) & uvec4(1u)), uvec4(0u))))))), uvec4(4294967295u), equal(((((v >> mix(uvec4(0u), uvec4(16u), equal((v & uvec4(65535u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(8u), equal(((v >> mix(uvec4(0u), uvec4(16u), equal((v & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(4u), equal((((v >> mix(uvec4(0u), uvec4(16u), equal((v & uvec4(65535u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(8u), equal(((v >> mix(uvec4(0u), uvec4(16u), equal((v & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u)))) & uvec4(15u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(2u), equal(((((v >> mix(uvec4(0u), uvec4(16u), equal((v & uvec4(65535u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(8u), equal(((v >> mix(uvec4(0u), uvec4(16u), equal((v & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(4u), equal((((v >> mix(uvec4(0u), uvec4(16u), equal((v & uvec4(65535u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(8u), equal(((v >> mix(uvec4(0u), uvec4(16u), equal((v & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u)))) & uvec4(15u)), uvec4(0u)))) & uvec4(3u)), uvec4(0u)))), uvec4(0u)));
return res;
}
VertexOutput vertex_main_inner() {
@@ -68,10 +53,10 @@
return tint_symbol;
}
void main() {
- VertexOutput v_6 = vertex_main_inner();
- gl_Position = v_6.pos;
+ VertexOutput v_1 = vertex_main_inner();
+ gl_Position = v_1.pos;
gl_Position[1u] = -(gl_Position.y);
gl_Position[2u] = ((2.0f * gl_Position.z) - gl_Position.w);
- vertex_main_loc0_Output = v_6.prevent_dce;
+ vertex_main_loc0_Output = v_1.prevent_dce;
gl_PointSize = 1.0f;
}
diff --git a/test/tint/builtins/gen/var/firstTrailingBit/110f2c.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/firstTrailingBit/110f2c.wgsl.expected.ir.msl
index 6bbf3c0..ed6dbb8 100644
--- a/test/tint/builtins/gen/var/firstTrailingBit/110f2c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/firstTrailingBit/110f2c.wgsl.expected.ir.msl
@@ -18,11 +18,7 @@
uint4 firstTrailingBit_110f2c() {
uint4 arg_0 = uint4(1u);
uint4 const v = arg_0;
- uint4 const v_1 = select(uint4(0u), uint4(16u), ((v & uint4(65535u)) == uint4(0u)));
- uint4 const v_2 = select(uint4(0u), uint4(8u), (((v >> v_1) & uint4(255u)) == uint4(0u)));
- uint4 const v_3 = select(uint4(0u), uint4(4u), ((((v >> v_1) >> v_2) & uint4(15u)) == uint4(0u)));
- uint4 const v_4 = select(uint4(0u), uint4(2u), (((((v >> v_1) >> v_2) >> v_3) & uint4(3u)) == uint4(0u)));
- uint4 res = select((v_1 | (v_2 | (v_3 | (v_4 | select(uint4(0u), uint4(1u), ((((((v >> v_1) >> v_2) >> v_3) >> v_4) & uint4(1u)) == uint4(0u))))))), uint4(4294967295u), (((((v >> v_1) >> v_2) >> v_3) >> v_4) == uint4(0u)));
+ uint4 res = select((select(uint4(0u), uint4(16u), ((v & uint4(65535u)) == uint4(0u))) | (select(uint4(0u), uint4(8u), (((v >> select(uint4(0u), uint4(16u), ((v & uint4(65535u)) == uint4(0u)))) & uint4(255u)) == uint4(0u))) | (select(uint4(0u), uint4(4u), ((((v >> select(uint4(0u), uint4(16u), ((v & uint4(65535u)) == uint4(0u)))) >> select(uint4(0u), uint4(8u), (((v >> select(uint4(0u), uint4(16u), ((v & uint4(65535u)) == uint4(0u)))) & uint4(255u)) == uint4(0u)))) & uint4(15u)) == uint4(0u))) | (select(uint4(0u), uint4(2u), (((((v >> select(uint4(0u), uint4(16u), ((v & uint4(65535u)) == uint4(0u)))) >> select(uint4(0u), uint4(8u), (((v >> select(uint4(0u), uint4(16u), ((v & uint4(65535u)) == uint4(0u)))) & uint4(255u)) == uint4(0u)))) >> select(uint4(0u), uint4(4u), ((((v >> select(uint4(0u), uint4(16u), ((v & uint4(65535u)) == uint4(0u)))) >> select(uint4(0u), uint4(8u), (((v >> select(uint4(0u), uint4(16u), ((v & uint4(65535u)) == uint4(0u)))) & uint4(255u)) == uint4(0u)))) & uint4(15u)) == uint4(0u)))) & uint4(3u)) == uint4(0u))) | select(uint4(0u), uint4(1u), ((((((v >> select(uint4(0u), uint4(16u), ((v & uint4(65535u)) == uint4(0u)))) >> select(uint4(0u), uint4(8u), (((v >> select(uint4(0u), uint4(16u), ((v & uint4(65535u)) == uint4(0u)))) & uint4(255u)) == uint4(0u)))) >> select(uint4(0u), uint4(4u), ((((v >> select(uint4(0u), uint4(16u), ((v & uint4(65535u)) == uint4(0u)))) >> select(uint4(0u), uint4(8u), (((v >> select(uint4(0u), uint4(16u), ((v & uint4(65535u)) == uint4(0u)))) & uint4(255u)) == uint4(0u)))) & uint4(15u)) == uint4(0u)))) >> select(uint4(0u), uint4(2u), (((((v >> select(uint4(0u), uint4(16u), ((v & uint4(65535u)) == uint4(0u)))) >> select(uint4(0u), uint4(8u), (((v >> select(uint4(0u), uint4(16u), ((v & uint4(65535u)) == uint4(0u)))) & uint4(255u)) == uint4(0u)))) >> select(uint4(0u), uint4(4u), ((((v >> select(uint4(0u), uint4(16u), ((v & uint4(65535u)) == uint4(0u)))) >> select(uint4(0u), uint4(8u), (((v >> select(uint4(0u), uint4(16u), ((v & uint4(65535u)) == uint4(0u)))) & uint4(255u)) == uint4(0u)))) & uint4(15u)) == uint4(0u)))) & uint4(3u)) == uint4(0u)))) & uint4(1u)) == uint4(0u))))))), uint4(4294967295u), (((((v >> select(uint4(0u), uint4(16u), ((v & uint4(65535u)) == uint4(0u)))) >> select(uint4(0u), uint4(8u), (((v >> select(uint4(0u), uint4(16u), ((v & uint4(65535u)) == uint4(0u)))) & uint4(255u)) == uint4(0u)))) >> select(uint4(0u), uint4(4u), ((((v >> select(uint4(0u), uint4(16u), ((v & uint4(65535u)) == uint4(0u)))) >> select(uint4(0u), uint4(8u), (((v >> select(uint4(0u), uint4(16u), ((v & uint4(65535u)) == uint4(0u)))) & uint4(255u)) == uint4(0u)))) & uint4(15u)) == uint4(0u)))) >> select(uint4(0u), uint4(2u), (((((v >> select(uint4(0u), uint4(16u), ((v & uint4(65535u)) == uint4(0u)))) >> select(uint4(0u), uint4(8u), (((v >> select(uint4(0u), uint4(16u), ((v & uint4(65535u)) == uint4(0u)))) & uint4(255u)) == uint4(0u)))) >> select(uint4(0u), uint4(4u), ((((v >> select(uint4(0u), uint4(16u), ((v & uint4(65535u)) == uint4(0u)))) >> select(uint4(0u), uint4(8u), (((v >> select(uint4(0u), uint4(16u), ((v & uint4(65535u)) == uint4(0u)))) & uint4(255u)) == uint4(0u)))) & uint4(15u)) == uint4(0u)))) & uint4(3u)) == uint4(0u)))) == uint4(0u)));
return res;
}
@@ -44,9 +40,9 @@
}
vertex vertex_main_outputs vertex_main() {
- VertexOutput const v_5 = vertex_main_inner();
+ VertexOutput const v_1 = vertex_main_inner();
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_5.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_5.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v_1.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/firstTrailingBit/3a2acc.wgsl.expected.glsl b/test/tint/builtins/gen/var/firstTrailingBit/3a2acc.wgsl.expected.glsl
index 8978466..b3a24fa 100644
--- a/test/tint/builtins/gen/var/firstTrailingBit/3a2acc.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/firstTrailingBit/3a2acc.wgsl.expected.glsl
@@ -9,11 +9,7 @@
int firstTrailingBit_3a2acc() {
int arg_0 = 1;
uint v_1 = uint(arg_0);
- uint v_2 = mix(0u, 16u, ((v_1 & 65535u) == 0u));
- uint v_3 = mix(0u, 8u, (((v_1 >> v_2) & 255u) == 0u));
- uint v_4 = mix(0u, 4u, ((((v_1 >> v_2) >> v_3) & 15u) == 0u));
- uint v_5 = mix(0u, 2u, (((((v_1 >> v_2) >> v_3) >> v_4) & 3u) == 0u));
- int res = int(mix((v_2 | (v_3 | (v_4 | (v_5 | mix(0u, 1u, ((((((v_1 >> v_2) >> v_3) >> v_4) >> v_5) & 1u) == 0u)))))), 4294967295u, (((((v_1 >> v_2) >> v_3) >> v_4) >> v_5) == 0u)));
+ int res = int(mix((mix(0u, 16u, ((v_1 & 65535u) == 0u)) | (mix(0u, 8u, (((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) & 255u) == 0u)) | (mix(0u, 4u, ((((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) >> mix(0u, 8u, (((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) & 255u) == 0u))) & 15u) == 0u)) | (mix(0u, 2u, (((((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) >> mix(0u, 8u, (((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) & 255u) == 0u))) >> mix(0u, 4u, ((((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) >> mix(0u, 8u, (((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) & 255u) == 0u))) & 15u) == 0u))) & 3u) == 0u)) | mix(0u, 1u, ((((((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) >> mix(0u, 8u, (((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) & 255u) == 0u))) >> mix(0u, 4u, ((((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) >> mix(0u, 8u, (((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) & 255u) == 0u))) & 15u) == 0u))) >> mix(0u, 2u, (((((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) >> mix(0u, 8u, (((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) & 255u) == 0u))) >> mix(0u, 4u, ((((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) >> mix(0u, 8u, (((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) & 255u) == 0u))) & 15u) == 0u))) & 3u) == 0u))) & 1u) == 0u)))))), 4294967295u, (((((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) >> mix(0u, 8u, (((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) & 255u) == 0u))) >> mix(0u, 4u, ((((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) >> mix(0u, 8u, (((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) & 255u) == 0u))) & 15u) == 0u))) >> mix(0u, 2u, (((((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) >> mix(0u, 8u, (((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) & 255u) == 0u))) >> mix(0u, 4u, ((((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) >> mix(0u, 8u, (((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) & 255u) == 0u))) & 15u) == 0u))) & 3u) == 0u))) == 0u)));
return res;
}
void main() {
@@ -28,11 +24,7 @@
int firstTrailingBit_3a2acc() {
int arg_0 = 1;
uint v_1 = uint(arg_0);
- uint v_2 = mix(0u, 16u, ((v_1 & 65535u) == 0u));
- uint v_3 = mix(0u, 8u, (((v_1 >> v_2) & 255u) == 0u));
- uint v_4 = mix(0u, 4u, ((((v_1 >> v_2) >> v_3) & 15u) == 0u));
- uint v_5 = mix(0u, 2u, (((((v_1 >> v_2) >> v_3) >> v_4) & 3u) == 0u));
- int res = int(mix((v_2 | (v_3 | (v_4 | (v_5 | mix(0u, 1u, ((((((v_1 >> v_2) >> v_3) >> v_4) >> v_5) & 1u) == 0u)))))), 4294967295u, (((((v_1 >> v_2) >> v_3) >> v_4) >> v_5) == 0u)));
+ int res = int(mix((mix(0u, 16u, ((v_1 & 65535u) == 0u)) | (mix(0u, 8u, (((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) & 255u) == 0u)) | (mix(0u, 4u, ((((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) >> mix(0u, 8u, (((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) & 255u) == 0u))) & 15u) == 0u)) | (mix(0u, 2u, (((((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) >> mix(0u, 8u, (((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) & 255u) == 0u))) >> mix(0u, 4u, ((((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) >> mix(0u, 8u, (((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) & 255u) == 0u))) & 15u) == 0u))) & 3u) == 0u)) | mix(0u, 1u, ((((((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) >> mix(0u, 8u, (((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) & 255u) == 0u))) >> mix(0u, 4u, ((((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) >> mix(0u, 8u, (((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) & 255u) == 0u))) & 15u) == 0u))) >> mix(0u, 2u, (((((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) >> mix(0u, 8u, (((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) & 255u) == 0u))) >> mix(0u, 4u, ((((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) >> mix(0u, 8u, (((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) & 255u) == 0u))) & 15u) == 0u))) & 3u) == 0u))) & 1u) == 0u)))))), 4294967295u, (((((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) >> mix(0u, 8u, (((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) & 255u) == 0u))) >> mix(0u, 4u, ((((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) >> mix(0u, 8u, (((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) & 255u) == 0u))) & 15u) == 0u))) >> mix(0u, 2u, (((((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) >> mix(0u, 8u, (((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) & 255u) == 0u))) >> mix(0u, 4u, ((((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) >> mix(0u, 8u, (((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) & 255u) == 0u))) & 15u) == 0u))) & 3u) == 0u))) == 0u)));
return res;
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
@@ -51,11 +43,7 @@
int firstTrailingBit_3a2acc() {
int arg_0 = 1;
uint v = uint(arg_0);
- uint v_1 = mix(0u, 16u, ((v & 65535u) == 0u));
- uint v_2 = mix(0u, 8u, (((v >> v_1) & 255u) == 0u));
- uint v_3 = mix(0u, 4u, ((((v >> v_1) >> v_2) & 15u) == 0u));
- uint v_4 = mix(0u, 2u, (((((v >> v_1) >> v_2) >> v_3) & 3u) == 0u));
- int res = int(mix((v_1 | (v_2 | (v_3 | (v_4 | mix(0u, 1u, ((((((v >> v_1) >> v_2) >> v_3) >> v_4) & 1u) == 0u)))))), 4294967295u, (((((v >> v_1) >> v_2) >> v_3) >> v_4) == 0u)));
+ int res = int(mix((mix(0u, 16u, ((v & 65535u) == 0u)) | (mix(0u, 8u, (((v >> mix(0u, 16u, ((v & 65535u) == 0u))) & 255u) == 0u)) | (mix(0u, 4u, ((((v >> mix(0u, 16u, ((v & 65535u) == 0u))) >> mix(0u, 8u, (((v >> mix(0u, 16u, ((v & 65535u) == 0u))) & 255u) == 0u))) & 15u) == 0u)) | (mix(0u, 2u, (((((v >> mix(0u, 16u, ((v & 65535u) == 0u))) >> mix(0u, 8u, (((v >> mix(0u, 16u, ((v & 65535u) == 0u))) & 255u) == 0u))) >> mix(0u, 4u, ((((v >> mix(0u, 16u, ((v & 65535u) == 0u))) >> mix(0u, 8u, (((v >> mix(0u, 16u, ((v & 65535u) == 0u))) & 255u) == 0u))) & 15u) == 0u))) & 3u) == 0u)) | mix(0u, 1u, ((((((v >> mix(0u, 16u, ((v & 65535u) == 0u))) >> mix(0u, 8u, (((v >> mix(0u, 16u, ((v & 65535u) == 0u))) & 255u) == 0u))) >> mix(0u, 4u, ((((v >> mix(0u, 16u, ((v & 65535u) == 0u))) >> mix(0u, 8u, (((v >> mix(0u, 16u, ((v & 65535u) == 0u))) & 255u) == 0u))) & 15u) == 0u))) >> mix(0u, 2u, (((((v >> mix(0u, 16u, ((v & 65535u) == 0u))) >> mix(0u, 8u, (((v >> mix(0u, 16u, ((v & 65535u) == 0u))) & 255u) == 0u))) >> mix(0u, 4u, ((((v >> mix(0u, 16u, ((v & 65535u) == 0u))) >> mix(0u, 8u, (((v >> mix(0u, 16u, ((v & 65535u) == 0u))) & 255u) == 0u))) & 15u) == 0u))) & 3u) == 0u))) & 1u) == 0u)))))), 4294967295u, (((((v >> mix(0u, 16u, ((v & 65535u) == 0u))) >> mix(0u, 8u, (((v >> mix(0u, 16u, ((v & 65535u) == 0u))) & 255u) == 0u))) >> mix(0u, 4u, ((((v >> mix(0u, 16u, ((v & 65535u) == 0u))) >> mix(0u, 8u, (((v >> mix(0u, 16u, ((v & 65535u) == 0u))) & 255u) == 0u))) & 15u) == 0u))) >> mix(0u, 2u, (((((v >> mix(0u, 16u, ((v & 65535u) == 0u))) >> mix(0u, 8u, (((v >> mix(0u, 16u, ((v & 65535u) == 0u))) & 255u) == 0u))) >> mix(0u, 4u, ((((v >> mix(0u, 16u, ((v & 65535u) == 0u))) >> mix(0u, 8u, (((v >> mix(0u, 16u, ((v & 65535u) == 0u))) & 255u) == 0u))) & 15u) == 0u))) & 3u) == 0u))) == 0u)));
return res;
}
VertexOutput vertex_main_inner() {
@@ -65,10 +53,10 @@
return tint_symbol;
}
void main() {
- VertexOutput v_5 = vertex_main_inner();
- gl_Position = v_5.pos;
+ VertexOutput v_1 = vertex_main_inner();
+ gl_Position = v_1.pos;
gl_Position[1u] = -(gl_Position.y);
gl_Position[2u] = ((2.0f * gl_Position.z) - gl_Position.w);
- vertex_main_loc0_Output = v_5.prevent_dce;
+ vertex_main_loc0_Output = v_1.prevent_dce;
gl_PointSize = 1.0f;
}
diff --git a/test/tint/builtins/gen/var/firstTrailingBit/3a2acc.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/firstTrailingBit/3a2acc.wgsl.expected.ir.msl
index 2a3fab0..46a5125 100644
--- a/test/tint/builtins/gen/var/firstTrailingBit/3a2acc.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/firstTrailingBit/3a2acc.wgsl.expected.ir.msl
@@ -18,11 +18,7 @@
int firstTrailingBit_3a2acc() {
int arg_0 = 1;
uint const v = as_type<uint>(arg_0);
- uint const v_1 = select(0u, 16u, ((v & 65535u) == 0u));
- uint const v_2 = select(0u, 8u, (((v >> v_1) & 255u) == 0u));
- uint const v_3 = select(0u, 4u, ((((v >> v_1) >> v_2) & 15u) == 0u));
- uint const v_4 = select(0u, 2u, (((((v >> v_1) >> v_2) >> v_3) & 3u) == 0u));
- int res = as_type<int>(select((v_1 | (v_2 | (v_3 | (v_4 | select(0u, 1u, ((((((v >> v_1) >> v_2) >> v_3) >> v_4) & 1u) == 0u)))))), 4294967295u, (((((v >> v_1) >> v_2) >> v_3) >> v_4) == 0u)));
+ int res = as_type<int>(select((select(0u, 16u, ((v & 65535u) == 0u)) | (select(0u, 8u, (((v >> select(0u, 16u, ((v & 65535u) == 0u))) & 255u) == 0u)) | (select(0u, 4u, ((((v >> select(0u, 16u, ((v & 65535u) == 0u))) >> select(0u, 8u, (((v >> select(0u, 16u, ((v & 65535u) == 0u))) & 255u) == 0u))) & 15u) == 0u)) | (select(0u, 2u, (((((v >> select(0u, 16u, ((v & 65535u) == 0u))) >> select(0u, 8u, (((v >> select(0u, 16u, ((v & 65535u) == 0u))) & 255u) == 0u))) >> select(0u, 4u, ((((v >> select(0u, 16u, ((v & 65535u) == 0u))) >> select(0u, 8u, (((v >> select(0u, 16u, ((v & 65535u) == 0u))) & 255u) == 0u))) & 15u) == 0u))) & 3u) == 0u)) | select(0u, 1u, ((((((v >> select(0u, 16u, ((v & 65535u) == 0u))) >> select(0u, 8u, (((v >> select(0u, 16u, ((v & 65535u) == 0u))) & 255u) == 0u))) >> select(0u, 4u, ((((v >> select(0u, 16u, ((v & 65535u) == 0u))) >> select(0u, 8u, (((v >> select(0u, 16u, ((v & 65535u) == 0u))) & 255u) == 0u))) & 15u) == 0u))) >> select(0u, 2u, (((((v >> select(0u, 16u, ((v & 65535u) == 0u))) >> select(0u, 8u, (((v >> select(0u, 16u, ((v & 65535u) == 0u))) & 255u) == 0u))) >> select(0u, 4u, ((((v >> select(0u, 16u, ((v & 65535u) == 0u))) >> select(0u, 8u, (((v >> select(0u, 16u, ((v & 65535u) == 0u))) & 255u) == 0u))) & 15u) == 0u))) & 3u) == 0u))) & 1u) == 0u)))))), 4294967295u, (((((v >> select(0u, 16u, ((v & 65535u) == 0u))) >> select(0u, 8u, (((v >> select(0u, 16u, ((v & 65535u) == 0u))) & 255u) == 0u))) >> select(0u, 4u, ((((v >> select(0u, 16u, ((v & 65535u) == 0u))) >> select(0u, 8u, (((v >> select(0u, 16u, ((v & 65535u) == 0u))) & 255u) == 0u))) & 15u) == 0u))) >> select(0u, 2u, (((((v >> select(0u, 16u, ((v & 65535u) == 0u))) >> select(0u, 8u, (((v >> select(0u, 16u, ((v & 65535u) == 0u))) & 255u) == 0u))) >> select(0u, 4u, ((((v >> select(0u, 16u, ((v & 65535u) == 0u))) >> select(0u, 8u, (((v >> select(0u, 16u, ((v & 65535u) == 0u))) & 255u) == 0u))) & 15u) == 0u))) & 3u) == 0u))) == 0u)));
return res;
}
@@ -44,9 +40,9 @@
}
vertex vertex_main_outputs vertex_main() {
- VertexOutput const v_5 = vertex_main_inner();
+ VertexOutput const v_1 = vertex_main_inner();
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_5.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_5.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v_1.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/firstTrailingBit/45eb10.wgsl.expected.glsl b/test/tint/builtins/gen/var/firstTrailingBit/45eb10.wgsl.expected.glsl
index 0690446..3d76333 100644
--- a/test/tint/builtins/gen/var/firstTrailingBit/45eb10.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/firstTrailingBit/45eb10.wgsl.expected.glsl
@@ -9,12 +9,7 @@
uvec2 firstTrailingBit_45eb10() {
uvec2 arg_0 = uvec2(1u);
uvec2 v_1 = arg_0;
- uvec2 v_2 = mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)));
- uvec2 v_3 = mix(uvec2(0u), uvec2(8u), equal(((v_1 >> v_2) & uvec2(255u)), uvec2(0u)));
- uvec2 v_4 = mix(uvec2(0u), uvec2(4u), equal((((v_1 >> v_2) >> v_3) & uvec2(15u)), uvec2(0u)));
- uvec2 v_5 = mix(uvec2(0u), uvec2(2u), equal(((((v_1 >> v_2) >> v_3) >> v_4) & uvec2(3u)), uvec2(0u)));
- uvec2 v_6 = (v_2 | (v_3 | (v_4 | (v_5 | mix(uvec2(0u), uvec2(1u), equal((((((v_1 >> v_2) >> v_3) >> v_4) >> v_5) & uvec2(1u)), uvec2(0u)))))));
- uvec2 res = mix(v_6, uvec2(4294967295u), equal(((((v_1 >> v_2) >> v_3) >> v_4) >> v_5), uvec2(0u)));
+ uvec2 res = mix((mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u))) | (mix(uvec2(0u), uvec2(8u), equal(((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u))) | (mix(uvec2(0u), uvec2(4u), equal((((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(8u), equal(((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u)))) & uvec2(15u)), uvec2(0u))) | (mix(uvec2(0u), uvec2(2u), equal(((((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(8u), equal(((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(4u), equal((((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(8u), equal(((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u)))) & uvec2(15u)), uvec2(0u)))) & uvec2(3u)), uvec2(0u))) | mix(uvec2(0u), uvec2(1u), equal((((((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(8u), equal(((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(4u), equal((((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(8u), equal(((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u)))) & uvec2(15u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(2u), equal(((((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(8u), equal(((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(4u), equal((((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(8u), equal(((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u)))) & uvec2(15u)), uvec2(0u)))) & uvec2(3u)), uvec2(0u)))) & uvec2(1u)), uvec2(0u))))))), uvec2(4294967295u), equal(((((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(8u), equal(((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(4u), equal((((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(8u), equal(((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u)))) & uvec2(15u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(2u), equal(((((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(8u), equal(((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(4u), equal((((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(8u), equal(((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u)))) & uvec2(15u)), uvec2(0u)))) & uvec2(3u)), uvec2(0u)))), uvec2(0u)));
return res;
}
void main() {
@@ -29,12 +24,7 @@
uvec2 firstTrailingBit_45eb10() {
uvec2 arg_0 = uvec2(1u);
uvec2 v_1 = arg_0;
- uvec2 v_2 = mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)));
- uvec2 v_3 = mix(uvec2(0u), uvec2(8u), equal(((v_1 >> v_2) & uvec2(255u)), uvec2(0u)));
- uvec2 v_4 = mix(uvec2(0u), uvec2(4u), equal((((v_1 >> v_2) >> v_3) & uvec2(15u)), uvec2(0u)));
- uvec2 v_5 = mix(uvec2(0u), uvec2(2u), equal(((((v_1 >> v_2) >> v_3) >> v_4) & uvec2(3u)), uvec2(0u)));
- uvec2 v_6 = (v_2 | (v_3 | (v_4 | (v_5 | mix(uvec2(0u), uvec2(1u), equal((((((v_1 >> v_2) >> v_3) >> v_4) >> v_5) & uvec2(1u)), uvec2(0u)))))));
- uvec2 res = mix(v_6, uvec2(4294967295u), equal(((((v_1 >> v_2) >> v_3) >> v_4) >> v_5), uvec2(0u)));
+ uvec2 res = mix((mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u))) | (mix(uvec2(0u), uvec2(8u), equal(((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u))) | (mix(uvec2(0u), uvec2(4u), equal((((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(8u), equal(((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u)))) & uvec2(15u)), uvec2(0u))) | (mix(uvec2(0u), uvec2(2u), equal(((((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(8u), equal(((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(4u), equal((((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(8u), equal(((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u)))) & uvec2(15u)), uvec2(0u)))) & uvec2(3u)), uvec2(0u))) | mix(uvec2(0u), uvec2(1u), equal((((((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(8u), equal(((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(4u), equal((((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(8u), equal(((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u)))) & uvec2(15u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(2u), equal(((((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(8u), equal(((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(4u), equal((((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(8u), equal(((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u)))) & uvec2(15u)), uvec2(0u)))) & uvec2(3u)), uvec2(0u)))) & uvec2(1u)), uvec2(0u))))))), uvec2(4294967295u), equal(((((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(8u), equal(((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(4u), equal((((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(8u), equal(((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u)))) & uvec2(15u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(2u), equal(((((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(8u), equal(((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(4u), equal((((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(8u), equal(((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u)))) & uvec2(15u)), uvec2(0u)))) & uvec2(3u)), uvec2(0u)))), uvec2(0u)));
return res;
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
@@ -53,12 +43,7 @@
uvec2 firstTrailingBit_45eb10() {
uvec2 arg_0 = uvec2(1u);
uvec2 v = arg_0;
- uvec2 v_1 = mix(uvec2(0u), uvec2(16u), equal((v & uvec2(65535u)), uvec2(0u)));
- uvec2 v_2 = mix(uvec2(0u), uvec2(8u), equal(((v >> v_1) & uvec2(255u)), uvec2(0u)));
- uvec2 v_3 = mix(uvec2(0u), uvec2(4u), equal((((v >> v_1) >> v_2) & uvec2(15u)), uvec2(0u)));
- uvec2 v_4 = mix(uvec2(0u), uvec2(2u), equal(((((v >> v_1) >> v_2) >> v_3) & uvec2(3u)), uvec2(0u)));
- uvec2 v_5 = (v_1 | (v_2 | (v_3 | (v_4 | mix(uvec2(0u), uvec2(1u), equal((((((v >> v_1) >> v_2) >> v_3) >> v_4) & uvec2(1u)), uvec2(0u)))))));
- uvec2 res = mix(v_5, uvec2(4294967295u), equal(((((v >> v_1) >> v_2) >> v_3) >> v_4), uvec2(0u)));
+ uvec2 res = mix((mix(uvec2(0u), uvec2(16u), equal((v & uvec2(65535u)), uvec2(0u))) | (mix(uvec2(0u), uvec2(8u), equal(((v >> mix(uvec2(0u), uvec2(16u), equal((v & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u))) | (mix(uvec2(0u), uvec2(4u), equal((((v >> mix(uvec2(0u), uvec2(16u), equal((v & uvec2(65535u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(8u), equal(((v >> mix(uvec2(0u), uvec2(16u), equal((v & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u)))) & uvec2(15u)), uvec2(0u))) | (mix(uvec2(0u), uvec2(2u), equal(((((v >> mix(uvec2(0u), uvec2(16u), equal((v & uvec2(65535u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(8u), equal(((v >> mix(uvec2(0u), uvec2(16u), equal((v & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(4u), equal((((v >> mix(uvec2(0u), uvec2(16u), equal((v & uvec2(65535u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(8u), equal(((v >> mix(uvec2(0u), uvec2(16u), equal((v & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u)))) & uvec2(15u)), uvec2(0u)))) & uvec2(3u)), uvec2(0u))) | mix(uvec2(0u), uvec2(1u), equal((((((v >> mix(uvec2(0u), uvec2(16u), equal((v & uvec2(65535u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(8u), equal(((v >> mix(uvec2(0u), uvec2(16u), equal((v & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(4u), equal((((v >> mix(uvec2(0u), uvec2(16u), equal((v & uvec2(65535u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(8u), equal(((v >> mix(uvec2(0u), uvec2(16u), equal((v & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u)))) & uvec2(15u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(2u), equal(((((v >> mix(uvec2(0u), uvec2(16u), equal((v & uvec2(65535u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(8u), equal(((v >> mix(uvec2(0u), uvec2(16u), equal((v & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(4u), equal((((v >> mix(uvec2(0u), uvec2(16u), equal((v & uvec2(65535u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(8u), equal(((v >> mix(uvec2(0u), uvec2(16u), equal((v & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u)))) & uvec2(15u)), uvec2(0u)))) & uvec2(3u)), uvec2(0u)))) & uvec2(1u)), uvec2(0u))))))), uvec2(4294967295u), equal(((((v >> mix(uvec2(0u), uvec2(16u), equal((v & uvec2(65535u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(8u), equal(((v >> mix(uvec2(0u), uvec2(16u), equal((v & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(4u), equal((((v >> mix(uvec2(0u), uvec2(16u), equal((v & uvec2(65535u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(8u), equal(((v >> mix(uvec2(0u), uvec2(16u), equal((v & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u)))) & uvec2(15u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(2u), equal(((((v >> mix(uvec2(0u), uvec2(16u), equal((v & uvec2(65535u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(8u), equal(((v >> mix(uvec2(0u), uvec2(16u), equal((v & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(4u), equal((((v >> mix(uvec2(0u), uvec2(16u), equal((v & uvec2(65535u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(8u), equal(((v >> mix(uvec2(0u), uvec2(16u), equal((v & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u)))) & uvec2(15u)), uvec2(0u)))) & uvec2(3u)), uvec2(0u)))), uvec2(0u)));
return res;
}
VertexOutput vertex_main_inner() {
@@ -68,10 +53,10 @@
return tint_symbol;
}
void main() {
- VertexOutput v_6 = vertex_main_inner();
- gl_Position = v_6.pos;
+ VertexOutput v_1 = vertex_main_inner();
+ gl_Position = v_1.pos;
gl_Position[1u] = -(gl_Position.y);
gl_Position[2u] = ((2.0f * gl_Position.z) - gl_Position.w);
- vertex_main_loc0_Output = v_6.prevent_dce;
+ vertex_main_loc0_Output = v_1.prevent_dce;
gl_PointSize = 1.0f;
}
diff --git a/test/tint/builtins/gen/var/firstTrailingBit/45eb10.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/firstTrailingBit/45eb10.wgsl.expected.ir.msl
index d6f20f3..643ebdb 100644
--- a/test/tint/builtins/gen/var/firstTrailingBit/45eb10.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/firstTrailingBit/45eb10.wgsl.expected.ir.msl
@@ -18,11 +18,7 @@
uint2 firstTrailingBit_45eb10() {
uint2 arg_0 = uint2(1u);
uint2 const v = arg_0;
- uint2 const v_1 = select(uint2(0u), uint2(16u), ((v & uint2(65535u)) == uint2(0u)));
- uint2 const v_2 = select(uint2(0u), uint2(8u), (((v >> v_1) & uint2(255u)) == uint2(0u)));
- uint2 const v_3 = select(uint2(0u), uint2(4u), ((((v >> v_1) >> v_2) & uint2(15u)) == uint2(0u)));
- uint2 const v_4 = select(uint2(0u), uint2(2u), (((((v >> v_1) >> v_2) >> v_3) & uint2(3u)) == uint2(0u)));
- uint2 res = select((v_1 | (v_2 | (v_3 | (v_4 | select(uint2(0u), uint2(1u), ((((((v >> v_1) >> v_2) >> v_3) >> v_4) & uint2(1u)) == uint2(0u))))))), uint2(4294967295u), (((((v >> v_1) >> v_2) >> v_3) >> v_4) == uint2(0u)));
+ uint2 res = select((select(uint2(0u), uint2(16u), ((v & uint2(65535u)) == uint2(0u))) | (select(uint2(0u), uint2(8u), (((v >> select(uint2(0u), uint2(16u), ((v & uint2(65535u)) == uint2(0u)))) & uint2(255u)) == uint2(0u))) | (select(uint2(0u), uint2(4u), ((((v >> select(uint2(0u), uint2(16u), ((v & uint2(65535u)) == uint2(0u)))) >> select(uint2(0u), uint2(8u), (((v >> select(uint2(0u), uint2(16u), ((v & uint2(65535u)) == uint2(0u)))) & uint2(255u)) == uint2(0u)))) & uint2(15u)) == uint2(0u))) | (select(uint2(0u), uint2(2u), (((((v >> select(uint2(0u), uint2(16u), ((v & uint2(65535u)) == uint2(0u)))) >> select(uint2(0u), uint2(8u), (((v >> select(uint2(0u), uint2(16u), ((v & uint2(65535u)) == uint2(0u)))) & uint2(255u)) == uint2(0u)))) >> select(uint2(0u), uint2(4u), ((((v >> select(uint2(0u), uint2(16u), ((v & uint2(65535u)) == uint2(0u)))) >> select(uint2(0u), uint2(8u), (((v >> select(uint2(0u), uint2(16u), ((v & uint2(65535u)) == uint2(0u)))) & uint2(255u)) == uint2(0u)))) & uint2(15u)) == uint2(0u)))) & uint2(3u)) == uint2(0u))) | select(uint2(0u), uint2(1u), ((((((v >> select(uint2(0u), uint2(16u), ((v & uint2(65535u)) == uint2(0u)))) >> select(uint2(0u), uint2(8u), (((v >> select(uint2(0u), uint2(16u), ((v & uint2(65535u)) == uint2(0u)))) & uint2(255u)) == uint2(0u)))) >> select(uint2(0u), uint2(4u), ((((v >> select(uint2(0u), uint2(16u), ((v & uint2(65535u)) == uint2(0u)))) >> select(uint2(0u), uint2(8u), (((v >> select(uint2(0u), uint2(16u), ((v & uint2(65535u)) == uint2(0u)))) & uint2(255u)) == uint2(0u)))) & uint2(15u)) == uint2(0u)))) >> select(uint2(0u), uint2(2u), (((((v >> select(uint2(0u), uint2(16u), ((v & uint2(65535u)) == uint2(0u)))) >> select(uint2(0u), uint2(8u), (((v >> select(uint2(0u), uint2(16u), ((v & uint2(65535u)) == uint2(0u)))) & uint2(255u)) == uint2(0u)))) >> select(uint2(0u), uint2(4u), ((((v >> select(uint2(0u), uint2(16u), ((v & uint2(65535u)) == uint2(0u)))) >> select(uint2(0u), uint2(8u), (((v >> select(uint2(0u), uint2(16u), ((v & uint2(65535u)) == uint2(0u)))) & uint2(255u)) == uint2(0u)))) & uint2(15u)) == uint2(0u)))) & uint2(3u)) == uint2(0u)))) & uint2(1u)) == uint2(0u))))))), uint2(4294967295u), (((((v >> select(uint2(0u), uint2(16u), ((v & uint2(65535u)) == uint2(0u)))) >> select(uint2(0u), uint2(8u), (((v >> select(uint2(0u), uint2(16u), ((v & uint2(65535u)) == uint2(0u)))) & uint2(255u)) == uint2(0u)))) >> select(uint2(0u), uint2(4u), ((((v >> select(uint2(0u), uint2(16u), ((v & uint2(65535u)) == uint2(0u)))) >> select(uint2(0u), uint2(8u), (((v >> select(uint2(0u), uint2(16u), ((v & uint2(65535u)) == uint2(0u)))) & uint2(255u)) == uint2(0u)))) & uint2(15u)) == uint2(0u)))) >> select(uint2(0u), uint2(2u), (((((v >> select(uint2(0u), uint2(16u), ((v & uint2(65535u)) == uint2(0u)))) >> select(uint2(0u), uint2(8u), (((v >> select(uint2(0u), uint2(16u), ((v & uint2(65535u)) == uint2(0u)))) & uint2(255u)) == uint2(0u)))) >> select(uint2(0u), uint2(4u), ((((v >> select(uint2(0u), uint2(16u), ((v & uint2(65535u)) == uint2(0u)))) >> select(uint2(0u), uint2(8u), (((v >> select(uint2(0u), uint2(16u), ((v & uint2(65535u)) == uint2(0u)))) & uint2(255u)) == uint2(0u)))) & uint2(15u)) == uint2(0u)))) & uint2(3u)) == uint2(0u)))) == uint2(0u)));
return res;
}
@@ -44,9 +40,9 @@
}
vertex vertex_main_outputs vertex_main() {
- VertexOutput const v_5 = vertex_main_inner();
+ VertexOutput const v_1 = vertex_main_inner();
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_5.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_5.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v_1.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/firstTrailingBit/47d475.wgsl.expected.glsl b/test/tint/builtins/gen/var/firstTrailingBit/47d475.wgsl.expected.glsl
index 50e9d95..d5066b5 100644
--- a/test/tint/builtins/gen/var/firstTrailingBit/47d475.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/firstTrailingBit/47d475.wgsl.expected.glsl
@@ -9,11 +9,7 @@
uint firstTrailingBit_47d475() {
uint arg_0 = 1u;
uint v_1 = arg_0;
- uint v_2 = mix(0u, 16u, ((v_1 & 65535u) == 0u));
- uint v_3 = mix(0u, 8u, (((v_1 >> v_2) & 255u) == 0u));
- uint v_4 = mix(0u, 4u, ((((v_1 >> v_2) >> v_3) & 15u) == 0u));
- uint v_5 = mix(0u, 2u, (((((v_1 >> v_2) >> v_3) >> v_4) & 3u) == 0u));
- uint res = mix((v_2 | (v_3 | (v_4 | (v_5 | mix(0u, 1u, ((((((v_1 >> v_2) >> v_3) >> v_4) >> v_5) & 1u) == 0u)))))), 4294967295u, (((((v_1 >> v_2) >> v_3) >> v_4) >> v_5) == 0u));
+ uint res = mix((mix(0u, 16u, ((v_1 & 65535u) == 0u)) | (mix(0u, 8u, (((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) & 255u) == 0u)) | (mix(0u, 4u, ((((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) >> mix(0u, 8u, (((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) & 255u) == 0u))) & 15u) == 0u)) | (mix(0u, 2u, (((((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) >> mix(0u, 8u, (((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) & 255u) == 0u))) >> mix(0u, 4u, ((((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) >> mix(0u, 8u, (((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) & 255u) == 0u))) & 15u) == 0u))) & 3u) == 0u)) | mix(0u, 1u, ((((((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) >> mix(0u, 8u, (((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) & 255u) == 0u))) >> mix(0u, 4u, ((((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) >> mix(0u, 8u, (((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) & 255u) == 0u))) & 15u) == 0u))) >> mix(0u, 2u, (((((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) >> mix(0u, 8u, (((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) & 255u) == 0u))) >> mix(0u, 4u, ((((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) >> mix(0u, 8u, (((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) & 255u) == 0u))) & 15u) == 0u))) & 3u) == 0u))) & 1u) == 0u)))))), 4294967295u, (((((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) >> mix(0u, 8u, (((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) & 255u) == 0u))) >> mix(0u, 4u, ((((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) >> mix(0u, 8u, (((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) & 255u) == 0u))) & 15u) == 0u))) >> mix(0u, 2u, (((((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) >> mix(0u, 8u, (((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) & 255u) == 0u))) >> mix(0u, 4u, ((((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) >> mix(0u, 8u, (((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) & 255u) == 0u))) & 15u) == 0u))) & 3u) == 0u))) == 0u));
return res;
}
void main() {
@@ -28,11 +24,7 @@
uint firstTrailingBit_47d475() {
uint arg_0 = 1u;
uint v_1 = arg_0;
- uint v_2 = mix(0u, 16u, ((v_1 & 65535u) == 0u));
- uint v_3 = mix(0u, 8u, (((v_1 >> v_2) & 255u) == 0u));
- uint v_4 = mix(0u, 4u, ((((v_1 >> v_2) >> v_3) & 15u) == 0u));
- uint v_5 = mix(0u, 2u, (((((v_1 >> v_2) >> v_3) >> v_4) & 3u) == 0u));
- uint res = mix((v_2 | (v_3 | (v_4 | (v_5 | mix(0u, 1u, ((((((v_1 >> v_2) >> v_3) >> v_4) >> v_5) & 1u) == 0u)))))), 4294967295u, (((((v_1 >> v_2) >> v_3) >> v_4) >> v_5) == 0u));
+ uint res = mix((mix(0u, 16u, ((v_1 & 65535u) == 0u)) | (mix(0u, 8u, (((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) & 255u) == 0u)) | (mix(0u, 4u, ((((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) >> mix(0u, 8u, (((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) & 255u) == 0u))) & 15u) == 0u)) | (mix(0u, 2u, (((((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) >> mix(0u, 8u, (((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) & 255u) == 0u))) >> mix(0u, 4u, ((((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) >> mix(0u, 8u, (((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) & 255u) == 0u))) & 15u) == 0u))) & 3u) == 0u)) | mix(0u, 1u, ((((((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) >> mix(0u, 8u, (((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) & 255u) == 0u))) >> mix(0u, 4u, ((((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) >> mix(0u, 8u, (((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) & 255u) == 0u))) & 15u) == 0u))) >> mix(0u, 2u, (((((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) >> mix(0u, 8u, (((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) & 255u) == 0u))) >> mix(0u, 4u, ((((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) >> mix(0u, 8u, (((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) & 255u) == 0u))) & 15u) == 0u))) & 3u) == 0u))) & 1u) == 0u)))))), 4294967295u, (((((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) >> mix(0u, 8u, (((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) & 255u) == 0u))) >> mix(0u, 4u, ((((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) >> mix(0u, 8u, (((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) & 255u) == 0u))) & 15u) == 0u))) >> mix(0u, 2u, (((((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) >> mix(0u, 8u, (((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) & 255u) == 0u))) >> mix(0u, 4u, ((((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) >> mix(0u, 8u, (((v_1 >> mix(0u, 16u, ((v_1 & 65535u) == 0u))) & 255u) == 0u))) & 15u) == 0u))) & 3u) == 0u))) == 0u));
return res;
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
@@ -51,11 +43,7 @@
uint firstTrailingBit_47d475() {
uint arg_0 = 1u;
uint v = arg_0;
- uint v_1 = mix(0u, 16u, ((v & 65535u) == 0u));
- uint v_2 = mix(0u, 8u, (((v >> v_1) & 255u) == 0u));
- uint v_3 = mix(0u, 4u, ((((v >> v_1) >> v_2) & 15u) == 0u));
- uint v_4 = mix(0u, 2u, (((((v >> v_1) >> v_2) >> v_3) & 3u) == 0u));
- uint res = mix((v_1 | (v_2 | (v_3 | (v_4 | mix(0u, 1u, ((((((v >> v_1) >> v_2) >> v_3) >> v_4) & 1u) == 0u)))))), 4294967295u, (((((v >> v_1) >> v_2) >> v_3) >> v_4) == 0u));
+ uint res = mix((mix(0u, 16u, ((v & 65535u) == 0u)) | (mix(0u, 8u, (((v >> mix(0u, 16u, ((v & 65535u) == 0u))) & 255u) == 0u)) | (mix(0u, 4u, ((((v >> mix(0u, 16u, ((v & 65535u) == 0u))) >> mix(0u, 8u, (((v >> mix(0u, 16u, ((v & 65535u) == 0u))) & 255u) == 0u))) & 15u) == 0u)) | (mix(0u, 2u, (((((v >> mix(0u, 16u, ((v & 65535u) == 0u))) >> mix(0u, 8u, (((v >> mix(0u, 16u, ((v & 65535u) == 0u))) & 255u) == 0u))) >> mix(0u, 4u, ((((v >> mix(0u, 16u, ((v & 65535u) == 0u))) >> mix(0u, 8u, (((v >> mix(0u, 16u, ((v & 65535u) == 0u))) & 255u) == 0u))) & 15u) == 0u))) & 3u) == 0u)) | mix(0u, 1u, ((((((v >> mix(0u, 16u, ((v & 65535u) == 0u))) >> mix(0u, 8u, (((v >> mix(0u, 16u, ((v & 65535u) == 0u))) & 255u) == 0u))) >> mix(0u, 4u, ((((v >> mix(0u, 16u, ((v & 65535u) == 0u))) >> mix(0u, 8u, (((v >> mix(0u, 16u, ((v & 65535u) == 0u))) & 255u) == 0u))) & 15u) == 0u))) >> mix(0u, 2u, (((((v >> mix(0u, 16u, ((v & 65535u) == 0u))) >> mix(0u, 8u, (((v >> mix(0u, 16u, ((v & 65535u) == 0u))) & 255u) == 0u))) >> mix(0u, 4u, ((((v >> mix(0u, 16u, ((v & 65535u) == 0u))) >> mix(0u, 8u, (((v >> mix(0u, 16u, ((v & 65535u) == 0u))) & 255u) == 0u))) & 15u) == 0u))) & 3u) == 0u))) & 1u) == 0u)))))), 4294967295u, (((((v >> mix(0u, 16u, ((v & 65535u) == 0u))) >> mix(0u, 8u, (((v >> mix(0u, 16u, ((v & 65535u) == 0u))) & 255u) == 0u))) >> mix(0u, 4u, ((((v >> mix(0u, 16u, ((v & 65535u) == 0u))) >> mix(0u, 8u, (((v >> mix(0u, 16u, ((v & 65535u) == 0u))) & 255u) == 0u))) & 15u) == 0u))) >> mix(0u, 2u, (((((v >> mix(0u, 16u, ((v & 65535u) == 0u))) >> mix(0u, 8u, (((v >> mix(0u, 16u, ((v & 65535u) == 0u))) & 255u) == 0u))) >> mix(0u, 4u, ((((v >> mix(0u, 16u, ((v & 65535u) == 0u))) >> mix(0u, 8u, (((v >> mix(0u, 16u, ((v & 65535u) == 0u))) & 255u) == 0u))) & 15u) == 0u))) & 3u) == 0u))) == 0u));
return res;
}
VertexOutput vertex_main_inner() {
@@ -65,10 +53,10 @@
return tint_symbol;
}
void main() {
- VertexOutput v_5 = vertex_main_inner();
- gl_Position = v_5.pos;
+ VertexOutput v_1 = vertex_main_inner();
+ gl_Position = v_1.pos;
gl_Position[1u] = -(gl_Position.y);
gl_Position[2u] = ((2.0f * gl_Position.z) - gl_Position.w);
- vertex_main_loc0_Output = v_5.prevent_dce;
+ vertex_main_loc0_Output = v_1.prevent_dce;
gl_PointSize = 1.0f;
}
diff --git a/test/tint/builtins/gen/var/firstTrailingBit/47d475.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/firstTrailingBit/47d475.wgsl.expected.ir.msl
index 46cb3b6..35a0b20 100644
--- a/test/tint/builtins/gen/var/firstTrailingBit/47d475.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/firstTrailingBit/47d475.wgsl.expected.ir.msl
@@ -18,11 +18,7 @@
uint firstTrailingBit_47d475() {
uint arg_0 = 1u;
uint const v = arg_0;
- uint const v_1 = select(0u, 16u, ((v & 65535u) == 0u));
- uint const v_2 = select(0u, 8u, (((v >> v_1) & 255u) == 0u));
- uint const v_3 = select(0u, 4u, ((((v >> v_1) >> v_2) & 15u) == 0u));
- uint const v_4 = select(0u, 2u, (((((v >> v_1) >> v_2) >> v_3) & 3u) == 0u));
- uint res = select((v_1 | (v_2 | (v_3 | (v_4 | select(0u, 1u, ((((((v >> v_1) >> v_2) >> v_3) >> v_4) & 1u) == 0u)))))), 4294967295u, (((((v >> v_1) >> v_2) >> v_3) >> v_4) == 0u));
+ uint res = select((select(0u, 16u, ((v & 65535u) == 0u)) | (select(0u, 8u, (((v >> select(0u, 16u, ((v & 65535u) == 0u))) & 255u) == 0u)) | (select(0u, 4u, ((((v >> select(0u, 16u, ((v & 65535u) == 0u))) >> select(0u, 8u, (((v >> select(0u, 16u, ((v & 65535u) == 0u))) & 255u) == 0u))) & 15u) == 0u)) | (select(0u, 2u, (((((v >> select(0u, 16u, ((v & 65535u) == 0u))) >> select(0u, 8u, (((v >> select(0u, 16u, ((v & 65535u) == 0u))) & 255u) == 0u))) >> select(0u, 4u, ((((v >> select(0u, 16u, ((v & 65535u) == 0u))) >> select(0u, 8u, (((v >> select(0u, 16u, ((v & 65535u) == 0u))) & 255u) == 0u))) & 15u) == 0u))) & 3u) == 0u)) | select(0u, 1u, ((((((v >> select(0u, 16u, ((v & 65535u) == 0u))) >> select(0u, 8u, (((v >> select(0u, 16u, ((v & 65535u) == 0u))) & 255u) == 0u))) >> select(0u, 4u, ((((v >> select(0u, 16u, ((v & 65535u) == 0u))) >> select(0u, 8u, (((v >> select(0u, 16u, ((v & 65535u) == 0u))) & 255u) == 0u))) & 15u) == 0u))) >> select(0u, 2u, (((((v >> select(0u, 16u, ((v & 65535u) == 0u))) >> select(0u, 8u, (((v >> select(0u, 16u, ((v & 65535u) == 0u))) & 255u) == 0u))) >> select(0u, 4u, ((((v >> select(0u, 16u, ((v & 65535u) == 0u))) >> select(0u, 8u, (((v >> select(0u, 16u, ((v & 65535u) == 0u))) & 255u) == 0u))) & 15u) == 0u))) & 3u) == 0u))) & 1u) == 0u)))))), 4294967295u, (((((v >> select(0u, 16u, ((v & 65535u) == 0u))) >> select(0u, 8u, (((v >> select(0u, 16u, ((v & 65535u) == 0u))) & 255u) == 0u))) >> select(0u, 4u, ((((v >> select(0u, 16u, ((v & 65535u) == 0u))) >> select(0u, 8u, (((v >> select(0u, 16u, ((v & 65535u) == 0u))) & 255u) == 0u))) & 15u) == 0u))) >> select(0u, 2u, (((((v >> select(0u, 16u, ((v & 65535u) == 0u))) >> select(0u, 8u, (((v >> select(0u, 16u, ((v & 65535u) == 0u))) & 255u) == 0u))) >> select(0u, 4u, ((((v >> select(0u, 16u, ((v & 65535u) == 0u))) >> select(0u, 8u, (((v >> select(0u, 16u, ((v & 65535u) == 0u))) & 255u) == 0u))) & 15u) == 0u))) & 3u) == 0u))) == 0u));
return res;
}
@@ -44,9 +40,9 @@
}
vertex vertex_main_outputs vertex_main() {
- VertexOutput const v_5 = vertex_main_inner();
+ VertexOutput const v_1 = vertex_main_inner();
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_5.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_5.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v_1.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/firstTrailingBit/50c072.wgsl.expected.glsl b/test/tint/builtins/gen/var/firstTrailingBit/50c072.wgsl.expected.glsl
index 4d0091f..bbb9fc4 100644
--- a/test/tint/builtins/gen/var/firstTrailingBit/50c072.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/firstTrailingBit/50c072.wgsl.expected.glsl
@@ -9,12 +9,7 @@
ivec2 firstTrailingBit_50c072() {
ivec2 arg_0 = ivec2(1);
uvec2 v_1 = uvec2(arg_0);
- uvec2 v_2 = mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)));
- uvec2 v_3 = mix(uvec2(0u), uvec2(8u), equal(((v_1 >> v_2) & uvec2(255u)), uvec2(0u)));
- uvec2 v_4 = mix(uvec2(0u), uvec2(4u), equal((((v_1 >> v_2) >> v_3) & uvec2(15u)), uvec2(0u)));
- uvec2 v_5 = mix(uvec2(0u), uvec2(2u), equal(((((v_1 >> v_2) >> v_3) >> v_4) & uvec2(3u)), uvec2(0u)));
- uvec2 v_6 = (v_2 | (v_3 | (v_4 | (v_5 | mix(uvec2(0u), uvec2(1u), equal((((((v_1 >> v_2) >> v_3) >> v_4) >> v_5) & uvec2(1u)), uvec2(0u)))))));
- ivec2 res = ivec2(mix(v_6, uvec2(4294967295u), equal(((((v_1 >> v_2) >> v_3) >> v_4) >> v_5), uvec2(0u))));
+ ivec2 res = ivec2(mix((mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u))) | (mix(uvec2(0u), uvec2(8u), equal(((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u))) | (mix(uvec2(0u), uvec2(4u), equal((((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(8u), equal(((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u)))) & uvec2(15u)), uvec2(0u))) | (mix(uvec2(0u), uvec2(2u), equal(((((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(8u), equal(((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(4u), equal((((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(8u), equal(((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u)))) & uvec2(15u)), uvec2(0u)))) & uvec2(3u)), uvec2(0u))) | mix(uvec2(0u), uvec2(1u), equal((((((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(8u), equal(((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(4u), equal((((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(8u), equal(((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u)))) & uvec2(15u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(2u), equal(((((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(8u), equal(((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(4u), equal((((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(8u), equal(((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u)))) & uvec2(15u)), uvec2(0u)))) & uvec2(3u)), uvec2(0u)))) & uvec2(1u)), uvec2(0u))))))), uvec2(4294967295u), equal(((((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(8u), equal(((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(4u), equal((((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(8u), equal(((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u)))) & uvec2(15u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(2u), equal(((((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(8u), equal(((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(4u), equal((((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(8u), equal(((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u)))) & uvec2(15u)), uvec2(0u)))) & uvec2(3u)), uvec2(0u)))), uvec2(0u))));
return res;
}
void main() {
@@ -29,12 +24,7 @@
ivec2 firstTrailingBit_50c072() {
ivec2 arg_0 = ivec2(1);
uvec2 v_1 = uvec2(arg_0);
- uvec2 v_2 = mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)));
- uvec2 v_3 = mix(uvec2(0u), uvec2(8u), equal(((v_1 >> v_2) & uvec2(255u)), uvec2(0u)));
- uvec2 v_4 = mix(uvec2(0u), uvec2(4u), equal((((v_1 >> v_2) >> v_3) & uvec2(15u)), uvec2(0u)));
- uvec2 v_5 = mix(uvec2(0u), uvec2(2u), equal(((((v_1 >> v_2) >> v_3) >> v_4) & uvec2(3u)), uvec2(0u)));
- uvec2 v_6 = (v_2 | (v_3 | (v_4 | (v_5 | mix(uvec2(0u), uvec2(1u), equal((((((v_1 >> v_2) >> v_3) >> v_4) >> v_5) & uvec2(1u)), uvec2(0u)))))));
- ivec2 res = ivec2(mix(v_6, uvec2(4294967295u), equal(((((v_1 >> v_2) >> v_3) >> v_4) >> v_5), uvec2(0u))));
+ ivec2 res = ivec2(mix((mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u))) | (mix(uvec2(0u), uvec2(8u), equal(((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u))) | (mix(uvec2(0u), uvec2(4u), equal((((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(8u), equal(((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u)))) & uvec2(15u)), uvec2(0u))) | (mix(uvec2(0u), uvec2(2u), equal(((((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(8u), equal(((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(4u), equal((((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(8u), equal(((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u)))) & uvec2(15u)), uvec2(0u)))) & uvec2(3u)), uvec2(0u))) | mix(uvec2(0u), uvec2(1u), equal((((((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(8u), equal(((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(4u), equal((((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(8u), equal(((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u)))) & uvec2(15u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(2u), equal(((((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(8u), equal(((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(4u), equal((((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(8u), equal(((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u)))) & uvec2(15u)), uvec2(0u)))) & uvec2(3u)), uvec2(0u)))) & uvec2(1u)), uvec2(0u))))))), uvec2(4294967295u), equal(((((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(8u), equal(((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(4u), equal((((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(8u), equal(((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u)))) & uvec2(15u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(2u), equal(((((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(8u), equal(((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(4u), equal((((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(8u), equal(((v_1 >> mix(uvec2(0u), uvec2(16u), equal((v_1 & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u)))) & uvec2(15u)), uvec2(0u)))) & uvec2(3u)), uvec2(0u)))), uvec2(0u))));
return res;
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
@@ -53,12 +43,7 @@
ivec2 firstTrailingBit_50c072() {
ivec2 arg_0 = ivec2(1);
uvec2 v = uvec2(arg_0);
- uvec2 v_1 = mix(uvec2(0u), uvec2(16u), equal((v & uvec2(65535u)), uvec2(0u)));
- uvec2 v_2 = mix(uvec2(0u), uvec2(8u), equal(((v >> v_1) & uvec2(255u)), uvec2(0u)));
- uvec2 v_3 = mix(uvec2(0u), uvec2(4u), equal((((v >> v_1) >> v_2) & uvec2(15u)), uvec2(0u)));
- uvec2 v_4 = mix(uvec2(0u), uvec2(2u), equal(((((v >> v_1) >> v_2) >> v_3) & uvec2(3u)), uvec2(0u)));
- uvec2 v_5 = (v_1 | (v_2 | (v_3 | (v_4 | mix(uvec2(0u), uvec2(1u), equal((((((v >> v_1) >> v_2) >> v_3) >> v_4) & uvec2(1u)), uvec2(0u)))))));
- ivec2 res = ivec2(mix(v_5, uvec2(4294967295u), equal(((((v >> v_1) >> v_2) >> v_3) >> v_4), uvec2(0u))));
+ ivec2 res = ivec2(mix((mix(uvec2(0u), uvec2(16u), equal((v & uvec2(65535u)), uvec2(0u))) | (mix(uvec2(0u), uvec2(8u), equal(((v >> mix(uvec2(0u), uvec2(16u), equal((v & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u))) | (mix(uvec2(0u), uvec2(4u), equal((((v >> mix(uvec2(0u), uvec2(16u), equal((v & uvec2(65535u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(8u), equal(((v >> mix(uvec2(0u), uvec2(16u), equal((v & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u)))) & uvec2(15u)), uvec2(0u))) | (mix(uvec2(0u), uvec2(2u), equal(((((v >> mix(uvec2(0u), uvec2(16u), equal((v & uvec2(65535u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(8u), equal(((v >> mix(uvec2(0u), uvec2(16u), equal((v & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(4u), equal((((v >> mix(uvec2(0u), uvec2(16u), equal((v & uvec2(65535u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(8u), equal(((v >> mix(uvec2(0u), uvec2(16u), equal((v & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u)))) & uvec2(15u)), uvec2(0u)))) & uvec2(3u)), uvec2(0u))) | mix(uvec2(0u), uvec2(1u), equal((((((v >> mix(uvec2(0u), uvec2(16u), equal((v & uvec2(65535u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(8u), equal(((v >> mix(uvec2(0u), uvec2(16u), equal((v & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(4u), equal((((v >> mix(uvec2(0u), uvec2(16u), equal((v & uvec2(65535u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(8u), equal(((v >> mix(uvec2(0u), uvec2(16u), equal((v & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u)))) & uvec2(15u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(2u), equal(((((v >> mix(uvec2(0u), uvec2(16u), equal((v & uvec2(65535u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(8u), equal(((v >> mix(uvec2(0u), uvec2(16u), equal((v & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(4u), equal((((v >> mix(uvec2(0u), uvec2(16u), equal((v & uvec2(65535u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(8u), equal(((v >> mix(uvec2(0u), uvec2(16u), equal((v & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u)))) & uvec2(15u)), uvec2(0u)))) & uvec2(3u)), uvec2(0u)))) & uvec2(1u)), uvec2(0u))))))), uvec2(4294967295u), equal(((((v >> mix(uvec2(0u), uvec2(16u), equal((v & uvec2(65535u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(8u), equal(((v >> mix(uvec2(0u), uvec2(16u), equal((v & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(4u), equal((((v >> mix(uvec2(0u), uvec2(16u), equal((v & uvec2(65535u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(8u), equal(((v >> mix(uvec2(0u), uvec2(16u), equal((v & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u)))) & uvec2(15u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(2u), equal(((((v >> mix(uvec2(0u), uvec2(16u), equal((v & uvec2(65535u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(8u), equal(((v >> mix(uvec2(0u), uvec2(16u), equal((v & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(4u), equal((((v >> mix(uvec2(0u), uvec2(16u), equal((v & uvec2(65535u)), uvec2(0u)))) >> mix(uvec2(0u), uvec2(8u), equal(((v >> mix(uvec2(0u), uvec2(16u), equal((v & uvec2(65535u)), uvec2(0u)))) & uvec2(255u)), uvec2(0u)))) & uvec2(15u)), uvec2(0u)))) & uvec2(3u)), uvec2(0u)))), uvec2(0u))));
return res;
}
VertexOutput vertex_main_inner() {
@@ -68,10 +53,10 @@
return tint_symbol;
}
void main() {
- VertexOutput v_6 = vertex_main_inner();
- gl_Position = v_6.pos;
+ VertexOutput v_1 = vertex_main_inner();
+ gl_Position = v_1.pos;
gl_Position[1u] = -(gl_Position.y);
gl_Position[2u] = ((2.0f * gl_Position.z) - gl_Position.w);
- vertex_main_loc0_Output = v_6.prevent_dce;
+ vertex_main_loc0_Output = v_1.prevent_dce;
gl_PointSize = 1.0f;
}
diff --git a/test/tint/builtins/gen/var/firstTrailingBit/50c072.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/firstTrailingBit/50c072.wgsl.expected.ir.msl
index c81f47e..d87c6a1 100644
--- a/test/tint/builtins/gen/var/firstTrailingBit/50c072.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/firstTrailingBit/50c072.wgsl.expected.ir.msl
@@ -18,11 +18,7 @@
int2 firstTrailingBit_50c072() {
int2 arg_0 = int2(1);
uint2 const v = as_type<uint2>(arg_0);
- uint2 const v_1 = select(uint2(0u), uint2(16u), ((v & uint2(65535u)) == uint2(0u)));
- uint2 const v_2 = select(uint2(0u), uint2(8u), (((v >> v_1) & uint2(255u)) == uint2(0u)));
- uint2 const v_3 = select(uint2(0u), uint2(4u), ((((v >> v_1) >> v_2) & uint2(15u)) == uint2(0u)));
- uint2 const v_4 = select(uint2(0u), uint2(2u), (((((v >> v_1) >> v_2) >> v_3) & uint2(3u)) == uint2(0u)));
- int2 res = as_type<int2>(select((v_1 | (v_2 | (v_3 | (v_4 | select(uint2(0u), uint2(1u), ((((((v >> v_1) >> v_2) >> v_3) >> v_4) & uint2(1u)) == uint2(0u))))))), uint2(4294967295u), (((((v >> v_1) >> v_2) >> v_3) >> v_4) == uint2(0u))));
+ int2 res = as_type<int2>(select((select(uint2(0u), uint2(16u), ((v & uint2(65535u)) == uint2(0u))) | (select(uint2(0u), uint2(8u), (((v >> select(uint2(0u), uint2(16u), ((v & uint2(65535u)) == uint2(0u)))) & uint2(255u)) == uint2(0u))) | (select(uint2(0u), uint2(4u), ((((v >> select(uint2(0u), uint2(16u), ((v & uint2(65535u)) == uint2(0u)))) >> select(uint2(0u), uint2(8u), (((v >> select(uint2(0u), uint2(16u), ((v & uint2(65535u)) == uint2(0u)))) & uint2(255u)) == uint2(0u)))) & uint2(15u)) == uint2(0u))) | (select(uint2(0u), uint2(2u), (((((v >> select(uint2(0u), uint2(16u), ((v & uint2(65535u)) == uint2(0u)))) >> select(uint2(0u), uint2(8u), (((v >> select(uint2(0u), uint2(16u), ((v & uint2(65535u)) == uint2(0u)))) & uint2(255u)) == uint2(0u)))) >> select(uint2(0u), uint2(4u), ((((v >> select(uint2(0u), uint2(16u), ((v & uint2(65535u)) == uint2(0u)))) >> select(uint2(0u), uint2(8u), (((v >> select(uint2(0u), uint2(16u), ((v & uint2(65535u)) == uint2(0u)))) & uint2(255u)) == uint2(0u)))) & uint2(15u)) == uint2(0u)))) & uint2(3u)) == uint2(0u))) | select(uint2(0u), uint2(1u), ((((((v >> select(uint2(0u), uint2(16u), ((v & uint2(65535u)) == uint2(0u)))) >> select(uint2(0u), uint2(8u), (((v >> select(uint2(0u), uint2(16u), ((v & uint2(65535u)) == uint2(0u)))) & uint2(255u)) == uint2(0u)))) >> select(uint2(0u), uint2(4u), ((((v >> select(uint2(0u), uint2(16u), ((v & uint2(65535u)) == uint2(0u)))) >> select(uint2(0u), uint2(8u), (((v >> select(uint2(0u), uint2(16u), ((v & uint2(65535u)) == uint2(0u)))) & uint2(255u)) == uint2(0u)))) & uint2(15u)) == uint2(0u)))) >> select(uint2(0u), uint2(2u), (((((v >> select(uint2(0u), uint2(16u), ((v & uint2(65535u)) == uint2(0u)))) >> select(uint2(0u), uint2(8u), (((v >> select(uint2(0u), uint2(16u), ((v & uint2(65535u)) == uint2(0u)))) & uint2(255u)) == uint2(0u)))) >> select(uint2(0u), uint2(4u), ((((v >> select(uint2(0u), uint2(16u), ((v & uint2(65535u)) == uint2(0u)))) >> select(uint2(0u), uint2(8u), (((v >> select(uint2(0u), uint2(16u), ((v & uint2(65535u)) == uint2(0u)))) & uint2(255u)) == uint2(0u)))) & uint2(15u)) == uint2(0u)))) & uint2(3u)) == uint2(0u)))) & uint2(1u)) == uint2(0u))))))), uint2(4294967295u), (((((v >> select(uint2(0u), uint2(16u), ((v & uint2(65535u)) == uint2(0u)))) >> select(uint2(0u), uint2(8u), (((v >> select(uint2(0u), uint2(16u), ((v & uint2(65535u)) == uint2(0u)))) & uint2(255u)) == uint2(0u)))) >> select(uint2(0u), uint2(4u), ((((v >> select(uint2(0u), uint2(16u), ((v & uint2(65535u)) == uint2(0u)))) >> select(uint2(0u), uint2(8u), (((v >> select(uint2(0u), uint2(16u), ((v & uint2(65535u)) == uint2(0u)))) & uint2(255u)) == uint2(0u)))) & uint2(15u)) == uint2(0u)))) >> select(uint2(0u), uint2(2u), (((((v >> select(uint2(0u), uint2(16u), ((v & uint2(65535u)) == uint2(0u)))) >> select(uint2(0u), uint2(8u), (((v >> select(uint2(0u), uint2(16u), ((v & uint2(65535u)) == uint2(0u)))) & uint2(255u)) == uint2(0u)))) >> select(uint2(0u), uint2(4u), ((((v >> select(uint2(0u), uint2(16u), ((v & uint2(65535u)) == uint2(0u)))) >> select(uint2(0u), uint2(8u), (((v >> select(uint2(0u), uint2(16u), ((v & uint2(65535u)) == uint2(0u)))) & uint2(255u)) == uint2(0u)))) & uint2(15u)) == uint2(0u)))) & uint2(3u)) == uint2(0u)))) == uint2(0u))));
return res;
}
@@ -44,9 +40,9 @@
}
vertex vertex_main_outputs vertex_main() {
- VertexOutput const v_5 = vertex_main_inner();
+ VertexOutput const v_1 = vertex_main_inner();
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_5.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_5.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v_1.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/firstTrailingBit/7496d6.wgsl.expected.glsl b/test/tint/builtins/gen/var/firstTrailingBit/7496d6.wgsl.expected.glsl
index 8087dc3..9a6c875 100644
--- a/test/tint/builtins/gen/var/firstTrailingBit/7496d6.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/firstTrailingBit/7496d6.wgsl.expected.glsl
@@ -9,12 +9,7 @@
ivec3 firstTrailingBit_7496d6() {
ivec3 arg_0 = ivec3(1);
uvec3 v_1 = uvec3(arg_0);
- uvec3 v_2 = mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)));
- uvec3 v_3 = mix(uvec3(0u), uvec3(8u), equal(((v_1 >> v_2) & uvec3(255u)), uvec3(0u)));
- uvec3 v_4 = mix(uvec3(0u), uvec3(4u), equal((((v_1 >> v_2) >> v_3) & uvec3(15u)), uvec3(0u)));
- uvec3 v_5 = mix(uvec3(0u), uvec3(2u), equal(((((v_1 >> v_2) >> v_3) >> v_4) & uvec3(3u)), uvec3(0u)));
- uvec3 v_6 = (v_2 | (v_3 | (v_4 | (v_5 | mix(uvec3(0u), uvec3(1u), equal((((((v_1 >> v_2) >> v_3) >> v_4) >> v_5) & uvec3(1u)), uvec3(0u)))))));
- ivec3 res = ivec3(mix(v_6, uvec3(4294967295u), equal(((((v_1 >> v_2) >> v_3) >> v_4) >> v_5), uvec3(0u))));
+ ivec3 res = ivec3(mix((mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u))) | (mix(uvec3(0u), uvec3(8u), equal(((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u))) | (mix(uvec3(0u), uvec3(4u), equal((((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(8u), equal(((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u)))) & uvec3(15u)), uvec3(0u))) | (mix(uvec3(0u), uvec3(2u), equal(((((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(8u), equal(((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(4u), equal((((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(8u), equal(((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u)))) & uvec3(15u)), uvec3(0u)))) & uvec3(3u)), uvec3(0u))) | mix(uvec3(0u), uvec3(1u), equal((((((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(8u), equal(((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(4u), equal((((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(8u), equal(((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u)))) & uvec3(15u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(2u), equal(((((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(8u), equal(((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(4u), equal((((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(8u), equal(((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u)))) & uvec3(15u)), uvec3(0u)))) & uvec3(3u)), uvec3(0u)))) & uvec3(1u)), uvec3(0u))))))), uvec3(4294967295u), equal(((((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(8u), equal(((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(4u), equal((((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(8u), equal(((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u)))) & uvec3(15u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(2u), equal(((((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(8u), equal(((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(4u), equal((((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(8u), equal(((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u)))) & uvec3(15u)), uvec3(0u)))) & uvec3(3u)), uvec3(0u)))), uvec3(0u))));
return res;
}
void main() {
@@ -29,12 +24,7 @@
ivec3 firstTrailingBit_7496d6() {
ivec3 arg_0 = ivec3(1);
uvec3 v_1 = uvec3(arg_0);
- uvec3 v_2 = mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)));
- uvec3 v_3 = mix(uvec3(0u), uvec3(8u), equal(((v_1 >> v_2) & uvec3(255u)), uvec3(0u)));
- uvec3 v_4 = mix(uvec3(0u), uvec3(4u), equal((((v_1 >> v_2) >> v_3) & uvec3(15u)), uvec3(0u)));
- uvec3 v_5 = mix(uvec3(0u), uvec3(2u), equal(((((v_1 >> v_2) >> v_3) >> v_4) & uvec3(3u)), uvec3(0u)));
- uvec3 v_6 = (v_2 | (v_3 | (v_4 | (v_5 | mix(uvec3(0u), uvec3(1u), equal((((((v_1 >> v_2) >> v_3) >> v_4) >> v_5) & uvec3(1u)), uvec3(0u)))))));
- ivec3 res = ivec3(mix(v_6, uvec3(4294967295u), equal(((((v_1 >> v_2) >> v_3) >> v_4) >> v_5), uvec3(0u))));
+ ivec3 res = ivec3(mix((mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u))) | (mix(uvec3(0u), uvec3(8u), equal(((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u))) | (mix(uvec3(0u), uvec3(4u), equal((((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(8u), equal(((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u)))) & uvec3(15u)), uvec3(0u))) | (mix(uvec3(0u), uvec3(2u), equal(((((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(8u), equal(((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(4u), equal((((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(8u), equal(((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u)))) & uvec3(15u)), uvec3(0u)))) & uvec3(3u)), uvec3(0u))) | mix(uvec3(0u), uvec3(1u), equal((((((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(8u), equal(((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(4u), equal((((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(8u), equal(((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u)))) & uvec3(15u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(2u), equal(((((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(8u), equal(((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(4u), equal((((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(8u), equal(((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u)))) & uvec3(15u)), uvec3(0u)))) & uvec3(3u)), uvec3(0u)))) & uvec3(1u)), uvec3(0u))))))), uvec3(4294967295u), equal(((((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(8u), equal(((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(4u), equal((((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(8u), equal(((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u)))) & uvec3(15u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(2u), equal(((((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(8u), equal(((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(4u), equal((((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(8u), equal(((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u)))) & uvec3(15u)), uvec3(0u)))) & uvec3(3u)), uvec3(0u)))), uvec3(0u))));
return res;
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
@@ -53,12 +43,7 @@
ivec3 firstTrailingBit_7496d6() {
ivec3 arg_0 = ivec3(1);
uvec3 v = uvec3(arg_0);
- uvec3 v_1 = mix(uvec3(0u), uvec3(16u), equal((v & uvec3(65535u)), uvec3(0u)));
- uvec3 v_2 = mix(uvec3(0u), uvec3(8u), equal(((v >> v_1) & uvec3(255u)), uvec3(0u)));
- uvec3 v_3 = mix(uvec3(0u), uvec3(4u), equal((((v >> v_1) >> v_2) & uvec3(15u)), uvec3(0u)));
- uvec3 v_4 = mix(uvec3(0u), uvec3(2u), equal(((((v >> v_1) >> v_2) >> v_3) & uvec3(3u)), uvec3(0u)));
- uvec3 v_5 = (v_1 | (v_2 | (v_3 | (v_4 | mix(uvec3(0u), uvec3(1u), equal((((((v >> v_1) >> v_2) >> v_3) >> v_4) & uvec3(1u)), uvec3(0u)))))));
- ivec3 res = ivec3(mix(v_5, uvec3(4294967295u), equal(((((v >> v_1) >> v_2) >> v_3) >> v_4), uvec3(0u))));
+ ivec3 res = ivec3(mix((mix(uvec3(0u), uvec3(16u), equal((v & uvec3(65535u)), uvec3(0u))) | (mix(uvec3(0u), uvec3(8u), equal(((v >> mix(uvec3(0u), uvec3(16u), equal((v & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u))) | (mix(uvec3(0u), uvec3(4u), equal((((v >> mix(uvec3(0u), uvec3(16u), equal((v & uvec3(65535u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(8u), equal(((v >> mix(uvec3(0u), uvec3(16u), equal((v & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u)))) & uvec3(15u)), uvec3(0u))) | (mix(uvec3(0u), uvec3(2u), equal(((((v >> mix(uvec3(0u), uvec3(16u), equal((v & uvec3(65535u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(8u), equal(((v >> mix(uvec3(0u), uvec3(16u), equal((v & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(4u), equal((((v >> mix(uvec3(0u), uvec3(16u), equal((v & uvec3(65535u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(8u), equal(((v >> mix(uvec3(0u), uvec3(16u), equal((v & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u)))) & uvec3(15u)), uvec3(0u)))) & uvec3(3u)), uvec3(0u))) | mix(uvec3(0u), uvec3(1u), equal((((((v >> mix(uvec3(0u), uvec3(16u), equal((v & uvec3(65535u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(8u), equal(((v >> mix(uvec3(0u), uvec3(16u), equal((v & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(4u), equal((((v >> mix(uvec3(0u), uvec3(16u), equal((v & uvec3(65535u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(8u), equal(((v >> mix(uvec3(0u), uvec3(16u), equal((v & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u)))) & uvec3(15u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(2u), equal(((((v >> mix(uvec3(0u), uvec3(16u), equal((v & uvec3(65535u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(8u), equal(((v >> mix(uvec3(0u), uvec3(16u), equal((v & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(4u), equal((((v >> mix(uvec3(0u), uvec3(16u), equal((v & uvec3(65535u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(8u), equal(((v >> mix(uvec3(0u), uvec3(16u), equal((v & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u)))) & uvec3(15u)), uvec3(0u)))) & uvec3(3u)), uvec3(0u)))) & uvec3(1u)), uvec3(0u))))))), uvec3(4294967295u), equal(((((v >> mix(uvec3(0u), uvec3(16u), equal((v & uvec3(65535u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(8u), equal(((v >> mix(uvec3(0u), uvec3(16u), equal((v & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(4u), equal((((v >> mix(uvec3(0u), uvec3(16u), equal((v & uvec3(65535u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(8u), equal(((v >> mix(uvec3(0u), uvec3(16u), equal((v & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u)))) & uvec3(15u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(2u), equal(((((v >> mix(uvec3(0u), uvec3(16u), equal((v & uvec3(65535u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(8u), equal(((v >> mix(uvec3(0u), uvec3(16u), equal((v & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(4u), equal((((v >> mix(uvec3(0u), uvec3(16u), equal((v & uvec3(65535u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(8u), equal(((v >> mix(uvec3(0u), uvec3(16u), equal((v & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u)))) & uvec3(15u)), uvec3(0u)))) & uvec3(3u)), uvec3(0u)))), uvec3(0u))));
return res;
}
VertexOutput vertex_main_inner() {
@@ -68,10 +53,10 @@
return tint_symbol;
}
void main() {
- VertexOutput v_6 = vertex_main_inner();
- gl_Position = v_6.pos;
+ VertexOutput v_1 = vertex_main_inner();
+ gl_Position = v_1.pos;
gl_Position[1u] = -(gl_Position.y);
gl_Position[2u] = ((2.0f * gl_Position.z) - gl_Position.w);
- vertex_main_loc0_Output = v_6.prevent_dce;
+ vertex_main_loc0_Output = v_1.prevent_dce;
gl_PointSize = 1.0f;
}
diff --git a/test/tint/builtins/gen/var/firstTrailingBit/7496d6.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/firstTrailingBit/7496d6.wgsl.expected.ir.msl
index 2ce73e1..2712228 100644
--- a/test/tint/builtins/gen/var/firstTrailingBit/7496d6.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/firstTrailingBit/7496d6.wgsl.expected.ir.msl
@@ -18,11 +18,7 @@
int3 firstTrailingBit_7496d6() {
int3 arg_0 = int3(1);
uint3 const v = as_type<uint3>(arg_0);
- uint3 const v_1 = select(uint3(0u), uint3(16u), ((v & uint3(65535u)) == uint3(0u)));
- uint3 const v_2 = select(uint3(0u), uint3(8u), (((v >> v_1) & uint3(255u)) == uint3(0u)));
- uint3 const v_3 = select(uint3(0u), uint3(4u), ((((v >> v_1) >> v_2) & uint3(15u)) == uint3(0u)));
- uint3 const v_4 = select(uint3(0u), uint3(2u), (((((v >> v_1) >> v_2) >> v_3) & uint3(3u)) == uint3(0u)));
- int3 res = as_type<int3>(select((v_1 | (v_2 | (v_3 | (v_4 | select(uint3(0u), uint3(1u), ((((((v >> v_1) >> v_2) >> v_3) >> v_4) & uint3(1u)) == uint3(0u))))))), uint3(4294967295u), (((((v >> v_1) >> v_2) >> v_3) >> v_4) == uint3(0u))));
+ int3 res = as_type<int3>(select((select(uint3(0u), uint3(16u), ((v & uint3(65535u)) == uint3(0u))) | (select(uint3(0u), uint3(8u), (((v >> select(uint3(0u), uint3(16u), ((v & uint3(65535u)) == uint3(0u)))) & uint3(255u)) == uint3(0u))) | (select(uint3(0u), uint3(4u), ((((v >> select(uint3(0u), uint3(16u), ((v & uint3(65535u)) == uint3(0u)))) >> select(uint3(0u), uint3(8u), (((v >> select(uint3(0u), uint3(16u), ((v & uint3(65535u)) == uint3(0u)))) & uint3(255u)) == uint3(0u)))) & uint3(15u)) == uint3(0u))) | (select(uint3(0u), uint3(2u), (((((v >> select(uint3(0u), uint3(16u), ((v & uint3(65535u)) == uint3(0u)))) >> select(uint3(0u), uint3(8u), (((v >> select(uint3(0u), uint3(16u), ((v & uint3(65535u)) == uint3(0u)))) & uint3(255u)) == uint3(0u)))) >> select(uint3(0u), uint3(4u), ((((v >> select(uint3(0u), uint3(16u), ((v & uint3(65535u)) == uint3(0u)))) >> select(uint3(0u), uint3(8u), (((v >> select(uint3(0u), uint3(16u), ((v & uint3(65535u)) == uint3(0u)))) & uint3(255u)) == uint3(0u)))) & uint3(15u)) == uint3(0u)))) & uint3(3u)) == uint3(0u))) | select(uint3(0u), uint3(1u), ((((((v >> select(uint3(0u), uint3(16u), ((v & uint3(65535u)) == uint3(0u)))) >> select(uint3(0u), uint3(8u), (((v >> select(uint3(0u), uint3(16u), ((v & uint3(65535u)) == uint3(0u)))) & uint3(255u)) == uint3(0u)))) >> select(uint3(0u), uint3(4u), ((((v >> select(uint3(0u), uint3(16u), ((v & uint3(65535u)) == uint3(0u)))) >> select(uint3(0u), uint3(8u), (((v >> select(uint3(0u), uint3(16u), ((v & uint3(65535u)) == uint3(0u)))) & uint3(255u)) == uint3(0u)))) & uint3(15u)) == uint3(0u)))) >> select(uint3(0u), uint3(2u), (((((v >> select(uint3(0u), uint3(16u), ((v & uint3(65535u)) == uint3(0u)))) >> select(uint3(0u), uint3(8u), (((v >> select(uint3(0u), uint3(16u), ((v & uint3(65535u)) == uint3(0u)))) & uint3(255u)) == uint3(0u)))) >> select(uint3(0u), uint3(4u), ((((v >> select(uint3(0u), uint3(16u), ((v & uint3(65535u)) == uint3(0u)))) >> select(uint3(0u), uint3(8u), (((v >> select(uint3(0u), uint3(16u), ((v & uint3(65535u)) == uint3(0u)))) & uint3(255u)) == uint3(0u)))) & uint3(15u)) == uint3(0u)))) & uint3(3u)) == uint3(0u)))) & uint3(1u)) == uint3(0u))))))), uint3(4294967295u), (((((v >> select(uint3(0u), uint3(16u), ((v & uint3(65535u)) == uint3(0u)))) >> select(uint3(0u), uint3(8u), (((v >> select(uint3(0u), uint3(16u), ((v & uint3(65535u)) == uint3(0u)))) & uint3(255u)) == uint3(0u)))) >> select(uint3(0u), uint3(4u), ((((v >> select(uint3(0u), uint3(16u), ((v & uint3(65535u)) == uint3(0u)))) >> select(uint3(0u), uint3(8u), (((v >> select(uint3(0u), uint3(16u), ((v & uint3(65535u)) == uint3(0u)))) & uint3(255u)) == uint3(0u)))) & uint3(15u)) == uint3(0u)))) >> select(uint3(0u), uint3(2u), (((((v >> select(uint3(0u), uint3(16u), ((v & uint3(65535u)) == uint3(0u)))) >> select(uint3(0u), uint3(8u), (((v >> select(uint3(0u), uint3(16u), ((v & uint3(65535u)) == uint3(0u)))) & uint3(255u)) == uint3(0u)))) >> select(uint3(0u), uint3(4u), ((((v >> select(uint3(0u), uint3(16u), ((v & uint3(65535u)) == uint3(0u)))) >> select(uint3(0u), uint3(8u), (((v >> select(uint3(0u), uint3(16u), ((v & uint3(65535u)) == uint3(0u)))) & uint3(255u)) == uint3(0u)))) & uint3(15u)) == uint3(0u)))) & uint3(3u)) == uint3(0u)))) == uint3(0u))));
return res;
}
@@ -44,9 +40,9 @@
}
vertex vertex_main_outputs vertex_main() {
- VertexOutput const v_5 = vertex_main_inner();
+ VertexOutput const v_1 = vertex_main_inner();
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_5.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_5.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v_1.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/firstTrailingBit/86551b.wgsl.expected.glsl b/test/tint/builtins/gen/var/firstTrailingBit/86551b.wgsl.expected.glsl
index d79eba6..452e256 100644
--- a/test/tint/builtins/gen/var/firstTrailingBit/86551b.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/firstTrailingBit/86551b.wgsl.expected.glsl
@@ -9,12 +9,7 @@
ivec4 firstTrailingBit_86551b() {
ivec4 arg_0 = ivec4(1);
uvec4 v_1 = uvec4(arg_0);
- uvec4 v_2 = mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)));
- uvec4 v_3 = mix(uvec4(0u), uvec4(8u), equal(((v_1 >> v_2) & uvec4(255u)), uvec4(0u)));
- uvec4 v_4 = mix(uvec4(0u), uvec4(4u), equal((((v_1 >> v_2) >> v_3) & uvec4(15u)), uvec4(0u)));
- uvec4 v_5 = mix(uvec4(0u), uvec4(2u), equal(((((v_1 >> v_2) >> v_3) >> v_4) & uvec4(3u)), uvec4(0u)));
- uvec4 v_6 = (v_2 | (v_3 | (v_4 | (v_5 | mix(uvec4(0u), uvec4(1u), equal((((((v_1 >> v_2) >> v_3) >> v_4) >> v_5) & uvec4(1u)), uvec4(0u)))))));
- ivec4 res = ivec4(mix(v_6, uvec4(4294967295u), equal(((((v_1 >> v_2) >> v_3) >> v_4) >> v_5), uvec4(0u))));
+ ivec4 res = ivec4(mix((mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u))) | (mix(uvec4(0u), uvec4(8u), equal(((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u))) | (mix(uvec4(0u), uvec4(4u), equal((((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(8u), equal(((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u)))) & uvec4(15u)), uvec4(0u))) | (mix(uvec4(0u), uvec4(2u), equal(((((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(8u), equal(((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(4u), equal((((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(8u), equal(((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u)))) & uvec4(15u)), uvec4(0u)))) & uvec4(3u)), uvec4(0u))) | mix(uvec4(0u), uvec4(1u), equal((((((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(8u), equal(((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(4u), equal((((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(8u), equal(((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u)))) & uvec4(15u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(2u), equal(((((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(8u), equal(((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(4u), equal((((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(8u), equal(((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u)))) & uvec4(15u)), uvec4(0u)))) & uvec4(3u)), uvec4(0u)))) & uvec4(1u)), uvec4(0u))))))), uvec4(4294967295u), equal(((((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(8u), equal(((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(4u), equal((((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(8u), equal(((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u)))) & uvec4(15u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(2u), equal(((((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(8u), equal(((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(4u), equal((((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(8u), equal(((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u)))) & uvec4(15u)), uvec4(0u)))) & uvec4(3u)), uvec4(0u)))), uvec4(0u))));
return res;
}
void main() {
@@ -29,12 +24,7 @@
ivec4 firstTrailingBit_86551b() {
ivec4 arg_0 = ivec4(1);
uvec4 v_1 = uvec4(arg_0);
- uvec4 v_2 = mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)));
- uvec4 v_3 = mix(uvec4(0u), uvec4(8u), equal(((v_1 >> v_2) & uvec4(255u)), uvec4(0u)));
- uvec4 v_4 = mix(uvec4(0u), uvec4(4u), equal((((v_1 >> v_2) >> v_3) & uvec4(15u)), uvec4(0u)));
- uvec4 v_5 = mix(uvec4(0u), uvec4(2u), equal(((((v_1 >> v_2) >> v_3) >> v_4) & uvec4(3u)), uvec4(0u)));
- uvec4 v_6 = (v_2 | (v_3 | (v_4 | (v_5 | mix(uvec4(0u), uvec4(1u), equal((((((v_1 >> v_2) >> v_3) >> v_4) >> v_5) & uvec4(1u)), uvec4(0u)))))));
- ivec4 res = ivec4(mix(v_6, uvec4(4294967295u), equal(((((v_1 >> v_2) >> v_3) >> v_4) >> v_5), uvec4(0u))));
+ ivec4 res = ivec4(mix((mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u))) | (mix(uvec4(0u), uvec4(8u), equal(((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u))) | (mix(uvec4(0u), uvec4(4u), equal((((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(8u), equal(((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u)))) & uvec4(15u)), uvec4(0u))) | (mix(uvec4(0u), uvec4(2u), equal(((((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(8u), equal(((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(4u), equal((((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(8u), equal(((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u)))) & uvec4(15u)), uvec4(0u)))) & uvec4(3u)), uvec4(0u))) | mix(uvec4(0u), uvec4(1u), equal((((((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(8u), equal(((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(4u), equal((((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(8u), equal(((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u)))) & uvec4(15u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(2u), equal(((((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(8u), equal(((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(4u), equal((((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(8u), equal(((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u)))) & uvec4(15u)), uvec4(0u)))) & uvec4(3u)), uvec4(0u)))) & uvec4(1u)), uvec4(0u))))))), uvec4(4294967295u), equal(((((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(8u), equal(((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(4u), equal((((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(8u), equal(((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u)))) & uvec4(15u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(2u), equal(((((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(8u), equal(((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(4u), equal((((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(8u), equal(((v_1 >> mix(uvec4(0u), uvec4(16u), equal((v_1 & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u)))) & uvec4(15u)), uvec4(0u)))) & uvec4(3u)), uvec4(0u)))), uvec4(0u))));
return res;
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
@@ -53,12 +43,7 @@
ivec4 firstTrailingBit_86551b() {
ivec4 arg_0 = ivec4(1);
uvec4 v = uvec4(arg_0);
- uvec4 v_1 = mix(uvec4(0u), uvec4(16u), equal((v & uvec4(65535u)), uvec4(0u)));
- uvec4 v_2 = mix(uvec4(0u), uvec4(8u), equal(((v >> v_1) & uvec4(255u)), uvec4(0u)));
- uvec4 v_3 = mix(uvec4(0u), uvec4(4u), equal((((v >> v_1) >> v_2) & uvec4(15u)), uvec4(0u)));
- uvec4 v_4 = mix(uvec4(0u), uvec4(2u), equal(((((v >> v_1) >> v_2) >> v_3) & uvec4(3u)), uvec4(0u)));
- uvec4 v_5 = (v_1 | (v_2 | (v_3 | (v_4 | mix(uvec4(0u), uvec4(1u), equal((((((v >> v_1) >> v_2) >> v_3) >> v_4) & uvec4(1u)), uvec4(0u)))))));
- ivec4 res = ivec4(mix(v_5, uvec4(4294967295u), equal(((((v >> v_1) >> v_2) >> v_3) >> v_4), uvec4(0u))));
+ ivec4 res = ivec4(mix((mix(uvec4(0u), uvec4(16u), equal((v & uvec4(65535u)), uvec4(0u))) | (mix(uvec4(0u), uvec4(8u), equal(((v >> mix(uvec4(0u), uvec4(16u), equal((v & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u))) | (mix(uvec4(0u), uvec4(4u), equal((((v >> mix(uvec4(0u), uvec4(16u), equal((v & uvec4(65535u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(8u), equal(((v >> mix(uvec4(0u), uvec4(16u), equal((v & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u)))) & uvec4(15u)), uvec4(0u))) | (mix(uvec4(0u), uvec4(2u), equal(((((v >> mix(uvec4(0u), uvec4(16u), equal((v & uvec4(65535u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(8u), equal(((v >> mix(uvec4(0u), uvec4(16u), equal((v & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(4u), equal((((v >> mix(uvec4(0u), uvec4(16u), equal((v & uvec4(65535u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(8u), equal(((v >> mix(uvec4(0u), uvec4(16u), equal((v & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u)))) & uvec4(15u)), uvec4(0u)))) & uvec4(3u)), uvec4(0u))) | mix(uvec4(0u), uvec4(1u), equal((((((v >> mix(uvec4(0u), uvec4(16u), equal((v & uvec4(65535u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(8u), equal(((v >> mix(uvec4(0u), uvec4(16u), equal((v & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(4u), equal((((v >> mix(uvec4(0u), uvec4(16u), equal((v & uvec4(65535u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(8u), equal(((v >> mix(uvec4(0u), uvec4(16u), equal((v & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u)))) & uvec4(15u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(2u), equal(((((v >> mix(uvec4(0u), uvec4(16u), equal((v & uvec4(65535u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(8u), equal(((v >> mix(uvec4(0u), uvec4(16u), equal((v & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(4u), equal((((v >> mix(uvec4(0u), uvec4(16u), equal((v & uvec4(65535u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(8u), equal(((v >> mix(uvec4(0u), uvec4(16u), equal((v & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u)))) & uvec4(15u)), uvec4(0u)))) & uvec4(3u)), uvec4(0u)))) & uvec4(1u)), uvec4(0u))))))), uvec4(4294967295u), equal(((((v >> mix(uvec4(0u), uvec4(16u), equal((v & uvec4(65535u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(8u), equal(((v >> mix(uvec4(0u), uvec4(16u), equal((v & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(4u), equal((((v >> mix(uvec4(0u), uvec4(16u), equal((v & uvec4(65535u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(8u), equal(((v >> mix(uvec4(0u), uvec4(16u), equal((v & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u)))) & uvec4(15u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(2u), equal(((((v >> mix(uvec4(0u), uvec4(16u), equal((v & uvec4(65535u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(8u), equal(((v >> mix(uvec4(0u), uvec4(16u), equal((v & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(4u), equal((((v >> mix(uvec4(0u), uvec4(16u), equal((v & uvec4(65535u)), uvec4(0u)))) >> mix(uvec4(0u), uvec4(8u), equal(((v >> mix(uvec4(0u), uvec4(16u), equal((v & uvec4(65535u)), uvec4(0u)))) & uvec4(255u)), uvec4(0u)))) & uvec4(15u)), uvec4(0u)))) & uvec4(3u)), uvec4(0u)))), uvec4(0u))));
return res;
}
VertexOutput vertex_main_inner() {
@@ -68,10 +53,10 @@
return tint_symbol;
}
void main() {
- VertexOutput v_6 = vertex_main_inner();
- gl_Position = v_6.pos;
+ VertexOutput v_1 = vertex_main_inner();
+ gl_Position = v_1.pos;
gl_Position[1u] = -(gl_Position.y);
gl_Position[2u] = ((2.0f * gl_Position.z) - gl_Position.w);
- vertex_main_loc0_Output = v_6.prevent_dce;
+ vertex_main_loc0_Output = v_1.prevent_dce;
gl_PointSize = 1.0f;
}
diff --git a/test/tint/builtins/gen/var/firstTrailingBit/86551b.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/firstTrailingBit/86551b.wgsl.expected.ir.msl
index 2d8416c..b0d901e 100644
--- a/test/tint/builtins/gen/var/firstTrailingBit/86551b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/firstTrailingBit/86551b.wgsl.expected.ir.msl
@@ -18,11 +18,7 @@
int4 firstTrailingBit_86551b() {
int4 arg_0 = int4(1);
uint4 const v = as_type<uint4>(arg_0);
- uint4 const v_1 = select(uint4(0u), uint4(16u), ((v & uint4(65535u)) == uint4(0u)));
- uint4 const v_2 = select(uint4(0u), uint4(8u), (((v >> v_1) & uint4(255u)) == uint4(0u)));
- uint4 const v_3 = select(uint4(0u), uint4(4u), ((((v >> v_1) >> v_2) & uint4(15u)) == uint4(0u)));
- uint4 const v_4 = select(uint4(0u), uint4(2u), (((((v >> v_1) >> v_2) >> v_3) & uint4(3u)) == uint4(0u)));
- int4 res = as_type<int4>(select((v_1 | (v_2 | (v_3 | (v_4 | select(uint4(0u), uint4(1u), ((((((v >> v_1) >> v_2) >> v_3) >> v_4) & uint4(1u)) == uint4(0u))))))), uint4(4294967295u), (((((v >> v_1) >> v_2) >> v_3) >> v_4) == uint4(0u))));
+ int4 res = as_type<int4>(select((select(uint4(0u), uint4(16u), ((v & uint4(65535u)) == uint4(0u))) | (select(uint4(0u), uint4(8u), (((v >> select(uint4(0u), uint4(16u), ((v & uint4(65535u)) == uint4(0u)))) & uint4(255u)) == uint4(0u))) | (select(uint4(0u), uint4(4u), ((((v >> select(uint4(0u), uint4(16u), ((v & uint4(65535u)) == uint4(0u)))) >> select(uint4(0u), uint4(8u), (((v >> select(uint4(0u), uint4(16u), ((v & uint4(65535u)) == uint4(0u)))) & uint4(255u)) == uint4(0u)))) & uint4(15u)) == uint4(0u))) | (select(uint4(0u), uint4(2u), (((((v >> select(uint4(0u), uint4(16u), ((v & uint4(65535u)) == uint4(0u)))) >> select(uint4(0u), uint4(8u), (((v >> select(uint4(0u), uint4(16u), ((v & uint4(65535u)) == uint4(0u)))) & uint4(255u)) == uint4(0u)))) >> select(uint4(0u), uint4(4u), ((((v >> select(uint4(0u), uint4(16u), ((v & uint4(65535u)) == uint4(0u)))) >> select(uint4(0u), uint4(8u), (((v >> select(uint4(0u), uint4(16u), ((v & uint4(65535u)) == uint4(0u)))) & uint4(255u)) == uint4(0u)))) & uint4(15u)) == uint4(0u)))) & uint4(3u)) == uint4(0u))) | select(uint4(0u), uint4(1u), ((((((v >> select(uint4(0u), uint4(16u), ((v & uint4(65535u)) == uint4(0u)))) >> select(uint4(0u), uint4(8u), (((v >> select(uint4(0u), uint4(16u), ((v & uint4(65535u)) == uint4(0u)))) & uint4(255u)) == uint4(0u)))) >> select(uint4(0u), uint4(4u), ((((v >> select(uint4(0u), uint4(16u), ((v & uint4(65535u)) == uint4(0u)))) >> select(uint4(0u), uint4(8u), (((v >> select(uint4(0u), uint4(16u), ((v & uint4(65535u)) == uint4(0u)))) & uint4(255u)) == uint4(0u)))) & uint4(15u)) == uint4(0u)))) >> select(uint4(0u), uint4(2u), (((((v >> select(uint4(0u), uint4(16u), ((v & uint4(65535u)) == uint4(0u)))) >> select(uint4(0u), uint4(8u), (((v >> select(uint4(0u), uint4(16u), ((v & uint4(65535u)) == uint4(0u)))) & uint4(255u)) == uint4(0u)))) >> select(uint4(0u), uint4(4u), ((((v >> select(uint4(0u), uint4(16u), ((v & uint4(65535u)) == uint4(0u)))) >> select(uint4(0u), uint4(8u), (((v >> select(uint4(0u), uint4(16u), ((v & uint4(65535u)) == uint4(0u)))) & uint4(255u)) == uint4(0u)))) & uint4(15u)) == uint4(0u)))) & uint4(3u)) == uint4(0u)))) & uint4(1u)) == uint4(0u))))))), uint4(4294967295u), (((((v >> select(uint4(0u), uint4(16u), ((v & uint4(65535u)) == uint4(0u)))) >> select(uint4(0u), uint4(8u), (((v >> select(uint4(0u), uint4(16u), ((v & uint4(65535u)) == uint4(0u)))) & uint4(255u)) == uint4(0u)))) >> select(uint4(0u), uint4(4u), ((((v >> select(uint4(0u), uint4(16u), ((v & uint4(65535u)) == uint4(0u)))) >> select(uint4(0u), uint4(8u), (((v >> select(uint4(0u), uint4(16u), ((v & uint4(65535u)) == uint4(0u)))) & uint4(255u)) == uint4(0u)))) & uint4(15u)) == uint4(0u)))) >> select(uint4(0u), uint4(2u), (((((v >> select(uint4(0u), uint4(16u), ((v & uint4(65535u)) == uint4(0u)))) >> select(uint4(0u), uint4(8u), (((v >> select(uint4(0u), uint4(16u), ((v & uint4(65535u)) == uint4(0u)))) & uint4(255u)) == uint4(0u)))) >> select(uint4(0u), uint4(4u), ((((v >> select(uint4(0u), uint4(16u), ((v & uint4(65535u)) == uint4(0u)))) >> select(uint4(0u), uint4(8u), (((v >> select(uint4(0u), uint4(16u), ((v & uint4(65535u)) == uint4(0u)))) & uint4(255u)) == uint4(0u)))) & uint4(15u)) == uint4(0u)))) & uint4(3u)) == uint4(0u)))) == uint4(0u))));
return res;
}
@@ -44,9 +40,9 @@
}
vertex vertex_main_outputs vertex_main() {
- VertexOutput const v_5 = vertex_main_inner();
+ VertexOutput const v_1 = vertex_main_inner();
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_5.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_5.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v_1.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/firstTrailingBit/cb51ce.wgsl.expected.glsl b/test/tint/builtins/gen/var/firstTrailingBit/cb51ce.wgsl.expected.glsl
index f73da10..a074186 100644
--- a/test/tint/builtins/gen/var/firstTrailingBit/cb51ce.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/firstTrailingBit/cb51ce.wgsl.expected.glsl
@@ -9,12 +9,7 @@
uvec3 firstTrailingBit_cb51ce() {
uvec3 arg_0 = uvec3(1u);
uvec3 v_1 = arg_0;
- uvec3 v_2 = mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)));
- uvec3 v_3 = mix(uvec3(0u), uvec3(8u), equal(((v_1 >> v_2) & uvec3(255u)), uvec3(0u)));
- uvec3 v_4 = mix(uvec3(0u), uvec3(4u), equal((((v_1 >> v_2) >> v_3) & uvec3(15u)), uvec3(0u)));
- uvec3 v_5 = mix(uvec3(0u), uvec3(2u), equal(((((v_1 >> v_2) >> v_3) >> v_4) & uvec3(3u)), uvec3(0u)));
- uvec3 v_6 = (v_2 | (v_3 | (v_4 | (v_5 | mix(uvec3(0u), uvec3(1u), equal((((((v_1 >> v_2) >> v_3) >> v_4) >> v_5) & uvec3(1u)), uvec3(0u)))))));
- uvec3 res = mix(v_6, uvec3(4294967295u), equal(((((v_1 >> v_2) >> v_3) >> v_4) >> v_5), uvec3(0u)));
+ uvec3 res = mix((mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u))) | (mix(uvec3(0u), uvec3(8u), equal(((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u))) | (mix(uvec3(0u), uvec3(4u), equal((((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(8u), equal(((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u)))) & uvec3(15u)), uvec3(0u))) | (mix(uvec3(0u), uvec3(2u), equal(((((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(8u), equal(((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(4u), equal((((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(8u), equal(((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u)))) & uvec3(15u)), uvec3(0u)))) & uvec3(3u)), uvec3(0u))) | mix(uvec3(0u), uvec3(1u), equal((((((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(8u), equal(((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(4u), equal((((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(8u), equal(((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u)))) & uvec3(15u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(2u), equal(((((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(8u), equal(((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(4u), equal((((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(8u), equal(((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u)))) & uvec3(15u)), uvec3(0u)))) & uvec3(3u)), uvec3(0u)))) & uvec3(1u)), uvec3(0u))))))), uvec3(4294967295u), equal(((((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(8u), equal(((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(4u), equal((((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(8u), equal(((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u)))) & uvec3(15u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(2u), equal(((((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(8u), equal(((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(4u), equal((((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(8u), equal(((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u)))) & uvec3(15u)), uvec3(0u)))) & uvec3(3u)), uvec3(0u)))), uvec3(0u)));
return res;
}
void main() {
@@ -29,12 +24,7 @@
uvec3 firstTrailingBit_cb51ce() {
uvec3 arg_0 = uvec3(1u);
uvec3 v_1 = arg_0;
- uvec3 v_2 = mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)));
- uvec3 v_3 = mix(uvec3(0u), uvec3(8u), equal(((v_1 >> v_2) & uvec3(255u)), uvec3(0u)));
- uvec3 v_4 = mix(uvec3(0u), uvec3(4u), equal((((v_1 >> v_2) >> v_3) & uvec3(15u)), uvec3(0u)));
- uvec3 v_5 = mix(uvec3(0u), uvec3(2u), equal(((((v_1 >> v_2) >> v_3) >> v_4) & uvec3(3u)), uvec3(0u)));
- uvec3 v_6 = (v_2 | (v_3 | (v_4 | (v_5 | mix(uvec3(0u), uvec3(1u), equal((((((v_1 >> v_2) >> v_3) >> v_4) >> v_5) & uvec3(1u)), uvec3(0u)))))));
- uvec3 res = mix(v_6, uvec3(4294967295u), equal(((((v_1 >> v_2) >> v_3) >> v_4) >> v_5), uvec3(0u)));
+ uvec3 res = mix((mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u))) | (mix(uvec3(0u), uvec3(8u), equal(((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u))) | (mix(uvec3(0u), uvec3(4u), equal((((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(8u), equal(((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u)))) & uvec3(15u)), uvec3(0u))) | (mix(uvec3(0u), uvec3(2u), equal(((((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(8u), equal(((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(4u), equal((((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(8u), equal(((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u)))) & uvec3(15u)), uvec3(0u)))) & uvec3(3u)), uvec3(0u))) | mix(uvec3(0u), uvec3(1u), equal((((((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(8u), equal(((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(4u), equal((((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(8u), equal(((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u)))) & uvec3(15u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(2u), equal(((((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(8u), equal(((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(4u), equal((((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(8u), equal(((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u)))) & uvec3(15u)), uvec3(0u)))) & uvec3(3u)), uvec3(0u)))) & uvec3(1u)), uvec3(0u))))))), uvec3(4294967295u), equal(((((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(8u), equal(((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(4u), equal((((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(8u), equal(((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u)))) & uvec3(15u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(2u), equal(((((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(8u), equal(((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(4u), equal((((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(8u), equal(((v_1 >> mix(uvec3(0u), uvec3(16u), equal((v_1 & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u)))) & uvec3(15u)), uvec3(0u)))) & uvec3(3u)), uvec3(0u)))), uvec3(0u)));
return res;
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
@@ -53,12 +43,7 @@
uvec3 firstTrailingBit_cb51ce() {
uvec3 arg_0 = uvec3(1u);
uvec3 v = arg_0;
- uvec3 v_1 = mix(uvec3(0u), uvec3(16u), equal((v & uvec3(65535u)), uvec3(0u)));
- uvec3 v_2 = mix(uvec3(0u), uvec3(8u), equal(((v >> v_1) & uvec3(255u)), uvec3(0u)));
- uvec3 v_3 = mix(uvec3(0u), uvec3(4u), equal((((v >> v_1) >> v_2) & uvec3(15u)), uvec3(0u)));
- uvec3 v_4 = mix(uvec3(0u), uvec3(2u), equal(((((v >> v_1) >> v_2) >> v_3) & uvec3(3u)), uvec3(0u)));
- uvec3 v_5 = (v_1 | (v_2 | (v_3 | (v_4 | mix(uvec3(0u), uvec3(1u), equal((((((v >> v_1) >> v_2) >> v_3) >> v_4) & uvec3(1u)), uvec3(0u)))))));
- uvec3 res = mix(v_5, uvec3(4294967295u), equal(((((v >> v_1) >> v_2) >> v_3) >> v_4), uvec3(0u)));
+ uvec3 res = mix((mix(uvec3(0u), uvec3(16u), equal((v & uvec3(65535u)), uvec3(0u))) | (mix(uvec3(0u), uvec3(8u), equal(((v >> mix(uvec3(0u), uvec3(16u), equal((v & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u))) | (mix(uvec3(0u), uvec3(4u), equal((((v >> mix(uvec3(0u), uvec3(16u), equal((v & uvec3(65535u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(8u), equal(((v >> mix(uvec3(0u), uvec3(16u), equal((v & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u)))) & uvec3(15u)), uvec3(0u))) | (mix(uvec3(0u), uvec3(2u), equal(((((v >> mix(uvec3(0u), uvec3(16u), equal((v & uvec3(65535u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(8u), equal(((v >> mix(uvec3(0u), uvec3(16u), equal((v & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(4u), equal((((v >> mix(uvec3(0u), uvec3(16u), equal((v & uvec3(65535u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(8u), equal(((v >> mix(uvec3(0u), uvec3(16u), equal((v & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u)))) & uvec3(15u)), uvec3(0u)))) & uvec3(3u)), uvec3(0u))) | mix(uvec3(0u), uvec3(1u), equal((((((v >> mix(uvec3(0u), uvec3(16u), equal((v & uvec3(65535u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(8u), equal(((v >> mix(uvec3(0u), uvec3(16u), equal((v & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(4u), equal((((v >> mix(uvec3(0u), uvec3(16u), equal((v & uvec3(65535u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(8u), equal(((v >> mix(uvec3(0u), uvec3(16u), equal((v & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u)))) & uvec3(15u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(2u), equal(((((v >> mix(uvec3(0u), uvec3(16u), equal((v & uvec3(65535u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(8u), equal(((v >> mix(uvec3(0u), uvec3(16u), equal((v & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(4u), equal((((v >> mix(uvec3(0u), uvec3(16u), equal((v & uvec3(65535u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(8u), equal(((v >> mix(uvec3(0u), uvec3(16u), equal((v & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u)))) & uvec3(15u)), uvec3(0u)))) & uvec3(3u)), uvec3(0u)))) & uvec3(1u)), uvec3(0u))))))), uvec3(4294967295u), equal(((((v >> mix(uvec3(0u), uvec3(16u), equal((v & uvec3(65535u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(8u), equal(((v >> mix(uvec3(0u), uvec3(16u), equal((v & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(4u), equal((((v >> mix(uvec3(0u), uvec3(16u), equal((v & uvec3(65535u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(8u), equal(((v >> mix(uvec3(0u), uvec3(16u), equal((v & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u)))) & uvec3(15u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(2u), equal(((((v >> mix(uvec3(0u), uvec3(16u), equal((v & uvec3(65535u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(8u), equal(((v >> mix(uvec3(0u), uvec3(16u), equal((v & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(4u), equal((((v >> mix(uvec3(0u), uvec3(16u), equal((v & uvec3(65535u)), uvec3(0u)))) >> mix(uvec3(0u), uvec3(8u), equal(((v >> mix(uvec3(0u), uvec3(16u), equal((v & uvec3(65535u)), uvec3(0u)))) & uvec3(255u)), uvec3(0u)))) & uvec3(15u)), uvec3(0u)))) & uvec3(3u)), uvec3(0u)))), uvec3(0u)));
return res;
}
VertexOutput vertex_main_inner() {
@@ -68,10 +53,10 @@
return tint_symbol;
}
void main() {
- VertexOutput v_6 = vertex_main_inner();
- gl_Position = v_6.pos;
+ VertexOutput v_1 = vertex_main_inner();
+ gl_Position = v_1.pos;
gl_Position[1u] = -(gl_Position.y);
gl_Position[2u] = ((2.0f * gl_Position.z) - gl_Position.w);
- vertex_main_loc0_Output = v_6.prevent_dce;
+ vertex_main_loc0_Output = v_1.prevent_dce;
gl_PointSize = 1.0f;
}
diff --git a/test/tint/builtins/gen/var/firstTrailingBit/cb51ce.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/firstTrailingBit/cb51ce.wgsl.expected.ir.msl
index 3edf460..29b42cf 100644
--- a/test/tint/builtins/gen/var/firstTrailingBit/cb51ce.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/firstTrailingBit/cb51ce.wgsl.expected.ir.msl
@@ -18,11 +18,7 @@
uint3 firstTrailingBit_cb51ce() {
uint3 arg_0 = uint3(1u);
uint3 const v = arg_0;
- uint3 const v_1 = select(uint3(0u), uint3(16u), ((v & uint3(65535u)) == uint3(0u)));
- uint3 const v_2 = select(uint3(0u), uint3(8u), (((v >> v_1) & uint3(255u)) == uint3(0u)));
- uint3 const v_3 = select(uint3(0u), uint3(4u), ((((v >> v_1) >> v_2) & uint3(15u)) == uint3(0u)));
- uint3 const v_4 = select(uint3(0u), uint3(2u), (((((v >> v_1) >> v_2) >> v_3) & uint3(3u)) == uint3(0u)));
- uint3 res = select((v_1 | (v_2 | (v_3 | (v_4 | select(uint3(0u), uint3(1u), ((((((v >> v_1) >> v_2) >> v_3) >> v_4) & uint3(1u)) == uint3(0u))))))), uint3(4294967295u), (((((v >> v_1) >> v_2) >> v_3) >> v_4) == uint3(0u)));
+ uint3 res = select((select(uint3(0u), uint3(16u), ((v & uint3(65535u)) == uint3(0u))) | (select(uint3(0u), uint3(8u), (((v >> select(uint3(0u), uint3(16u), ((v & uint3(65535u)) == uint3(0u)))) & uint3(255u)) == uint3(0u))) | (select(uint3(0u), uint3(4u), ((((v >> select(uint3(0u), uint3(16u), ((v & uint3(65535u)) == uint3(0u)))) >> select(uint3(0u), uint3(8u), (((v >> select(uint3(0u), uint3(16u), ((v & uint3(65535u)) == uint3(0u)))) & uint3(255u)) == uint3(0u)))) & uint3(15u)) == uint3(0u))) | (select(uint3(0u), uint3(2u), (((((v >> select(uint3(0u), uint3(16u), ((v & uint3(65535u)) == uint3(0u)))) >> select(uint3(0u), uint3(8u), (((v >> select(uint3(0u), uint3(16u), ((v & uint3(65535u)) == uint3(0u)))) & uint3(255u)) == uint3(0u)))) >> select(uint3(0u), uint3(4u), ((((v >> select(uint3(0u), uint3(16u), ((v & uint3(65535u)) == uint3(0u)))) >> select(uint3(0u), uint3(8u), (((v >> select(uint3(0u), uint3(16u), ((v & uint3(65535u)) == uint3(0u)))) & uint3(255u)) == uint3(0u)))) & uint3(15u)) == uint3(0u)))) & uint3(3u)) == uint3(0u))) | select(uint3(0u), uint3(1u), ((((((v >> select(uint3(0u), uint3(16u), ((v & uint3(65535u)) == uint3(0u)))) >> select(uint3(0u), uint3(8u), (((v >> select(uint3(0u), uint3(16u), ((v & uint3(65535u)) == uint3(0u)))) & uint3(255u)) == uint3(0u)))) >> select(uint3(0u), uint3(4u), ((((v >> select(uint3(0u), uint3(16u), ((v & uint3(65535u)) == uint3(0u)))) >> select(uint3(0u), uint3(8u), (((v >> select(uint3(0u), uint3(16u), ((v & uint3(65535u)) == uint3(0u)))) & uint3(255u)) == uint3(0u)))) & uint3(15u)) == uint3(0u)))) >> select(uint3(0u), uint3(2u), (((((v >> select(uint3(0u), uint3(16u), ((v & uint3(65535u)) == uint3(0u)))) >> select(uint3(0u), uint3(8u), (((v >> select(uint3(0u), uint3(16u), ((v & uint3(65535u)) == uint3(0u)))) & uint3(255u)) == uint3(0u)))) >> select(uint3(0u), uint3(4u), ((((v >> select(uint3(0u), uint3(16u), ((v & uint3(65535u)) == uint3(0u)))) >> select(uint3(0u), uint3(8u), (((v >> select(uint3(0u), uint3(16u), ((v & uint3(65535u)) == uint3(0u)))) & uint3(255u)) == uint3(0u)))) & uint3(15u)) == uint3(0u)))) & uint3(3u)) == uint3(0u)))) & uint3(1u)) == uint3(0u))))))), uint3(4294967295u), (((((v >> select(uint3(0u), uint3(16u), ((v & uint3(65535u)) == uint3(0u)))) >> select(uint3(0u), uint3(8u), (((v >> select(uint3(0u), uint3(16u), ((v & uint3(65535u)) == uint3(0u)))) & uint3(255u)) == uint3(0u)))) >> select(uint3(0u), uint3(4u), ((((v >> select(uint3(0u), uint3(16u), ((v & uint3(65535u)) == uint3(0u)))) >> select(uint3(0u), uint3(8u), (((v >> select(uint3(0u), uint3(16u), ((v & uint3(65535u)) == uint3(0u)))) & uint3(255u)) == uint3(0u)))) & uint3(15u)) == uint3(0u)))) >> select(uint3(0u), uint3(2u), (((((v >> select(uint3(0u), uint3(16u), ((v & uint3(65535u)) == uint3(0u)))) >> select(uint3(0u), uint3(8u), (((v >> select(uint3(0u), uint3(16u), ((v & uint3(65535u)) == uint3(0u)))) & uint3(255u)) == uint3(0u)))) >> select(uint3(0u), uint3(4u), ((((v >> select(uint3(0u), uint3(16u), ((v & uint3(65535u)) == uint3(0u)))) >> select(uint3(0u), uint3(8u), (((v >> select(uint3(0u), uint3(16u), ((v & uint3(65535u)) == uint3(0u)))) & uint3(255u)) == uint3(0u)))) & uint3(15u)) == uint3(0u)))) & uint3(3u)) == uint3(0u)))) == uint3(0u)));
return res;
}
@@ -44,9 +40,9 @@
}
vertex vertex_main_outputs vertex_main() {
- VertexOutput const v_5 = vertex_main_inner();
+ VertexOutput const v_1 = vertex_main_inner();
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_5.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_5.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v_1.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/fwidthFine/523fdc.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/gen/var/fwidthFine/523fdc.wgsl.expected.ir.dxc.hlsl
index 59c3481..5cf0d79 100644
--- a/test/tint/builtins/gen/var/fwidthFine/523fdc.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/gen/var/fwidthFine/523fdc.wgsl.expected.ir.dxc.hlsl
@@ -4,9 +4,7 @@
float3 arg_0 = (1.0f).xxx;
float3 v = arg_0;
float3 v_1 = ddx_fine(v);
- float3 v_2 = ddy_fine(v);
- float3 v_3 = abs(v_1);
- float3 res = (v_3 + abs(v_2));
+ float3 res = (abs(v_1) + abs(ddy_fine(v)));
return res;
}
diff --git a/test/tint/builtins/gen/var/fwidthFine/523fdc.wgsl.expected.ir.fxc.hlsl b/test/tint/builtins/gen/var/fwidthFine/523fdc.wgsl.expected.ir.fxc.hlsl
index 59c3481..5cf0d79 100644
--- a/test/tint/builtins/gen/var/fwidthFine/523fdc.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/builtins/gen/var/fwidthFine/523fdc.wgsl.expected.ir.fxc.hlsl
@@ -4,9 +4,7 @@
float3 arg_0 = (1.0f).xxx;
float3 v = arg_0;
float3 v_1 = ddx_fine(v);
- float3 v_2 = ddy_fine(v);
- float3 v_3 = abs(v_1);
- float3 res = (v_3 + abs(v_2));
+ float3 res = (abs(v_1) + abs(ddy_fine(v)));
return res;
}
diff --git a/test/tint/builtins/gen/var/fwidthFine/523fdc.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/fwidthFine/523fdc.wgsl.expected.ir.msl
index cdbeb4c..f588e36 100644
--- a/test/tint/builtins/gen/var/fwidthFine/523fdc.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/fwidthFine/523fdc.wgsl.expected.ir.msl
@@ -9,9 +9,7 @@
float3 arg_0 = float3(1.0f);
float3 const v = arg_0;
float3 const v_1 = dfdx(v);
- float3 const v_2 = dfdy(v);
- float3 const v_3 = abs(v_1);
- float3 res = (v_3 + abs(v_2));
+ float3 res = (abs(v_1) + abs(dfdy(v)));
return res;
}
diff --git a/test/tint/builtins/gen/var/fwidthFine/68f4ef.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/gen/var/fwidthFine/68f4ef.wgsl.expected.ir.dxc.hlsl
index 210f9f0..5651294 100644
--- a/test/tint/builtins/gen/var/fwidthFine/68f4ef.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/gen/var/fwidthFine/68f4ef.wgsl.expected.ir.dxc.hlsl
@@ -4,9 +4,7 @@
float4 arg_0 = (1.0f).xxxx;
float4 v = arg_0;
float4 v_1 = ddx_fine(v);
- float4 v_2 = ddy_fine(v);
- float4 v_3 = abs(v_1);
- float4 res = (v_3 + abs(v_2));
+ float4 res = (abs(v_1) + abs(ddy_fine(v)));
return res;
}
diff --git a/test/tint/builtins/gen/var/fwidthFine/68f4ef.wgsl.expected.ir.fxc.hlsl b/test/tint/builtins/gen/var/fwidthFine/68f4ef.wgsl.expected.ir.fxc.hlsl
index 210f9f0..5651294 100644
--- a/test/tint/builtins/gen/var/fwidthFine/68f4ef.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/builtins/gen/var/fwidthFine/68f4ef.wgsl.expected.ir.fxc.hlsl
@@ -4,9 +4,7 @@
float4 arg_0 = (1.0f).xxxx;
float4 v = arg_0;
float4 v_1 = ddx_fine(v);
- float4 v_2 = ddy_fine(v);
- float4 v_3 = abs(v_1);
- float4 res = (v_3 + abs(v_2));
+ float4 res = (abs(v_1) + abs(ddy_fine(v)));
return res;
}
diff --git a/test/tint/builtins/gen/var/fwidthFine/68f4ef.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/fwidthFine/68f4ef.wgsl.expected.ir.msl
index 5acbeca..6522186 100644
--- a/test/tint/builtins/gen/var/fwidthFine/68f4ef.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/fwidthFine/68f4ef.wgsl.expected.ir.msl
@@ -9,9 +9,7 @@
float4 arg_0 = float4(1.0f);
float4 const v = arg_0;
float4 const v_1 = dfdx(v);
- float4 const v_2 = dfdy(v);
- float4 const v_3 = abs(v_1);
- float4 res = (v_3 + abs(v_2));
+ float4 res = (abs(v_1) + abs(dfdy(v)));
return res;
}
diff --git a/test/tint/builtins/gen/var/fwidthFine/f1742d.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/gen/var/fwidthFine/f1742d.wgsl.expected.ir.dxc.hlsl
index 4adbd95..91e8eff 100644
--- a/test/tint/builtins/gen/var/fwidthFine/f1742d.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/gen/var/fwidthFine/f1742d.wgsl.expected.ir.dxc.hlsl
@@ -4,9 +4,7 @@
float arg_0 = 1.0f;
float v = arg_0;
float v_1 = ddx_fine(v);
- float v_2 = ddy_fine(v);
- float v_3 = abs(v_1);
- float res = (v_3 + abs(v_2));
+ float res = (abs(v_1) + abs(ddy_fine(v)));
return res;
}
diff --git a/test/tint/builtins/gen/var/fwidthFine/f1742d.wgsl.expected.ir.fxc.hlsl b/test/tint/builtins/gen/var/fwidthFine/f1742d.wgsl.expected.ir.fxc.hlsl
index 4adbd95..91e8eff 100644
--- a/test/tint/builtins/gen/var/fwidthFine/f1742d.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/builtins/gen/var/fwidthFine/f1742d.wgsl.expected.ir.fxc.hlsl
@@ -4,9 +4,7 @@
float arg_0 = 1.0f;
float v = arg_0;
float v_1 = ddx_fine(v);
- float v_2 = ddy_fine(v);
- float v_3 = abs(v_1);
- float res = (v_3 + abs(v_2));
+ float res = (abs(v_1) + abs(ddy_fine(v)));
return res;
}
diff --git a/test/tint/builtins/gen/var/fwidthFine/f1742d.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/fwidthFine/f1742d.wgsl.expected.ir.msl
index d933746..8a9f398 100644
--- a/test/tint/builtins/gen/var/fwidthFine/f1742d.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/fwidthFine/f1742d.wgsl.expected.ir.msl
@@ -9,9 +9,7 @@
float arg_0 = 1.0f;
float const v = arg_0;
float const v_1 = dfdx(v);
- float const v_2 = dfdy(v);
- float const v_3 = abs(v_1);
- float res = (v_3 + abs(v_2));
+ float res = (abs(v_1) + abs(dfdy(v)));
return res;
}
diff --git a/test/tint/builtins/gen/var/fwidthFine/ff6aa0.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/gen/var/fwidthFine/ff6aa0.wgsl.expected.ir.dxc.hlsl
index 30a3772..0bd0eef 100644
--- a/test/tint/builtins/gen/var/fwidthFine/ff6aa0.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/gen/var/fwidthFine/ff6aa0.wgsl.expected.ir.dxc.hlsl
@@ -4,9 +4,7 @@
float2 arg_0 = (1.0f).xx;
float2 v = arg_0;
float2 v_1 = ddx_fine(v);
- float2 v_2 = ddy_fine(v);
- float2 v_3 = abs(v_1);
- float2 res = (v_3 + abs(v_2));
+ float2 res = (abs(v_1) + abs(ddy_fine(v)));
return res;
}
diff --git a/test/tint/builtins/gen/var/fwidthFine/ff6aa0.wgsl.expected.ir.fxc.hlsl b/test/tint/builtins/gen/var/fwidthFine/ff6aa0.wgsl.expected.ir.fxc.hlsl
index 30a3772..0bd0eef 100644
--- a/test/tint/builtins/gen/var/fwidthFine/ff6aa0.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/builtins/gen/var/fwidthFine/ff6aa0.wgsl.expected.ir.fxc.hlsl
@@ -4,9 +4,7 @@
float2 arg_0 = (1.0f).xx;
float2 v = arg_0;
float2 v_1 = ddx_fine(v);
- float2 v_2 = ddy_fine(v);
- float2 v_3 = abs(v_1);
- float2 res = (v_3 + abs(v_2));
+ float2 res = (abs(v_1) + abs(ddy_fine(v)));
return res;
}
diff --git a/test/tint/builtins/gen/var/fwidthFine/ff6aa0.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/fwidthFine/ff6aa0.wgsl.expected.ir.msl
index 2d88e6c..f2cde30 100644
--- a/test/tint/builtins/gen/var/fwidthFine/ff6aa0.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/fwidthFine/ff6aa0.wgsl.expected.ir.msl
@@ -9,9 +9,7 @@
float2 arg_0 = float2(1.0f);
float2 const v = arg_0;
float2 const v_1 = dfdx(v);
- float2 const v_2 = dfdy(v);
- float2 const v_3 = abs(v_1);
- float2 res = (v_3 + abs(v_2));
+ float2 res = (abs(v_1) + abs(dfdy(v)));
return res;
}
diff --git a/test/tint/builtins/gen/var/insertBits/3c7ba5.wgsl.expected.glsl b/test/tint/builtins/gen/var/insertBits/3c7ba5.wgsl.expected.glsl
index f2bafcc..647698e 100644
--- a/test/tint/builtins/gen/var/insertBits/3c7ba5.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/insertBits/3c7ba5.wgsl.expected.glsl
@@ -13,11 +13,10 @@
uint arg_3 = 1u;
uvec2 v_1 = arg_0;
uvec2 v_2 = arg_1;
- uint v_3 = arg_3;
- uint v_4 = min(arg_2, 32u);
- uint v_5 = min(v_3, (32u - v_4));
- int v_6 = int(v_4);
- uvec2 res = bitfieldInsert(v_1, v_2, v_6, int(v_5));
+ uint v_3 = min(arg_2, 32u);
+ uint v_4 = min(arg_3, (32u - v_3));
+ int v_5 = int(v_3);
+ uvec2 res = bitfieldInsert(v_1, v_2, v_5, int(v_4));
return res;
}
void main() {
@@ -36,11 +35,10 @@
uint arg_3 = 1u;
uvec2 v_1 = arg_0;
uvec2 v_2 = arg_1;
- uint v_3 = arg_3;
- uint v_4 = min(arg_2, 32u);
- uint v_5 = min(v_3, (32u - v_4));
- int v_6 = int(v_4);
- uvec2 res = bitfieldInsert(v_1, v_2, v_6, int(v_5));
+ uint v_3 = min(arg_2, 32u);
+ uint v_4 = min(arg_3, (32u - v_3));
+ int v_5 = int(v_3);
+ uvec2 res = bitfieldInsert(v_1, v_2, v_5, int(v_4));
return res;
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
@@ -63,11 +61,10 @@
uint arg_3 = 1u;
uvec2 v = arg_0;
uvec2 v_1 = arg_1;
- uint v_2 = arg_3;
- uint v_3 = min(arg_2, 32u);
- uint v_4 = min(v_2, (32u - v_3));
- int v_5 = int(v_3);
- uvec2 res = bitfieldInsert(v, v_1, v_5, int(v_4));
+ uint v_2 = min(arg_2, 32u);
+ uint v_3 = min(arg_3, (32u - v_2));
+ int v_4 = int(v_2);
+ uvec2 res = bitfieldInsert(v, v_1, v_4, int(v_3));
return res;
}
VertexOutput vertex_main_inner() {
@@ -77,10 +74,10 @@
return tint_symbol;
}
void main() {
- VertexOutput v_6 = vertex_main_inner();
- gl_Position = v_6.pos;
+ VertexOutput v_5 = vertex_main_inner();
+ gl_Position = v_5.pos;
gl_Position[1u] = -(gl_Position.y);
gl_Position[2u] = ((2.0f * gl_Position.z) - gl_Position.w);
- vertex_main_loc0_Output = v_6.prevent_dce;
+ vertex_main_loc0_Output = v_5.prevent_dce;
gl_PointSize = 1.0f;
}
diff --git a/test/tint/builtins/gen/var/insertBits/3c7ba5.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/insertBits/3c7ba5.wgsl.expected.ir.msl
index 066836f..f3a8587 100644
--- a/test/tint/builtins/gen/var/insertBits/3c7ba5.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/insertBits/3c7ba5.wgsl.expected.ir.msl
@@ -20,11 +20,8 @@
uint2 arg_1 = uint2(1u);
uint arg_2 = 1u;
uint arg_3 = 1u;
- uint2 const v = arg_0;
- uint2 const v_1 = arg_1;
- uint const v_2 = arg_3;
- uint const v_3 = min(arg_2, 32u);
- uint2 res = insert_bits(v, v_1, v_3, min(v_2, (32u - v_3)));
+ uint const v = min(arg_2, 32u);
+ uint2 res = insert_bits(arg_0, arg_1, v, min(arg_3, (32u - v)));
return res;
}
@@ -46,9 +43,9 @@
}
vertex vertex_main_outputs vertex_main() {
- VertexOutput const v_4 = vertex_main_inner();
+ VertexOutput const v_1 = vertex_main_inner();
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_4.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_4.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v_1.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/insertBits/428b0b.wgsl.expected.glsl b/test/tint/builtins/gen/var/insertBits/428b0b.wgsl.expected.glsl
index 7e877b7..a5fa8a7 100644
--- a/test/tint/builtins/gen/var/insertBits/428b0b.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/insertBits/428b0b.wgsl.expected.glsl
@@ -13,11 +13,10 @@
uint arg_3 = 1u;
ivec3 v_1 = arg_0;
ivec3 v_2 = arg_1;
- uint v_3 = arg_3;
- uint v_4 = min(arg_2, 32u);
- uint v_5 = min(v_3, (32u - v_4));
- int v_6 = int(v_4);
- ivec3 res = bitfieldInsert(v_1, v_2, v_6, int(v_5));
+ uint v_3 = min(arg_2, 32u);
+ uint v_4 = min(arg_3, (32u - v_3));
+ int v_5 = int(v_3);
+ ivec3 res = bitfieldInsert(v_1, v_2, v_5, int(v_4));
return res;
}
void main() {
@@ -36,11 +35,10 @@
uint arg_3 = 1u;
ivec3 v_1 = arg_0;
ivec3 v_2 = arg_1;
- uint v_3 = arg_3;
- uint v_4 = min(arg_2, 32u);
- uint v_5 = min(v_3, (32u - v_4));
- int v_6 = int(v_4);
- ivec3 res = bitfieldInsert(v_1, v_2, v_6, int(v_5));
+ uint v_3 = min(arg_2, 32u);
+ uint v_4 = min(arg_3, (32u - v_3));
+ int v_5 = int(v_3);
+ ivec3 res = bitfieldInsert(v_1, v_2, v_5, int(v_4));
return res;
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
@@ -63,11 +61,10 @@
uint arg_3 = 1u;
ivec3 v = arg_0;
ivec3 v_1 = arg_1;
- uint v_2 = arg_3;
- uint v_3 = min(arg_2, 32u);
- uint v_4 = min(v_2, (32u - v_3));
- int v_5 = int(v_3);
- ivec3 res = bitfieldInsert(v, v_1, v_5, int(v_4));
+ uint v_2 = min(arg_2, 32u);
+ uint v_3 = min(arg_3, (32u - v_2));
+ int v_4 = int(v_2);
+ ivec3 res = bitfieldInsert(v, v_1, v_4, int(v_3));
return res;
}
VertexOutput vertex_main_inner() {
@@ -77,10 +74,10 @@
return tint_symbol;
}
void main() {
- VertexOutput v_6 = vertex_main_inner();
- gl_Position = v_6.pos;
+ VertexOutput v_5 = vertex_main_inner();
+ gl_Position = v_5.pos;
gl_Position[1u] = -(gl_Position.y);
gl_Position[2u] = ((2.0f * gl_Position.z) - gl_Position.w);
- vertex_main_loc0_Output = v_6.prevent_dce;
+ vertex_main_loc0_Output = v_5.prevent_dce;
gl_PointSize = 1.0f;
}
diff --git a/test/tint/builtins/gen/var/insertBits/428b0b.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/insertBits/428b0b.wgsl.expected.ir.msl
index 85edddb..a603414 100644
--- a/test/tint/builtins/gen/var/insertBits/428b0b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/insertBits/428b0b.wgsl.expected.ir.msl
@@ -20,11 +20,8 @@
int3 arg_1 = int3(1);
uint arg_2 = 1u;
uint arg_3 = 1u;
- int3 const v = arg_0;
- int3 const v_1 = arg_1;
- uint const v_2 = arg_3;
- uint const v_3 = min(arg_2, 32u);
- int3 res = insert_bits(v, v_1, v_3, min(v_2, (32u - v_3)));
+ uint const v = min(arg_2, 32u);
+ int3 res = insert_bits(arg_0, arg_1, v, min(arg_3, (32u - v)));
return res;
}
@@ -46,9 +43,9 @@
}
vertex vertex_main_outputs vertex_main() {
- VertexOutput const v_4 = vertex_main_inner();
+ VertexOutput const v_1 = vertex_main_inner();
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_4.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_4.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v_1.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/insertBits/51ede1.wgsl.expected.glsl b/test/tint/builtins/gen/var/insertBits/51ede1.wgsl.expected.glsl
index 7bd9fbe..b4590b3 100644
--- a/test/tint/builtins/gen/var/insertBits/51ede1.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/insertBits/51ede1.wgsl.expected.glsl
@@ -13,11 +13,10 @@
uint arg_3 = 1u;
uvec4 v_1 = arg_0;
uvec4 v_2 = arg_1;
- uint v_3 = arg_3;
- uint v_4 = min(arg_2, 32u);
- uint v_5 = min(v_3, (32u - v_4));
- int v_6 = int(v_4);
- uvec4 res = bitfieldInsert(v_1, v_2, v_6, int(v_5));
+ uint v_3 = min(arg_2, 32u);
+ uint v_4 = min(arg_3, (32u - v_3));
+ int v_5 = int(v_3);
+ uvec4 res = bitfieldInsert(v_1, v_2, v_5, int(v_4));
return res;
}
void main() {
@@ -36,11 +35,10 @@
uint arg_3 = 1u;
uvec4 v_1 = arg_0;
uvec4 v_2 = arg_1;
- uint v_3 = arg_3;
- uint v_4 = min(arg_2, 32u);
- uint v_5 = min(v_3, (32u - v_4));
- int v_6 = int(v_4);
- uvec4 res = bitfieldInsert(v_1, v_2, v_6, int(v_5));
+ uint v_3 = min(arg_2, 32u);
+ uint v_4 = min(arg_3, (32u - v_3));
+ int v_5 = int(v_3);
+ uvec4 res = bitfieldInsert(v_1, v_2, v_5, int(v_4));
return res;
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
@@ -63,11 +61,10 @@
uint arg_3 = 1u;
uvec4 v = arg_0;
uvec4 v_1 = arg_1;
- uint v_2 = arg_3;
- uint v_3 = min(arg_2, 32u);
- uint v_4 = min(v_2, (32u - v_3));
- int v_5 = int(v_3);
- uvec4 res = bitfieldInsert(v, v_1, v_5, int(v_4));
+ uint v_2 = min(arg_2, 32u);
+ uint v_3 = min(arg_3, (32u - v_2));
+ int v_4 = int(v_2);
+ uvec4 res = bitfieldInsert(v, v_1, v_4, int(v_3));
return res;
}
VertexOutput vertex_main_inner() {
@@ -77,10 +74,10 @@
return tint_symbol;
}
void main() {
- VertexOutput v_6 = vertex_main_inner();
- gl_Position = v_6.pos;
+ VertexOutput v_5 = vertex_main_inner();
+ gl_Position = v_5.pos;
gl_Position[1u] = -(gl_Position.y);
gl_Position[2u] = ((2.0f * gl_Position.z) - gl_Position.w);
- vertex_main_loc0_Output = v_6.prevent_dce;
+ vertex_main_loc0_Output = v_5.prevent_dce;
gl_PointSize = 1.0f;
}
diff --git a/test/tint/builtins/gen/var/insertBits/51ede1.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/insertBits/51ede1.wgsl.expected.ir.msl
index 310328f..8a43be9 100644
--- a/test/tint/builtins/gen/var/insertBits/51ede1.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/insertBits/51ede1.wgsl.expected.ir.msl
@@ -20,11 +20,8 @@
uint4 arg_1 = uint4(1u);
uint arg_2 = 1u;
uint arg_3 = 1u;
- uint4 const v = arg_0;
- uint4 const v_1 = arg_1;
- uint const v_2 = arg_3;
- uint const v_3 = min(arg_2, 32u);
- uint4 res = insert_bits(v, v_1, v_3, min(v_2, (32u - v_3)));
+ uint const v = min(arg_2, 32u);
+ uint4 res = insert_bits(arg_0, arg_1, v, min(arg_3, (32u - v)));
return res;
}
@@ -46,9 +43,9 @@
}
vertex vertex_main_outputs vertex_main() {
- VertexOutput const v_4 = vertex_main_inner();
+ VertexOutput const v_1 = vertex_main_inner();
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_4.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_4.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v_1.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/insertBits/65468b.wgsl.expected.glsl b/test/tint/builtins/gen/var/insertBits/65468b.wgsl.expected.glsl
index 6a2a57424..613ba7e 100644
--- a/test/tint/builtins/gen/var/insertBits/65468b.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/insertBits/65468b.wgsl.expected.glsl
@@ -13,11 +13,10 @@
uint arg_3 = 1u;
int v_1 = arg_0;
int v_2 = arg_1;
- uint v_3 = arg_3;
- uint v_4 = min(arg_2, 32u);
- uint v_5 = min(v_3, (32u - v_4));
- int v_6 = int(v_4);
- int res = bitfieldInsert(v_1, v_2, v_6, int(v_5));
+ uint v_3 = min(arg_2, 32u);
+ uint v_4 = min(arg_3, (32u - v_3));
+ int v_5 = int(v_3);
+ int res = bitfieldInsert(v_1, v_2, v_5, int(v_4));
return res;
}
void main() {
@@ -36,11 +35,10 @@
uint arg_3 = 1u;
int v_1 = arg_0;
int v_2 = arg_1;
- uint v_3 = arg_3;
- uint v_4 = min(arg_2, 32u);
- uint v_5 = min(v_3, (32u - v_4));
- int v_6 = int(v_4);
- int res = bitfieldInsert(v_1, v_2, v_6, int(v_5));
+ uint v_3 = min(arg_2, 32u);
+ uint v_4 = min(arg_3, (32u - v_3));
+ int v_5 = int(v_3);
+ int res = bitfieldInsert(v_1, v_2, v_5, int(v_4));
return res;
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
@@ -63,11 +61,10 @@
uint arg_3 = 1u;
int v = arg_0;
int v_1 = arg_1;
- uint v_2 = arg_3;
- uint v_3 = min(arg_2, 32u);
- uint v_4 = min(v_2, (32u - v_3));
- int v_5 = int(v_3);
- int res = bitfieldInsert(v, v_1, v_5, int(v_4));
+ uint v_2 = min(arg_2, 32u);
+ uint v_3 = min(arg_3, (32u - v_2));
+ int v_4 = int(v_2);
+ int res = bitfieldInsert(v, v_1, v_4, int(v_3));
return res;
}
VertexOutput vertex_main_inner() {
@@ -77,10 +74,10 @@
return tint_symbol;
}
void main() {
- VertexOutput v_6 = vertex_main_inner();
- gl_Position = v_6.pos;
+ VertexOutput v_5 = vertex_main_inner();
+ gl_Position = v_5.pos;
gl_Position[1u] = -(gl_Position.y);
gl_Position[2u] = ((2.0f * gl_Position.z) - gl_Position.w);
- vertex_main_loc0_Output = v_6.prevent_dce;
+ vertex_main_loc0_Output = v_5.prevent_dce;
gl_PointSize = 1.0f;
}
diff --git a/test/tint/builtins/gen/var/insertBits/65468b.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/insertBits/65468b.wgsl.expected.ir.msl
index 8ad6c06..03bb7bd 100644
--- a/test/tint/builtins/gen/var/insertBits/65468b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/insertBits/65468b.wgsl.expected.ir.msl
@@ -20,11 +20,8 @@
int arg_1 = 1;
uint arg_2 = 1u;
uint arg_3 = 1u;
- int const v = arg_0;
- int const v_1 = arg_1;
- uint const v_2 = arg_3;
- uint const v_3 = min(arg_2, 32u);
- int res = insert_bits(v, v_1, v_3, min(v_2, (32u - v_3)));
+ uint const v = min(arg_2, 32u);
+ int res = insert_bits(arg_0, arg_1, v, min(arg_3, (32u - v)));
return res;
}
@@ -46,9 +43,9 @@
}
vertex vertex_main_outputs vertex_main() {
- VertexOutput const v_4 = vertex_main_inner();
+ VertexOutput const v_1 = vertex_main_inner();
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_4.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_4.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v_1.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/insertBits/87826b.wgsl.expected.glsl b/test/tint/builtins/gen/var/insertBits/87826b.wgsl.expected.glsl
index e585cb4..b492324 100644
--- a/test/tint/builtins/gen/var/insertBits/87826b.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/insertBits/87826b.wgsl.expected.glsl
@@ -13,11 +13,10 @@
uint arg_3 = 1u;
uvec3 v_1 = arg_0;
uvec3 v_2 = arg_1;
- uint v_3 = arg_3;
- uint v_4 = min(arg_2, 32u);
- uint v_5 = min(v_3, (32u - v_4));
- int v_6 = int(v_4);
- uvec3 res = bitfieldInsert(v_1, v_2, v_6, int(v_5));
+ uint v_3 = min(arg_2, 32u);
+ uint v_4 = min(arg_3, (32u - v_3));
+ int v_5 = int(v_3);
+ uvec3 res = bitfieldInsert(v_1, v_2, v_5, int(v_4));
return res;
}
void main() {
@@ -36,11 +35,10 @@
uint arg_3 = 1u;
uvec3 v_1 = arg_0;
uvec3 v_2 = arg_1;
- uint v_3 = arg_3;
- uint v_4 = min(arg_2, 32u);
- uint v_5 = min(v_3, (32u - v_4));
- int v_6 = int(v_4);
- uvec3 res = bitfieldInsert(v_1, v_2, v_6, int(v_5));
+ uint v_3 = min(arg_2, 32u);
+ uint v_4 = min(arg_3, (32u - v_3));
+ int v_5 = int(v_3);
+ uvec3 res = bitfieldInsert(v_1, v_2, v_5, int(v_4));
return res;
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
@@ -63,11 +61,10 @@
uint arg_3 = 1u;
uvec3 v = arg_0;
uvec3 v_1 = arg_1;
- uint v_2 = arg_3;
- uint v_3 = min(arg_2, 32u);
- uint v_4 = min(v_2, (32u - v_3));
- int v_5 = int(v_3);
- uvec3 res = bitfieldInsert(v, v_1, v_5, int(v_4));
+ uint v_2 = min(arg_2, 32u);
+ uint v_3 = min(arg_3, (32u - v_2));
+ int v_4 = int(v_2);
+ uvec3 res = bitfieldInsert(v, v_1, v_4, int(v_3));
return res;
}
VertexOutput vertex_main_inner() {
@@ -77,10 +74,10 @@
return tint_symbol;
}
void main() {
- VertexOutput v_6 = vertex_main_inner();
- gl_Position = v_6.pos;
+ VertexOutput v_5 = vertex_main_inner();
+ gl_Position = v_5.pos;
gl_Position[1u] = -(gl_Position.y);
gl_Position[2u] = ((2.0f * gl_Position.z) - gl_Position.w);
- vertex_main_loc0_Output = v_6.prevent_dce;
+ vertex_main_loc0_Output = v_5.prevent_dce;
gl_PointSize = 1.0f;
}
diff --git a/test/tint/builtins/gen/var/insertBits/87826b.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/insertBits/87826b.wgsl.expected.ir.msl
index 7845af2..7abc81b 100644
--- a/test/tint/builtins/gen/var/insertBits/87826b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/insertBits/87826b.wgsl.expected.ir.msl
@@ -20,11 +20,8 @@
uint3 arg_1 = uint3(1u);
uint arg_2 = 1u;
uint arg_3 = 1u;
- uint3 const v = arg_0;
- uint3 const v_1 = arg_1;
- uint const v_2 = arg_3;
- uint const v_3 = min(arg_2, 32u);
- uint3 res = insert_bits(v, v_1, v_3, min(v_2, (32u - v_3)));
+ uint const v = min(arg_2, 32u);
+ uint3 res = insert_bits(arg_0, arg_1, v, min(arg_3, (32u - v)));
return res;
}
@@ -46,9 +43,9 @@
}
vertex vertex_main_outputs vertex_main() {
- VertexOutput const v_4 = vertex_main_inner();
+ VertexOutput const v_1 = vertex_main_inner();
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_4.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_4.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v_1.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/insertBits/d86978.wgsl.expected.glsl b/test/tint/builtins/gen/var/insertBits/d86978.wgsl.expected.glsl
index 70c1bd3..526b9b5 100644
--- a/test/tint/builtins/gen/var/insertBits/d86978.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/insertBits/d86978.wgsl.expected.glsl
@@ -13,11 +13,10 @@
uint arg_3 = 1u;
ivec4 v_1 = arg_0;
ivec4 v_2 = arg_1;
- uint v_3 = arg_3;
- uint v_4 = min(arg_2, 32u);
- uint v_5 = min(v_3, (32u - v_4));
- int v_6 = int(v_4);
- ivec4 res = bitfieldInsert(v_1, v_2, v_6, int(v_5));
+ uint v_3 = min(arg_2, 32u);
+ uint v_4 = min(arg_3, (32u - v_3));
+ int v_5 = int(v_3);
+ ivec4 res = bitfieldInsert(v_1, v_2, v_5, int(v_4));
return res;
}
void main() {
@@ -36,11 +35,10 @@
uint arg_3 = 1u;
ivec4 v_1 = arg_0;
ivec4 v_2 = arg_1;
- uint v_3 = arg_3;
- uint v_4 = min(arg_2, 32u);
- uint v_5 = min(v_3, (32u - v_4));
- int v_6 = int(v_4);
- ivec4 res = bitfieldInsert(v_1, v_2, v_6, int(v_5));
+ uint v_3 = min(arg_2, 32u);
+ uint v_4 = min(arg_3, (32u - v_3));
+ int v_5 = int(v_3);
+ ivec4 res = bitfieldInsert(v_1, v_2, v_5, int(v_4));
return res;
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
@@ -63,11 +61,10 @@
uint arg_3 = 1u;
ivec4 v = arg_0;
ivec4 v_1 = arg_1;
- uint v_2 = arg_3;
- uint v_3 = min(arg_2, 32u);
- uint v_4 = min(v_2, (32u - v_3));
- int v_5 = int(v_3);
- ivec4 res = bitfieldInsert(v, v_1, v_5, int(v_4));
+ uint v_2 = min(arg_2, 32u);
+ uint v_3 = min(arg_3, (32u - v_2));
+ int v_4 = int(v_2);
+ ivec4 res = bitfieldInsert(v, v_1, v_4, int(v_3));
return res;
}
VertexOutput vertex_main_inner() {
@@ -77,10 +74,10 @@
return tint_symbol;
}
void main() {
- VertexOutput v_6 = vertex_main_inner();
- gl_Position = v_6.pos;
+ VertexOutput v_5 = vertex_main_inner();
+ gl_Position = v_5.pos;
gl_Position[1u] = -(gl_Position.y);
gl_Position[2u] = ((2.0f * gl_Position.z) - gl_Position.w);
- vertex_main_loc0_Output = v_6.prevent_dce;
+ vertex_main_loc0_Output = v_5.prevent_dce;
gl_PointSize = 1.0f;
}
diff --git a/test/tint/builtins/gen/var/insertBits/d86978.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/insertBits/d86978.wgsl.expected.ir.msl
index 570f105..00a859f 100644
--- a/test/tint/builtins/gen/var/insertBits/d86978.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/insertBits/d86978.wgsl.expected.ir.msl
@@ -20,11 +20,8 @@
int4 arg_1 = int4(1);
uint arg_2 = 1u;
uint arg_3 = 1u;
- int4 const v = arg_0;
- int4 const v_1 = arg_1;
- uint const v_2 = arg_3;
- uint const v_3 = min(arg_2, 32u);
- int4 res = insert_bits(v, v_1, v_3, min(v_2, (32u - v_3)));
+ uint const v = min(arg_2, 32u);
+ int4 res = insert_bits(arg_0, arg_1, v, min(arg_3, (32u - v)));
return res;
}
@@ -46,9 +43,9 @@
}
vertex vertex_main_outputs vertex_main() {
- VertexOutput const v_4 = vertex_main_inner();
+ VertexOutput const v_1 = vertex_main_inner();
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_4.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_4.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v_1.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/insertBits/e3e3a2.wgsl.expected.glsl b/test/tint/builtins/gen/var/insertBits/e3e3a2.wgsl.expected.glsl
index 545e224..0d27f3f 100644
--- a/test/tint/builtins/gen/var/insertBits/e3e3a2.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/insertBits/e3e3a2.wgsl.expected.glsl
@@ -13,11 +13,10 @@
uint arg_3 = 1u;
uint v_1 = arg_0;
uint v_2 = arg_1;
- uint v_3 = arg_3;
- uint v_4 = min(arg_2, 32u);
- uint v_5 = min(v_3, (32u - v_4));
- int v_6 = int(v_4);
- uint res = bitfieldInsert(v_1, v_2, v_6, int(v_5));
+ uint v_3 = min(arg_2, 32u);
+ uint v_4 = min(arg_3, (32u - v_3));
+ int v_5 = int(v_3);
+ uint res = bitfieldInsert(v_1, v_2, v_5, int(v_4));
return res;
}
void main() {
@@ -36,11 +35,10 @@
uint arg_3 = 1u;
uint v_1 = arg_0;
uint v_2 = arg_1;
- uint v_3 = arg_3;
- uint v_4 = min(arg_2, 32u);
- uint v_5 = min(v_3, (32u - v_4));
- int v_6 = int(v_4);
- uint res = bitfieldInsert(v_1, v_2, v_6, int(v_5));
+ uint v_3 = min(arg_2, 32u);
+ uint v_4 = min(arg_3, (32u - v_3));
+ int v_5 = int(v_3);
+ uint res = bitfieldInsert(v_1, v_2, v_5, int(v_4));
return res;
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
@@ -63,11 +61,10 @@
uint arg_3 = 1u;
uint v = arg_0;
uint v_1 = arg_1;
- uint v_2 = arg_3;
- uint v_3 = min(arg_2, 32u);
- uint v_4 = min(v_2, (32u - v_3));
- int v_5 = int(v_3);
- uint res = bitfieldInsert(v, v_1, v_5, int(v_4));
+ uint v_2 = min(arg_2, 32u);
+ uint v_3 = min(arg_3, (32u - v_2));
+ int v_4 = int(v_2);
+ uint res = bitfieldInsert(v, v_1, v_4, int(v_3));
return res;
}
VertexOutput vertex_main_inner() {
@@ -77,10 +74,10 @@
return tint_symbol;
}
void main() {
- VertexOutput v_6 = vertex_main_inner();
- gl_Position = v_6.pos;
+ VertexOutput v_5 = vertex_main_inner();
+ gl_Position = v_5.pos;
gl_Position[1u] = -(gl_Position.y);
gl_Position[2u] = ((2.0f * gl_Position.z) - gl_Position.w);
- vertex_main_loc0_Output = v_6.prevent_dce;
+ vertex_main_loc0_Output = v_5.prevent_dce;
gl_PointSize = 1.0f;
}
diff --git a/test/tint/builtins/gen/var/insertBits/e3e3a2.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/insertBits/e3e3a2.wgsl.expected.ir.msl
index 7ebf8f9..24e40e3 100644
--- a/test/tint/builtins/gen/var/insertBits/e3e3a2.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/insertBits/e3e3a2.wgsl.expected.ir.msl
@@ -20,11 +20,8 @@
uint arg_1 = 1u;
uint arg_2 = 1u;
uint arg_3 = 1u;
- uint const v = arg_0;
- uint const v_1 = arg_1;
- uint const v_2 = arg_3;
- uint const v_3 = min(arg_2, 32u);
- uint res = insert_bits(v, v_1, v_3, min(v_2, (32u - v_3)));
+ uint const v = min(arg_2, 32u);
+ uint res = insert_bits(arg_0, arg_1, v, min(arg_3, (32u - v)));
return res;
}
@@ -46,9 +43,9 @@
}
vertex vertex_main_outputs vertex_main() {
- VertexOutput const v_4 = vertex_main_inner();
+ VertexOutput const v_1 = vertex_main_inner();
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_4.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_4.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v_1.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/insertBits/fe6ba6.wgsl.expected.glsl b/test/tint/builtins/gen/var/insertBits/fe6ba6.wgsl.expected.glsl
index 65796ec..fbbe869 100644
--- a/test/tint/builtins/gen/var/insertBits/fe6ba6.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/insertBits/fe6ba6.wgsl.expected.glsl
@@ -13,11 +13,10 @@
uint arg_3 = 1u;
ivec2 v_1 = arg_0;
ivec2 v_2 = arg_1;
- uint v_3 = arg_3;
- uint v_4 = min(arg_2, 32u);
- uint v_5 = min(v_3, (32u - v_4));
- int v_6 = int(v_4);
- ivec2 res = bitfieldInsert(v_1, v_2, v_6, int(v_5));
+ uint v_3 = min(arg_2, 32u);
+ uint v_4 = min(arg_3, (32u - v_3));
+ int v_5 = int(v_3);
+ ivec2 res = bitfieldInsert(v_1, v_2, v_5, int(v_4));
return res;
}
void main() {
@@ -36,11 +35,10 @@
uint arg_3 = 1u;
ivec2 v_1 = arg_0;
ivec2 v_2 = arg_1;
- uint v_3 = arg_3;
- uint v_4 = min(arg_2, 32u);
- uint v_5 = min(v_3, (32u - v_4));
- int v_6 = int(v_4);
- ivec2 res = bitfieldInsert(v_1, v_2, v_6, int(v_5));
+ uint v_3 = min(arg_2, 32u);
+ uint v_4 = min(arg_3, (32u - v_3));
+ int v_5 = int(v_3);
+ ivec2 res = bitfieldInsert(v_1, v_2, v_5, int(v_4));
return res;
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
@@ -63,11 +61,10 @@
uint arg_3 = 1u;
ivec2 v = arg_0;
ivec2 v_1 = arg_1;
- uint v_2 = arg_3;
- uint v_3 = min(arg_2, 32u);
- uint v_4 = min(v_2, (32u - v_3));
- int v_5 = int(v_3);
- ivec2 res = bitfieldInsert(v, v_1, v_5, int(v_4));
+ uint v_2 = min(arg_2, 32u);
+ uint v_3 = min(arg_3, (32u - v_2));
+ int v_4 = int(v_2);
+ ivec2 res = bitfieldInsert(v, v_1, v_4, int(v_3));
return res;
}
VertexOutput vertex_main_inner() {
@@ -77,10 +74,10 @@
return tint_symbol;
}
void main() {
- VertexOutput v_6 = vertex_main_inner();
- gl_Position = v_6.pos;
+ VertexOutput v_5 = vertex_main_inner();
+ gl_Position = v_5.pos;
gl_Position[1u] = -(gl_Position.y);
gl_Position[2u] = ((2.0f * gl_Position.z) - gl_Position.w);
- vertex_main_loc0_Output = v_6.prevent_dce;
+ vertex_main_loc0_Output = v_5.prevent_dce;
gl_PointSize = 1.0f;
}
diff --git a/test/tint/builtins/gen/var/insertBits/fe6ba6.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/insertBits/fe6ba6.wgsl.expected.ir.msl
index 78534bd..564b294 100644
--- a/test/tint/builtins/gen/var/insertBits/fe6ba6.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/insertBits/fe6ba6.wgsl.expected.ir.msl
@@ -20,11 +20,8 @@
int2 arg_1 = int2(1);
uint arg_2 = 1u;
uint arg_3 = 1u;
- int2 const v = arg_0;
- int2 const v_1 = arg_1;
- uint const v_2 = arg_3;
- uint const v_3 = min(arg_2, 32u);
- int2 res = insert_bits(v, v_1, v_3, min(v_2, (32u - v_3)));
+ uint const v = min(arg_2, 32u);
+ int2 res = insert_bits(arg_0, arg_1, v, min(arg_3, (32u - v)));
return res;
}
@@ -46,9 +43,9 @@
}
vertex vertex_main_outputs vertex_main() {
- VertexOutput const v_4 = vertex_main_inner();
+ VertexOutput const v_1 = vertex_main_inner();
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_4.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_4.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v_1.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/modf/2d50da.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/gen/var/modf/2d50da.wgsl.expected.ir.dxc.hlsl
index 9ca858a..9237556 100644
--- a/test/tint/builtins/gen/var/modf/2d50da.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/gen/var/modf/2d50da.wgsl.expected.ir.dxc.hlsl
@@ -15,8 +15,7 @@
void modf_2d50da() {
float2 arg_0 = (-1.5f).xx;
float2 v = (0.0f).xx;
- float2 v_1 = modf(arg_0, v);
- modf_result_vec2_f32 res = {v_1, v};
+ modf_result_vec2_f32 res = {modf(arg_0, v), v};
}
void fragment_main() {
@@ -32,13 +31,13 @@
VertexOutput tint_symbol = (VertexOutput)0;
tint_symbol.pos = (0.0f).xxxx;
modf_2d50da();
- VertexOutput v_2 = tint_symbol;
- return v_2;
+ VertexOutput v_1 = tint_symbol;
+ return v_1;
}
vertex_main_outputs vertex_main() {
- VertexOutput v_3 = vertex_main_inner();
- vertex_main_outputs v_4 = {v_3.pos};
- return v_4;
+ VertexOutput v_2 = vertex_main_inner();
+ vertex_main_outputs v_3 = {v_2.pos};
+ return v_3;
}
diff --git a/test/tint/builtins/gen/var/modf/2d50da.wgsl.expected.ir.fxc.hlsl b/test/tint/builtins/gen/var/modf/2d50da.wgsl.expected.ir.fxc.hlsl
index 9ca858a..9237556 100644
--- a/test/tint/builtins/gen/var/modf/2d50da.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/builtins/gen/var/modf/2d50da.wgsl.expected.ir.fxc.hlsl
@@ -15,8 +15,7 @@
void modf_2d50da() {
float2 arg_0 = (-1.5f).xx;
float2 v = (0.0f).xx;
- float2 v_1 = modf(arg_0, v);
- modf_result_vec2_f32 res = {v_1, v};
+ modf_result_vec2_f32 res = {modf(arg_0, v), v};
}
void fragment_main() {
@@ -32,13 +31,13 @@
VertexOutput tint_symbol = (VertexOutput)0;
tint_symbol.pos = (0.0f).xxxx;
modf_2d50da();
- VertexOutput v_2 = tint_symbol;
- return v_2;
+ VertexOutput v_1 = tint_symbol;
+ return v_1;
}
vertex_main_outputs vertex_main() {
- VertexOutput v_3 = vertex_main_inner();
- vertex_main_outputs v_4 = {v_3.pos};
- return v_4;
+ VertexOutput v_2 = vertex_main_inner();
+ vertex_main_outputs v_3 = {v_2.pos};
+ return v_3;
}
diff --git a/test/tint/builtins/gen/var/modf/45005f.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/gen/var/modf/45005f.wgsl.expected.ir.dxc.hlsl
index b99294e..ad2b8be 100644
--- a/test/tint/builtins/gen/var/modf/45005f.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/gen/var/modf/45005f.wgsl.expected.ir.dxc.hlsl
@@ -15,8 +15,7 @@
void modf_45005f() {
vector<float16_t, 3> arg_0 = (float16_t(-1.5h)).xxx;
vector<float16_t, 3> v = (float16_t(0.0h)).xxx;
- vector<float16_t, 3> v_1 = modf(arg_0, v);
- modf_result_vec3_f16 res = {v_1, v};
+ modf_result_vec3_f16 res = {modf(arg_0, v), v};
}
void fragment_main() {
@@ -32,13 +31,13 @@
VertexOutput tint_symbol = (VertexOutput)0;
tint_symbol.pos = (0.0f).xxxx;
modf_45005f();
- VertexOutput v_2 = tint_symbol;
- return v_2;
+ VertexOutput v_1 = tint_symbol;
+ return v_1;
}
vertex_main_outputs vertex_main() {
- VertexOutput v_3 = vertex_main_inner();
- vertex_main_outputs v_4 = {v_3.pos};
- return v_4;
+ VertexOutput v_2 = vertex_main_inner();
+ vertex_main_outputs v_3 = {v_2.pos};
+ return v_3;
}
diff --git a/test/tint/builtins/gen/var/modf/4bfced.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/gen/var/modf/4bfced.wgsl.expected.ir.dxc.hlsl
index 21207c1..a7513ba 100644
--- a/test/tint/builtins/gen/var/modf/4bfced.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/gen/var/modf/4bfced.wgsl.expected.ir.dxc.hlsl
@@ -15,8 +15,7 @@
void modf_4bfced() {
float4 arg_0 = (-1.5f).xxxx;
float4 v = (0.0f).xxxx;
- float4 v_1 = modf(arg_0, v);
- modf_result_vec4_f32 res = {v_1, v};
+ modf_result_vec4_f32 res = {modf(arg_0, v), v};
}
void fragment_main() {
@@ -32,13 +31,13 @@
VertexOutput tint_symbol = (VertexOutput)0;
tint_symbol.pos = (0.0f).xxxx;
modf_4bfced();
- VertexOutput v_2 = tint_symbol;
- return v_2;
+ VertexOutput v_1 = tint_symbol;
+ return v_1;
}
vertex_main_outputs vertex_main() {
- VertexOutput v_3 = vertex_main_inner();
- vertex_main_outputs v_4 = {v_3.pos};
- return v_4;
+ VertexOutput v_2 = vertex_main_inner();
+ vertex_main_outputs v_3 = {v_2.pos};
+ return v_3;
}
diff --git a/test/tint/builtins/gen/var/modf/4bfced.wgsl.expected.ir.fxc.hlsl b/test/tint/builtins/gen/var/modf/4bfced.wgsl.expected.ir.fxc.hlsl
index 21207c1..a7513ba 100644
--- a/test/tint/builtins/gen/var/modf/4bfced.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/builtins/gen/var/modf/4bfced.wgsl.expected.ir.fxc.hlsl
@@ -15,8 +15,7 @@
void modf_4bfced() {
float4 arg_0 = (-1.5f).xxxx;
float4 v = (0.0f).xxxx;
- float4 v_1 = modf(arg_0, v);
- modf_result_vec4_f32 res = {v_1, v};
+ modf_result_vec4_f32 res = {modf(arg_0, v), v};
}
void fragment_main() {
@@ -32,13 +31,13 @@
VertexOutput tint_symbol = (VertexOutput)0;
tint_symbol.pos = (0.0f).xxxx;
modf_4bfced();
- VertexOutput v_2 = tint_symbol;
- return v_2;
+ VertexOutput v_1 = tint_symbol;
+ return v_1;
}
vertex_main_outputs vertex_main() {
- VertexOutput v_3 = vertex_main_inner();
- vertex_main_outputs v_4 = {v_3.pos};
- return v_4;
+ VertexOutput v_2 = vertex_main_inner();
+ vertex_main_outputs v_3 = {v_2.pos};
+ return v_3;
}
diff --git a/test/tint/builtins/gen/var/modf/5ea256.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/gen/var/modf/5ea256.wgsl.expected.ir.dxc.hlsl
index 9f155fe..e9e2753 100644
--- a/test/tint/builtins/gen/var/modf/5ea256.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/gen/var/modf/5ea256.wgsl.expected.ir.dxc.hlsl
@@ -15,8 +15,7 @@
void modf_5ea256() {
float3 arg_0 = (-1.5f).xxx;
float3 v = (0.0f).xxx;
- float3 v_1 = modf(arg_0, v);
- modf_result_vec3_f32 res = {v_1, v};
+ modf_result_vec3_f32 res = {modf(arg_0, v), v};
}
void fragment_main() {
@@ -32,13 +31,13 @@
VertexOutput tint_symbol = (VertexOutput)0;
tint_symbol.pos = (0.0f).xxxx;
modf_5ea256();
- VertexOutput v_2 = tint_symbol;
- return v_2;
+ VertexOutput v_1 = tint_symbol;
+ return v_1;
}
vertex_main_outputs vertex_main() {
- VertexOutput v_3 = vertex_main_inner();
- vertex_main_outputs v_4 = {v_3.pos};
- return v_4;
+ VertexOutput v_2 = vertex_main_inner();
+ vertex_main_outputs v_3 = {v_2.pos};
+ return v_3;
}
diff --git a/test/tint/builtins/gen/var/modf/5ea256.wgsl.expected.ir.fxc.hlsl b/test/tint/builtins/gen/var/modf/5ea256.wgsl.expected.ir.fxc.hlsl
index 9f155fe..e9e2753 100644
--- a/test/tint/builtins/gen/var/modf/5ea256.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/builtins/gen/var/modf/5ea256.wgsl.expected.ir.fxc.hlsl
@@ -15,8 +15,7 @@
void modf_5ea256() {
float3 arg_0 = (-1.5f).xxx;
float3 v = (0.0f).xxx;
- float3 v_1 = modf(arg_0, v);
- modf_result_vec3_f32 res = {v_1, v};
+ modf_result_vec3_f32 res = {modf(arg_0, v), v};
}
void fragment_main() {
@@ -32,13 +31,13 @@
VertexOutput tint_symbol = (VertexOutput)0;
tint_symbol.pos = (0.0f).xxxx;
modf_5ea256();
- VertexOutput v_2 = tint_symbol;
- return v_2;
+ VertexOutput v_1 = tint_symbol;
+ return v_1;
}
vertex_main_outputs vertex_main() {
- VertexOutput v_3 = vertex_main_inner();
- vertex_main_outputs v_4 = {v_3.pos};
- return v_4;
+ VertexOutput v_2 = vertex_main_inner();
+ vertex_main_outputs v_3 = {v_2.pos};
+ return v_3;
}
diff --git a/test/tint/builtins/gen/var/modf/8dbbbf.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/gen/var/modf/8dbbbf.wgsl.expected.ir.dxc.hlsl
index baddf63..b1bd887 100644
--- a/test/tint/builtins/gen/var/modf/8dbbbf.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/gen/var/modf/8dbbbf.wgsl.expected.ir.dxc.hlsl
@@ -15,8 +15,7 @@
void modf_8dbbbf() {
float16_t arg_0 = float16_t(-1.5h);
float16_t v = float16_t(0.0h);
- float16_t v_1 = modf(arg_0, v);
- modf_result_f16 res = {v_1, v};
+ modf_result_f16 res = {modf(arg_0, v), v};
}
void fragment_main() {
@@ -32,13 +31,13 @@
VertexOutput tint_symbol = (VertexOutput)0;
tint_symbol.pos = (0.0f).xxxx;
modf_8dbbbf();
- VertexOutput v_2 = tint_symbol;
- return v_2;
+ VertexOutput v_1 = tint_symbol;
+ return v_1;
}
vertex_main_outputs vertex_main() {
- VertexOutput v_3 = vertex_main_inner();
- vertex_main_outputs v_4 = {v_3.pos};
- return v_4;
+ VertexOutput v_2 = vertex_main_inner();
+ vertex_main_outputs v_3 = {v_2.pos};
+ return v_3;
}
diff --git a/test/tint/builtins/gen/var/modf/995934.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/gen/var/modf/995934.wgsl.expected.ir.dxc.hlsl
index 6fe9378..fe4291e 100644
--- a/test/tint/builtins/gen/var/modf/995934.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/gen/var/modf/995934.wgsl.expected.ir.dxc.hlsl
@@ -15,8 +15,7 @@
void modf_995934() {
vector<float16_t, 4> arg_0 = (float16_t(-1.5h)).xxxx;
vector<float16_t, 4> v = (float16_t(0.0h)).xxxx;
- vector<float16_t, 4> v_1 = modf(arg_0, v);
- modf_result_vec4_f16 res = {v_1, v};
+ modf_result_vec4_f16 res = {modf(arg_0, v), v};
}
void fragment_main() {
@@ -32,13 +31,13 @@
VertexOutput tint_symbol = (VertexOutput)0;
tint_symbol.pos = (0.0f).xxxx;
modf_995934();
- VertexOutput v_2 = tint_symbol;
- return v_2;
+ VertexOutput v_1 = tint_symbol;
+ return v_1;
}
vertex_main_outputs vertex_main() {
- VertexOutput v_3 = vertex_main_inner();
- vertex_main_outputs v_4 = {v_3.pos};
- return v_4;
+ VertexOutput v_2 = vertex_main_inner();
+ vertex_main_outputs v_3 = {v_2.pos};
+ return v_3;
}
diff --git a/test/tint/builtins/gen/var/modf/a545b9.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/gen/var/modf/a545b9.wgsl.expected.ir.dxc.hlsl
index 62431b2..9ff2c7d 100644
--- a/test/tint/builtins/gen/var/modf/a545b9.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/gen/var/modf/a545b9.wgsl.expected.ir.dxc.hlsl
@@ -15,8 +15,7 @@
void modf_a545b9() {
vector<float16_t, 2> arg_0 = (float16_t(-1.5h)).xx;
vector<float16_t, 2> v = (float16_t(0.0h)).xx;
- vector<float16_t, 2> v_1 = modf(arg_0, v);
- modf_result_vec2_f16 res = {v_1, v};
+ modf_result_vec2_f16 res = {modf(arg_0, v), v};
}
void fragment_main() {
@@ -32,13 +31,13 @@
VertexOutput tint_symbol = (VertexOutput)0;
tint_symbol.pos = (0.0f).xxxx;
modf_a545b9();
- VertexOutput v_2 = tint_symbol;
- return v_2;
+ VertexOutput v_1 = tint_symbol;
+ return v_1;
}
vertex_main_outputs vertex_main() {
- VertexOutput v_3 = vertex_main_inner();
- vertex_main_outputs v_4 = {v_3.pos};
- return v_4;
+ VertexOutput v_2 = vertex_main_inner();
+ vertex_main_outputs v_3 = {v_2.pos};
+ return v_3;
}
diff --git a/test/tint/builtins/gen/var/modf/bbf7f7.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/gen/var/modf/bbf7f7.wgsl.expected.ir.dxc.hlsl
index 6c84711..e07fea4 100644
--- a/test/tint/builtins/gen/var/modf/bbf7f7.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/gen/var/modf/bbf7f7.wgsl.expected.ir.dxc.hlsl
@@ -15,8 +15,7 @@
void modf_bbf7f7() {
float arg_0 = -1.5f;
float v = 0.0f;
- float v_1 = modf(arg_0, v);
- modf_result_f32 res = {v_1, v};
+ modf_result_f32 res = {modf(arg_0, v), v};
}
void fragment_main() {
@@ -32,13 +31,13 @@
VertexOutput tint_symbol = (VertexOutput)0;
tint_symbol.pos = (0.0f).xxxx;
modf_bbf7f7();
- VertexOutput v_2 = tint_symbol;
- return v_2;
+ VertexOutput v_1 = tint_symbol;
+ return v_1;
}
vertex_main_outputs vertex_main() {
- VertexOutput v_3 = vertex_main_inner();
- vertex_main_outputs v_4 = {v_3.pos};
- return v_4;
+ VertexOutput v_2 = vertex_main_inner();
+ vertex_main_outputs v_3 = {v_2.pos};
+ return v_3;
}
diff --git a/test/tint/builtins/gen/var/modf/bbf7f7.wgsl.expected.ir.fxc.hlsl b/test/tint/builtins/gen/var/modf/bbf7f7.wgsl.expected.ir.fxc.hlsl
index 6c84711..e07fea4 100644
--- a/test/tint/builtins/gen/var/modf/bbf7f7.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/builtins/gen/var/modf/bbf7f7.wgsl.expected.ir.fxc.hlsl
@@ -15,8 +15,7 @@
void modf_bbf7f7() {
float arg_0 = -1.5f;
float v = 0.0f;
- float v_1 = modf(arg_0, v);
- modf_result_f32 res = {v_1, v};
+ modf_result_f32 res = {modf(arg_0, v), v};
}
void fragment_main() {
@@ -32,13 +31,13 @@
VertexOutput tint_symbol = (VertexOutput)0;
tint_symbol.pos = (0.0f).xxxx;
modf_bbf7f7();
- VertexOutput v_2 = tint_symbol;
- return v_2;
+ VertexOutput v_1 = tint_symbol;
+ return v_1;
}
vertex_main_outputs vertex_main() {
- VertexOutput v_3 = vertex_main_inner();
- vertex_main_outputs v_4 = {v_3.pos};
- return v_4;
+ VertexOutput v_2 = vertex_main_inner();
+ vertex_main_outputs v_3 = {v_2.pos};
+ return v_3;
}
diff --git a/test/tint/builtins/gen/var/pack4xI8/bfce01.wgsl.expected.ir.fxc.hlsl b/test/tint/builtins/gen/var/pack4xI8/bfce01.wgsl.expected.ir.fxc.hlsl
index 2013151..54e0344 100644
--- a/test/tint/builtins/gen/var/pack4xI8/bfce01.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/builtins/gen/var/pack4xI8/bfce01.wgsl.expected.ir.fxc.hlsl
@@ -14,9 +14,8 @@
int4 arg_0 = (int(1)).xxxx;
int4 v = arg_0;
uint4 v_1 = uint4(0u, 8u, 16u, 24u);
- uint4 v_2 = asuint(v);
- uint4 v_3 = ((v_2 & uint4((255u).xxxx)) << v_1);
- uint res = dot(v_3, uint4((1u).xxxx));
+ uint4 v_2 = ((asuint(v) & uint4((255u).xxxx)) << v_1);
+ uint res = dot(v_2, uint4((1u).xxxx));
return res;
}
@@ -33,13 +32,13 @@
VertexOutput tint_symbol = (VertexOutput)0;
tint_symbol.pos = (0.0f).xxxx;
tint_symbol.prevent_dce = pack4xI8_bfce01();
- VertexOutput v_4 = tint_symbol;
- return v_4;
+ VertexOutput v_3 = tint_symbol;
+ return v_3;
}
vertex_main_outputs vertex_main() {
- VertexOutput v_5 = vertex_main_inner();
- vertex_main_outputs v_6 = {v_5.prevent_dce, v_5.pos};
- return v_6;
+ VertexOutput v_4 = vertex_main_inner();
+ vertex_main_outputs v_5 = {v_4.prevent_dce, v_4.pos};
+ return v_5;
}
diff --git a/test/tint/builtins/gen/var/quantizeToF16/cba294.wgsl.expected.glsl b/test/tint/builtins/gen/var/quantizeToF16/cba294.wgsl.expected.glsl
index 00f14a9..d1cb21e 100644
--- a/test/tint/builtins/gen/var/quantizeToF16/cba294.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/quantizeToF16/cba294.wgsl.expected.glsl
@@ -7,8 +7,7 @@
vec4 inner;
} v;
vec4 tint_quantize_to_f16(vec4 val) {
- vec2 v_1 = unpackHalf2x16(packHalf2x16(val.xy));
- return vec4(v_1, unpackHalf2x16(packHalf2x16(val.zw)));
+ return vec4(unpackHalf2x16(packHalf2x16(val.xy)), unpackHalf2x16(packHalf2x16(val.zw)));
}
vec4 quantizeToF16_cba294() {
vec4 arg_0 = vec4(1.0f);
@@ -25,8 +24,7 @@
vec4 inner;
} v;
vec4 tint_quantize_to_f16(vec4 val) {
- vec2 v_1 = unpackHalf2x16(packHalf2x16(val.xy));
- return vec4(v_1, unpackHalf2x16(packHalf2x16(val.zw)));
+ return vec4(unpackHalf2x16(packHalf2x16(val.xy)), unpackHalf2x16(packHalf2x16(val.zw)));
}
vec4 quantizeToF16_cba294() {
vec4 arg_0 = vec4(1.0f);
@@ -47,8 +45,7 @@
layout(location = 0) flat out vec4 vertex_main_loc0_Output;
vec4 tint_quantize_to_f16(vec4 val) {
- vec2 v = unpackHalf2x16(packHalf2x16(val.xy));
- return vec4(v, unpackHalf2x16(packHalf2x16(val.zw)));
+ return vec4(unpackHalf2x16(packHalf2x16(val.xy)), unpackHalf2x16(packHalf2x16(val.zw)));
}
vec4 quantizeToF16_cba294() {
vec4 arg_0 = vec4(1.0f);
@@ -62,10 +59,10 @@
return tint_symbol;
}
void main() {
- VertexOutput v_1 = vertex_main_inner();
- gl_Position = v_1.pos;
+ VertexOutput v = vertex_main_inner();
+ gl_Position = v.pos;
gl_Position[1u] = -(gl_Position.y);
gl_Position[2u] = ((2.0f * gl_Position.z) - gl_Position.w);
- vertex_main_loc0_Output = v_1.prevent_dce;
+ vertex_main_loc0_Output = v.prevent_dce;
gl_PointSize = 1.0f;
}
diff --git a/test/tint/builtins/gen/var/quantizeToF16/e8fd14.wgsl.expected.glsl b/test/tint/builtins/gen/var/quantizeToF16/e8fd14.wgsl.expected.glsl
index 317e934..2556d24 100644
--- a/test/tint/builtins/gen/var/quantizeToF16/e8fd14.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/quantizeToF16/e8fd14.wgsl.expected.glsl
@@ -7,8 +7,7 @@
vec3 inner;
} v;
vec3 tint_quantize_to_f16(vec3 val) {
- vec2 v_1 = unpackHalf2x16(packHalf2x16(val.xy));
- return vec3(v_1, unpackHalf2x16(packHalf2x16(val.zz)).x);
+ return vec3(unpackHalf2x16(packHalf2x16(val.xy)), unpackHalf2x16(packHalf2x16(val.zz)).x);
}
vec3 quantizeToF16_e8fd14() {
vec3 arg_0 = vec3(1.0f);
@@ -25,8 +24,7 @@
vec3 inner;
} v;
vec3 tint_quantize_to_f16(vec3 val) {
- vec2 v_1 = unpackHalf2x16(packHalf2x16(val.xy));
- return vec3(v_1, unpackHalf2x16(packHalf2x16(val.zz)).x);
+ return vec3(unpackHalf2x16(packHalf2x16(val.xy)), unpackHalf2x16(packHalf2x16(val.zz)).x);
}
vec3 quantizeToF16_e8fd14() {
vec3 arg_0 = vec3(1.0f);
@@ -47,8 +45,7 @@
layout(location = 0) flat out vec3 vertex_main_loc0_Output;
vec3 tint_quantize_to_f16(vec3 val) {
- vec2 v = unpackHalf2x16(packHalf2x16(val.xy));
- return vec3(v, unpackHalf2x16(packHalf2x16(val.zz)).x);
+ return vec3(unpackHalf2x16(packHalf2x16(val.xy)), unpackHalf2x16(packHalf2x16(val.zz)).x);
}
vec3 quantizeToF16_e8fd14() {
vec3 arg_0 = vec3(1.0f);
@@ -62,10 +59,10 @@
return tint_symbol;
}
void main() {
- VertexOutput v_1 = vertex_main_inner();
- gl_Position = v_1.pos;
+ VertexOutput v = vertex_main_inner();
+ gl_Position = v.pos;
gl_Position[1u] = -(gl_Position.y);
gl_Position[2u] = ((2.0f * gl_Position.z) - gl_Position.w);
- vertex_main_loc0_Output = v_1.prevent_dce;
+ vertex_main_loc0_Output = v.prevent_dce;
gl_PointSize = 1.0f;
}
diff --git a/test/tint/builtins/gen/var/subgroupBallot/1a8251.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/subgroupBallot/1a8251.wgsl.expected.ir.msl
index 73db8be..54a7908 100644
--- a/test/tint/builtins/gen/var/subgroupBallot/1a8251.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/subgroupBallot/1a8251.wgsl.expected.ir.msl
@@ -20,19 +20,15 @@
fragment void fragment_main(uint tint_subgroup_size [[threads_per_simdgroup]], device uint4* prevent_dce [[buffer(0)]]) {
thread uint2 tint_subgroup_size_mask = 0u;
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .tint_subgroup_size_mask=(&tint_subgroup_size_mask)};
- uint const v_1 = select((4294967295u >> (32u - tint_subgroup_size)), 4294967295u, (tint_subgroup_size > 32u));
- uint const v_2 = select(0u, (4294967295u >> (64u - tint_subgroup_size)), (tint_subgroup_size > 32u));
- (*tint_module_vars.tint_subgroup_size_mask)[0u] = v_1;
- (*tint_module_vars.tint_subgroup_size_mask)[1u] = v_2;
+ (*tint_module_vars.tint_subgroup_size_mask)[0u] = select((4294967295u >> (32u - tint_subgroup_size)), 4294967295u, (tint_subgroup_size > 32u));
+ (*tint_module_vars.tint_subgroup_size_mask)[1u] = select(0u, (4294967295u >> (64u - tint_subgroup_size)), (tint_subgroup_size > 32u));
(*tint_module_vars.prevent_dce) = subgroupBallot_1a8251(tint_module_vars);
}
kernel void compute_main(uint tint_subgroup_size [[threads_per_simdgroup]], device uint4* prevent_dce [[buffer(0)]]) {
thread uint2 tint_subgroup_size_mask = 0u;
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce, .tint_subgroup_size_mask=(&tint_subgroup_size_mask)};
- uint const v_3 = select((4294967295u >> (32u - tint_subgroup_size)), 4294967295u, (tint_subgroup_size > 32u));
- uint const v_4 = select(0u, (4294967295u >> (64u - tint_subgroup_size)), (tint_subgroup_size > 32u));
- (*tint_module_vars.tint_subgroup_size_mask)[0u] = v_3;
- (*tint_module_vars.tint_subgroup_size_mask)[1u] = v_4;
+ (*tint_module_vars.tint_subgroup_size_mask)[0u] = select((4294967295u >> (32u - tint_subgroup_size)), 4294967295u, (tint_subgroup_size > 32u));
+ (*tint_module_vars.tint_subgroup_size_mask)[1u] = select(0u, (4294967295u >> (64u - tint_subgroup_size)), (tint_subgroup_size > 32u));
(*tint_module_vars.prevent_dce) = subgroupBallot_1a8251(tint_module_vars);
}
diff --git a/test/tint/builtins/gen/var/subgroupShuffleDown/10eb45.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/gen/var/subgroupShuffleDown/10eb45.wgsl.expected.ir.dxc.hlsl
index 09979fc..e91f27c 100644
--- a/test/tint/builtins/gen/var/subgroupShuffleDown/10eb45.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/gen/var/subgroupShuffleDown/10eb45.wgsl.expected.ir.dxc.hlsl
@@ -3,9 +3,7 @@
vector<float16_t, 4> subgroupShuffleDown_10eb45() {
vector<float16_t, 4> arg_0 = (float16_t(1.0h)).xxxx;
uint arg_1 = 1u;
- vector<float16_t, 4> v = arg_0;
- uint v_1 = arg_1;
- vector<float16_t, 4> res = WaveReadLaneAt(v, (WaveGetLaneIndex() + v_1));
+ vector<float16_t, 4> res = WaveReadLaneAt(arg_0, (WaveGetLaneIndex() + arg_1));
return res;
}
diff --git a/test/tint/builtins/gen/var/subgroupShuffleDown/1b530f.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/gen/var/subgroupShuffleDown/1b530f.wgsl.expected.ir.dxc.hlsl
index 1bba839..4b76a60 100644
--- a/test/tint/builtins/gen/var/subgroupShuffleDown/1b530f.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/gen/var/subgroupShuffleDown/1b530f.wgsl.expected.ir.dxc.hlsl
@@ -3,9 +3,7 @@
int3 subgroupShuffleDown_1b530f() {
int3 arg_0 = (int(1)).xxx;
uint arg_1 = 1u;
- int3 v = arg_0;
- uint v_1 = arg_1;
- int3 res = WaveReadLaneAt(v, (WaveGetLaneIndex() + v_1));
+ int3 res = WaveReadLaneAt(arg_0, (WaveGetLaneIndex() + arg_1));
return res;
}
diff --git a/test/tint/builtins/gen/var/subgroupShuffleDown/257ff0.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/gen/var/subgroupShuffleDown/257ff0.wgsl.expected.ir.dxc.hlsl
index 2d30c3e..efc7f9a 100644
--- a/test/tint/builtins/gen/var/subgroupShuffleDown/257ff0.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/gen/var/subgroupShuffleDown/257ff0.wgsl.expected.ir.dxc.hlsl
@@ -3,9 +3,7 @@
float4 subgroupShuffleDown_257ff0() {
float4 arg_0 = (1.0f).xxxx;
uint arg_1 = 1u;
- float4 v = arg_0;
- uint v_1 = arg_1;
- float4 res = WaveReadLaneAt(v, (WaveGetLaneIndex() + v_1));
+ float4 res = WaveReadLaneAt(arg_0, (WaveGetLaneIndex() + arg_1));
return res;
}
diff --git a/test/tint/builtins/gen/var/subgroupShuffleDown/313d9b.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/gen/var/subgroupShuffleDown/313d9b.wgsl.expected.ir.dxc.hlsl
index 81bfdbe..cbfac82 100644
--- a/test/tint/builtins/gen/var/subgroupShuffleDown/313d9b.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/gen/var/subgroupShuffleDown/313d9b.wgsl.expected.ir.dxc.hlsl
@@ -3,9 +3,7 @@
int4 subgroupShuffleDown_313d9b() {
int4 arg_0 = (int(1)).xxxx;
uint arg_1 = 1u;
- int4 v = arg_0;
- uint v_1 = arg_1;
- int4 res = WaveReadLaneAt(v, (WaveGetLaneIndex() + v_1));
+ int4 res = WaveReadLaneAt(arg_0, (WaveGetLaneIndex() + arg_1));
return res;
}
diff --git a/test/tint/builtins/gen/var/subgroupShuffleDown/57b1e8.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/gen/var/subgroupShuffleDown/57b1e8.wgsl.expected.ir.dxc.hlsl
index e499055..63f36bc 100644
--- a/test/tint/builtins/gen/var/subgroupShuffleDown/57b1e8.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/gen/var/subgroupShuffleDown/57b1e8.wgsl.expected.ir.dxc.hlsl
@@ -3,9 +3,7 @@
vector<float16_t, 2> subgroupShuffleDown_57b1e8() {
vector<float16_t, 2> arg_0 = (float16_t(1.0h)).xx;
uint arg_1 = 1u;
- vector<float16_t, 2> v = arg_0;
- uint v_1 = arg_1;
- vector<float16_t, 2> res = WaveReadLaneAt(v, (WaveGetLaneIndex() + v_1));
+ vector<float16_t, 2> res = WaveReadLaneAt(arg_0, (WaveGetLaneIndex() + arg_1));
return res;
}
diff --git a/test/tint/builtins/gen/var/subgroupShuffleDown/5d8b9f.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/gen/var/subgroupShuffleDown/5d8b9f.wgsl.expected.ir.dxc.hlsl
index c84a4fb..db2bbb9 100644
--- a/test/tint/builtins/gen/var/subgroupShuffleDown/5d8b9f.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/gen/var/subgroupShuffleDown/5d8b9f.wgsl.expected.ir.dxc.hlsl
@@ -3,9 +3,7 @@
float3 subgroupShuffleDown_5d8b9f() {
float3 arg_0 = (1.0f).xxx;
uint arg_1 = 1u;
- float3 v = arg_0;
- uint v_1 = arg_1;
- float3 res = WaveReadLaneAt(v, (WaveGetLaneIndex() + v_1));
+ float3 res = WaveReadLaneAt(arg_0, (WaveGetLaneIndex() + arg_1));
return res;
}
diff --git a/test/tint/builtins/gen/var/subgroupShuffleDown/63fdb0.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/gen/var/subgroupShuffleDown/63fdb0.wgsl.expected.ir.dxc.hlsl
index 8a683ee..7c56cb9 100644
--- a/test/tint/builtins/gen/var/subgroupShuffleDown/63fdb0.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/gen/var/subgroupShuffleDown/63fdb0.wgsl.expected.ir.dxc.hlsl
@@ -3,9 +3,7 @@
vector<float16_t, 3> subgroupShuffleDown_63fdb0() {
vector<float16_t, 3> arg_0 = (float16_t(1.0h)).xxx;
uint arg_1 = 1u;
- vector<float16_t, 3> v = arg_0;
- uint v_1 = arg_1;
- vector<float16_t, 3> res = WaveReadLaneAt(v, (WaveGetLaneIndex() + v_1));
+ vector<float16_t, 3> res = WaveReadLaneAt(arg_0, (WaveGetLaneIndex() + arg_1));
return res;
}
diff --git a/test/tint/builtins/gen/var/subgroupShuffleDown/642789.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/gen/var/subgroupShuffleDown/642789.wgsl.expected.ir.dxc.hlsl
index eb04453..64efa19 100644
--- a/test/tint/builtins/gen/var/subgroupShuffleDown/642789.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/gen/var/subgroupShuffleDown/642789.wgsl.expected.ir.dxc.hlsl
@@ -3,9 +3,7 @@
uint3 subgroupShuffleDown_642789() {
uint3 arg_0 = (1u).xxx;
uint arg_1 = 1u;
- uint3 v = arg_0;
- uint v_1 = arg_1;
- uint3 res = WaveReadLaneAt(v, (WaveGetLaneIndex() + v_1));
+ uint3 res = WaveReadLaneAt(arg_0, (WaveGetLaneIndex() + arg_1));
return res;
}
diff --git a/test/tint/builtins/gen/var/subgroupShuffleDown/7a0cf5.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/gen/var/subgroupShuffleDown/7a0cf5.wgsl.expected.ir.dxc.hlsl
index 5a4d42f..4573fab 100644
--- a/test/tint/builtins/gen/var/subgroupShuffleDown/7a0cf5.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/gen/var/subgroupShuffleDown/7a0cf5.wgsl.expected.ir.dxc.hlsl
@@ -3,9 +3,7 @@
float2 subgroupShuffleDown_7a0cf5() {
float2 arg_0 = (1.0f).xx;
uint arg_1 = 1u;
- float2 v = arg_0;
- uint v_1 = arg_1;
- float2 res = WaveReadLaneAt(v, (WaveGetLaneIndex() + v_1));
+ float2 res = WaveReadLaneAt(arg_0, (WaveGetLaneIndex() + arg_1));
return res;
}
diff --git a/test/tint/builtins/gen/var/subgroupShuffleDown/7f8886.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/gen/var/subgroupShuffleDown/7f8886.wgsl.expected.ir.dxc.hlsl
index 6543105..8a74136 100644
--- a/test/tint/builtins/gen/var/subgroupShuffleDown/7f8886.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/gen/var/subgroupShuffleDown/7f8886.wgsl.expected.ir.dxc.hlsl
@@ -3,9 +3,7 @@
float subgroupShuffleDown_7f8886() {
float arg_0 = 1.0f;
uint arg_1 = 1u;
- float v = arg_0;
- uint v_1 = arg_1;
- float res = WaveReadLaneAt(v, (WaveGetLaneIndex() + v_1));
+ float res = WaveReadLaneAt(arg_0, (WaveGetLaneIndex() + arg_1));
return res;
}
diff --git a/test/tint/builtins/gen/var/subgroupShuffleDown/9c6714.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/gen/var/subgroupShuffleDown/9c6714.wgsl.expected.ir.dxc.hlsl
index 92afff7..cbcef7e 100644
--- a/test/tint/builtins/gen/var/subgroupShuffleDown/9c6714.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/gen/var/subgroupShuffleDown/9c6714.wgsl.expected.ir.dxc.hlsl
@@ -3,9 +3,7 @@
float16_t subgroupShuffleDown_9c6714() {
float16_t arg_0 = float16_t(1.0h);
uint arg_1 = 1u;
- float16_t v = arg_0;
- uint v_1 = arg_1;
- float16_t res = WaveReadLaneAt(v, (WaveGetLaneIndex() + v_1));
+ float16_t res = WaveReadLaneAt(arg_0, (WaveGetLaneIndex() + arg_1));
return res;
}
diff --git a/test/tint/builtins/gen/var/subgroupShuffleDown/b41899.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/gen/var/subgroupShuffleDown/b41899.wgsl.expected.ir.dxc.hlsl
index 0f97cff..aff7669 100644
--- a/test/tint/builtins/gen/var/subgroupShuffleDown/b41899.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/gen/var/subgroupShuffleDown/b41899.wgsl.expected.ir.dxc.hlsl
@@ -3,9 +3,7 @@
int2 subgroupShuffleDown_b41899() {
int2 arg_0 = (int(1)).xx;
uint arg_1 = 1u;
- int2 v = arg_0;
- uint v_1 = arg_1;
- int2 res = WaveReadLaneAt(v, (WaveGetLaneIndex() + v_1));
+ int2 res = WaveReadLaneAt(arg_0, (WaveGetLaneIndex() + arg_1));
return res;
}
diff --git a/test/tint/builtins/gen/var/subgroupShuffleDown/c9f1c4.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/gen/var/subgroupShuffleDown/c9f1c4.wgsl.expected.ir.dxc.hlsl
index a54585c..7f39791 100644
--- a/test/tint/builtins/gen/var/subgroupShuffleDown/c9f1c4.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/gen/var/subgroupShuffleDown/c9f1c4.wgsl.expected.ir.dxc.hlsl
@@ -3,9 +3,7 @@
uint2 subgroupShuffleDown_c9f1c4() {
uint2 arg_0 = (1u).xx;
uint arg_1 = 1u;
- uint2 v = arg_0;
- uint v_1 = arg_1;
- uint2 res = WaveReadLaneAt(v, (WaveGetLaneIndex() + v_1));
+ uint2 res = WaveReadLaneAt(arg_0, (WaveGetLaneIndex() + arg_1));
return res;
}
diff --git a/test/tint/builtins/gen/var/subgroupShuffleDown/d269eb.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/gen/var/subgroupShuffleDown/d269eb.wgsl.expected.ir.dxc.hlsl
index 33816db..c203b16 100644
--- a/test/tint/builtins/gen/var/subgroupShuffleDown/d269eb.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/gen/var/subgroupShuffleDown/d269eb.wgsl.expected.ir.dxc.hlsl
@@ -3,9 +3,7 @@
int subgroupShuffleDown_d269eb() {
int arg_0 = int(1);
uint arg_1 = 1u;
- int v = arg_0;
- uint v_1 = arg_1;
- int res = WaveReadLaneAt(v, (WaveGetLaneIndex() + v_1));
+ int res = WaveReadLaneAt(arg_0, (WaveGetLaneIndex() + arg_1));
return res;
}
diff --git a/test/tint/builtins/gen/var/subgroupShuffleDown/d46304.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/gen/var/subgroupShuffleDown/d46304.wgsl.expected.ir.dxc.hlsl
index 3ee1f79..10af458 100644
--- a/test/tint/builtins/gen/var/subgroupShuffleDown/d46304.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/gen/var/subgroupShuffleDown/d46304.wgsl.expected.ir.dxc.hlsl
@@ -3,9 +3,7 @@
uint4 subgroupShuffleDown_d46304() {
uint4 arg_0 = (1u).xxxx;
uint arg_1 = 1u;
- uint4 v = arg_0;
- uint v_1 = arg_1;
- uint4 res = WaveReadLaneAt(v, (WaveGetLaneIndex() + v_1));
+ uint4 res = WaveReadLaneAt(arg_0, (WaveGetLaneIndex() + arg_1));
return res;
}
diff --git a/test/tint/builtins/gen/var/subgroupShuffleDown/d90c2f.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/gen/var/subgroupShuffleDown/d90c2f.wgsl.expected.ir.dxc.hlsl
index ff97f2a..d031296 100644
--- a/test/tint/builtins/gen/var/subgroupShuffleDown/d90c2f.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/gen/var/subgroupShuffleDown/d90c2f.wgsl.expected.ir.dxc.hlsl
@@ -3,9 +3,7 @@
uint subgroupShuffleDown_d90c2f() {
uint arg_0 = 1u;
uint arg_1 = 1u;
- uint v = arg_0;
- uint v_1 = arg_1;
- uint res = WaveReadLaneAt(v, (WaveGetLaneIndex() + v_1));
+ uint res = WaveReadLaneAt(arg_0, (WaveGetLaneIndex() + arg_1));
return res;
}
diff --git a/test/tint/builtins/gen/var/subgroupShuffleUp/0990cd.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/gen/var/subgroupShuffleUp/0990cd.wgsl.expected.ir.dxc.hlsl
index 082b3aa..2eb4021 100644
--- a/test/tint/builtins/gen/var/subgroupShuffleUp/0990cd.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/gen/var/subgroupShuffleUp/0990cd.wgsl.expected.ir.dxc.hlsl
@@ -3,9 +3,7 @@
vector<float16_t, 4> subgroupShuffleUp_0990cd() {
vector<float16_t, 4> arg_0 = (float16_t(1.0h)).xxxx;
uint arg_1 = 1u;
- vector<float16_t, 4> v = arg_0;
- uint v_1 = arg_1;
- vector<float16_t, 4> res = WaveReadLaneAt(v, (WaveGetLaneIndex() - v_1));
+ vector<float16_t, 4> res = WaveReadLaneAt(arg_0, (WaveGetLaneIndex() - arg_1));
return res;
}
diff --git a/test/tint/builtins/gen/var/subgroupShuffleUp/1bb93f.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/gen/var/subgroupShuffleUp/1bb93f.wgsl.expected.ir.dxc.hlsl
index e3f9e1a..6b5ff33 100644
--- a/test/tint/builtins/gen/var/subgroupShuffleUp/1bb93f.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/gen/var/subgroupShuffleUp/1bb93f.wgsl.expected.ir.dxc.hlsl
@@ -3,9 +3,7 @@
int subgroupShuffleUp_1bb93f() {
int arg_0 = int(1);
uint arg_1 = 1u;
- int v = arg_0;
- uint v_1 = arg_1;
- int res = WaveReadLaneAt(v, (WaveGetLaneIndex() - v_1));
+ int res = WaveReadLaneAt(arg_0, (WaveGetLaneIndex() - arg_1));
return res;
}
diff --git a/test/tint/builtins/gen/var/subgroupShuffleUp/23c7ca.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/gen/var/subgroupShuffleUp/23c7ca.wgsl.expected.ir.dxc.hlsl
index 89e3f4b..e517a42 100644
--- a/test/tint/builtins/gen/var/subgroupShuffleUp/23c7ca.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/gen/var/subgroupShuffleUp/23c7ca.wgsl.expected.ir.dxc.hlsl
@@ -3,9 +3,7 @@
float subgroupShuffleUp_23c7ca() {
float arg_0 = 1.0f;
uint arg_1 = 1u;
- float v = arg_0;
- uint v_1 = arg_1;
- float res = WaveReadLaneAt(v, (WaveGetLaneIndex() - v_1));
+ float res = WaveReadLaneAt(arg_0, (WaveGetLaneIndex() - arg_1));
return res;
}
diff --git a/test/tint/builtins/gen/var/subgroupShuffleUp/3242a6.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/gen/var/subgroupShuffleUp/3242a6.wgsl.expected.ir.dxc.hlsl
index 57994eb..4c7adc9 100644
--- a/test/tint/builtins/gen/var/subgroupShuffleUp/3242a6.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/gen/var/subgroupShuffleUp/3242a6.wgsl.expected.ir.dxc.hlsl
@@ -3,9 +3,7 @@
uint subgroupShuffleUp_3242a6() {
uint arg_0 = 1u;
uint arg_1 = 1u;
- uint v = arg_0;
- uint v_1 = arg_1;
- uint res = WaveReadLaneAt(v, (WaveGetLaneIndex() - v_1));
+ uint res = WaveReadLaneAt(arg_0, (WaveGetLaneIndex() - arg_1));
return res;
}
diff --git a/test/tint/builtins/gen/var/subgroupShuffleUp/33d495.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/gen/var/subgroupShuffleUp/33d495.wgsl.expected.ir.dxc.hlsl
index 32830a3..6d66153 100644
--- a/test/tint/builtins/gen/var/subgroupShuffleUp/33d495.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/gen/var/subgroupShuffleUp/33d495.wgsl.expected.ir.dxc.hlsl
@@ -3,9 +3,7 @@
float4 subgroupShuffleUp_33d495() {
float4 arg_0 = (1.0f).xxxx;
uint arg_1 = 1u;
- float4 v = arg_0;
- uint v_1 = arg_1;
- float4 res = WaveReadLaneAt(v, (WaveGetLaneIndex() - v_1));
+ float4 res = WaveReadLaneAt(arg_0, (WaveGetLaneIndex() - arg_1));
return res;
}
diff --git a/test/tint/builtins/gen/var/subgroupShuffleUp/3e609f.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/gen/var/subgroupShuffleUp/3e609f.wgsl.expected.ir.dxc.hlsl
index dfff5b7..ae43039 100644
--- a/test/tint/builtins/gen/var/subgroupShuffleUp/3e609f.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/gen/var/subgroupShuffleUp/3e609f.wgsl.expected.ir.dxc.hlsl
@@ -3,9 +3,7 @@
int4 subgroupShuffleUp_3e609f() {
int4 arg_0 = (int(1)).xxxx;
uint arg_1 = 1u;
- int4 v = arg_0;
- uint v_1 = arg_1;
- int4 res = WaveReadLaneAt(v, (WaveGetLaneIndex() - v_1));
+ int4 res = WaveReadLaneAt(arg_0, (WaveGetLaneIndex() - arg_1));
return res;
}
diff --git a/test/tint/builtins/gen/var/subgroupShuffleUp/58de69.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/gen/var/subgroupShuffleUp/58de69.wgsl.expected.ir.dxc.hlsl
index c66f242..f42c107 100644
--- a/test/tint/builtins/gen/var/subgroupShuffleUp/58de69.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/gen/var/subgroupShuffleUp/58de69.wgsl.expected.ir.dxc.hlsl
@@ -3,9 +3,7 @@
uint2 subgroupShuffleUp_58de69() {
uint2 arg_0 = (1u).xx;
uint arg_1 = 1u;
- uint2 v = arg_0;
- uint v_1 = arg_1;
- uint2 res = WaveReadLaneAt(v, (WaveGetLaneIndex() - v_1));
+ uint2 res = WaveReadLaneAt(arg_0, (WaveGetLaneIndex() - arg_1));
return res;
}
diff --git a/test/tint/builtins/gen/var/subgroupShuffleUp/868e52.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/gen/var/subgroupShuffleUp/868e52.wgsl.expected.ir.dxc.hlsl
index 7a3e163..381eebf 100644
--- a/test/tint/builtins/gen/var/subgroupShuffleUp/868e52.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/gen/var/subgroupShuffleUp/868e52.wgsl.expected.ir.dxc.hlsl
@@ -3,9 +3,7 @@
vector<float16_t, 3> subgroupShuffleUp_868e52() {
vector<float16_t, 3> arg_0 = (float16_t(1.0h)).xxx;
uint arg_1 = 1u;
- vector<float16_t, 3> v = arg_0;
- uint v_1 = arg_1;
- vector<float16_t, 3> res = WaveReadLaneAt(v, (WaveGetLaneIndex() - v_1));
+ vector<float16_t, 3> res = WaveReadLaneAt(arg_0, (WaveGetLaneIndex() - arg_1));
return res;
}
diff --git a/test/tint/builtins/gen/var/subgroupShuffleUp/87c9d6.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/gen/var/subgroupShuffleUp/87c9d6.wgsl.expected.ir.dxc.hlsl
index cd48322..d2cd600 100644
--- a/test/tint/builtins/gen/var/subgroupShuffleUp/87c9d6.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/gen/var/subgroupShuffleUp/87c9d6.wgsl.expected.ir.dxc.hlsl
@@ -3,9 +3,7 @@
float3 subgroupShuffleUp_87c9d6() {
float3 arg_0 = (1.0f).xxx;
uint arg_1 = 1u;
- float3 v = arg_0;
- uint v_1 = arg_1;
- float3 res = WaveReadLaneAt(v, (WaveGetLaneIndex() - v_1));
+ float3 res = WaveReadLaneAt(arg_0, (WaveGetLaneIndex() - arg_1));
return res;
}
diff --git a/test/tint/builtins/gen/var/subgroupShuffleUp/88eb07.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/gen/var/subgroupShuffleUp/88eb07.wgsl.expected.ir.dxc.hlsl
index 964205d..7a0efad 100644
--- a/test/tint/builtins/gen/var/subgroupShuffleUp/88eb07.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/gen/var/subgroupShuffleUp/88eb07.wgsl.expected.ir.dxc.hlsl
@@ -3,9 +3,7 @@
uint4 subgroupShuffleUp_88eb07() {
uint4 arg_0 = (1u).xxxx;
uint arg_1 = 1u;
- uint4 v = arg_0;
- uint v_1 = arg_1;
- uint4 res = WaveReadLaneAt(v, (WaveGetLaneIndex() - v_1));
+ uint4 res = WaveReadLaneAt(arg_0, (WaveGetLaneIndex() - arg_1));
return res;
}
diff --git a/test/tint/builtins/gen/var/subgroupShuffleUp/8a63f3.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/gen/var/subgroupShuffleUp/8a63f3.wgsl.expected.ir.dxc.hlsl
index 317edcf..4a53b52 100644
--- a/test/tint/builtins/gen/var/subgroupShuffleUp/8a63f3.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/gen/var/subgroupShuffleUp/8a63f3.wgsl.expected.ir.dxc.hlsl
@@ -3,9 +3,7 @@
int3 subgroupShuffleUp_8a63f3() {
int3 arg_0 = (int(1)).xxx;
uint arg_1 = 1u;
- int3 v = arg_0;
- uint v_1 = arg_1;
- int3 res = WaveReadLaneAt(v, (WaveGetLaneIndex() - v_1));
+ int3 res = WaveReadLaneAt(arg_0, (WaveGetLaneIndex() - arg_1));
return res;
}
diff --git a/test/tint/builtins/gen/var/subgroupShuffleUp/a2075a.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/gen/var/subgroupShuffleUp/a2075a.wgsl.expected.ir.dxc.hlsl
index d22b670..0cb8cc5 100644
--- a/test/tint/builtins/gen/var/subgroupShuffleUp/a2075a.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/gen/var/subgroupShuffleUp/a2075a.wgsl.expected.ir.dxc.hlsl
@@ -3,9 +3,7 @@
vector<float16_t, 2> subgroupShuffleUp_a2075a() {
vector<float16_t, 2> arg_0 = (float16_t(1.0h)).xx;
uint arg_1 = 1u;
- vector<float16_t, 2> v = arg_0;
- uint v_1 = arg_1;
- vector<float16_t, 2> res = WaveReadLaneAt(v, (WaveGetLaneIndex() - v_1));
+ vector<float16_t, 2> res = WaveReadLaneAt(arg_0, (WaveGetLaneIndex() - arg_1));
return res;
}
diff --git a/test/tint/builtins/gen/var/subgroupShuffleUp/abaea0.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/gen/var/subgroupShuffleUp/abaea0.wgsl.expected.ir.dxc.hlsl
index f09e879..3181789 100644
--- a/test/tint/builtins/gen/var/subgroupShuffleUp/abaea0.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/gen/var/subgroupShuffleUp/abaea0.wgsl.expected.ir.dxc.hlsl
@@ -3,9 +3,7 @@
uint3 subgroupShuffleUp_abaea0() {
uint3 arg_0 = (1u).xxx;
uint arg_1 = 1u;
- uint3 v = arg_0;
- uint v_1 = arg_1;
- uint3 res = WaveReadLaneAt(v, (WaveGetLaneIndex() - v_1));
+ uint3 res = WaveReadLaneAt(arg_0, (WaveGetLaneIndex() - arg_1));
return res;
}
diff --git a/test/tint/builtins/gen/var/subgroupShuffleUp/b58804.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/gen/var/subgroupShuffleUp/b58804.wgsl.expected.ir.dxc.hlsl
index a37ad83..fd78251 100644
--- a/test/tint/builtins/gen/var/subgroupShuffleUp/b58804.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/gen/var/subgroupShuffleUp/b58804.wgsl.expected.ir.dxc.hlsl
@@ -3,9 +3,7 @@
float2 subgroupShuffleUp_b58804() {
float2 arg_0 = (1.0f).xx;
uint arg_1 = 1u;
- float2 v = arg_0;
- uint v_1 = arg_1;
- float2 res = WaveReadLaneAt(v, (WaveGetLaneIndex() - v_1));
+ float2 res = WaveReadLaneAt(arg_0, (WaveGetLaneIndex() - arg_1));
return res;
}
diff --git a/test/tint/builtins/gen/var/subgroupShuffleUp/bbf7f4.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/gen/var/subgroupShuffleUp/bbf7f4.wgsl.expected.ir.dxc.hlsl
index 19cbd4f..b5fe571 100644
--- a/test/tint/builtins/gen/var/subgroupShuffleUp/bbf7f4.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/gen/var/subgroupShuffleUp/bbf7f4.wgsl.expected.ir.dxc.hlsl
@@ -3,9 +3,7 @@
float16_t subgroupShuffleUp_bbf7f4() {
float16_t arg_0 = float16_t(1.0h);
uint arg_1 = 1u;
- float16_t v = arg_0;
- uint v_1 = arg_1;
- float16_t res = WaveReadLaneAt(v, (WaveGetLaneIndex() - v_1));
+ float16_t res = WaveReadLaneAt(arg_0, (WaveGetLaneIndex() - arg_1));
return res;
}
diff --git a/test/tint/builtins/gen/var/subgroupShuffleUp/db5bcb.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/gen/var/subgroupShuffleUp/db5bcb.wgsl.expected.ir.dxc.hlsl
index a5aae3e..25eb514 100644
--- a/test/tint/builtins/gen/var/subgroupShuffleUp/db5bcb.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/gen/var/subgroupShuffleUp/db5bcb.wgsl.expected.ir.dxc.hlsl
@@ -3,9 +3,7 @@
int2 subgroupShuffleUp_db5bcb() {
int2 arg_0 = (int(1)).xx;
uint arg_1 = 1u;
- int2 v = arg_0;
- uint v_1 = arg_1;
- int2 res = WaveReadLaneAt(v, (WaveGetLaneIndex() - v_1));
+ int2 res = WaveReadLaneAt(arg_0, (WaveGetLaneIndex() - arg_1));
return res;
}
diff --git a/test/tint/builtins/gen/var/subgroupShuffleXor/071aa0.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/gen/var/subgroupShuffleXor/071aa0.wgsl.expected.ir.dxc.hlsl
index a6ef3a1..ad8f220 100644
--- a/test/tint/builtins/gen/var/subgroupShuffleXor/071aa0.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/gen/var/subgroupShuffleXor/071aa0.wgsl.expected.ir.dxc.hlsl
@@ -3,9 +3,7 @@
int2 subgroupShuffleXor_071aa0() {
int2 arg_0 = (int(1)).xx;
uint arg_1 = 1u;
- int2 v = arg_0;
- uint v_1 = arg_1;
- int2 res = WaveReadLaneAt(v, (WaveGetLaneIndex() ^ v_1));
+ int2 res = WaveReadLaneAt(arg_0, (WaveGetLaneIndex() ^ arg_1));
return res;
}
diff --git a/test/tint/builtins/gen/var/subgroupShuffleXor/08f588.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/gen/var/subgroupShuffleXor/08f588.wgsl.expected.ir.dxc.hlsl
index 81dbb34..cd9792a 100644
--- a/test/tint/builtins/gen/var/subgroupShuffleXor/08f588.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/gen/var/subgroupShuffleXor/08f588.wgsl.expected.ir.dxc.hlsl
@@ -3,9 +3,7 @@
uint4 subgroupShuffleXor_08f588() {
uint4 arg_0 = (1u).xxxx;
uint arg_1 = 1u;
- uint4 v = arg_0;
- uint v_1 = arg_1;
- uint4 res = WaveReadLaneAt(v, (WaveGetLaneIndex() ^ v_1));
+ uint4 res = WaveReadLaneAt(arg_0, (WaveGetLaneIndex() ^ arg_1));
return res;
}
diff --git a/test/tint/builtins/gen/var/subgroupShuffleXor/1d36b6.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/gen/var/subgroupShuffleXor/1d36b6.wgsl.expected.ir.dxc.hlsl
index d18dc93..c0bdfea 100644
--- a/test/tint/builtins/gen/var/subgroupShuffleXor/1d36b6.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/gen/var/subgroupShuffleXor/1d36b6.wgsl.expected.ir.dxc.hlsl
@@ -3,9 +3,7 @@
float subgroupShuffleXor_1d36b6() {
float arg_0 = 1.0f;
uint arg_1 = 1u;
- float v = arg_0;
- uint v_1 = arg_1;
- float res = WaveReadLaneAt(v, (WaveGetLaneIndex() ^ v_1));
+ float res = WaveReadLaneAt(arg_0, (WaveGetLaneIndex() ^ arg_1));
return res;
}
diff --git a/test/tint/builtins/gen/var/subgroupShuffleXor/1e247f.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/gen/var/subgroupShuffleXor/1e247f.wgsl.expected.ir.dxc.hlsl
index fb4367a..6691bfd 100644
--- a/test/tint/builtins/gen/var/subgroupShuffleXor/1e247f.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/gen/var/subgroupShuffleXor/1e247f.wgsl.expected.ir.dxc.hlsl
@@ -3,9 +3,7 @@
vector<float16_t, 2> subgroupShuffleXor_1e247f() {
vector<float16_t, 2> arg_0 = (float16_t(1.0h)).xx;
uint arg_1 = 1u;
- vector<float16_t, 2> v = arg_0;
- uint v_1 = arg_1;
- vector<float16_t, 2> res = WaveReadLaneAt(v, (WaveGetLaneIndex() ^ v_1));
+ vector<float16_t, 2> res = WaveReadLaneAt(arg_0, (WaveGetLaneIndex() ^ arg_1));
return res;
}
diff --git a/test/tint/builtins/gen/var/subgroupShuffleXor/1f2590.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/gen/var/subgroupShuffleXor/1f2590.wgsl.expected.ir.dxc.hlsl
index 9406967..22385d0 100644
--- a/test/tint/builtins/gen/var/subgroupShuffleXor/1f2590.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/gen/var/subgroupShuffleXor/1f2590.wgsl.expected.ir.dxc.hlsl
@@ -3,9 +3,7 @@
vector<float16_t, 3> subgroupShuffleXor_1f2590() {
vector<float16_t, 3> arg_0 = (float16_t(1.0h)).xxx;
uint arg_1 = 1u;
- vector<float16_t, 3> v = arg_0;
- uint v_1 = arg_1;
- vector<float16_t, 3> res = WaveReadLaneAt(v, (WaveGetLaneIndex() ^ v_1));
+ vector<float16_t, 3> res = WaveReadLaneAt(arg_0, (WaveGetLaneIndex() ^ arg_1));
return res;
}
diff --git a/test/tint/builtins/gen/var/subgroupShuffleXor/2e033d.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/gen/var/subgroupShuffleXor/2e033d.wgsl.expected.ir.dxc.hlsl
index 067c5aa..4ed128f 100644
--- a/test/tint/builtins/gen/var/subgroupShuffleXor/2e033d.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/gen/var/subgroupShuffleXor/2e033d.wgsl.expected.ir.dxc.hlsl
@@ -3,9 +3,7 @@
vector<float16_t, 4> subgroupShuffleXor_2e033d() {
vector<float16_t, 4> arg_0 = (float16_t(1.0h)).xxxx;
uint arg_1 = 1u;
- vector<float16_t, 4> v = arg_0;
- uint v_1 = arg_1;
- vector<float16_t, 4> res = WaveReadLaneAt(v, (WaveGetLaneIndex() ^ v_1));
+ vector<float16_t, 4> res = WaveReadLaneAt(arg_0, (WaveGetLaneIndex() ^ arg_1));
return res;
}
diff --git a/test/tint/builtins/gen/var/subgroupShuffleXor/445e83.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/gen/var/subgroupShuffleXor/445e83.wgsl.expected.ir.dxc.hlsl
index d9253dc..a374c9f 100644
--- a/test/tint/builtins/gen/var/subgroupShuffleXor/445e83.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/gen/var/subgroupShuffleXor/445e83.wgsl.expected.ir.dxc.hlsl
@@ -3,9 +3,7 @@
int subgroupShuffleXor_445e83() {
int arg_0 = int(1);
uint arg_1 = 1u;
- int v = arg_0;
- uint v_1 = arg_1;
- int res = WaveReadLaneAt(v, (WaveGetLaneIndex() ^ v_1));
+ int res = WaveReadLaneAt(arg_0, (WaveGetLaneIndex() ^ arg_1));
return res;
}
diff --git a/test/tint/builtins/gen/var/subgroupShuffleXor/7435fe.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/gen/var/subgroupShuffleXor/7435fe.wgsl.expected.ir.dxc.hlsl
index 5ad3ae1..a21ba7f 100644
--- a/test/tint/builtins/gen/var/subgroupShuffleXor/7435fe.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/gen/var/subgroupShuffleXor/7435fe.wgsl.expected.ir.dxc.hlsl
@@ -3,9 +3,7 @@
int3 subgroupShuffleXor_7435fe() {
int3 arg_0 = (int(1)).xxx;
uint arg_1 = 1u;
- int3 v = arg_0;
- uint v_1 = arg_1;
- int3 res = WaveReadLaneAt(v, (WaveGetLaneIndex() ^ v_1));
+ int3 res = WaveReadLaneAt(arg_0, (WaveGetLaneIndex() ^ arg_1));
return res;
}
diff --git a/test/tint/builtins/gen/var/subgroupShuffleXor/80b6e9.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/gen/var/subgroupShuffleXor/80b6e9.wgsl.expected.ir.dxc.hlsl
index 18e0f27..8bda6b8 100644
--- a/test/tint/builtins/gen/var/subgroupShuffleXor/80b6e9.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/gen/var/subgroupShuffleXor/80b6e9.wgsl.expected.ir.dxc.hlsl
@@ -3,9 +3,7 @@
uint subgroupShuffleXor_80b6e9() {
uint arg_0 = 1u;
uint arg_1 = 1u;
- uint v = arg_0;
- uint v_1 = arg_1;
- uint res = WaveReadLaneAt(v, (WaveGetLaneIndex() ^ v_1));
+ uint res = WaveReadLaneAt(arg_0, (WaveGetLaneIndex() ^ arg_1));
return res;
}
diff --git a/test/tint/builtins/gen/var/subgroupShuffleXor/9f945a.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/gen/var/subgroupShuffleXor/9f945a.wgsl.expected.ir.dxc.hlsl
index 208c5dc..e3d8b91 100644
--- a/test/tint/builtins/gen/var/subgroupShuffleXor/9f945a.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/gen/var/subgroupShuffleXor/9f945a.wgsl.expected.ir.dxc.hlsl
@@ -3,9 +3,7 @@
uint3 subgroupShuffleXor_9f945a() {
uint3 arg_0 = (1u).xxx;
uint arg_1 = 1u;
- uint3 v = arg_0;
- uint v_1 = arg_1;
- uint3 res = WaveReadLaneAt(v, (WaveGetLaneIndex() ^ v_1));
+ uint3 res = WaveReadLaneAt(arg_0, (WaveGetLaneIndex() ^ arg_1));
return res;
}
diff --git a/test/tint/builtins/gen/var/subgroupShuffleXor/bdddba.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/gen/var/subgroupShuffleXor/bdddba.wgsl.expected.ir.dxc.hlsl
index c9c24a8..babf0f4 100644
--- a/test/tint/builtins/gen/var/subgroupShuffleXor/bdddba.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/gen/var/subgroupShuffleXor/bdddba.wgsl.expected.ir.dxc.hlsl
@@ -3,9 +3,7 @@
int4 subgroupShuffleXor_bdddba() {
int4 arg_0 = (int(1)).xxxx;
uint arg_1 = 1u;
- int4 v = arg_0;
- uint v_1 = arg_1;
- int4 res = WaveReadLaneAt(v, (WaveGetLaneIndex() ^ v_1));
+ int4 res = WaveReadLaneAt(arg_0, (WaveGetLaneIndex() ^ arg_1));
return res;
}
diff --git a/test/tint/builtins/gen/var/subgroupShuffleXor/c88290.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/gen/var/subgroupShuffleXor/c88290.wgsl.expected.ir.dxc.hlsl
index 768e191..cd1e8a6 100644
--- a/test/tint/builtins/gen/var/subgroupShuffleXor/c88290.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/gen/var/subgroupShuffleXor/c88290.wgsl.expected.ir.dxc.hlsl
@@ -3,9 +3,7 @@
float4 subgroupShuffleXor_c88290() {
float4 arg_0 = (1.0f).xxxx;
uint arg_1 = 1u;
- float4 v = arg_0;
- uint v_1 = arg_1;
- float4 res = WaveReadLaneAt(v, (WaveGetLaneIndex() ^ v_1));
+ float4 res = WaveReadLaneAt(arg_0, (WaveGetLaneIndex() ^ arg_1));
return res;
}
diff --git a/test/tint/builtins/gen/var/subgroupShuffleXor/caa816.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/gen/var/subgroupShuffleXor/caa816.wgsl.expected.ir.dxc.hlsl
index db10840..32e8cb1 100644
--- a/test/tint/builtins/gen/var/subgroupShuffleXor/caa816.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/gen/var/subgroupShuffleXor/caa816.wgsl.expected.ir.dxc.hlsl
@@ -3,9 +3,7 @@
float3 subgroupShuffleXor_caa816() {
float3 arg_0 = (1.0f).xxx;
uint arg_1 = 1u;
- float3 v = arg_0;
- uint v_1 = arg_1;
- float3 res = WaveReadLaneAt(v, (WaveGetLaneIndex() ^ v_1));
+ float3 res = WaveReadLaneAt(arg_0, (WaveGetLaneIndex() ^ arg_1));
return res;
}
diff --git a/test/tint/builtins/gen/var/subgroupShuffleXor/d224ab.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/gen/var/subgroupShuffleXor/d224ab.wgsl.expected.ir.dxc.hlsl
index 98ba1d7..ddc55a9 100644
--- a/test/tint/builtins/gen/var/subgroupShuffleXor/d224ab.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/gen/var/subgroupShuffleXor/d224ab.wgsl.expected.ir.dxc.hlsl
@@ -3,9 +3,7 @@
float16_t subgroupShuffleXor_d224ab() {
float16_t arg_0 = float16_t(1.0h);
uint arg_1 = 1u;
- float16_t v = arg_0;
- uint v_1 = arg_1;
- float16_t res = WaveReadLaneAt(v, (WaveGetLaneIndex() ^ v_1));
+ float16_t res = WaveReadLaneAt(arg_0, (WaveGetLaneIndex() ^ arg_1));
return res;
}
diff --git a/test/tint/builtins/gen/var/subgroupShuffleXor/e3c10b.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/gen/var/subgroupShuffleXor/e3c10b.wgsl.expected.ir.dxc.hlsl
index ac11efa..c4724da 100644
--- a/test/tint/builtins/gen/var/subgroupShuffleXor/e3c10b.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/gen/var/subgroupShuffleXor/e3c10b.wgsl.expected.ir.dxc.hlsl
@@ -3,9 +3,7 @@
uint2 subgroupShuffleXor_e3c10b() {
uint2 arg_0 = (1u).xx;
uint arg_1 = 1u;
- uint2 v = arg_0;
- uint v_1 = arg_1;
- uint2 res = WaveReadLaneAt(v, (WaveGetLaneIndex() ^ v_1));
+ uint2 res = WaveReadLaneAt(arg_0, (WaveGetLaneIndex() ^ arg_1));
return res;
}
diff --git a/test/tint/builtins/gen/var/subgroupShuffleXor/f7b453.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/gen/var/subgroupShuffleXor/f7b453.wgsl.expected.ir.dxc.hlsl
index 701779f..5f4471d 100644
--- a/test/tint/builtins/gen/var/subgroupShuffleXor/f7b453.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/gen/var/subgroupShuffleXor/f7b453.wgsl.expected.ir.dxc.hlsl
@@ -3,9 +3,7 @@
float2 subgroupShuffleXor_f7b453() {
float2 arg_0 = (1.0f).xx;
uint arg_1 = 1u;
- float2 v = arg_0;
- uint v_1 = arg_1;
- float2 res = WaveReadLaneAt(v, (WaveGetLaneIndex() ^ v_1));
+ float2 res = WaveReadLaneAt(arg_0, (WaveGetLaneIndex() ^ arg_1));
return res;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/00229f.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/00229f.wgsl.expected.ir.msl
index 79f41ef..35b3ba0 100644
--- a/test/tint/builtins/gen/var/textureDimensions/00229f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/00229f.wgsl.expected.ir.msl
@@ -17,9 +17,7 @@
};
uint3 textureDimensions_00229f(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint const v_1 = tint_module_vars.arg_0.get_height(0u);
- uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(0u));
+ uint3 res = uint3(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u), tint_module_vars.arg_0.get_depth(0u));
return res;
}
@@ -42,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texture3d<float, access::read> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_2.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_2.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/00348c.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/00348c.wgsl.expected.ir.msl
index 1f914e7..209abea 100644
--- a/test/tint/builtins/gen/var/textureDimensions/00348c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/00348c.wgsl.expected.ir.msl
@@ -17,8 +17,7 @@
};
uint2 textureDimensions_00348c(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width();
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height());
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(), tint_module_vars.arg_0.get_height());
return res;
}
@@ -41,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texture2d_ms<int, access::read> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/0276ec.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/0276ec.wgsl.expected.ir.msl
index dc83d4f..5620bf2 100644
--- a/test/tint/builtins/gen/var/textureDimensions/0276ec.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/0276ec.wgsl.expected.ir.msl
@@ -7,9 +7,7 @@
};
uint3 textureDimensions_0276ec(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint const v_1 = tint_module_vars.arg_0.get_height(0u);
- uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(0u));
+ uint3 res = uint3(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u), tint_module_vars.arg_0.get_depth(0u));
return res;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/029589.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/029589.wgsl.expected.ir.msl
index 2657fea..9c032ab 100644
--- a/test/tint/builtins/gen/var/textureDimensions/029589.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/029589.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_029589(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/03f81e.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/03f81e.wgsl.expected.ir.msl
index fdb8210..509ad2e 100644
--- a/test/tint/builtins/gen/var/textureDimensions/03f81e.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/03f81e.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_03f81e(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/07f1ba.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/07f1ba.wgsl.expected.ir.msl
index 5957c30..d8366ab 100644
--- a/test/tint/builtins/gen/var/textureDimensions/07f1ba.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/07f1ba.wgsl.expected.ir.msl
@@ -17,8 +17,7 @@
};
uint2 textureDimensions_07f1ba(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
@@ -41,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texture2d<float, access::read> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/088918.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/088918.wgsl.expected.ir.msl
index d210bd5..696e9d1 100644
--- a/test/tint/builtins/gen/var/textureDimensions/088918.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/088918.wgsl.expected.ir.msl
@@ -17,8 +17,7 @@
};
uint2 textureDimensions_088918(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
@@ -41,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texture2d<float, access::read> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/0890c6.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/0890c6.wgsl.expected.ir.msl
index 6a5c819..14926eb 100644
--- a/test/tint/builtins/gen/var/textureDimensions/0890c6.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/0890c6.wgsl.expected.ir.msl
@@ -19,9 +19,7 @@
uint3 textureDimensions_0890c6(tint_module_vars_struct tint_module_vars) {
uint arg_1 = 1u;
uint const v = arg_1;
- uint const v_1 = tint_module_vars.arg_0.get_width(v);
- uint const v_2 = tint_module_vars.arg_0.get_height(v);
- uint3 res = uint3(v_1, v_2, tint_module_vars.arg_0.get_depth(v));
+ uint3 res = uint3(tint_module_vars.arg_0.get_width(v), tint_module_vars.arg_0.get_height(v), tint_module_vars.arg_0.get_depth(v));
return res;
}
@@ -44,9 +42,9 @@
vertex vertex_main_outputs vertex_main(texture3d<float, access::sample> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_3 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_3.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_3.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v_1.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/08e371.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/08e371.wgsl.expected.ir.msl
index 692a4bc..0f0f9d5 100644
--- a/test/tint/builtins/gen/var/textureDimensions/08e371.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/08e371.wgsl.expected.ir.msl
@@ -17,8 +17,7 @@
};
uint2 textureDimensions_08e371(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
@@ -41,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texture2d<int, access::read> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/0973c9.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/0973c9.wgsl.expected.ir.msl
index 2935fb0..1e3906d 100644
--- a/test/tint/builtins/gen/var/textureDimensions/0973c9.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/0973c9.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_0973c9(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/0baa0d.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/0baa0d.wgsl.expected.ir.msl
index 8f2693a..db2edc0 100644
--- a/test/tint/builtins/gen/var/textureDimensions/0baa0d.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/0baa0d.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_0baa0d(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/0d4a7c.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/0d4a7c.wgsl.expected.ir.msl
index 2772f27..dbb71fd 100644
--- a/test/tint/builtins/gen/var/textureDimensions/0d4a7c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/0d4a7c.wgsl.expected.ir.msl
@@ -17,8 +17,7 @@
};
uint2 textureDimensions_0d4a7c(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
@@ -41,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texture2d<uint, access::read> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/0de70c.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/0de70c.wgsl.expected.ir.msl
index 6eaf722..5db8e91 100644
--- a/test/tint/builtins/gen/var/textureDimensions/0de70c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/0de70c.wgsl.expected.ir.msl
@@ -7,9 +7,7 @@
};
uint3 textureDimensions_0de70c(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint const v_1 = tint_module_vars.arg_0.get_height(0u);
- uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(0u));
+ uint3 res = uint3(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u), tint_module_vars.arg_0.get_depth(0u));
return res;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/0ff9a4.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/0ff9a4.wgsl.expected.ir.msl
index c46f78b..665b203 100644
--- a/test/tint/builtins/gen/var/textureDimensions/0ff9a4.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/0ff9a4.wgsl.expected.ir.msl
@@ -19,8 +19,7 @@
uint2 textureDimensions_0ff9a4(tint_module_vars_struct tint_module_vars) {
int arg_1 = 1;
uint const v = uint(arg_1);
- uint const v_1 = tint_module_vars.arg_0.get_width(v);
- uint2 res = uint2(v_1, tint_module_vars.arg_0.get_height(v));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(v), tint_module_vars.arg_0.get_height(v));
return res;
}
@@ -43,9 +42,9 @@
vertex vertex_main_outputs vertex_main(depthcube_array<float, access::sample> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_2.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_2.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v_1.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/135176.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/135176.wgsl.expected.ir.msl
index 6b88da2..39fc939 100644
--- a/test/tint/builtins/gen/var/textureDimensions/135176.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/135176.wgsl.expected.ir.msl
@@ -17,8 +17,7 @@
};
uint2 textureDimensions_135176(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
@@ -41,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/13f8db.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/13f8db.wgsl.expected.ir.msl
index 4398abe..a0fad81 100644
--- a/test/tint/builtins/gen/var/textureDimensions/13f8db.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/13f8db.wgsl.expected.ir.msl
@@ -19,8 +19,7 @@
uint2 textureDimensions_13f8db(tint_module_vars_struct tint_module_vars) {
uint arg_1 = 1u;
uint const v = arg_1;
- uint const v_1 = tint_module_vars.arg_0.get_width(v);
- uint2 res = uint2(v_1, tint_module_vars.arg_0.get_height(v));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(v), tint_module_vars.arg_0.get_height(v));
return res;
}
@@ -43,9 +42,9 @@
vertex vertex_main_outputs vertex_main(texture2d<float, access::sample> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_2.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_2.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v_1.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/1417dd.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/1417dd.wgsl.expected.ir.msl
index 1663c42..7eb210c 100644
--- a/test/tint/builtins/gen/var/textureDimensions/1417dd.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/1417dd.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_1417dd(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/15aa17.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/15aa17.wgsl.expected.ir.msl
index 96a9291..2191b01 100644
--- a/test/tint/builtins/gen/var/textureDimensions/15aa17.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/15aa17.wgsl.expected.ir.msl
@@ -7,9 +7,7 @@
};
uint3 textureDimensions_15aa17(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint const v_1 = tint_module_vars.arg_0.get_height(0u);
- uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(0u));
+ uint3 res = uint3(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u), tint_module_vars.arg_0.get_depth(0u));
return res;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/15b577.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/15b577.wgsl.expected.ir.msl
index e18fee2..bae9238 100644
--- a/test/tint/builtins/gen/var/textureDimensions/15b577.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/15b577.wgsl.expected.ir.msl
@@ -19,8 +19,7 @@
uint2 textureDimensions_15b577(tint_module_vars_struct tint_module_vars) {
int arg_1 = 1;
uint const v = uint(arg_1);
- uint const v_1 = tint_module_vars.arg_0.get_width(v);
- uint2 res = uint2(v_1, tint_module_vars.arg_0.get_height(v));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(v), tint_module_vars.arg_0.get_height(v));
return res;
}
@@ -43,9 +42,9 @@
vertex vertex_main_outputs vertex_main(texture2d<uint, access::sample> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_2.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_2.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v_1.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/18160d.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/18160d.wgsl.expected.ir.msl
index 3099d88..2a4e028 100644
--- a/test/tint/builtins/gen/var/textureDimensions/18160d.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/18160d.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_18160d(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/18f19f.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/18f19f.wgsl.expected.ir.msl
index ba0f617..b81208f 100644
--- a/test/tint/builtins/gen/var/textureDimensions/18f19f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/18f19f.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_18f19f(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/1a2be7.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/1a2be7.wgsl.expected.ir.msl
index 3e1d163..d5421e5 100644
--- a/test/tint/builtins/gen/var/textureDimensions/1a2be7.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/1a2be7.wgsl.expected.ir.msl
@@ -17,9 +17,7 @@
};
uint3 textureDimensions_1a2be7(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint const v_1 = tint_module_vars.arg_0.get_height(0u);
- uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(0u));
+ uint3 res = uint3(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u), tint_module_vars.arg_0.get_depth(0u));
return res;
}
@@ -42,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texture3d<int, access::sample> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_2.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_2.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/1b720f.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/1b720f.wgsl.expected.ir.msl
index a3f54b7..59acb39 100644
--- a/test/tint/builtins/gen/var/textureDimensions/1b720f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/1b720f.wgsl.expected.ir.msl
@@ -17,9 +17,7 @@
};
uint3 textureDimensions_1b720f(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint const v_1 = tint_module_vars.arg_0.get_height(0u);
- uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(0u));
+ uint3 res = uint3(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u), tint_module_vars.arg_0.get_depth(0u));
return res;
}
@@ -42,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texture3d<int, access::read> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_2.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_2.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/1bc428.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/1bc428.wgsl.expected.ir.msl
index 3c9aefd..9cb8543 100644
--- a/test/tint/builtins/gen/var/textureDimensions/1bc428.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/1bc428.wgsl.expected.ir.msl
@@ -19,9 +19,7 @@
uint3 textureDimensions_1bc428(tint_module_vars_struct tint_module_vars) {
int arg_1 = 1;
uint const v = uint(arg_1);
- uint const v_1 = tint_module_vars.arg_0.get_width(v);
- uint const v_2 = tint_module_vars.arg_0.get_height(v);
- uint3 res = uint3(v_1, v_2, tint_module_vars.arg_0.get_depth(v));
+ uint3 res = uint3(tint_module_vars.arg_0.get_width(v), tint_module_vars.arg_0.get_height(v), tint_module_vars.arg_0.get_depth(v));
return res;
}
@@ -44,9 +42,9 @@
vertex vertex_main_outputs vertex_main(texture3d<float, access::sample> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_3 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_3.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_3.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v_1.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/1bd78c.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/1bd78c.wgsl.expected.ir.msl
index 8889091..cbbf33a 100644
--- a/test/tint/builtins/gen/var/textureDimensions/1bd78c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/1bd78c.wgsl.expected.ir.msl
@@ -19,8 +19,7 @@
uint2 textureDimensions_1bd78c(tint_module_vars_struct tint_module_vars) {
int arg_1 = 1;
uint const v = uint(arg_1);
- uint const v_1 = tint_module_vars.arg_0.get_width(v);
- uint2 res = uint2(v_1, tint_module_vars.arg_0.get_height(v));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(v), tint_module_vars.arg_0.get_height(v));
return res;
}
@@ -43,9 +42,9 @@
vertex vertex_main_outputs vertex_main(texture2d<float, access::sample> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_2.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_2.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v_1.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/1e4024.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/1e4024.wgsl.expected.ir.msl
index acdc94a..dcf5c13 100644
--- a/test/tint/builtins/gen/var/textureDimensions/1e4024.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/1e4024.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_1e4024(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/20eaad.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/20eaad.wgsl.expected.ir.msl
index 27dd3e5..fedadae 100644
--- a/test/tint/builtins/gen/var/textureDimensions/20eaad.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/20eaad.wgsl.expected.ir.msl
@@ -7,9 +7,7 @@
};
uint3 textureDimensions_20eaad(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint const v_1 = tint_module_vars.arg_0.get_height(0u);
- uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(0u));
+ uint3 res = uint3(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u), tint_module_vars.arg_0.get_depth(0u));
return res;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/224113.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/224113.wgsl.expected.ir.msl
index 1287d89..ba21deb 100644
--- a/test/tint/builtins/gen/var/textureDimensions/224113.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/224113.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_224113(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/22b5b6.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/22b5b6.wgsl.expected.ir.msl
index 93e56f1..e8eed85 100644
--- a/test/tint/builtins/gen/var/textureDimensions/22b5b6.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/22b5b6.wgsl.expected.ir.msl
@@ -19,8 +19,7 @@
uint2 textureDimensions_22b5b6(tint_module_vars_struct tint_module_vars) {
int arg_1 = 1;
uint const v = uint(arg_1);
- uint const v_1 = tint_module_vars.arg_0.get_width(v);
- uint2 res = uint2(v_1, tint_module_vars.arg_0.get_height(v));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(v), tint_module_vars.arg_0.get_height(v));
return res;
}
@@ -43,9 +42,9 @@
vertex vertex_main_outputs vertex_main(texturecube_array<uint, access::sample> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_2.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_2.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v_1.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/24db07.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/24db07.wgsl.expected.ir.msl
index eabf071..19e027d 100644
--- a/test/tint/builtins/gen/var/textureDimensions/24db07.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/24db07.wgsl.expected.ir.msl
@@ -17,8 +17,7 @@
};
uint2 textureDimensions_24db07(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
@@ -41,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texture2d<float, access::sample> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/25d284.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/25d284.wgsl.expected.ir.msl
index 26f2ffe..30ab16b 100644
--- a/test/tint/builtins/gen/var/textureDimensions/25d284.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/25d284.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_25d284(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/2674d8.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/2674d8.wgsl.expected.ir.msl
index 2168dd3..f341aff 100644
--- a/test/tint/builtins/gen/var/textureDimensions/2674d8.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/2674d8.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_2674d8(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/268ddb.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/268ddb.wgsl.expected.ir.msl
index 014532b..f0729ed 100644
--- a/test/tint/builtins/gen/var/textureDimensions/268ddb.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/268ddb.wgsl.expected.ir.msl
@@ -17,9 +17,7 @@
};
uint3 textureDimensions_268ddb(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint const v_1 = tint_module_vars.arg_0.get_height(0u);
- uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(0u));
+ uint3 res = uint3(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u), tint_module_vars.arg_0.get_depth(0u));
return res;
}
@@ -42,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texture3d<uint, access::read> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_2.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_2.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/282978.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/282978.wgsl.expected.ir.msl
index 9738cb6..a16eaa8 100644
--- a/test/tint/builtins/gen/var/textureDimensions/282978.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/282978.wgsl.expected.ir.msl
@@ -7,9 +7,7 @@
};
uint3 textureDimensions_282978(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint const v_1 = tint_module_vars.arg_0.get_height(0u);
- uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(0u));
+ uint3 res = uint3(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u), tint_module_vars.arg_0.get_depth(0u));
return res;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/2a58b7.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/2a58b7.wgsl.expected.ir.msl
index 9c1f14b..0c80633 100644
--- a/test/tint/builtins/gen/var/textureDimensions/2a58b7.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/2a58b7.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_2a58b7(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/2e443d.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/2e443d.wgsl.expected.ir.msl
index 4a40b6e..7fd1195 100644
--- a/test/tint/builtins/gen/var/textureDimensions/2e443d.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/2e443d.wgsl.expected.ir.msl
@@ -19,8 +19,7 @@
uint2 textureDimensions_2e443d(tint_module_vars_struct tint_module_vars) {
int arg_1 = 1;
uint const v = uint(arg_1);
- uint const v_1 = tint_module_vars.arg_0.get_width(v);
- uint2 res = uint2(v_1, tint_module_vars.arg_0.get_height(v));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(v), tint_module_vars.arg_0.get_height(v));
return res;
}
@@ -43,9 +42,9 @@
vertex vertex_main_outputs vertex_main(texture2d<int, access::sample> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_2.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_2.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v_1.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/2fd2a4.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/2fd2a4.wgsl.expected.ir.msl
index c5b0beb..11ad43f 100644
--- a/test/tint/builtins/gen/var/textureDimensions/2fd2a4.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/2fd2a4.wgsl.expected.ir.msl
@@ -19,8 +19,7 @@
uint2 textureDimensions_2fd2a4(tint_module_vars_struct tint_module_vars) {
int arg_1 = 1;
uint const v = uint(arg_1);
- uint const v_1 = tint_module_vars.arg_0.get_width(v);
- uint2 res = uint2(v_1, tint_module_vars.arg_0.get_height(v));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(v), tint_module_vars.arg_0.get_height(v));
return res;
}
@@ -43,9 +42,9 @@
vertex vertex_main_outputs vertex_main(texture2d_array<float, access::sample> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_2.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_2.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v_1.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/2ff32a.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/2ff32a.wgsl.expected.ir.msl
index eac4d16..8024df4 100644
--- a/test/tint/builtins/gen/var/textureDimensions/2ff32a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/2ff32a.wgsl.expected.ir.msl
@@ -17,9 +17,7 @@
};
uint3 textureDimensions_2ff32a(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint const v_1 = tint_module_vars.arg_0.get_height(0u);
- uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(0u));
+ uint3 res = uint3(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u), tint_module_vars.arg_0.get_depth(0u));
return res;
}
@@ -42,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texture3d<float, access::read> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_2.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_2.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/305dd5.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/305dd5.wgsl.expected.ir.msl
index ea3e966..6965306 100644
--- a/test/tint/builtins/gen/var/textureDimensions/305dd5.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/305dd5.wgsl.expected.ir.msl
@@ -17,8 +17,7 @@
};
uint2 textureDimensions_305dd5(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
@@ -41,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/31799c.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/31799c.wgsl.expected.ir.msl
index 1311c87..deb0cdc 100644
--- a/test/tint/builtins/gen/var/textureDimensions/31799c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/31799c.wgsl.expected.ir.msl
@@ -7,9 +7,7 @@
};
uint3 textureDimensions_31799c(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint const v_1 = tint_module_vars.arg_0.get_height(0u);
- uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(0u));
+ uint3 res = uint3(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u), tint_module_vars.arg_0.get_depth(0u));
return res;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/31d00d.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/31d00d.wgsl.expected.ir.msl
index 6ea77d3..959d177 100644
--- a/test/tint/builtins/gen/var/textureDimensions/31d00d.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/31d00d.wgsl.expected.ir.msl
@@ -7,9 +7,7 @@
};
uint3 textureDimensions_31d00d(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint const v_1 = tint_module_vars.arg_0.get_height(0u);
- uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(0u));
+ uint3 res = uint3(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u), tint_module_vars.arg_0.get_depth(0u));
return res;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/325338.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/325338.wgsl.expected.ir.msl
index efb9edd..1454b85 100644
--- a/test/tint/builtins/gen/var/textureDimensions/325338.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/325338.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_325338(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/346fee.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/346fee.wgsl.expected.ir.msl
index c355d29..96c73d0 100644
--- a/test/tint/builtins/gen/var/textureDimensions/346fee.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/346fee.wgsl.expected.ir.msl
@@ -19,8 +19,7 @@
uint2 textureDimensions_346fee(tint_module_vars_struct tint_module_vars) {
uint arg_1 = 1u;
uint const v = arg_1;
- uint const v_1 = tint_module_vars.arg_0.get_width(v);
- uint2 res = uint2(v_1, tint_module_vars.arg_0.get_height(v));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(v), tint_module_vars.arg_0.get_height(v));
return res;
}
@@ -43,9 +42,9 @@
vertex vertex_main_outputs vertex_main(texturecube_array<uint, access::sample> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_2.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_2.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v_1.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/35a7e5.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/35a7e5.wgsl.expected.ir.msl
index 4116634..329d48c 100644
--- a/test/tint/builtins/gen/var/textureDimensions/35a7e5.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/35a7e5.wgsl.expected.ir.msl
@@ -7,9 +7,7 @@
};
uint3 textureDimensions_35a7e5(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint const v_1 = tint_module_vars.arg_0.get_height(0u);
- uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(0u));
+ uint3 res = uint3(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u), tint_module_vars.arg_0.get_depth(0u));
return res;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/35ee69.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/35ee69.wgsl.expected.ir.msl
index 7be909e..2941ca9 100644
--- a/test/tint/builtins/gen/var/textureDimensions/35ee69.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/35ee69.wgsl.expected.ir.msl
@@ -7,9 +7,7 @@
};
uint3 textureDimensions_35ee69(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint const v_1 = tint_module_vars.arg_0.get_height(0u);
- uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(0u));
+ uint3 res = uint3(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u), tint_module_vars.arg_0.get_depth(0u));
return res;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/36eeb7.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/36eeb7.wgsl.expected.ir.msl
index 4c4d3c6..371e767 100644
--- a/test/tint/builtins/gen/var/textureDimensions/36eeb7.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/36eeb7.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_36eeb7(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/378a65.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/378a65.wgsl.expected.ir.msl
index e15f4ba..ab58240 100644
--- a/test/tint/builtins/gen/var/textureDimensions/378a65.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/378a65.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_378a65(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/382b16.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/382b16.wgsl.expected.ir.msl
index 059d903..bb429e8 100644
--- a/test/tint/builtins/gen/var/textureDimensions/382b16.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/382b16.wgsl.expected.ir.msl
@@ -19,8 +19,7 @@
uint2 textureDimensions_382b16(tint_module_vars_struct tint_module_vars) {
uint arg_1 = 1u;
uint const v = arg_1;
- uint const v_1 = tint_module_vars.arg_0.get_width(v);
- uint2 res = uint2(v_1, tint_module_vars.arg_0.get_height(v));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(v), tint_module_vars.arg_0.get_height(v));
return res;
}
@@ -43,9 +42,9 @@
vertex vertex_main_outputs vertex_main(texturecube<float, access::sample> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_2.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_2.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v_1.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/3834f8.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/3834f8.wgsl.expected.ir.msl
index ead2027..3534119 100644
--- a/test/tint/builtins/gen/var/textureDimensions/3834f8.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/3834f8.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_3834f8(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/38c9ca.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/38c9ca.wgsl.expected.ir.msl
index 2b81f43..64c867e 100644
--- a/test/tint/builtins/gen/var/textureDimensions/38c9ca.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/38c9ca.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_38c9ca(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/3963d0.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/3963d0.wgsl.expected.ir.msl
index ba67b02..22176a2 100644
--- a/test/tint/builtins/gen/var/textureDimensions/3963d0.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/3963d0.wgsl.expected.ir.msl
@@ -19,8 +19,7 @@
uint2 textureDimensions_3963d0(tint_module_vars_struct tint_module_vars) {
uint arg_1 = 1u;
uint const v = arg_1;
- uint const v_1 = tint_module_vars.arg_0.get_width(v);
- uint2 res = uint2(v_1, tint_module_vars.arg_0.get_height(v));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(v), tint_module_vars.arg_0.get_height(v));
return res;
}
@@ -43,9 +42,9 @@
vertex vertex_main_outputs vertex_main(texturecube_array<int, access::sample> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_2.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_2.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v_1.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/397dab.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/397dab.wgsl.expected.ir.msl
index d234fd5..b4ad113 100644
--- a/test/tint/builtins/gen/var/textureDimensions/397dab.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/397dab.wgsl.expected.ir.msl
@@ -17,8 +17,7 @@
};
uint2 textureDimensions_397dab(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
@@ -41,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/3a5bb1.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/3a5bb1.wgsl.expected.ir.msl
index abb7c10..91b18ca 100644
--- a/test/tint/builtins/gen/var/textureDimensions/3a5bb1.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/3a5bb1.wgsl.expected.ir.msl
@@ -7,9 +7,7 @@
};
uint3 textureDimensions_3a5bb1(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint const v_1 = tint_module_vars.arg_0.get_height(0u);
- uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(0u));
+ uint3 res = uint3(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u), tint_module_vars.arg_0.get_depth(0u));
return res;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/3a7b69.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/3a7b69.wgsl.expected.ir.msl
index b530d91..f5df6e5 100644
--- a/test/tint/builtins/gen/var/textureDimensions/3a7b69.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/3a7b69.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_3a7b69(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/3b38f6.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/3b38f6.wgsl.expected.ir.msl
index 0f705da..d5e84bc 100644
--- a/test/tint/builtins/gen/var/textureDimensions/3b38f6.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/3b38f6.wgsl.expected.ir.msl
@@ -17,8 +17,7 @@
};
uint2 textureDimensions_3b38f6(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
@@ -41,9 +40,9 @@
vertex vertex_main_outputs vertex_main(depth2d<float, access::sample> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/3baab5.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/3baab5.wgsl.expected.ir.msl
index 10cfce9..7350592 100644
--- a/test/tint/builtins/gen/var/textureDimensions/3baab5.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/3baab5.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_3baab5(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/3bf12a.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/3bf12a.wgsl.expected.ir.msl
index 156005e..7e74b6d 100644
--- a/test/tint/builtins/gen/var/textureDimensions/3bf12a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/3bf12a.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_3bf12a(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/3c66f0.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/3c66f0.wgsl.expected.ir.msl
index 34db2a7..303c521 100644
--- a/test/tint/builtins/gen/var/textureDimensions/3c66f0.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/3c66f0.wgsl.expected.ir.msl
@@ -19,8 +19,7 @@
uint2 textureDimensions_3c66f0(tint_module_vars_struct tint_module_vars) {
int arg_1 = 1;
uint const v = uint(arg_1);
- uint const v_1 = tint_module_vars.arg_0.get_width(v);
- uint2 res = uint2(v_1, tint_module_vars.arg_0.get_height(v));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(v), tint_module_vars.arg_0.get_height(v));
return res;
}
@@ -43,9 +42,9 @@
vertex vertex_main_outputs vertex_main(texturecube_array<int, access::sample> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_2.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_2.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v_1.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/3f3474.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/3f3474.wgsl.expected.ir.msl
index 9bffbee..b401d86 100644
--- a/test/tint/builtins/gen/var/textureDimensions/3f3474.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/3f3474.wgsl.expected.ir.msl
@@ -17,8 +17,7 @@
};
uint2 textureDimensions_3f3474(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width();
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height());
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(), tint_module_vars.arg_0.get_height());
return res;
}
@@ -41,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texture2d_ms<float, access::read> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/3fc3dc.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/3fc3dc.wgsl.expected.ir.msl
index 8bab6f0..b6d0a37 100644
--- a/test/tint/builtins/gen/var/textureDimensions/3fc3dc.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/3fc3dc.wgsl.expected.ir.msl
@@ -19,8 +19,7 @@
uint2 textureDimensions_3fc3dc(tint_module_vars_struct tint_module_vars) {
uint arg_1 = 1u;
uint const v = arg_1;
- uint const v_1 = tint_module_vars.arg_0.get_width(v);
- uint2 res = uint2(v_1, tint_module_vars.arg_0.get_height(v));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(v), tint_module_vars.arg_0.get_height(v));
return res;
}
@@ -43,9 +42,9 @@
vertex vertex_main_outputs vertex_main(texture2d_array<float, access::sample> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_2.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_2.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v_1.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/3ff0a5.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/3ff0a5.wgsl.expected.ir.msl
index 7325844..3e1367d 100644
--- a/test/tint/builtins/gen/var/textureDimensions/3ff0a5.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/3ff0a5.wgsl.expected.ir.msl
@@ -17,8 +17,7 @@
};
uint2 textureDimensions_3ff0a5(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
@@ -41,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texture2d_array<int, access::read> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/40c671.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/40c671.wgsl.expected.ir.msl
index 0175af0..293a5c5 100644
--- a/test/tint/builtins/gen/var/textureDimensions/40c671.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/40c671.wgsl.expected.ir.msl
@@ -7,9 +7,7 @@
};
uint3 textureDimensions_40c671(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint const v_1 = tint_module_vars.arg_0.get_height(0u);
- uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(0u));
+ uint3 res = uint3(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u), tint_module_vars.arg_0.get_depth(0u));
return res;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/40da20.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/40da20.wgsl.expected.ir.msl
index 660a153..602b56e 100644
--- a/test/tint/builtins/gen/var/textureDimensions/40da20.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/40da20.wgsl.expected.ir.msl
@@ -17,8 +17,7 @@
};
uint2 textureDimensions_40da20(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
@@ -41,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texture2d<float, access::read> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/40ecf4.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/40ecf4.wgsl.expected.ir.msl
index 3783923..8f2c570 100644
--- a/test/tint/builtins/gen/var/textureDimensions/40ecf4.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/40ecf4.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_40ecf4(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/41545f.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/41545f.wgsl.expected.ir.msl
index ddc15a3..76e3b71 100644
--- a/test/tint/builtins/gen/var/textureDimensions/41545f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/41545f.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_41545f(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/423519.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/423519.wgsl.expected.ir.msl
index a8d70e0..7fa357e 100644
--- a/test/tint/builtins/gen/var/textureDimensions/423519.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/423519.wgsl.expected.ir.msl
@@ -17,9 +17,7 @@
};
uint3 textureDimensions_423519(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint const v_1 = tint_module_vars.arg_0.get_height(0u);
- uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(0u));
+ uint3 res = uint3(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u), tint_module_vars.arg_0.get_depth(0u));
return res;
}
@@ -42,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texture3d<uint, access::read> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_2.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_2.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/427f92.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/427f92.wgsl.expected.ir.msl
index 2726bd8..f4e7bb0 100644
--- a/test/tint/builtins/gen/var/textureDimensions/427f92.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/427f92.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_427f92(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/439651.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/439651.wgsl.expected.ir.msl
index 2c0d48b..8a6dc42 100644
--- a/test/tint/builtins/gen/var/textureDimensions/439651.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/439651.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_439651(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/445376.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/445376.wgsl.expected.ir.msl
index c27b2a06..c2800572 100644
--- a/test/tint/builtins/gen/var/textureDimensions/445376.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/445376.wgsl.expected.ir.msl
@@ -17,8 +17,7 @@
};
uint2 textureDimensions_445376(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
@@ -41,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texture2d_array<uint, access::sample> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/44b358.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/44b358.wgsl.expected.ir.msl
index 101b633..bb2d84e 100644
--- a/test/tint/builtins/gen/var/textureDimensions/44b358.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/44b358.wgsl.expected.ir.msl
@@ -7,9 +7,7 @@
};
uint3 textureDimensions_44b358(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint const v_1 = tint_module_vars.arg_0.get_height(0u);
- uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(0u));
+ uint3 res = uint3(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u), tint_module_vars.arg_0.get_depth(0u));
return res;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/452fc1.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/452fc1.wgsl.expected.ir.msl
index cc367e1..d9e1ac2 100644
--- a/test/tint/builtins/gen/var/textureDimensions/452fc1.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/452fc1.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_452fc1(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/46f0fc.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/46f0fc.wgsl.expected.ir.msl
index 4e1f4d1..605ba83 100644
--- a/test/tint/builtins/gen/var/textureDimensions/46f0fc.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/46f0fc.wgsl.expected.ir.msl
@@ -17,8 +17,7 @@
};
uint2 textureDimensions_46f0fc(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
@@ -41,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texture2d_array<float, access::sample> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/4716a4.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/4716a4.wgsl.expected.ir.msl
index db47d43..83c4f65 100644
--- a/test/tint/builtins/gen/var/textureDimensions/4716a4.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/4716a4.wgsl.expected.ir.msl
@@ -17,8 +17,7 @@
};
uint2 textureDimensions_4716a4(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
@@ -41,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texture2d_array<int, access::read> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/475c10.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/475c10.wgsl.expected.ir.msl
index 4459a94..fcc9e6b 100644
--- a/test/tint/builtins/gen/var/textureDimensions/475c10.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/475c10.wgsl.expected.ir.msl
@@ -17,9 +17,7 @@
};
uint3 textureDimensions_475c10(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint const v_1 = tint_module_vars.arg_0.get_height(0u);
- uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(0u));
+ uint3 res = uint3(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u), tint_module_vars.arg_0.get_depth(0u));
return res;
}
@@ -42,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texture3d<uint, access::read> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_2.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_2.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/49a067.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/49a067.wgsl.expected.ir.msl
index 2382a17..99e8b03 100644
--- a/test/tint/builtins/gen/var/textureDimensions/49a067.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/49a067.wgsl.expected.ir.msl
@@ -19,8 +19,7 @@
uint2 textureDimensions_49a067(tint_module_vars_struct tint_module_vars) {
int arg_1 = 1;
uint const v = uint(arg_1);
- uint const v_1 = tint_module_vars.arg_0.get_width(v);
- uint2 res = uint2(v_1, tint_module_vars.arg_0.get_height(v));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(v), tint_module_vars.arg_0.get_height(v));
return res;
}
@@ -43,9 +42,9 @@
vertex vertex_main_outputs vertex_main(texturecube<float, access::sample> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_2.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_2.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v_1.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/4acec7.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/4acec7.wgsl.expected.ir.msl
index 41b13b5..72c87bf 100644
--- a/test/tint/builtins/gen/var/textureDimensions/4acec7.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/4acec7.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_4acec7(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/4b26ef.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/4b26ef.wgsl.expected.ir.msl
index e8d0680..0e220b8 100644
--- a/test/tint/builtins/gen/var/textureDimensions/4b26ef.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/4b26ef.wgsl.expected.ir.msl
@@ -7,9 +7,7 @@
};
uint3 textureDimensions_4b26ef(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint const v_1 = tint_module_vars.arg_0.get_height(0u);
- uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(0u));
+ uint3 res = uint3(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u), tint_module_vars.arg_0.get_depth(0u));
return res;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/4be71b.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/4be71b.wgsl.expected.ir.msl
index 48bb73e..7c3b5b5 100644
--- a/test/tint/builtins/gen/var/textureDimensions/4be71b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/4be71b.wgsl.expected.ir.msl
@@ -17,8 +17,7 @@
};
uint2 textureDimensions_4be71b(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
@@ -41,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texture2d<uint, access::sample> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/4d1f71.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/4d1f71.wgsl.expected.ir.msl
index f4ab179..f2dfd4b 100644
--- a/test/tint/builtins/gen/var/textureDimensions/4d1f71.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/4d1f71.wgsl.expected.ir.msl
@@ -17,8 +17,7 @@
};
uint2 textureDimensions_4d1f71(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
@@ -41,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/4d27b3.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/4d27b3.wgsl.expected.ir.msl
index 5630add..af4f2b5 100644
--- a/test/tint/builtins/gen/var/textureDimensions/4d27b3.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/4d27b3.wgsl.expected.ir.msl
@@ -7,9 +7,7 @@
};
uint3 textureDimensions_4d27b3(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint const v_1 = tint_module_vars.arg_0.get_height(0u);
- uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(0u));
+ uint3 res = uint3(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u), tint_module_vars.arg_0.get_depth(0u));
return res;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/4df14c.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/4df14c.wgsl.expected.ir.msl
index e3d609c..a99947a 100644
--- a/test/tint/builtins/gen/var/textureDimensions/4df14c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/4df14c.wgsl.expected.ir.msl
@@ -7,9 +7,7 @@
};
uint3 textureDimensions_4df14c(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint const v_1 = tint_module_vars.arg_0.get_height(0u);
- uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(0u));
+ uint3 res = uint3(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u), tint_module_vars.arg_0.get_depth(0u));
return res;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/528c0e.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/528c0e.wgsl.expected.ir.msl
index f4afdd3..b686843 100644
--- a/test/tint/builtins/gen/var/textureDimensions/528c0e.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/528c0e.wgsl.expected.ir.msl
@@ -19,8 +19,7 @@
uint2 textureDimensions_528c0e(tint_module_vars_struct tint_module_vars) {
uint arg_1 = 1u;
uint const v = arg_1;
- uint const v_1 = tint_module_vars.arg_0.get_width(v);
- uint2 res = uint2(v_1, tint_module_vars.arg_0.get_height(v));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(v), tint_module_vars.arg_0.get_height(v));
return res;
}
@@ -43,9 +42,9 @@
vertex vertex_main_outputs vertex_main(texture2d_array<uint, access::sample> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_2.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_2.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v_1.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/52cf60.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/52cf60.wgsl.expected.ir.msl
index f012616..cc024f1 100644
--- a/test/tint/builtins/gen/var/textureDimensions/52cf60.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/52cf60.wgsl.expected.ir.msl
@@ -17,8 +17,7 @@
};
uint2 textureDimensions_52cf60(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
@@ -41,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texture2d<float, access::read> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/534ef8.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/534ef8.wgsl.expected.ir.msl
index 1b691a8..0c45681 100644
--- a/test/tint/builtins/gen/var/textureDimensions/534ef8.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/534ef8.wgsl.expected.ir.msl
@@ -17,8 +17,7 @@
};
uint2 textureDimensions_534ef8(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
@@ -41,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texture2d<int, access::read> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/55fdeb.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/55fdeb.wgsl.expected.ir.msl
index 4f4f478..fa98e5d 100644
--- a/test/tint/builtins/gen/var/textureDimensions/55fdeb.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/55fdeb.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_55fdeb(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/578e75.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/578e75.wgsl.expected.ir.msl
index a1a81e5..49d9aa0 100644
--- a/test/tint/builtins/gen/var/textureDimensions/578e75.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/578e75.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_578e75(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/579eee.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/579eee.wgsl.expected.ir.msl
index 2f5010e..f5dd839 100644
--- a/test/tint/builtins/gen/var/textureDimensions/579eee.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/579eee.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_579eee(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/591981.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/591981.wgsl.expected.ir.msl
index fa1a433..12bf97a 100644
--- a/test/tint/builtins/gen/var/textureDimensions/591981.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/591981.wgsl.expected.ir.msl
@@ -7,9 +7,7 @@
};
uint3 textureDimensions_591981(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint const v_1 = tint_module_vars.arg_0.get_height(0u);
- uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(0u));
+ uint3 res = uint3(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u), tint_module_vars.arg_0.get_depth(0u));
return res;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/599ab5.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/599ab5.wgsl.expected.ir.msl
index 2c25b47..2e3c783 100644
--- a/test/tint/builtins/gen/var/textureDimensions/599ab5.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/599ab5.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_599ab5(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/5b4b10.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/5b4b10.wgsl.expected.ir.msl
index 891c4cb..22ade29 100644
--- a/test/tint/builtins/gen/var/textureDimensions/5b4b10.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/5b4b10.wgsl.expected.ir.msl
@@ -7,9 +7,7 @@
};
uint3 textureDimensions_5b4b10(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint const v_1 = tint_module_vars.arg_0.get_height(0u);
- uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(0u));
+ uint3 res = uint3(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u), tint_module_vars.arg_0.get_depth(0u));
return res;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/609d34.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/609d34.wgsl.expected.ir.msl
index 6fc2ca2..1b733d4 100644
--- a/test/tint/builtins/gen/var/textureDimensions/609d34.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/609d34.wgsl.expected.ir.msl
@@ -17,8 +17,7 @@
};
uint2 textureDimensions_609d34(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
@@ -41,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/617dc8.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/617dc8.wgsl.expected.ir.msl
index a11d1eb..f891b4d 100644
--- a/test/tint/builtins/gen/var/textureDimensions/617dc8.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/617dc8.wgsl.expected.ir.msl
@@ -7,9 +7,7 @@
};
uint3 textureDimensions_617dc8(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint const v_1 = tint_module_vars.arg_0.get_height(0u);
- uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(0u));
+ uint3 res = uint3(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u), tint_module_vars.arg_0.get_depth(0u));
return res;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/62cb5a.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/62cb5a.wgsl.expected.ir.msl
index ccf1c20..cd3f1b9 100644
--- a/test/tint/builtins/gen/var/textureDimensions/62cb5a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/62cb5a.wgsl.expected.ir.msl
@@ -17,8 +17,7 @@
};
uint2 textureDimensions_62cb5a(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
@@ -41,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texture2d_array<int, access::sample> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/62e7ae.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/62e7ae.wgsl.expected.ir.msl
index 29829fb..4e432f4 100644
--- a/test/tint/builtins/gen/var/textureDimensions/62e7ae.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/62e7ae.wgsl.expected.ir.msl
@@ -17,8 +17,7 @@
};
uint2 textureDimensions_62e7ae(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
@@ -41,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texture2d<uint, access::read> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/64dc74.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/64dc74.wgsl.expected.ir.msl
index bccd510..6c983cc 100644
--- a/test/tint/builtins/gen/var/textureDimensions/64dc74.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/64dc74.wgsl.expected.ir.msl
@@ -19,8 +19,7 @@
uint2 textureDimensions_64dc74(tint_module_vars_struct tint_module_vars) {
uint arg_1 = 1u;
uint const v = arg_1;
- uint const v_1 = tint_module_vars.arg_0.get_width(v);
- uint2 res = uint2(v_1, tint_module_vars.arg_0.get_height(v));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(v), tint_module_vars.arg_0.get_height(v));
return res;
}
@@ -43,9 +42,9 @@
vertex vertex_main_outputs vertex_main(texturecube<int, access::sample> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_2.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_2.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v_1.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/674058.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/674058.wgsl.expected.ir.msl
index 0b33489..60970fc 100644
--- a/test/tint/builtins/gen/var/textureDimensions/674058.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/674058.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_674058(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/6dae40.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/6dae40.wgsl.expected.ir.msl
index 2f472db..e43a1b7 100644
--- a/test/tint/builtins/gen/var/textureDimensions/6dae40.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/6dae40.wgsl.expected.ir.msl
@@ -17,9 +17,7 @@
};
uint3 textureDimensions_6dae40(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint const v_1 = tint_module_vars.arg_0.get_height(0u);
- uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(0u));
+ uint3 res = uint3(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u), tint_module_vars.arg_0.get_depth(0u));
return res;
}
@@ -42,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texture3d<float, access::read> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_2.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_2.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/6dbef4.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/6dbef4.wgsl.expected.ir.msl
index 59e7418..f6e792c 100644
--- a/test/tint/builtins/gen/var/textureDimensions/6dbef4.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/6dbef4.wgsl.expected.ir.msl
@@ -17,9 +17,7 @@
};
uint3 textureDimensions_6dbef4(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint const v_1 = tint_module_vars.arg_0.get_height(0u);
- uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(0u));
+ uint3 res = uint3(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u), tint_module_vars.arg_0.get_depth(0u));
return res;
}
@@ -42,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texture3d<int, access::read> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_2.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_2.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/6e6c7a.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/6e6c7a.wgsl.expected.ir.msl
index 0c0225a..d151419 100644
--- a/test/tint/builtins/gen/var/textureDimensions/6e6c7a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/6e6c7a.wgsl.expected.ir.msl
@@ -19,9 +19,7 @@
uint3 textureDimensions_6e6c7a(tint_module_vars_struct tint_module_vars) {
uint arg_1 = 1u;
uint const v = arg_1;
- uint const v_1 = tint_module_vars.arg_0.get_width(v);
- uint const v_2 = tint_module_vars.arg_0.get_height(v);
- uint3 res = uint3(v_1, v_2, tint_module_vars.arg_0.get_depth(v));
+ uint3 res = uint3(tint_module_vars.arg_0.get_width(v), tint_module_vars.arg_0.get_height(v), tint_module_vars.arg_0.get_depth(v));
return res;
}
@@ -44,9 +42,9 @@
vertex vertex_main_outputs vertex_main(texture3d<uint, access::sample> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_3 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_3.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_3.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v_1.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/6e72c5.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/6e72c5.wgsl.expected.ir.msl
index 92f2607..477667e 100644
--- a/test/tint/builtins/gen/var/textureDimensions/6e72c5.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/6e72c5.wgsl.expected.ir.msl
@@ -17,8 +17,7 @@
};
uint2 textureDimensions_6e72c5(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
@@ -41,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texture2d<float, access::read> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/6f1b5d.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/6f1b5d.wgsl.expected.ir.msl
index cbfb4f8..a9fc796 100644
--- a/test/tint/builtins/gen/var/textureDimensions/6f1b5d.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/6f1b5d.wgsl.expected.ir.msl
@@ -19,8 +19,7 @@
uint2 textureDimensions_6f1b5d(tint_module_vars_struct tint_module_vars) {
int arg_1 = 1;
uint const v = uint(arg_1);
- uint const v_1 = tint_module_vars.arg_0.get_width(v);
- uint2 res = uint2(v_1, tint_module_vars.arg_0.get_height(v));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(v), tint_module_vars.arg_0.get_height(v));
return res;
}
@@ -43,9 +42,9 @@
vertex vertex_main_outputs vertex_main(depth2d<float, access::sample> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_2.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_2.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v_1.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/70dd33.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/70dd33.wgsl.expected.ir.msl
index 762389e..c3cabe7 100644
--- a/test/tint/builtins/gen/var/textureDimensions/70dd33.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/70dd33.wgsl.expected.ir.msl
@@ -7,9 +7,7 @@
};
uint3 textureDimensions_70dd33(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint const v_1 = tint_module_vars.arg_0.get_height(0u);
- uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(0u));
+ uint3 res = uint3(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u), tint_module_vars.arg_0.get_depth(0u));
return res;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/715917.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/715917.wgsl.expected.ir.msl
index b8a42a3..fe40805 100644
--- a/test/tint/builtins/gen/var/textureDimensions/715917.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/715917.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_715917(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/7327fa.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/7327fa.wgsl.expected.ir.msl
index d53d2b3..a17f19a 100644
--- a/test/tint/builtins/gen/var/textureDimensions/7327fa.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/7327fa.wgsl.expected.ir.msl
@@ -17,8 +17,7 @@
};
uint2 textureDimensions_7327fa(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
@@ -41,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texture2d<float, access::read> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/756031.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/756031.wgsl.expected.ir.msl
index 19c4e15..0689945 100644
--- a/test/tint/builtins/gen/var/textureDimensions/756031.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/756031.wgsl.expected.ir.msl
@@ -19,9 +19,7 @@
uint3 textureDimensions_756031(tint_module_vars_struct tint_module_vars) {
int arg_1 = 1;
uint const v = uint(arg_1);
- uint const v_1 = tint_module_vars.arg_0.get_width(v);
- uint const v_2 = tint_module_vars.arg_0.get_height(v);
- uint3 res = uint3(v_1, v_2, tint_module_vars.arg_0.get_depth(v));
+ uint3 res = uint3(tint_module_vars.arg_0.get_width(v), tint_module_vars.arg_0.get_height(v), tint_module_vars.arg_0.get_depth(v));
return res;
}
@@ -44,9 +42,9 @@
vertex vertex_main_outputs vertex_main(texture3d<int, access::sample> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_3 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_3.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_3.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v_1.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/756304.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/756304.wgsl.expected.ir.msl
index 9b06a7e..94e97cf 100644
--- a/test/tint/builtins/gen/var/textureDimensions/756304.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/756304.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_756304(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/790e57.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/790e57.wgsl.expected.ir.msl
index 563cd72..6deff5a 100644
--- a/test/tint/builtins/gen/var/textureDimensions/790e57.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/790e57.wgsl.expected.ir.msl
@@ -17,9 +17,7 @@
};
uint3 textureDimensions_790e57(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint const v_1 = tint_module_vars.arg_0.get_height(0u);
- uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(0u));
+ uint3 res = uint3(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u), tint_module_vars.arg_0.get_depth(0u));
return res;
}
@@ -42,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texture3d<int, access::read> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_2.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_2.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/795fbb.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/795fbb.wgsl.expected.ir.msl
index 479a000..f9c461c 100644
--- a/test/tint/builtins/gen/var/textureDimensions/795fbb.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/795fbb.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_795fbb(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/79d168.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/79d168.wgsl.expected.ir.msl
index a8bbedd..b8c8f84 100644
--- a/test/tint/builtins/gen/var/textureDimensions/79d168.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/79d168.wgsl.expected.ir.msl
@@ -19,8 +19,7 @@
uint2 textureDimensions_79d168(tint_module_vars_struct tint_module_vars) {
int arg_1 = 1;
uint const v = uint(arg_1);
- uint const v_1 = tint_module_vars.arg_0.get_width(v);
- uint2 res = uint2(v_1, tint_module_vars.arg_0.get_height(v));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(v), tint_module_vars.arg_0.get_height(v));
return res;
}
@@ -43,9 +42,9 @@
vertex vertex_main_outputs vertex_main(depthcube<float, access::sample> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_2.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_2.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v_1.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/7a3890.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/7a3890.wgsl.expected.ir.msl
index 5e311d4..5292b84f 100644
--- a/test/tint/builtins/gen/var/textureDimensions/7a3890.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/7a3890.wgsl.expected.ir.msl
@@ -17,9 +17,7 @@
};
uint3 textureDimensions_7a3890(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint const v_1 = tint_module_vars.arg_0.get_height(0u);
- uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(0u));
+ uint3 res = uint3(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u), tint_module_vars.arg_0.get_depth(0u));
return res;
}
@@ -42,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texture3d<uint, access::sample> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_2.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_2.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/7a9e30.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/7a9e30.wgsl.expected.ir.msl
index 473a8ca..943a700 100644
--- a/test/tint/builtins/gen/var/textureDimensions/7a9e30.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/7a9e30.wgsl.expected.ir.msl
@@ -17,8 +17,7 @@
};
uint2 textureDimensions_7a9e30(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
@@ -41,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texturecube<uint, access::sample> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/7c7c64.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/7c7c64.wgsl.expected.ir.msl
index 9695e7e..0377b76 100644
--- a/test/tint/builtins/gen/var/textureDimensions/7c7c64.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/7c7c64.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_7c7c64(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/7ea4b5.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/7ea4b5.wgsl.expected.ir.msl
index c4c5c2e..76c5df3 100644
--- a/test/tint/builtins/gen/var/textureDimensions/7ea4b5.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/7ea4b5.wgsl.expected.ir.msl
@@ -7,9 +7,7 @@
};
uint3 textureDimensions_7ea4b5(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint const v_1 = tint_module_vars.arg_0.get_height(0u);
- uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(0u));
+ uint3 res = uint3(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u), tint_module_vars.arg_0.get_depth(0u));
return res;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/7edb05.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/7edb05.wgsl.expected.ir.msl
index 5b4088b..3bf3057 100644
--- a/test/tint/builtins/gen/var/textureDimensions/7edb05.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/7edb05.wgsl.expected.ir.msl
@@ -17,8 +17,7 @@
};
uint2 textureDimensions_7edb05(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
@@ -41,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/8057cb.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/8057cb.wgsl.expected.ir.msl
index 690700c..399b473 100644
--- a/test/tint/builtins/gen/var/textureDimensions/8057cb.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/8057cb.wgsl.expected.ir.msl
@@ -17,9 +17,7 @@
};
uint3 textureDimensions_8057cb(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint const v_1 = tint_module_vars.arg_0.get_height(0u);
- uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(0u));
+ uint3 res = uint3(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u), tint_module_vars.arg_0.get_depth(0u));
return res;
}
@@ -42,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texture3d<float, access::read> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_2.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_2.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/8243a1.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/8243a1.wgsl.expected.ir.msl
index b3d6f22..aeea11c 100644
--- a/test/tint/builtins/gen/var/textureDimensions/8243a1.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/8243a1.wgsl.expected.ir.msl
@@ -7,9 +7,7 @@
};
uint3 textureDimensions_8243a1(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint const v_1 = tint_module_vars.arg_0.get_height(0u);
- uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(0u));
+ uint3 res = uint3(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u), tint_module_vars.arg_0.get_depth(0u));
return res;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/835f90.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/835f90.wgsl.expected.ir.msl
index 2e89dd5..ba9785a 100644
--- a/test/tint/builtins/gen/var/textureDimensions/835f90.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/835f90.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_835f90(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/867ead.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/867ead.wgsl.expected.ir.msl
index 30c602f..a5d3928 100644
--- a/test/tint/builtins/gen/var/textureDimensions/867ead.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/867ead.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_867ead(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/879b73.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/879b73.wgsl.expected.ir.msl
index 392cb64..18e3bd1 100644
--- a/test/tint/builtins/gen/var/textureDimensions/879b73.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/879b73.wgsl.expected.ir.msl
@@ -17,8 +17,7 @@
};
uint2 textureDimensions_879b73(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
@@ -41,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texturecube_array<float, access::sample> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/87b42d.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/87b42d.wgsl.expected.ir.msl
index 92e3ae7..5f9162b 100644
--- a/test/tint/builtins/gen/var/textureDimensions/87b42d.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/87b42d.wgsl.expected.ir.msl
@@ -17,8 +17,7 @@
};
uint2 textureDimensions_87b42d(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
@@ -41,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/881dd4.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/881dd4.wgsl.expected.ir.msl
index 032b293..a9e2f32 100644
--- a/test/tint/builtins/gen/var/textureDimensions/881dd4.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/881dd4.wgsl.expected.ir.msl
@@ -17,8 +17,7 @@
};
uint2 textureDimensions_881dd4(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
@@ -41,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/8a35f9.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/8a35f9.wgsl.expected.ir.msl
index c211043..5779c83 100644
--- a/test/tint/builtins/gen/var/textureDimensions/8a35f9.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/8a35f9.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_8a35f9(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/8af728.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/8af728.wgsl.expected.ir.msl
index 2466a59..3f69017 100644
--- a/test/tint/builtins/gen/var/textureDimensions/8af728.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/8af728.wgsl.expected.ir.msl
@@ -17,8 +17,7 @@
};
uint2 textureDimensions_8af728(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
@@ -41,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/8b9906.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/8b9906.wgsl.expected.ir.msl
index d7d16e2..8abe649 100644
--- a/test/tint/builtins/gen/var/textureDimensions/8b9906.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/8b9906.wgsl.expected.ir.msl
@@ -7,9 +7,7 @@
};
uint3 textureDimensions_8b9906(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint const v_1 = tint_module_vars.arg_0.get_height(0u);
- uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(0u));
+ uint3 res = uint3(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u), tint_module_vars.arg_0.get_depth(0u));
return res;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/8bd369.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/8bd369.wgsl.expected.ir.msl
index c0b8a1a..bc53331 100644
--- a/test/tint/builtins/gen/var/textureDimensions/8bd369.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/8bd369.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_8bd369(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/8e15f4.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/8e15f4.wgsl.expected.ir.msl
index 299c6ec..696defd 100644
--- a/test/tint/builtins/gen/var/textureDimensions/8e15f4.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/8e15f4.wgsl.expected.ir.msl
@@ -17,8 +17,7 @@
};
uint2 textureDimensions_8e15f4(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
@@ -41,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texture2d<uint, access::read> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/902179.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/902179.wgsl.expected.ir.msl
index b11de21..20aa789 100644
--- a/test/tint/builtins/gen/var/textureDimensions/902179.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/902179.wgsl.expected.ir.msl
@@ -7,9 +7,7 @@
};
uint3 textureDimensions_902179(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint const v_1 = tint_module_vars.arg_0.get_height(0u);
- uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(0u));
+ uint3 res = uint3(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u), tint_module_vars.arg_0.get_depth(0u));
return res;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/904b0f.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/904b0f.wgsl.expected.ir.msl
index e27ba6d..f853b9e 100644
--- a/test/tint/builtins/gen/var/textureDimensions/904b0f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/904b0f.wgsl.expected.ir.msl
@@ -17,8 +17,7 @@
};
uint2 textureDimensions_904b0f(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
@@ -41,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texture2d_array<int, access::read> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/90dd74.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/90dd74.wgsl.expected.ir.msl
index 02532a7..f4e64fc 100644
--- a/test/tint/builtins/gen/var/textureDimensions/90dd74.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/90dd74.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_90dd74(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/91e3b4.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/91e3b4.wgsl.expected.ir.msl
index 57d58ed..370a11f 100644
--- a/test/tint/builtins/gen/var/textureDimensions/91e3b4.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/91e3b4.wgsl.expected.ir.msl
@@ -7,9 +7,7 @@
};
uint3 textureDimensions_91e3b4(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint const v_1 = tint_module_vars.arg_0.get_height(0u);
- uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(0u));
+ uint3 res = uint3(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u), tint_module_vars.arg_0.get_depth(0u));
return res;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/9573f3.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/9573f3.wgsl.expected.ir.msl
index 1174f2c..a792efa 100644
--- a/test/tint/builtins/gen/var/textureDimensions/9573f3.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/9573f3.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_9573f3(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/98b2d3.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/98b2d3.wgsl.expected.ir.msl
index 8491445..c90fc44 100644
--- a/test/tint/builtins/gen/var/textureDimensions/98b2d3.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/98b2d3.wgsl.expected.ir.msl
@@ -17,8 +17,7 @@
};
uint2 textureDimensions_98b2d3(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
@@ -41,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texturecube_array<int, access::sample> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/991ea9.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/991ea9.wgsl.expected.ir.msl
index c5fc3ba..efe24b8 100644
--- a/test/tint/builtins/gen/var/textureDimensions/991ea9.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/991ea9.wgsl.expected.ir.msl
@@ -19,8 +19,7 @@
uint2 textureDimensions_991ea9(tint_module_vars_struct tint_module_vars) {
uint arg_1 = 1u;
uint const v = arg_1;
- uint const v_1 = tint_module_vars.arg_0.get_width(v);
- uint2 res = uint2(v_1, tint_module_vars.arg_0.get_height(v));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(v), tint_module_vars.arg_0.get_height(v));
return res;
}
@@ -43,9 +42,9 @@
vertex vertex_main_outputs vertex_main(depth2d<float, access::sample> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_2.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_2.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v_1.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/9b10a0.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/9b10a0.wgsl.expected.ir.msl
index 3426a05..e406d0b 100644
--- a/test/tint/builtins/gen/var/textureDimensions/9b10a0.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/9b10a0.wgsl.expected.ir.msl
@@ -17,8 +17,7 @@
};
uint2 textureDimensions_9b10a0(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
@@ -41,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/9b223b.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/9b223b.wgsl.expected.ir.msl
index 25ee267..0077624 100644
--- a/test/tint/builtins/gen/var/textureDimensions/9b223b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/9b223b.wgsl.expected.ir.msl
@@ -17,8 +17,7 @@
};
uint2 textureDimensions_9b223b(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
@@ -41,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texturecube<float, access::sample> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/9baf27.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/9baf27.wgsl.expected.ir.msl
index 026adf2..4e0de58 100644
--- a/test/tint/builtins/gen/var/textureDimensions/9baf27.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/9baf27.wgsl.expected.ir.msl
@@ -19,8 +19,7 @@
uint2 textureDimensions_9baf27(tint_module_vars_struct tint_module_vars) {
uint arg_1 = 1u;
uint const v = arg_1;
- uint const v_1 = tint_module_vars.arg_0.get_width(v);
- uint2 res = uint2(v_1, tint_module_vars.arg_0.get_height(v));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(v), tint_module_vars.arg_0.get_height(v));
return res;
}
@@ -43,9 +42,9 @@
vertex vertex_main_outputs vertex_main(texturecube<uint, access::sample> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_2.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_2.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v_1.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/9cd4ca.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/9cd4ca.wgsl.expected.ir.msl
index 2e4ecc5..10086e2 100644
--- a/test/tint/builtins/gen/var/textureDimensions/9cd4ca.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/9cd4ca.wgsl.expected.ir.msl
@@ -19,8 +19,7 @@
uint2 textureDimensions_9cd4ca(tint_module_vars_struct tint_module_vars) {
int arg_1 = 1;
uint const v = uint(arg_1);
- uint const v_1 = tint_module_vars.arg_0.get_width(v);
- uint2 res = uint2(v_1, tint_module_vars.arg_0.get_height(v));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(v), tint_module_vars.arg_0.get_height(v));
return res;
}
@@ -43,9 +42,9 @@
vertex vertex_main_outputs vertex_main(texturecube<uint, access::sample> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_2.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_2.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v_1.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/9cd8ad.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/9cd8ad.wgsl.expected.ir.msl
index ae59ca3..c779787 100644
--- a/test/tint/builtins/gen/var/textureDimensions/9cd8ad.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/9cd8ad.wgsl.expected.ir.msl
@@ -7,9 +7,7 @@
};
uint3 textureDimensions_9cd8ad(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint const v_1 = tint_module_vars.arg_0.get_height(0u);
- uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(0u));
+ uint3 res = uint3(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u), tint_module_vars.arg_0.get_depth(0u));
return res;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/9d0bac.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/9d0bac.wgsl.expected.ir.msl
index 11c4e88..6fa5071 100644
--- a/test/tint/builtins/gen/var/textureDimensions/9d0bac.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/9d0bac.wgsl.expected.ir.msl
@@ -17,8 +17,7 @@
};
uint2 textureDimensions_9d0bac(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
@@ -41,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texture2d<float, access::read> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/9dc27a.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/9dc27a.wgsl.expected.ir.msl
index 17ee0dd..1ae7a01 100644
--- a/test/tint/builtins/gen/var/textureDimensions/9dc27a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/9dc27a.wgsl.expected.ir.msl
@@ -17,8 +17,7 @@
};
uint2 textureDimensions_9dc27a(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
@@ -41,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/9e0794.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/9e0794.wgsl.expected.ir.msl
index 6685aa7..3f9f802 100644
--- a/test/tint/builtins/gen/var/textureDimensions/9e0794.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/9e0794.wgsl.expected.ir.msl
@@ -19,8 +19,7 @@
uint2 textureDimensions_9e0794(tint_module_vars_struct tint_module_vars) {
int arg_1 = 1;
uint const v = uint(arg_1);
- uint const v_1 = tint_module_vars.arg_0.get_width(v);
- uint2 res = uint2(v_1, tint_module_vars.arg_0.get_height(v));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(v), tint_module_vars.arg_0.get_height(v));
return res;
}
@@ -43,9 +42,9 @@
vertex vertex_main_outputs vertex_main(texture2d_array<uint, access::sample> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_2.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_2.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v_1.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/9fcc3b.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/9fcc3b.wgsl.expected.ir.msl
index fb3b71c..ac71dec 100644
--- a/test/tint/builtins/gen/var/textureDimensions/9fcc3b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/9fcc3b.wgsl.expected.ir.msl
@@ -17,8 +17,7 @@
};
uint2 textureDimensions_9fcc3b(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
@@ -41,9 +40,9 @@
vertex vertex_main_outputs vertex_main(depthcube_array<float, access::sample> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/a105a5.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/a105a5.wgsl.expected.ir.msl
index 348f77b..b2a6fc8 100644
--- a/test/tint/builtins/gen/var/textureDimensions/a105a5.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/a105a5.wgsl.expected.ir.msl
@@ -7,9 +7,7 @@
};
uint3 textureDimensions_a105a5(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint const v_1 = tint_module_vars.arg_0.get_height(0u);
- uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(0u));
+ uint3 res = uint3(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u), tint_module_vars.arg_0.get_depth(0u));
return res;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/a14386.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/a14386.wgsl.expected.ir.msl
index edfe9af..24d4e2c 100644
--- a/test/tint/builtins/gen/var/textureDimensions/a14386.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/a14386.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_a14386(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/a1598a.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/a1598a.wgsl.expected.ir.msl
index 9d2e4bb..7fd4e35 100644
--- a/test/tint/builtins/gen/var/textureDimensions/a1598a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/a1598a.wgsl.expected.ir.msl
@@ -17,8 +17,7 @@
};
uint2 textureDimensions_a1598a(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
@@ -41,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texturecube_array<uint, access::sample> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/a20ba2.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/a20ba2.wgsl.expected.ir.msl
index 666ad36..419bfae 100644
--- a/test/tint/builtins/gen/var/textureDimensions/a20ba2.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/a20ba2.wgsl.expected.ir.msl
@@ -7,9 +7,7 @@
};
uint3 textureDimensions_a20ba2(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint const v_1 = tint_module_vars.arg_0.get_height(0u);
- uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(0u));
+ uint3 res = uint3(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u), tint_module_vars.arg_0.get_depth(0u));
return res;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/a25d9b.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/a25d9b.wgsl.expected.ir.msl
index 4f425be..8ba62a3 100644
--- a/test/tint/builtins/gen/var/textureDimensions/a25d9b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/a25d9b.wgsl.expected.ir.msl
@@ -17,9 +17,7 @@
};
uint3 textureDimensions_a25d9b(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint const v_1 = tint_module_vars.arg_0.get_height(0u);
- uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(0u));
+ uint3 res = uint3(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u), tint_module_vars.arg_0.get_depth(0u));
return res;
}
@@ -42,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texture3d<float, access::read> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_2.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_2.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/a2ba5e.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/a2ba5e.wgsl.expected.ir.msl
index 6e5e3c8..57102ff 100644
--- a/test/tint/builtins/gen/var/textureDimensions/a2ba5e.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/a2ba5e.wgsl.expected.ir.msl
@@ -19,8 +19,7 @@
uint2 textureDimensions_a2ba5e(tint_module_vars_struct tint_module_vars) {
int arg_1 = 1;
uint const v = uint(arg_1);
- uint const v_1 = tint_module_vars.arg_0.get_width(v);
- uint2 res = uint2(v_1, tint_module_vars.arg_0.get_height(v));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(v), tint_module_vars.arg_0.get_height(v));
return res;
}
@@ -43,9 +42,9 @@
vertex vertex_main_outputs vertex_main(texturecube<int, access::sample> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_2.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_2.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v_1.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/a3ea91.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/a3ea91.wgsl.expected.ir.msl
index d3ac982a..8823e0c 100644
--- a/test/tint/builtins/gen/var/textureDimensions/a3ea91.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/a3ea91.wgsl.expected.ir.msl
@@ -17,9 +17,7 @@
};
uint3 textureDimensions_a3ea91(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint const v_1 = tint_module_vars.arg_0.get_height(0u);
- uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(0u));
+ uint3 res = uint3(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u), tint_module_vars.arg_0.get_depth(0u));
return res;
}
@@ -42,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texture3d<float, access::read> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_2.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_2.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/a48049.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/a48049.wgsl.expected.ir.msl
index 93c40f2..e8e565e 100644
--- a/test/tint/builtins/gen/var/textureDimensions/a48049.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/a48049.wgsl.expected.ir.msl
@@ -19,8 +19,7 @@
uint2 textureDimensions_a48049(tint_module_vars_struct tint_module_vars) {
uint arg_1 = 1u;
uint const v = arg_1;
- uint const v_1 = tint_module_vars.arg_0.get_width(v);
- uint2 res = uint2(v_1, tint_module_vars.arg_0.get_height(v));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(v), tint_module_vars.arg_0.get_height(v));
return res;
}
@@ -43,9 +42,9 @@
vertex vertex_main_outputs vertex_main(texture2d<int, access::sample> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_2.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_2.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v_1.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/a4cd56.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/a4cd56.wgsl.expected.ir.msl
index c364f6b..2e9b5ec 100644
--- a/test/tint/builtins/gen/var/textureDimensions/a4cd56.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/a4cd56.wgsl.expected.ir.msl
@@ -17,8 +17,7 @@
};
uint2 textureDimensions_a4cd56(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
@@ -41,9 +40,9 @@
vertex vertex_main_outputs vertex_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/a65776.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/a65776.wgsl.expected.ir.msl
index bf2fb49..a4ee4e8 100644
--- a/test/tint/builtins/gen/var/textureDimensions/a65776.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/a65776.wgsl.expected.ir.msl
@@ -17,8 +17,7 @@
};
uint2 textureDimensions_a65776(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
@@ -41,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texture2d<int, access::read> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/aa4353.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/aa4353.wgsl.expected.ir.msl
index b5f0af5..b4a7a78 100644
--- a/test/tint/builtins/gen/var/textureDimensions/aa4353.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/aa4353.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_aa4353(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/ae4595.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/ae4595.wgsl.expected.ir.msl
index ce03f49..dc1c773 100644
--- a/test/tint/builtins/gen/var/textureDimensions/ae4595.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/ae4595.wgsl.expected.ir.msl
@@ -7,9 +7,7 @@
};
uint3 textureDimensions_ae4595(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint const v_1 = tint_module_vars.arg_0.get_height(0u);
- uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(0u));
+ uint3 res = uint3(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u), tint_module_vars.arg_0.get_depth(0u));
return res;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/af46ab.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/af46ab.wgsl.expected.ir.msl
index bbda3dc..330d6d1 100644
--- a/test/tint/builtins/gen/var/textureDimensions/af46ab.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/af46ab.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_af46ab(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/b16352.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/b16352.wgsl.expected.ir.msl
index c62fef1..3211e5a 100644
--- a/test/tint/builtins/gen/var/textureDimensions/b16352.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/b16352.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_b16352(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/b284b8.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/b284b8.wgsl.expected.ir.msl
index cac21d2..8ba605e 100644
--- a/test/tint/builtins/gen/var/textureDimensions/b284b8.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/b284b8.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_b284b8(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/b3ab5e.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/b3ab5e.wgsl.expected.ir.msl
index b699803..d2f1c82 100644
--- a/test/tint/builtins/gen/var/textureDimensions/b3ab5e.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/b3ab5e.wgsl.expected.ir.msl
@@ -19,8 +19,7 @@
uint2 textureDimensions_b3ab5e(tint_module_vars_struct tint_module_vars) {
int arg_1 = 1;
uint const v = uint(arg_1);
- uint const v_1 = tint_module_vars.arg_0.get_width(v);
- uint2 res = uint2(v_1, tint_module_vars.arg_0.get_height(v));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(v), tint_module_vars.arg_0.get_height(v));
return res;
}
@@ -43,9 +42,9 @@
vertex vertex_main_outputs vertex_main(texturecube_array<float, access::sample> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_2.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_2.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v_1.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/b56112.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/b56112.wgsl.expected.ir.msl
index 5fe07cc..2984f15 100644
--- a/test/tint/builtins/gen/var/textureDimensions/b56112.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/b56112.wgsl.expected.ir.msl
@@ -17,8 +17,7 @@
};
uint2 textureDimensions_b56112(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
@@ -41,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texture2d<uint, access::read> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/b5d68e.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/b5d68e.wgsl.expected.ir.msl
index 266d4d4..7db05e0 100644
--- a/test/tint/builtins/gen/var/textureDimensions/b5d68e.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/b5d68e.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_b5d68e(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/b6bbf4.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/b6bbf4.wgsl.expected.ir.msl
index f8702ea..40aa81d 100644
--- a/test/tint/builtins/gen/var/textureDimensions/b6bbf4.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/b6bbf4.wgsl.expected.ir.msl
@@ -17,9 +17,7 @@
};
uint3 textureDimensions_b6bbf4(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint const v_1 = tint_module_vars.arg_0.get_height(0u);
- uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(0u));
+ uint3 res = uint3(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u), tint_module_vars.arg_0.get_depth(0u));
return res;
}
@@ -42,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texture3d<uint, access::read> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_2.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_2.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/b8287f.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/b8287f.wgsl.expected.ir.msl
index 4267d89..659429a 100644
--- a/test/tint/builtins/gen/var/textureDimensions/b8287f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/b8287f.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_b8287f(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/bb95d9.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/bb95d9.wgsl.expected.ir.msl
index 5570234..c52d6b6 100644
--- a/test/tint/builtins/gen/var/textureDimensions/bb95d9.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/bb95d9.wgsl.expected.ir.msl
@@ -17,9 +17,7 @@
};
uint3 textureDimensions_bb95d9(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint const v_1 = tint_module_vars.arg_0.get_height(0u);
- uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(0u));
+ uint3 res = uint3(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u), tint_module_vars.arg_0.get_depth(0u));
return res;
}
@@ -42,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texture3d<float, access::sample> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_2.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_2.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/bbe285.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/bbe285.wgsl.expected.ir.msl
index 848bc4e..f2e1a00 100644
--- a/test/tint/builtins/gen/var/textureDimensions/bbe285.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/bbe285.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_bbe285(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/bc96f6.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/bc96f6.wgsl.expected.ir.msl
index 5dfb71b..786579e 100644
--- a/test/tint/builtins/gen/var/textureDimensions/bc96f6.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/bc96f6.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_bc96f6(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/bd94c8.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/bd94c8.wgsl.expected.ir.msl
index 25500b4f..43a55f1 100644
--- a/test/tint/builtins/gen/var/textureDimensions/bd94c8.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/bd94c8.wgsl.expected.ir.msl
@@ -19,8 +19,7 @@
uint2 textureDimensions_bd94c8(tint_module_vars_struct tint_module_vars) {
uint arg_1 = 1u;
uint const v = arg_1;
- uint const v_1 = tint_module_vars.arg_0.get_width(v);
- uint2 res = uint2(v_1, tint_module_vars.arg_0.get_height(v));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(v), tint_module_vars.arg_0.get_height(v));
return res;
}
@@ -43,9 +42,9 @@
vertex vertex_main_outputs vertex_main(depthcube_array<float, access::sample> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_2.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_2.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v_1.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/bec716.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/bec716.wgsl.expected.ir.msl
index 953363c..84516f2 100644
--- a/test/tint/builtins/gen/var/textureDimensions/bec716.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/bec716.wgsl.expected.ir.msl
@@ -17,9 +17,7 @@
};
uint3 textureDimensions_bec716(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint const v_1 = tint_module_vars.arg_0.get_height(0u);
- uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(0u));
+ uint3 res = uint3(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u), tint_module_vars.arg_0.get_depth(0u));
return res;
}
@@ -42,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texture3d<float, access::read> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_2.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_2.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/bf9170.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/bf9170.wgsl.expected.ir.msl
index d92d171..098135d 100644
--- a/test/tint/builtins/gen/var/textureDimensions/bf9170.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/bf9170.wgsl.expected.ir.msl
@@ -17,9 +17,7 @@
};
uint3 textureDimensions_bf9170(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint const v_1 = tint_module_vars.arg_0.get_height(0u);
- uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(0u));
+ uint3 res = uint3(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u), tint_module_vars.arg_0.get_depth(0u));
return res;
}
@@ -42,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texture3d<float, access::read> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_2.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_2.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/c1189e.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/c1189e.wgsl.expected.ir.msl
index c80849a..ba9eba4 100644
--- a/test/tint/builtins/gen/var/textureDimensions/c1189e.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/c1189e.wgsl.expected.ir.msl
@@ -17,8 +17,7 @@
};
uint2 textureDimensions_c1189e(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
@@ -41,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/c1dbf6.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/c1dbf6.wgsl.expected.ir.msl
index b8a5a97..8075370 100644
--- a/test/tint/builtins/gen/var/textureDimensions/c1dbf6.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/c1dbf6.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_c1dbf6(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/c2cdd3.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/c2cdd3.wgsl.expected.ir.msl
index 9d6d63a..802c733 100644
--- a/test/tint/builtins/gen/var/textureDimensions/c2cdd3.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/c2cdd3.wgsl.expected.ir.msl
@@ -17,8 +17,7 @@
};
uint2 textureDimensions_c2cdd3(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width();
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height());
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(), tint_module_vars.arg_0.get_height());
return res;
}
@@ -41,9 +40,9 @@
vertex vertex_main_outputs vertex_main(depth2d_ms<float, access::read> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/c44fc1.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/c44fc1.wgsl.expected.ir.msl
index 089dc08..36da347 100644
--- a/test/tint/builtins/gen/var/textureDimensions/c44fc1.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/c44fc1.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_c44fc1(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/c5a36e.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/c5a36e.wgsl.expected.ir.msl
index 67445d3..b575286 100644
--- a/test/tint/builtins/gen/var/textureDimensions/c5a36e.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/c5a36e.wgsl.expected.ir.msl
@@ -17,8 +17,7 @@
};
uint2 textureDimensions_c5a36e(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
@@ -41,9 +40,9 @@
vertex vertex_main_outputs vertex_main(depthcube<float, access::sample> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/c6b44c.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/c6b44c.wgsl.expected.ir.msl
index fbdaddb..f2d859e 100644
--- a/test/tint/builtins/gen/var/textureDimensions/c6b44c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/c6b44c.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_c6b44c(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/c82420.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/c82420.wgsl.expected.ir.msl
index 71e20ed8..d0cc9d8 100644
--- a/test/tint/builtins/gen/var/textureDimensions/c82420.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/c82420.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_c82420(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/c871f3.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/c871f3.wgsl.expected.ir.msl
index 7ead90d..61c6d10 100644
--- a/test/tint/builtins/gen/var/textureDimensions/c871f3.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/c871f3.wgsl.expected.ir.msl
@@ -19,9 +19,7 @@
uint3 textureDimensions_c871f3(tint_module_vars_struct tint_module_vars) {
uint arg_1 = 1u;
uint const v = arg_1;
- uint const v_1 = tint_module_vars.arg_0.get_width(v);
- uint const v_2 = tint_module_vars.arg_0.get_height(v);
- uint3 res = uint3(v_1, v_2, tint_module_vars.arg_0.get_depth(v));
+ uint3 res = uint3(tint_module_vars.arg_0.get_width(v), tint_module_vars.arg_0.get_height(v), tint_module_vars.arg_0.get_depth(v));
return res;
}
@@ -44,9 +42,9 @@
vertex vertex_main_outputs vertex_main(texture3d<int, access::sample> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_3 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_3.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_3.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v_1.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/ca10cc.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/ca10cc.wgsl.expected.ir.msl
index 8d4236e..6fba22a 100644
--- a/test/tint/builtins/gen/var/textureDimensions/ca10cc.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/ca10cc.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_ca10cc(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/cad3b7.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/cad3b7.wgsl.expected.ir.msl
index a36c42f..615845b 100644
--- a/test/tint/builtins/gen/var/textureDimensions/cad3b7.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/cad3b7.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_cad3b7(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/cc947b.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/cc947b.wgsl.expected.ir.msl
index 7241341..bb455c2 100644
--- a/test/tint/builtins/gen/var/textureDimensions/cc947b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/cc947b.wgsl.expected.ir.msl
@@ -7,9 +7,7 @@
};
uint3 textureDimensions_cc947b(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint const v_1 = tint_module_vars.arg_0.get_height(0u);
- uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(0u));
+ uint3 res = uint3(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u), tint_module_vars.arg_0.get_depth(0u));
return res;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/cd3033.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/cd3033.wgsl.expected.ir.msl
index c828c98..8091bd4 100644
--- a/test/tint/builtins/gen/var/textureDimensions/cd3033.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/cd3033.wgsl.expected.ir.msl
@@ -17,8 +17,7 @@
};
uint2 textureDimensions_cd3033(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
@@ -41,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texture2d_array<int, access::read> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/cdc6c9.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/cdc6c9.wgsl.expected.ir.dxc.hlsl
index e50d38e..466f94b 100644
--- a/test/tint/builtins/gen/var/textureDimensions/cdc6c9.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureDimensions/cdc6c9.wgsl.expected.ir.dxc.hlsl
@@ -53,56 +53,45 @@
}
float3x3 v_6(uint start_byte_offset) {
- float3 v_7 = asfloat(arg_0_params[(start_byte_offset / 16u)].xyz);
- float3 v_8 = asfloat(arg_0_params[((16u + start_byte_offset) / 16u)].xyz);
- return float3x3(v_7, v_8, asfloat(arg_0_params[((32u + start_byte_offset) / 16u)].xyz));
+ return float3x3(asfloat(arg_0_params[(start_byte_offset / 16u)].xyz), asfloat(arg_0_params[((16u + start_byte_offset) / 16u)].xyz), asfloat(arg_0_params[((32u + start_byte_offset) / 16u)].xyz));
}
-tint_GammaTransferParams v_9(uint start_byte_offset) {
- float v_10 = asfloat(arg_0_params[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]);
- float v_11 = asfloat(arg_0_params[((4u + start_byte_offset) / 16u)][(((4u + start_byte_offset) % 16u) / 4u)]);
- float v_12 = asfloat(arg_0_params[((8u + start_byte_offset) / 16u)][(((8u + start_byte_offset) % 16u) / 4u)]);
- float v_13 = asfloat(arg_0_params[((12u + start_byte_offset) / 16u)][(((12u + start_byte_offset) % 16u) / 4u)]);
- float v_14 = asfloat(arg_0_params[((16u + start_byte_offset) / 16u)][(((16u + start_byte_offset) % 16u) / 4u)]);
- float v_15 = asfloat(arg_0_params[((20u + start_byte_offset) / 16u)][(((20u + start_byte_offset) % 16u) / 4u)]);
- float v_16 = asfloat(arg_0_params[((24u + start_byte_offset) / 16u)][(((24u + start_byte_offset) % 16u) / 4u)]);
- tint_GammaTransferParams v_17 = {v_10, v_11, v_12, v_13, v_14, v_15, v_16, arg_0_params[((28u + start_byte_offset) / 16u)][(((28u + start_byte_offset) % 16u) / 4u)]};
- return v_17;
+tint_GammaTransferParams v_7(uint start_byte_offset) {
+ tint_GammaTransferParams v_8 = {asfloat(arg_0_params[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]), asfloat(arg_0_params[((4u + start_byte_offset) / 16u)][(((4u + start_byte_offset) % 16u) / 4u)]), asfloat(arg_0_params[((8u + start_byte_offset) / 16u)][(((8u + start_byte_offset) % 16u) / 4u)]), asfloat(arg_0_params[((12u + start_byte_offset) / 16u)][(((12u + start_byte_offset) % 16u) / 4u)]), asfloat(arg_0_params[((16u + start_byte_offset) / 16u)][(((16u + start_byte_offset) % 16u) / 4u)]), asfloat(arg_0_params[((20u + start_byte_offset) / 16u)][(((20u + start_byte_offset) % 16u) / 4u)]), asfloat(arg_0_params[((24u + start_byte_offset) / 16u)][(((24u + start_byte_offset) % 16u) / 4u)]), arg_0_params[((28u + start_byte_offset) / 16u)][(((28u + start_byte_offset) % 16u) / 4u)]};
+ return v_8;
}
-float3x4 v_18(uint start_byte_offset) {
- float4 v_19 = asfloat(arg_0_params[(start_byte_offset / 16u)]);
- float4 v_20 = asfloat(arg_0_params[((16u + start_byte_offset) / 16u)]);
- return float3x4(v_19, v_20, asfloat(arg_0_params[((32u + start_byte_offset) / 16u)]));
+float3x4 v_9(uint start_byte_offset) {
+ return float3x4(asfloat(arg_0_params[(start_byte_offset / 16u)]), asfloat(arg_0_params[((16u + start_byte_offset) / 16u)]), asfloat(arg_0_params[((32u + start_byte_offset) / 16u)]));
}
-tint_ExternalTextureParams v_21(uint start_byte_offset) {
- uint v_22 = arg_0_params[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)];
- uint v_23 = arg_0_params[((4u + start_byte_offset) / 16u)][(((4u + start_byte_offset) % 16u) / 4u)];
- float3x4 v_24 = v_18((16u + start_byte_offset));
- tint_GammaTransferParams v_25 = v_9((64u + start_byte_offset));
- tint_GammaTransferParams v_26 = v_9((96u + start_byte_offset));
- float3x3 v_27 = v_6((128u + start_byte_offset));
- float3x2 v_28 = v((176u + start_byte_offset));
- float3x2 v_29 = v((200u + start_byte_offset));
- uint4 v_30 = arg_0_params[((224u + start_byte_offset) / 16u)];
- float2 v_31 = asfloat(((((((224u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_30.zw) : (v_30.xy)));
- uint4 v_32 = arg_0_params[((232u + start_byte_offset) / 16u)];
- float2 v_33 = asfloat(((((((232u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_32.zw) : (v_32.xy)));
- uint4 v_34 = arg_0_params[((240u + start_byte_offset) / 16u)];
- float2 v_35 = asfloat(((((((240u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_34.zw) : (v_34.xy)));
- uint4 v_36 = arg_0_params[((248u + start_byte_offset) / 16u)];
- float2 v_37 = asfloat(((((((248u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_36.zw) : (v_36.xy)));
- uint4 v_38 = arg_0_params[((256u + start_byte_offset) / 16u)];
- uint2 v_39 = ((((((256u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_38.zw) : (v_38.xy));
- uint4 v_40 = arg_0_params[((264u + start_byte_offset) / 16u)];
- tint_ExternalTextureParams v_41 = {v_22, v_23, v_24, v_25, v_26, v_27, v_28, v_29, v_31, v_33, v_35, v_37, v_39, asfloat(((((((264u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_40.zw) : (v_40.xy)))};
- return v_41;
+tint_ExternalTextureParams v_10(uint start_byte_offset) {
+ uint v_11 = arg_0_params[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)];
+ uint v_12 = arg_0_params[((4u + start_byte_offset) / 16u)][(((4u + start_byte_offset) % 16u) / 4u)];
+ float3x4 v_13 = v_9((16u + start_byte_offset));
+ tint_GammaTransferParams v_14 = v_7((64u + start_byte_offset));
+ tint_GammaTransferParams v_15 = v_7((96u + start_byte_offset));
+ float3x3 v_16 = v_6((128u + start_byte_offset));
+ float3x2 v_17 = v((176u + start_byte_offset));
+ float3x2 v_18 = v((200u + start_byte_offset));
+ uint4 v_19 = arg_0_params[((224u + start_byte_offset) / 16u)];
+ float2 v_20 = asfloat(((((((224u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_19.zw) : (v_19.xy)));
+ uint4 v_21 = arg_0_params[((232u + start_byte_offset) / 16u)];
+ float2 v_22 = asfloat(((((((232u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_21.zw) : (v_21.xy)));
+ uint4 v_23 = arg_0_params[((240u + start_byte_offset) / 16u)];
+ float2 v_24 = asfloat(((((((240u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_23.zw) : (v_23.xy)));
+ uint4 v_25 = arg_0_params[((248u + start_byte_offset) / 16u)];
+ float2 v_26 = asfloat(((((((248u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_25.zw) : (v_25.xy)));
+ uint4 v_27 = arg_0_params[((256u + start_byte_offset) / 16u)];
+ uint2 v_28 = ((((((256u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_27.zw) : (v_27.xy));
+ uint4 v_29 = arg_0_params[((264u + start_byte_offset) / 16u)];
+ tint_ExternalTextureParams v_30 = {v_11, v_12, v_13, v_14, v_15, v_16, v_17, v_18, v_20, v_22, v_24, v_26, v_28, asfloat(((((((264u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_29.zw) : (v_29.xy)))};
+ return v_30;
}
uint2 textureDimensions_cdc6c9() {
- tint_ExternalTextureParams v_42 = v_21(0u);
- uint2 res = (v_42.visibleSize + (1u).xx);
+ tint_ExternalTextureParams v_31 = v_10(0u);
+ uint2 res = (v_31.visibleSize + (1u).xx);
return res;
}
@@ -119,13 +108,13 @@
VertexOutput tint_symbol = (VertexOutput)0;
tint_symbol.pos = (0.0f).xxxx;
tint_symbol.prevent_dce = textureDimensions_cdc6c9();
- VertexOutput v_43 = tint_symbol;
- return v_43;
+ VertexOutput v_32 = tint_symbol;
+ return v_32;
}
vertex_main_outputs vertex_main() {
- VertexOutput v_44 = vertex_main_inner();
- vertex_main_outputs v_45 = {v_44.prevent_dce, v_44.pos};
- return v_45;
+ VertexOutput v_33 = vertex_main_inner();
+ vertex_main_outputs v_34 = {v_33.prevent_dce, v_33.pos};
+ return v_34;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/cdc6c9.wgsl.expected.ir.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/cdc6c9.wgsl.expected.ir.fxc.hlsl
index e50d38e..466f94b 100644
--- a/test/tint/builtins/gen/var/textureDimensions/cdc6c9.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureDimensions/cdc6c9.wgsl.expected.ir.fxc.hlsl
@@ -53,56 +53,45 @@
}
float3x3 v_6(uint start_byte_offset) {
- float3 v_7 = asfloat(arg_0_params[(start_byte_offset / 16u)].xyz);
- float3 v_8 = asfloat(arg_0_params[((16u + start_byte_offset) / 16u)].xyz);
- return float3x3(v_7, v_8, asfloat(arg_0_params[((32u + start_byte_offset) / 16u)].xyz));
+ return float3x3(asfloat(arg_0_params[(start_byte_offset / 16u)].xyz), asfloat(arg_0_params[((16u + start_byte_offset) / 16u)].xyz), asfloat(arg_0_params[((32u + start_byte_offset) / 16u)].xyz));
}
-tint_GammaTransferParams v_9(uint start_byte_offset) {
- float v_10 = asfloat(arg_0_params[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]);
- float v_11 = asfloat(arg_0_params[((4u + start_byte_offset) / 16u)][(((4u + start_byte_offset) % 16u) / 4u)]);
- float v_12 = asfloat(arg_0_params[((8u + start_byte_offset) / 16u)][(((8u + start_byte_offset) % 16u) / 4u)]);
- float v_13 = asfloat(arg_0_params[((12u + start_byte_offset) / 16u)][(((12u + start_byte_offset) % 16u) / 4u)]);
- float v_14 = asfloat(arg_0_params[((16u + start_byte_offset) / 16u)][(((16u + start_byte_offset) % 16u) / 4u)]);
- float v_15 = asfloat(arg_0_params[((20u + start_byte_offset) / 16u)][(((20u + start_byte_offset) % 16u) / 4u)]);
- float v_16 = asfloat(arg_0_params[((24u + start_byte_offset) / 16u)][(((24u + start_byte_offset) % 16u) / 4u)]);
- tint_GammaTransferParams v_17 = {v_10, v_11, v_12, v_13, v_14, v_15, v_16, arg_0_params[((28u + start_byte_offset) / 16u)][(((28u + start_byte_offset) % 16u) / 4u)]};
- return v_17;
+tint_GammaTransferParams v_7(uint start_byte_offset) {
+ tint_GammaTransferParams v_8 = {asfloat(arg_0_params[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]), asfloat(arg_0_params[((4u + start_byte_offset) / 16u)][(((4u + start_byte_offset) % 16u) / 4u)]), asfloat(arg_0_params[((8u + start_byte_offset) / 16u)][(((8u + start_byte_offset) % 16u) / 4u)]), asfloat(arg_0_params[((12u + start_byte_offset) / 16u)][(((12u + start_byte_offset) % 16u) / 4u)]), asfloat(arg_0_params[((16u + start_byte_offset) / 16u)][(((16u + start_byte_offset) % 16u) / 4u)]), asfloat(arg_0_params[((20u + start_byte_offset) / 16u)][(((20u + start_byte_offset) % 16u) / 4u)]), asfloat(arg_0_params[((24u + start_byte_offset) / 16u)][(((24u + start_byte_offset) % 16u) / 4u)]), arg_0_params[((28u + start_byte_offset) / 16u)][(((28u + start_byte_offset) % 16u) / 4u)]};
+ return v_8;
}
-float3x4 v_18(uint start_byte_offset) {
- float4 v_19 = asfloat(arg_0_params[(start_byte_offset / 16u)]);
- float4 v_20 = asfloat(arg_0_params[((16u + start_byte_offset) / 16u)]);
- return float3x4(v_19, v_20, asfloat(arg_0_params[((32u + start_byte_offset) / 16u)]));
+float3x4 v_9(uint start_byte_offset) {
+ return float3x4(asfloat(arg_0_params[(start_byte_offset / 16u)]), asfloat(arg_0_params[((16u + start_byte_offset) / 16u)]), asfloat(arg_0_params[((32u + start_byte_offset) / 16u)]));
}
-tint_ExternalTextureParams v_21(uint start_byte_offset) {
- uint v_22 = arg_0_params[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)];
- uint v_23 = arg_0_params[((4u + start_byte_offset) / 16u)][(((4u + start_byte_offset) % 16u) / 4u)];
- float3x4 v_24 = v_18((16u + start_byte_offset));
- tint_GammaTransferParams v_25 = v_9((64u + start_byte_offset));
- tint_GammaTransferParams v_26 = v_9((96u + start_byte_offset));
- float3x3 v_27 = v_6((128u + start_byte_offset));
- float3x2 v_28 = v((176u + start_byte_offset));
- float3x2 v_29 = v((200u + start_byte_offset));
- uint4 v_30 = arg_0_params[((224u + start_byte_offset) / 16u)];
- float2 v_31 = asfloat(((((((224u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_30.zw) : (v_30.xy)));
- uint4 v_32 = arg_0_params[((232u + start_byte_offset) / 16u)];
- float2 v_33 = asfloat(((((((232u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_32.zw) : (v_32.xy)));
- uint4 v_34 = arg_0_params[((240u + start_byte_offset) / 16u)];
- float2 v_35 = asfloat(((((((240u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_34.zw) : (v_34.xy)));
- uint4 v_36 = arg_0_params[((248u + start_byte_offset) / 16u)];
- float2 v_37 = asfloat(((((((248u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_36.zw) : (v_36.xy)));
- uint4 v_38 = arg_0_params[((256u + start_byte_offset) / 16u)];
- uint2 v_39 = ((((((256u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_38.zw) : (v_38.xy));
- uint4 v_40 = arg_0_params[((264u + start_byte_offset) / 16u)];
- tint_ExternalTextureParams v_41 = {v_22, v_23, v_24, v_25, v_26, v_27, v_28, v_29, v_31, v_33, v_35, v_37, v_39, asfloat(((((((264u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_40.zw) : (v_40.xy)))};
- return v_41;
+tint_ExternalTextureParams v_10(uint start_byte_offset) {
+ uint v_11 = arg_0_params[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)];
+ uint v_12 = arg_0_params[((4u + start_byte_offset) / 16u)][(((4u + start_byte_offset) % 16u) / 4u)];
+ float3x4 v_13 = v_9((16u + start_byte_offset));
+ tint_GammaTransferParams v_14 = v_7((64u + start_byte_offset));
+ tint_GammaTransferParams v_15 = v_7((96u + start_byte_offset));
+ float3x3 v_16 = v_6((128u + start_byte_offset));
+ float3x2 v_17 = v((176u + start_byte_offset));
+ float3x2 v_18 = v((200u + start_byte_offset));
+ uint4 v_19 = arg_0_params[((224u + start_byte_offset) / 16u)];
+ float2 v_20 = asfloat(((((((224u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_19.zw) : (v_19.xy)));
+ uint4 v_21 = arg_0_params[((232u + start_byte_offset) / 16u)];
+ float2 v_22 = asfloat(((((((232u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_21.zw) : (v_21.xy)));
+ uint4 v_23 = arg_0_params[((240u + start_byte_offset) / 16u)];
+ float2 v_24 = asfloat(((((((240u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_23.zw) : (v_23.xy)));
+ uint4 v_25 = arg_0_params[((248u + start_byte_offset) / 16u)];
+ float2 v_26 = asfloat(((((((248u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_25.zw) : (v_25.xy)));
+ uint4 v_27 = arg_0_params[((256u + start_byte_offset) / 16u)];
+ uint2 v_28 = ((((((256u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_27.zw) : (v_27.xy));
+ uint4 v_29 = arg_0_params[((264u + start_byte_offset) / 16u)];
+ tint_ExternalTextureParams v_30 = {v_11, v_12, v_13, v_14, v_15, v_16, v_17, v_18, v_20, v_22, v_24, v_26, v_28, asfloat(((((((264u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_29.zw) : (v_29.xy)))};
+ return v_30;
}
uint2 textureDimensions_cdc6c9() {
- tint_ExternalTextureParams v_42 = v_21(0u);
- uint2 res = (v_42.visibleSize + (1u).xx);
+ tint_ExternalTextureParams v_31 = v_10(0u);
+ uint2 res = (v_31.visibleSize + (1u).xx);
return res;
}
@@ -119,13 +108,13 @@
VertexOutput tint_symbol = (VertexOutput)0;
tint_symbol.pos = (0.0f).xxxx;
tint_symbol.prevent_dce = textureDimensions_cdc6c9();
- VertexOutput v_43 = tint_symbol;
- return v_43;
+ VertexOutput v_32 = tint_symbol;
+ return v_32;
}
vertex_main_outputs vertex_main() {
- VertexOutput v_44 = vertex_main_inner();
- vertex_main_outputs v_45 = {v_44.prevent_dce, v_44.pos};
- return v_45;
+ VertexOutput v_33 = vertex_main_inner();
+ vertex_main_outputs v_34 = {v_33.prevent_dce, v_33.pos};
+ return v_34;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/cf2b50.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/cf2b50.wgsl.expected.ir.msl
index 697480e..77484c4 100644
--- a/test/tint/builtins/gen/var/textureDimensions/cf2b50.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/cf2b50.wgsl.expected.ir.msl
@@ -19,8 +19,7 @@
uint2 textureDimensions_cf2b50(tint_module_vars_struct tint_module_vars) {
uint arg_1 = 1u;
uint const v = arg_1;
- uint const v_1 = tint_module_vars.arg_0.get_width(v);
- uint2 res = uint2(v_1, tint_module_vars.arg_0.get_height(v));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(v), tint_module_vars.arg_0.get_height(v));
return res;
}
@@ -43,9 +42,9 @@
vertex vertex_main_outputs vertex_main(texturecube_array<float, access::sample> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_2.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_2.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v_1.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/d0778e.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/d0778e.wgsl.expected.ir.msl
index 0747899..df8fc6b 100644
--- a/test/tint/builtins/gen/var/textureDimensions/d0778e.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/d0778e.wgsl.expected.ir.msl
@@ -17,9 +17,7 @@
};
uint3 textureDimensions_d0778e(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint const v_1 = tint_module_vars.arg_0.get_height(0u);
- uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(0u));
+ uint3 res = uint3(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u), tint_module_vars.arg_0.get_depth(0u));
return res;
}
@@ -42,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texture3d<uint, access::read> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_2.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_2.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/d1b882.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/d1b882.wgsl.expected.ir.msl
index 5c65808..7fffe0c 100644
--- a/test/tint/builtins/gen/var/textureDimensions/d1b882.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/d1b882.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_d1b882(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/d3accd.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/d3accd.wgsl.expected.ir.msl
index f10737b..80ab6f4 100644
--- a/test/tint/builtins/gen/var/textureDimensions/d3accd.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/d3accd.wgsl.expected.ir.msl
@@ -19,8 +19,7 @@
uint2 textureDimensions_d3accd(tint_module_vars_struct tint_module_vars) {
uint arg_1 = 1u;
uint const v = arg_1;
- uint const v_1 = tint_module_vars.arg_0.get_width(v);
- uint2 res = uint2(v_1, tint_module_vars.arg_0.get_height(v));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(v), tint_module_vars.arg_0.get_height(v));
return res;
}
@@ -43,9 +42,9 @@
vertex vertex_main_outputs vertex_main(depthcube<float, access::sample> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_2.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_2.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v_1.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/d44ac3.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/d44ac3.wgsl.expected.ir.msl
index 2d9c6a9..47f5ee5 100644
--- a/test/tint/builtins/gen/var/textureDimensions/d44ac3.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/d44ac3.wgsl.expected.ir.msl
@@ -17,8 +17,7 @@
};
uint2 textureDimensions_d44ac3(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
@@ -41,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texture2d<float, access::read> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/d44dd1.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/d44dd1.wgsl.expected.ir.msl
index e21a8f6..c2b64e2 100644
--- a/test/tint/builtins/gen/var/textureDimensions/d44dd1.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/d44dd1.wgsl.expected.ir.msl
@@ -17,8 +17,7 @@
};
uint2 textureDimensions_d44dd1(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
@@ -41,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texture2d<uint, access::read> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/d63c28.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/d63c28.wgsl.expected.ir.msl
index ee1d879..acf909c 100644
--- a/test/tint/builtins/gen/var/textureDimensions/d63c28.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/d63c28.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_d63c28(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/d6f3cf.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/d6f3cf.wgsl.expected.ir.msl
index 83100b7..bcd3426 100644
--- a/test/tint/builtins/gen/var/textureDimensions/d6f3cf.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/d6f3cf.wgsl.expected.ir.msl
@@ -17,8 +17,7 @@
};
uint2 textureDimensions_d6f3cf(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
@@ -41,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texture2d<int, access::read> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/d8ba68.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/d8ba68.wgsl.expected.ir.msl
index 8c7338c..858a620 100644
--- a/test/tint/builtins/gen/var/textureDimensions/d8ba68.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/d8ba68.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_d8ba68(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/d8f887.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/d8f887.wgsl.expected.ir.msl
index d936b3b..a5d23e8 100644
--- a/test/tint/builtins/gen/var/textureDimensions/d8f887.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/d8f887.wgsl.expected.ir.msl
@@ -7,9 +7,7 @@
};
uint3 textureDimensions_d8f887(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint const v_1 = tint_module_vars.arg_0.get_height(0u);
- uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(0u));
+ uint3 res = uint3(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u), tint_module_vars.arg_0.get_depth(0u));
return res;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/daf0fe.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/daf0fe.wgsl.expected.ir.msl
index e05161c..e5d9e0c 100644
--- a/test/tint/builtins/gen/var/textureDimensions/daf0fe.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/daf0fe.wgsl.expected.ir.msl
@@ -17,8 +17,7 @@
};
uint2 textureDimensions_daf0fe(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
@@ -41,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texture2d_array<float, access::read> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/db7131.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/db7131.wgsl.expected.ir.msl
index aa7a762..26d0b88 100644
--- a/test/tint/builtins/gen/var/textureDimensions/db7131.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/db7131.wgsl.expected.ir.msl
@@ -17,9 +17,7 @@
};
uint3 textureDimensions_db7131(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint const v_1 = tint_module_vars.arg_0.get_height(0u);
- uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(0u));
+ uint3 res = uint3(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u), tint_module_vars.arg_0.get_depth(0u));
return res;
}
@@ -42,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texture3d<int, access::read> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_2.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_2.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/dc83ce.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/dc83ce.wgsl.expected.ir.msl
index 0f796c6..1d5bd19 100644
--- a/test/tint/builtins/gen/var/textureDimensions/dc83ce.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/dc83ce.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_dc83ce(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/deb3c0.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/deb3c0.wgsl.expected.ir.msl
index 5362354..48b2c49 100644
--- a/test/tint/builtins/gen/var/textureDimensions/deb3c0.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/deb3c0.wgsl.expected.ir.msl
@@ -7,9 +7,7 @@
};
uint3 textureDimensions_deb3c0(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint const v_1 = tint_module_vars.arg_0.get_height(0u);
- uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(0u));
+ uint3 res = uint3(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u), tint_module_vars.arg_0.get_depth(0u));
return res;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/dee461.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/dee461.wgsl.expected.ir.msl
index 8f9bd34..ac3cf4b 100644
--- a/test/tint/builtins/gen/var/textureDimensions/dee461.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/dee461.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_dee461(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/dfdc32.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/dfdc32.wgsl.expected.ir.msl
index 45ac6b6..310869a 100644
--- a/test/tint/builtins/gen/var/textureDimensions/dfdc32.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/dfdc32.wgsl.expected.ir.msl
@@ -19,8 +19,7 @@
uint2 textureDimensions_dfdc32(tint_module_vars_struct tint_module_vars) {
int arg_1 = 1;
uint const v = uint(arg_1);
- uint const v_1 = tint_module_vars.arg_0.get_width(v);
- uint2 res = uint2(v_1, tint_module_vars.arg_0.get_height(v));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(v), tint_module_vars.arg_0.get_height(v));
return res;
}
@@ -43,9 +42,9 @@
vertex vertex_main_outputs vertex_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_2.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_2.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v_1.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/e18a8b.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/e18a8b.wgsl.expected.ir.msl
index 5e9cc82..a8c7721 100644
--- a/test/tint/builtins/gen/var/textureDimensions/e18a8b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/e18a8b.wgsl.expected.ir.msl
@@ -19,8 +19,7 @@
uint2 textureDimensions_e18a8b(tint_module_vars_struct tint_module_vars) {
uint arg_1 = 1u;
uint const v = arg_1;
- uint const v_1 = tint_module_vars.arg_0.get_width(v);
- uint2 res = uint2(v_1, tint_module_vars.arg_0.get_height(v));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(v), tint_module_vars.arg_0.get_height(v));
return res;
}
@@ -43,9 +42,9 @@
vertex vertex_main_outputs vertex_main(texture2d<uint, access::sample> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_2.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_2.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v_1.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/e4bfd2.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/e4bfd2.wgsl.expected.ir.msl
index df157ac..d00d51d 100644
--- a/test/tint/builtins/gen/var/textureDimensions/e4bfd2.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/e4bfd2.wgsl.expected.ir.msl
@@ -17,8 +17,7 @@
};
uint2 textureDimensions_e4bfd2(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width();
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height());
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(), tint_module_vars.arg_0.get_height());
return res;
}
@@ -41,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texture2d_ms<uint, access::read> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/e4e310.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/e4e310.wgsl.expected.ir.msl
index b5ac32c..49856dc 100644
--- a/test/tint/builtins/gen/var/textureDimensions/e4e310.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/e4e310.wgsl.expected.ir.msl
@@ -19,8 +19,7 @@
uint2 textureDimensions_e4e310(tint_module_vars_struct tint_module_vars) {
uint arg_1 = 1u;
uint const v = arg_1;
- uint const v_1 = tint_module_vars.arg_0.get_width(v);
- uint2 res = uint2(v_1, tint_module_vars.arg_0.get_height(v));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(v), tint_module_vars.arg_0.get_height(v));
return res;
}
@@ -43,9 +42,9 @@
vertex vertex_main_outputs vertex_main(texture2d_array<int, access::sample> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_2.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_2.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v_1.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/e4f021.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/e4f021.wgsl.expected.ir.msl
index 089db84..8090733 100644
--- a/test/tint/builtins/gen/var/textureDimensions/e4f021.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/e4f021.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_e4f021(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/e50eb8.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/e50eb8.wgsl.expected.ir.msl
index 1bf6d8f..898f9ca 100644
--- a/test/tint/builtins/gen/var/textureDimensions/e50eb8.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/e50eb8.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_e50eb8(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/e5a203.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/e5a203.wgsl.expected.ir.msl
index 70068de..d7a2b09 100644
--- a/test/tint/builtins/gen/var/textureDimensions/e5a203.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/e5a203.wgsl.expected.ir.msl
@@ -19,9 +19,7 @@
uint3 textureDimensions_e5a203(tint_module_vars_struct tint_module_vars) {
int arg_1 = 1;
uint const v = uint(arg_1);
- uint const v_1 = tint_module_vars.arg_0.get_width(v);
- uint const v_2 = tint_module_vars.arg_0.get_height(v);
- uint3 res = uint3(v_1, v_2, tint_module_vars.arg_0.get_depth(v));
+ uint3 res = uint3(tint_module_vars.arg_0.get_width(v), tint_module_vars.arg_0.get_height(v), tint_module_vars.arg_0.get_depth(v));
return res;
}
@@ -44,9 +42,9 @@
vertex vertex_main_outputs vertex_main(texture3d<uint, access::sample> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_3 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_3.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_3.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v_1.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/e738f4.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/e738f4.wgsl.expected.ir.msl
index d911ffa..4cab686 100644
--- a/test/tint/builtins/gen/var/textureDimensions/e738f4.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/e738f4.wgsl.expected.ir.msl
@@ -7,9 +7,7 @@
};
uint3 textureDimensions_e738f4(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint const v_1 = tint_module_vars.arg_0.get_height(0u);
- uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(0u));
+ uint3 res = uint3(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u), tint_module_vars.arg_0.get_depth(0u));
return res;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/e824b6.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/e824b6.wgsl.expected.ir.msl
index 16d0da3..7b2711a 100644
--- a/test/tint/builtins/gen/var/textureDimensions/e824b6.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/e824b6.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_e824b6(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/e99308.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/e99308.wgsl.expected.ir.msl
index 96a8e48..3dfe8e9 100644
--- a/test/tint/builtins/gen/var/textureDimensions/e99308.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/e99308.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_e99308(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/eafe19.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/eafe19.wgsl.expected.ir.msl
index d6903df..1b32c8a 100644
--- a/test/tint/builtins/gen/var/textureDimensions/eafe19.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/eafe19.wgsl.expected.ir.msl
@@ -19,8 +19,7 @@
uint2 textureDimensions_eafe19(tint_module_vars_struct tint_module_vars) {
uint arg_1 = 1u;
uint const v = arg_1;
- uint const v_1 = tint_module_vars.arg_0.get_width(v);
- uint2 res = uint2(v_1, tint_module_vars.arg_0.get_height(v));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(v), tint_module_vars.arg_0.get_height(v));
return res;
}
@@ -43,9 +42,9 @@
vertex vertex_main_outputs vertex_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_2.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_2.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v_1.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/eb03b1.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/eb03b1.wgsl.expected.ir.msl
index 3fce652..cd86bff 100644
--- a/test/tint/builtins/gen/var/textureDimensions/eb03b1.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/eb03b1.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_eb03b1(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/eb10d6.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/eb10d6.wgsl.expected.ir.msl
index 3a560ae..7d4c8ae 100644
--- a/test/tint/builtins/gen/var/textureDimensions/eb10d6.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/eb10d6.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_eb10d6(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/eb9f4d.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/eb9f4d.wgsl.expected.ir.msl
index f45c04b..e8d2c88 100644
--- a/test/tint/builtins/gen/var/textureDimensions/eb9f4d.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/eb9f4d.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_eb9f4d(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/ed1030.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/ed1030.wgsl.expected.ir.msl
index 7873284..608e540 100644
--- a/test/tint/builtins/gen/var/textureDimensions/ed1030.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/ed1030.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_ed1030(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/ef2e58.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/ef2e58.wgsl.expected.ir.msl
index 79ce0da7..4f57f19 100644
--- a/test/tint/builtins/gen/var/textureDimensions/ef2e58.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/ef2e58.wgsl.expected.ir.msl
@@ -7,9 +7,7 @@
};
uint3 textureDimensions_ef2e58(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint const v_1 = tint_module_vars.arg_0.get_height(0u);
- uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(0u));
+ uint3 res = uint3(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u), tint_module_vars.arg_0.get_depth(0u));
return res;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/f3a2ac.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/f3a2ac.wgsl.expected.ir.msl
index dee0b81..b6d691e 100644
--- a/test/tint/builtins/gen/var/textureDimensions/f3a2ac.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/f3a2ac.wgsl.expected.ir.msl
@@ -7,9 +7,7 @@
};
uint3 textureDimensions_f3a2ac(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint const v_1 = tint_module_vars.arg_0.get_height(0u);
- uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(0u));
+ uint3 res = uint3(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u), tint_module_vars.arg_0.get_depth(0u));
return res;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/f4321c.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/f4321c.wgsl.expected.ir.msl
index ab46020..7b9bf79 100644
--- a/test/tint/builtins/gen/var/textureDimensions/f4321c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/f4321c.wgsl.expected.ir.msl
@@ -17,9 +17,7 @@
};
uint3 textureDimensions_f4321c(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint const v_1 = tint_module_vars.arg_0.get_height(0u);
- uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(0u));
+ uint3 res = uint3(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u), tint_module_vars.arg_0.get_depth(0u));
return res;
}
@@ -42,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texture3d<int, access::read> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_2.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_2.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/f48886.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/f48886.wgsl.expected.ir.msl
index 959c45a..d95905e 100644
--- a/test/tint/builtins/gen/var/textureDimensions/f48886.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/f48886.wgsl.expected.ir.msl
@@ -17,8 +17,7 @@
};
uint2 textureDimensions_f48886(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
@@ -41,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texture2d<int, access::read> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/f4e469.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/f4e469.wgsl.expected.ir.msl
index ce02a56..11908a2 100644
--- a/test/tint/builtins/gen/var/textureDimensions/f4e469.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/f4e469.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_f4e469(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/f55a94.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/f55a94.wgsl.expected.ir.msl
index 5f477a2..9bbecd5 100644
--- a/test/tint/builtins/gen/var/textureDimensions/f55a94.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/f55a94.wgsl.expected.ir.msl
@@ -7,9 +7,7 @@
};
uint3 textureDimensions_f55a94(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint const v_1 = tint_module_vars.arg_0.get_height(0u);
- uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(0u));
+ uint3 res = uint3(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u), tint_module_vars.arg_0.get_depth(0u));
return res;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/f626b3.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/f626b3.wgsl.expected.ir.msl
index b94bc98..20fac94 100644
--- a/test/tint/builtins/gen/var/textureDimensions/f626b3.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/f626b3.wgsl.expected.ir.msl
@@ -17,8 +17,7 @@
};
uint2 textureDimensions_f626b3(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
@@ -41,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texturecube<int, access::sample> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/f7bac5.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/f7bac5.wgsl.expected.ir.msl
index e7d0476..020c015 100644
--- a/test/tint/builtins/gen/var/textureDimensions/f7bac5.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/f7bac5.wgsl.expected.ir.msl
@@ -17,8 +17,7 @@
};
uint2 textureDimensions_f7bac5(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
@@ -41,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texture2d_array<int, access::read> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/f8522e.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/f8522e.wgsl.expected.ir.msl
index 39021b5..74c0a28 100644
--- a/test/tint/builtins/gen/var/textureDimensions/f8522e.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/f8522e.wgsl.expected.ir.msl
@@ -17,8 +17,7 @@
};
uint2 textureDimensions_f8522e(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
@@ -41,9 +40,9 @@
vertex vertex_main_outputs vertex_main(texture2d<int, access::sample> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/f93ece.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/f93ece.wgsl.expected.ir.msl
index 84ced912..b7c9004 100644
--- a/test/tint/builtins/gen/var/textureDimensions/f93ece.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/f93ece.wgsl.expected.ir.msl
@@ -7,9 +7,7 @@
};
uint3 textureDimensions_f93ece(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint const v_1 = tint_module_vars.arg_0.get_height(0u);
- uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(0u));
+ uint3 res = uint3(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u), tint_module_vars.arg_0.get_depth(0u));
return res;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/f94e55.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/f94e55.wgsl.expected.ir.msl
index 6ad8bf1..e42bb1f 100644
--- a/test/tint/builtins/gen/var/textureDimensions/f94e55.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/f94e55.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_f94e55(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/fbb15a.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/fbb15a.wgsl.expected.ir.msl
index a841b86..dffa61c 100644
--- a/test/tint/builtins/gen/var/textureDimensions/fbb15a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/fbb15a.wgsl.expected.ir.msl
@@ -7,8 +7,7 @@
};
uint2 textureDimensions_fbb15a(tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.arg_0.get_width(0u);
- uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u));
return res;
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/fdf6e9.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureDimensions/fdf6e9.wgsl.expected.ir.msl
index a1bb9a9..f3d0d7e 100644
--- a/test/tint/builtins/gen/var/textureDimensions/fdf6e9.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureDimensions/fdf6e9.wgsl.expected.ir.msl
@@ -19,8 +19,7 @@
uint2 textureDimensions_fdf6e9(tint_module_vars_struct tint_module_vars) {
int arg_1 = 1;
uint const v = uint(arg_1);
- uint const v_1 = tint_module_vars.arg_0.get_width(v);
- uint2 res = uint2(v_1, tint_module_vars.arg_0.get_height(v));
+ uint2 res = uint2(tint_module_vars.arg_0.get_width(v), tint_module_vars.arg_0.get_height(v));
return res;
}
@@ -43,9 +42,9 @@
vertex vertex_main_outputs vertex_main(texture2d_array<int, access::sample> arg_0 [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0};
- VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_2.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_2.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v_1.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureGather/22e930.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureGather/22e930.wgsl.expected.ir.msl
index 36aaa61..f19f8fa 100644
--- a/test/tint/builtins/gen/var/textureGather/22e930.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureGather/22e930.wgsl.expected.ir.msl
@@ -20,8 +20,7 @@
float4 textureGather_22e930(tint_module_vars_struct tint_module_vars) {
float2 arg_3 = float2(1.0f);
int arg_4 = 1;
- float2 const v = arg_3;
- float4 res = tint_module_vars.arg_1.gather(tint_module_vars.arg_2, v, max(arg_4, 0), int2(0), component::y);
+ float4 res = tint_module_vars.arg_1.gather(tint_module_vars.arg_2, arg_3, max(arg_4, 0), int2(0), component::y);
return res;
}
@@ -44,9 +43,9 @@
vertex vertex_main_outputs vertex_main(texture2d_array<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureGather/24b0bd.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureGather/24b0bd.wgsl.expected.ir.msl
index f6f6aed..98bcd0c 100644
--- a/test/tint/builtins/gen/var/textureGather/24b0bd.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureGather/24b0bd.wgsl.expected.ir.msl
@@ -20,8 +20,7 @@
float4 textureGather_24b0bd(tint_module_vars_struct tint_module_vars) {
float2 arg_3 = float2(1.0f);
int arg_4 = 1;
- float2 const v = arg_3;
- float4 res = tint_module_vars.arg_1.gather(tint_module_vars.arg_2, v, max(arg_4, 0), int2(0), component::y);
+ float4 res = tint_module_vars.arg_1.gather(tint_module_vars.arg_2, arg_3, max(arg_4, 0), int2(0), component::y);
return res;
}
@@ -44,9 +43,9 @@
vertex vertex_main_outputs vertex_main(texture2d_array<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureGather/2cc066.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureGather/2cc066.wgsl.expected.ir.msl
index a2805b6c..058e442 100644
--- a/test/tint/builtins/gen/var/textureGather/2cc066.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureGather/2cc066.wgsl.expected.ir.msl
@@ -20,8 +20,7 @@
uint4 textureGather_2cc066(tint_module_vars_struct tint_module_vars) {
float2 arg_3 = float2(1.0f);
int arg_4 = 1;
- float2 const v = arg_3;
- uint4 res = tint_module_vars.arg_1.gather(tint_module_vars.arg_2, v, max(arg_4, 0), int2(0), component::y);
+ uint4 res = tint_module_vars.arg_1.gather(tint_module_vars.arg_2, arg_3, max(arg_4, 0), int2(0), component::y);
return res;
}
@@ -44,9 +43,9 @@
vertex vertex_main_outputs vertex_main(texture2d_array<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureGather/43025d.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureGather/43025d.wgsl.expected.ir.msl
index fbf1a4c..fa3beb0 100644
--- a/test/tint/builtins/gen/var/textureGather/43025d.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureGather/43025d.wgsl.expected.ir.msl
@@ -20,8 +20,7 @@
float4 textureGather_43025d(tint_module_vars_struct tint_module_vars) {
float3 arg_2 = float3(1.0f);
int arg_3 = 1;
- float3 const v = arg_2;
- float4 res = tint_module_vars.arg_0.gather(tint_module_vars.arg_1, v, max(arg_3, 0));
+ float4 res = tint_module_vars.arg_0.gather(tint_module_vars.arg_1, arg_2, max(arg_3, 0));
return res;
}
@@ -44,9 +43,9 @@
vertex vertex_main_outputs vertex_main(depthcube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureGather/445793.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureGather/445793.wgsl.expected.ir.msl
index 6425071..3fd3cf6 100644
--- a/test/tint/builtins/gen/var/textureGather/445793.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureGather/445793.wgsl.expected.ir.msl
@@ -20,8 +20,7 @@
int4 textureGather_445793(tint_module_vars_struct tint_module_vars) {
float2 arg_3 = float2(1.0f);
int arg_4 = 1;
- float2 const v = arg_3;
- int4 res = tint_module_vars.arg_1.gather(tint_module_vars.arg_2, v, max(arg_4, 0), int2(0), component::y);
+ int4 res = tint_module_vars.arg_1.gather(tint_module_vars.arg_2, arg_3, max(arg_4, 0), int2(0), component::y);
return res;
}
@@ -44,9 +43,9 @@
vertex vertex_main_outputs vertex_main(texture2d_array<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureGather/4b8103.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureGather/4b8103.wgsl.expected.ir.msl
index 2e16406..339f18e 100644
--- a/test/tint/builtins/gen/var/textureGather/4b8103.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureGather/4b8103.wgsl.expected.ir.msl
@@ -20,8 +20,7 @@
float4 textureGather_4b8103(tint_module_vars_struct tint_module_vars) {
float2 arg_3 = float2(1.0f);
int arg_4 = 1;
- float2 const v = arg_3;
- float4 res = tint_module_vars.arg_1.gather(tint_module_vars.arg_2, v, max(arg_4, 0), int2(1), component::y);
+ float4 res = tint_module_vars.arg_1.gather(tint_module_vars.arg_2, arg_3, max(arg_4, 0), int2(1), component::y);
return res;
}
@@ -44,9 +43,9 @@
vertex vertex_main_outputs vertex_main(texture2d_array<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureGather/751f8a.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureGather/751f8a.wgsl.expected.ir.msl
index 978441b..9b7b3d1 100644
--- a/test/tint/builtins/gen/var/textureGather/751f8a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureGather/751f8a.wgsl.expected.ir.msl
@@ -20,8 +20,7 @@
float4 textureGather_751f8a(tint_module_vars_struct tint_module_vars) {
float3 arg_3 = float3(1.0f);
int arg_4 = 1;
- float3 const v = arg_3;
- float4 res = tint_module_vars.arg_1.gather(tint_module_vars.arg_2, v, max(arg_4, 0), component::y);
+ float4 res = tint_module_vars.arg_1.gather(tint_module_vars.arg_2, arg_3, max(arg_4, 0), component::y);
return res;
}
@@ -44,9 +43,9 @@
vertex vertex_main_outputs vertex_main(texturecube_array<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureGather/831549.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureGather/831549.wgsl.expected.ir.msl
index 562d4e4..f5df389 100644
--- a/test/tint/builtins/gen/var/textureGather/831549.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureGather/831549.wgsl.expected.ir.msl
@@ -20,8 +20,7 @@
float4 textureGather_831549(tint_module_vars_struct tint_module_vars) {
float2 arg_3 = float2(1.0f);
int arg_4 = 1;
- float2 const v = arg_3;
- float4 res = tint_module_vars.arg_1.gather(tint_module_vars.arg_2, v, max(arg_4, 0), int2(1), component::y);
+ float4 res = tint_module_vars.arg_1.gather(tint_module_vars.arg_2, arg_3, max(arg_4, 0), int2(1), component::y);
return res;
}
@@ -44,9 +43,9 @@
vertex vertex_main_outputs vertex_main(texture2d_array<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureGather/8b754c.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureGather/8b754c.wgsl.expected.ir.msl
index 4cf91a1..e19338f 100644
--- a/test/tint/builtins/gen/var/textureGather/8b754c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureGather/8b754c.wgsl.expected.ir.msl
@@ -20,8 +20,7 @@
int4 textureGather_8b754c(tint_module_vars_struct tint_module_vars) {
float2 arg_3 = float2(1.0f);
int arg_4 = 1;
- float2 const v = arg_3;
- int4 res = tint_module_vars.arg_1.gather(tint_module_vars.arg_2, v, max(arg_4, 0), int2(0), component::y);
+ int4 res = tint_module_vars.arg_1.gather(tint_module_vars.arg_2, arg_3, max(arg_4, 0), int2(0), component::y);
return res;
}
@@ -44,9 +43,9 @@
vertex vertex_main_outputs vertex_main(texture2d_array<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureGather/92ea47.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureGather/92ea47.wgsl.expected.ir.msl
index 75bf121..f84fd00 100644
--- a/test/tint/builtins/gen/var/textureGather/92ea47.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureGather/92ea47.wgsl.expected.ir.msl
@@ -20,8 +20,7 @@
uint4 textureGather_92ea47(tint_module_vars_struct tint_module_vars) {
float2 arg_3 = float2(1.0f);
int arg_4 = 1;
- float2 const v = arg_3;
- uint4 res = tint_module_vars.arg_1.gather(tint_module_vars.arg_2, v, max(arg_4, 0), int2(0), component::y);
+ uint4 res = tint_module_vars.arg_1.gather(tint_module_vars.arg_2, arg_3, max(arg_4, 0), int2(0), component::y);
return res;
}
@@ -44,9 +43,9 @@
vertex vertex_main_outputs vertex_main(texture2d_array<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureGather/9a6358.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureGather/9a6358.wgsl.expected.ir.msl
index e1735ea..3754e94 100644
--- a/test/tint/builtins/gen/var/textureGather/9a6358.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureGather/9a6358.wgsl.expected.ir.msl
@@ -20,8 +20,7 @@
float4 textureGather_9a6358(tint_module_vars_struct tint_module_vars) {
float2 arg_2 = float2(1.0f);
int arg_3 = 1;
- float2 const v = arg_2;
- float4 res = tint_module_vars.arg_0.gather(tint_module_vars.arg_1, v, max(arg_3, 0), int2(0));
+ float4 res = tint_module_vars.arg_0.gather(tint_module_vars.arg_1, arg_2, max(arg_3, 0), int2(0));
return res;
}
@@ -44,9 +43,9 @@
vertex vertex_main_outputs vertex_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureGather/9ab41e.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureGather/9ab41e.wgsl.expected.ir.msl
index f911eb2..423f10c 100644
--- a/test/tint/builtins/gen/var/textureGather/9ab41e.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureGather/9ab41e.wgsl.expected.ir.msl
@@ -20,8 +20,7 @@
int4 textureGather_9ab41e(tint_module_vars_struct tint_module_vars) {
float2 arg_3 = float2(1.0f);
int arg_4 = 1;
- float2 const v = arg_3;
- int4 res = tint_module_vars.arg_1.gather(tint_module_vars.arg_2, v, max(arg_4, 0), int2(1), component::y);
+ int4 res = tint_module_vars.arg_1.gather(tint_module_vars.arg_2, arg_3, max(arg_4, 0), int2(1), component::y);
return res;
}
@@ -44,9 +43,9 @@
vertex vertex_main_outputs vertex_main(texture2d_array<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureGather/aaf6bd.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureGather/aaf6bd.wgsl.expected.ir.msl
index 99b020a..ca71d85 100644
--- a/test/tint/builtins/gen/var/textureGather/aaf6bd.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureGather/aaf6bd.wgsl.expected.ir.msl
@@ -20,8 +20,7 @@
int4 textureGather_aaf6bd(tint_module_vars_struct tint_module_vars) {
float3 arg_3 = float3(1.0f);
int arg_4 = 1;
- float3 const v = arg_3;
- int4 res = tint_module_vars.arg_1.gather(tint_module_vars.arg_2, v, max(arg_4, 0), component::y);
+ int4 res = tint_module_vars.arg_1.gather(tint_module_vars.arg_2, arg_3, max(arg_4, 0), component::y);
return res;
}
@@ -44,9 +43,9 @@
vertex vertex_main_outputs vertex_main(texturecube_array<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureGather/c0640c.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureGather/c0640c.wgsl.expected.ir.msl
index 8552e97..f17327a 100644
--- a/test/tint/builtins/gen/var/textureGather/c0640c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureGather/c0640c.wgsl.expected.ir.msl
@@ -20,8 +20,7 @@
int4 textureGather_c0640c(tint_module_vars_struct tint_module_vars) {
float3 arg_3 = float3(1.0f);
int arg_4 = 1;
- float3 const v = arg_3;
- int4 res = tint_module_vars.arg_1.gather(tint_module_vars.arg_2, v, max(arg_4, 0), component::y);
+ int4 res = tint_module_vars.arg_1.gather(tint_module_vars.arg_2, arg_3, max(arg_4, 0), component::y);
return res;
}
@@ -44,9 +43,9 @@
vertex vertex_main_outputs vertex_main(texturecube_array<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureGather/d1f187.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureGather/d1f187.wgsl.expected.ir.msl
index bc51d3d..6ad8602 100644
--- a/test/tint/builtins/gen/var/textureGather/d1f187.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureGather/d1f187.wgsl.expected.ir.msl
@@ -20,8 +20,7 @@
uint4 textureGather_d1f187(tint_module_vars_struct tint_module_vars) {
float2 arg_3 = float2(1.0f);
int arg_4 = 1;
- float2 const v = arg_3;
- uint4 res = tint_module_vars.arg_1.gather(tint_module_vars.arg_2, v, max(arg_4, 0), int2(1), component::y);
+ uint4 res = tint_module_vars.arg_1.gather(tint_module_vars.arg_2, arg_3, max(arg_4, 0), int2(1), component::y);
return res;
}
@@ -44,9 +43,9 @@
vertex vertex_main_outputs vertex_main(texture2d_array<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureGather/d4b5c6.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureGather/d4b5c6.wgsl.expected.ir.msl
index 45d48b3..06d1a86 100644
--- a/test/tint/builtins/gen/var/textureGather/d4b5c6.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureGather/d4b5c6.wgsl.expected.ir.msl
@@ -20,8 +20,7 @@
uint4 textureGather_d4b5c6(tint_module_vars_struct tint_module_vars) {
float3 arg_3 = float3(1.0f);
int arg_4 = 1;
- float3 const v = arg_3;
- uint4 res = tint_module_vars.arg_1.gather(tint_module_vars.arg_2, v, max(arg_4, 0), component::y);
+ uint4 res = tint_module_vars.arg_1.gather(tint_module_vars.arg_2, arg_3, max(arg_4, 0), component::y);
return res;
}
@@ -44,9 +43,9 @@
vertex vertex_main_outputs vertex_main(texturecube_array<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureGather/d90605.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureGather/d90605.wgsl.expected.ir.msl
index 90c023f..cb520d6 100644
--- a/test/tint/builtins/gen/var/textureGather/d90605.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureGather/d90605.wgsl.expected.ir.msl
@@ -20,8 +20,7 @@
float4 textureGather_d90605(tint_module_vars_struct tint_module_vars) {
float2 arg_2 = float2(1.0f);
int arg_3 = 1;
- float2 const v = arg_2;
- float4 res = tint_module_vars.arg_0.gather(tint_module_vars.arg_1, v, max(arg_3, 0), int2(1));
+ float4 res = tint_module_vars.arg_0.gather(tint_module_vars.arg_1, arg_2, max(arg_3, 0), int2(1));
return res;
}
@@ -44,9 +43,9 @@
vertex vertex_main_outputs vertex_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureGather/d98d59.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureGather/d98d59.wgsl.expected.ir.msl
index 7f7ab4b..2b15b69 100644
--- a/test/tint/builtins/gen/var/textureGather/d98d59.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureGather/d98d59.wgsl.expected.ir.msl
@@ -20,8 +20,7 @@
float4 textureGather_d98d59(tint_module_vars_struct tint_module_vars) {
float3 arg_3 = float3(1.0f);
int arg_4 = 1;
- float3 const v = arg_3;
- float4 res = tint_module_vars.arg_1.gather(tint_module_vars.arg_2, v, max(arg_4, 0), component::y);
+ float4 res = tint_module_vars.arg_1.gather(tint_module_vars.arg_2, arg_3, max(arg_4, 0), component::y);
return res;
}
@@ -44,9 +43,9 @@
vertex vertex_main_outputs vertex_main(texturecube_array<float, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureGather/e3165f.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureGather/e3165f.wgsl.expected.ir.msl
index 5a42754..713548f 100644
--- a/test/tint/builtins/gen/var/textureGather/e3165f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureGather/e3165f.wgsl.expected.ir.msl
@@ -20,8 +20,7 @@
uint4 textureGather_e3165f(tint_module_vars_struct tint_module_vars) {
float2 arg_3 = float2(1.0f);
int arg_4 = 1;
- float2 const v = arg_3;
- uint4 res = tint_module_vars.arg_1.gather(tint_module_vars.arg_2, v, max(arg_4, 0), int2(1), component::y);
+ uint4 res = tint_module_vars.arg_1.gather(tint_module_vars.arg_2, arg_3, max(arg_4, 0), int2(1), component::y);
return res;
}
@@ -44,9 +43,9 @@
vertex vertex_main_outputs vertex_main(texture2d_array<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureGather/e9d390.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureGather/e9d390.wgsl.expected.ir.msl
index c1ba84c..f4e748e 100644
--- a/test/tint/builtins/gen/var/textureGather/e9d390.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureGather/e9d390.wgsl.expected.ir.msl
@@ -20,8 +20,7 @@
int4 textureGather_e9d390(tint_module_vars_struct tint_module_vars) {
float2 arg_3 = float2(1.0f);
int arg_4 = 1;
- float2 const v = arg_3;
- int4 res = tint_module_vars.arg_1.gather(tint_module_vars.arg_2, v, max(arg_4, 0), int2(1), component::y);
+ int4 res = tint_module_vars.arg_1.gather(tint_module_vars.arg_2, arg_3, max(arg_4, 0), int2(1), component::y);
return res;
}
@@ -44,9 +43,9 @@
vertex vertex_main_outputs vertex_main(texture2d_array<int, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureGather/f2c6e3.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureGather/f2c6e3.wgsl.expected.ir.msl
index c9ea218..ab50be8 100644
--- a/test/tint/builtins/gen/var/textureGather/f2c6e3.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureGather/f2c6e3.wgsl.expected.ir.msl
@@ -20,8 +20,7 @@
uint4 textureGather_f2c6e3(tint_module_vars_struct tint_module_vars) {
float3 arg_3 = float3(1.0f);
int arg_4 = 1;
- float3 const v = arg_3;
- uint4 res = tint_module_vars.arg_1.gather(tint_module_vars.arg_2, v, max(arg_4, 0), component::y);
+ uint4 res = tint_module_vars.arg_1.gather(tint_module_vars.arg_2, arg_3, max(arg_4, 0), component::y);
return res;
}
@@ -44,9 +43,9 @@
vertex vertex_main_outputs vertex_main(texturecube_array<uint, access::sample> arg_1 [[texture(0)]], sampler arg_2 [[sampler(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_1=arg_1, .arg_2=arg_2};
- VertexOutput const v_1 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_1.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_1.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureGatherCompare/60d2d1.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureGatherCompare/60d2d1.wgsl.expected.ir.msl
index 2aef39c..aa2151e 100644
--- a/test/tint/builtins/gen/var/textureGatherCompare/60d2d1.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureGatherCompare/60d2d1.wgsl.expected.ir.msl
@@ -21,9 +21,7 @@
float3 arg_2 = float3(1.0f);
int arg_3 = 1;
float arg_4 = 1.0f;
- float3 const v = arg_2;
- float const v_1 = arg_4;
- float4 res = tint_module_vars.arg_0.gather_compare(tint_module_vars.arg_1, v, max(arg_3, 0), v_1);
+ float4 res = tint_module_vars.arg_0.gather_compare(tint_module_vars.arg_1, arg_2, max(arg_3, 0), arg_4);
return res;
}
@@ -46,9 +44,9 @@
vertex vertex_main_outputs vertex_main(depthcube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1};
- VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_2.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_2.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureGatherCompare/783e65.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureGatherCompare/783e65.wgsl.expected.ir.msl
index f25fb21..fcc1dae 100644
--- a/test/tint/builtins/gen/var/textureGatherCompare/783e65.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureGatherCompare/783e65.wgsl.expected.ir.msl
@@ -21,9 +21,7 @@
float2 arg_2 = float2(1.0f);
int arg_3 = 1;
float arg_4 = 1.0f;
- float2 const v = arg_2;
- float const v_1 = arg_4;
- float4 res = tint_module_vars.arg_0.gather_compare(tint_module_vars.arg_1, v, max(arg_3, 0), v_1);
+ float4 res = tint_module_vars.arg_0.gather_compare(tint_module_vars.arg_1, arg_2, max(arg_3, 0), arg_4);
return res;
}
@@ -46,9 +44,9 @@
vertex vertex_main_outputs vertex_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1};
- VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_2.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_2.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureGatherCompare/f585cc.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureGatherCompare/f585cc.wgsl.expected.ir.msl
index 8ad5616..016894b 100644
--- a/test/tint/builtins/gen/var/textureGatherCompare/f585cc.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureGatherCompare/f585cc.wgsl.expected.ir.msl
@@ -21,9 +21,7 @@
float2 arg_2 = float2(1.0f);
int arg_3 = 1;
float arg_4 = 1.0f;
- float2 const v = arg_2;
- float const v_1 = arg_4;
- float4 res = tint_module_vars.arg_0.gather_compare(tint_module_vars.arg_1, v, max(arg_3, 0), v_1, int2(1));
+ float4 res = tint_module_vars.arg_0.gather_compare(tint_module_vars.arg_1, arg_2, max(arg_3, 0), arg_4, int2(1));
return res;
}
@@ -46,9 +44,9 @@
vertex vertex_main_outputs vertex_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1};
- VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_2.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_2.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureLoad/1bfdfb.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/1bfdfb.wgsl.expected.glsl
index b119af8..27e9423 100644
--- a/test/tint/builtins/gen/var/textureLoad/1bfdfb.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureLoad/1bfdfb.wgsl.expected.glsl
@@ -71,47 +71,43 @@
uniform highp sampler2D arg_0_plane1;
vec3 tint_GammaCorrection(vec3 v, tint_GammaTransferParams params) {
vec3 v_3 = vec3(params.G);
- vec3 v_4 = vec3(params.D);
- vec3 v_5 = abs(v);
- vec3 v_6 = sign(v);
- bvec3 v_7 = lessThan(v_5, v_4);
- return mix((v_6 * (pow(((params.A * v_5) + params.B), v_3) + params.E)), (v_6 * ((params.C * v_5) + params.F)), v_7);
+ return mix((sign(v) * (pow(((params.A * abs(v)) + params.B), v_3) + params.E)), (sign(v) * ((params.C * abs(v)) + params.F)), lessThan(abs(v), vec3(params.D)));
}
vec4 tint_TextureLoadExternal(tint_ExternalTextureParams params, uvec2 coords) {
- vec2 v_8 = round((params.loadTransform * vec3(vec2(min(coords, params.visibleSize)), 1.0f)));
- uvec2 v_9 = uvec2(v_8);
- vec3 v_10 = vec3(0.0f);
- float v_11 = 0.0f;
+ vec2 v_4 = round((params.loadTransform * vec3(vec2(min(coords, params.visibleSize)), 1.0f)));
+ uvec2 v_5 = uvec2(v_4);
+ vec3 v_6 = vec3(0.0f);
+ float v_7 = 0.0f;
if ((params.numPlanes == 1u)) {
- ivec2 v_12 = ivec2(v_9);
- vec4 v_13 = texelFetch(arg_0_plane0, v_12, int(0u));
- v_10 = v_13.xyz;
- v_11 = v_13[3u];
+ ivec2 v_8 = ivec2(v_5);
+ vec4 v_9 = texelFetch(arg_0_plane0, v_8, int(0u));
+ v_6 = v_9.xyz;
+ v_7 = v_9[3u];
} else {
- ivec2 v_14 = ivec2(v_9);
- float v_15 = texelFetch(arg_0_plane0, v_14, int(0u))[0u];
- ivec2 v_16 = ivec2(uvec2((v_8 * params.plane1CoordFactor)));
- v_10 = (vec4(v_15, texelFetch(arg_0_plane1, v_16, int(0u)).xy, 1.0f) * params.yuvToRgbConversionMatrix);
- v_11 = 1.0f;
+ ivec2 v_10 = ivec2(v_5);
+ float v_11 = texelFetch(arg_0_plane0, v_10, int(0u))[0u];
+ ivec2 v_12 = ivec2(uvec2((v_4 * params.plane1CoordFactor)));
+ v_6 = (vec4(v_11, texelFetch(arg_0_plane1, v_12, int(0u)).xy, 1.0f) * params.yuvToRgbConversionMatrix);
+ v_7 = 1.0f;
}
- vec3 v_17 = v_10;
- vec3 v_18 = vec3(0.0f);
+ vec3 v_13 = v_6;
+ vec3 v_14 = vec3(0.0f);
if ((params.doYuvToRgbConversionOnly == 0u)) {
- v_18 = tint_GammaCorrection((params.gamutConversionMatrix * tint_GammaCorrection(v_17, params.gammaDecodeParams)), params.gammaEncodeParams);
+ v_14 = tint_GammaCorrection((params.gamutConversionMatrix * tint_GammaCorrection(v_13, params.gammaDecodeParams)), params.gammaEncodeParams);
} else {
- v_18 = v_17;
+ v_14 = v_13;
}
- return vec4(v_18, v_11);
+ return vec4(v_14, v_7);
}
tint_ExternalTextureParams tint_convert_tint_ExternalTextureParams(tint_ExternalTextureParams_std140 tint_input) {
- mat3 v_19 = mat3(tint_input.gamutConversionMatrix_col0, tint_input.gamutConversionMatrix_col1, tint_input.gamutConversionMatrix_col2);
- mat3x2 v_20 = mat3x2(tint_input.sampleTransform_col0, tint_input.sampleTransform_col1, tint_input.sampleTransform_col2);
- return tint_ExternalTextureParams(tint_input.numPlanes, tint_input.doYuvToRgbConversionOnly, tint_input.yuvToRgbConversionMatrix, tint_input.gammaDecodeParams, tint_input.gammaEncodeParams, v_19, v_20, mat3x2(tint_input.loadTransform_col0, tint_input.loadTransform_col1, tint_input.loadTransform_col2), tint_input.samplePlane0RectMin, tint_input.samplePlane0RectMax, tint_input.samplePlane1RectMin, tint_input.samplePlane1RectMax, tint_input.visibleSize, tint_input.plane1CoordFactor);
+ mat3 v_15 = mat3(tint_input.gamutConversionMatrix_col0, tint_input.gamutConversionMatrix_col1, tint_input.gamutConversionMatrix_col2);
+ mat3x2 v_16 = mat3x2(tint_input.sampleTransform_col0, tint_input.sampleTransform_col1, tint_input.sampleTransform_col2);
+ return tint_ExternalTextureParams(tint_input.numPlanes, tint_input.doYuvToRgbConversionOnly, tint_input.yuvToRgbConversionMatrix, tint_input.gammaDecodeParams, tint_input.gammaEncodeParams, v_15, v_16, mat3x2(tint_input.loadTransform_col0, tint_input.loadTransform_col1, tint_input.loadTransform_col2), tint_input.samplePlane0RectMin, tint_input.samplePlane0RectMax, tint_input.samplePlane1RectMin, tint_input.samplePlane1RectMax, tint_input.visibleSize, tint_input.plane1CoordFactor);
}
vec4 textureLoad_1bfdfb() {
uvec2 arg_1 = uvec2(1u);
- tint_ExternalTextureParams v_21 = tint_convert_tint_ExternalTextureParams(v_2.inner);
- vec4 res = tint_TextureLoadExternal(v_21, arg_1);
+ tint_ExternalTextureParams v_17 = tint_convert_tint_ExternalTextureParams(v_2.inner);
+ vec4 res = tint_TextureLoadExternal(v_17, arg_1);
return res;
}
void main() {
@@ -188,47 +184,43 @@
uniform highp sampler2D arg_0_plane1;
vec3 tint_GammaCorrection(vec3 v, tint_GammaTransferParams params) {
vec3 v_3 = vec3(params.G);
- vec3 v_4 = vec3(params.D);
- vec3 v_5 = abs(v);
- vec3 v_6 = sign(v);
- bvec3 v_7 = lessThan(v_5, v_4);
- return mix((v_6 * (pow(((params.A * v_5) + params.B), v_3) + params.E)), (v_6 * ((params.C * v_5) + params.F)), v_7);
+ return mix((sign(v) * (pow(((params.A * abs(v)) + params.B), v_3) + params.E)), (sign(v) * ((params.C * abs(v)) + params.F)), lessThan(abs(v), vec3(params.D)));
}
vec4 tint_TextureLoadExternal(tint_ExternalTextureParams params, uvec2 coords) {
- vec2 v_8 = round((params.loadTransform * vec3(vec2(min(coords, params.visibleSize)), 1.0f)));
- uvec2 v_9 = uvec2(v_8);
- vec3 v_10 = vec3(0.0f);
- float v_11 = 0.0f;
+ vec2 v_4 = round((params.loadTransform * vec3(vec2(min(coords, params.visibleSize)), 1.0f)));
+ uvec2 v_5 = uvec2(v_4);
+ vec3 v_6 = vec3(0.0f);
+ float v_7 = 0.0f;
if ((params.numPlanes == 1u)) {
- ivec2 v_12 = ivec2(v_9);
- vec4 v_13 = texelFetch(arg_0_plane0, v_12, int(0u));
- v_10 = v_13.xyz;
- v_11 = v_13[3u];
+ ivec2 v_8 = ivec2(v_5);
+ vec4 v_9 = texelFetch(arg_0_plane0, v_8, int(0u));
+ v_6 = v_9.xyz;
+ v_7 = v_9[3u];
} else {
- ivec2 v_14 = ivec2(v_9);
- float v_15 = texelFetch(arg_0_plane0, v_14, int(0u))[0u];
- ivec2 v_16 = ivec2(uvec2((v_8 * params.plane1CoordFactor)));
- v_10 = (vec4(v_15, texelFetch(arg_0_plane1, v_16, int(0u)).xy, 1.0f) * params.yuvToRgbConversionMatrix);
- v_11 = 1.0f;
+ ivec2 v_10 = ivec2(v_5);
+ float v_11 = texelFetch(arg_0_plane0, v_10, int(0u))[0u];
+ ivec2 v_12 = ivec2(uvec2((v_4 * params.plane1CoordFactor)));
+ v_6 = (vec4(v_11, texelFetch(arg_0_plane1, v_12, int(0u)).xy, 1.0f) * params.yuvToRgbConversionMatrix);
+ v_7 = 1.0f;
}
- vec3 v_17 = v_10;
- vec3 v_18 = vec3(0.0f);
+ vec3 v_13 = v_6;
+ vec3 v_14 = vec3(0.0f);
if ((params.doYuvToRgbConversionOnly == 0u)) {
- v_18 = tint_GammaCorrection((params.gamutConversionMatrix * tint_GammaCorrection(v_17, params.gammaDecodeParams)), params.gammaEncodeParams);
+ v_14 = tint_GammaCorrection((params.gamutConversionMatrix * tint_GammaCorrection(v_13, params.gammaDecodeParams)), params.gammaEncodeParams);
} else {
- v_18 = v_17;
+ v_14 = v_13;
}
- return vec4(v_18, v_11);
+ return vec4(v_14, v_7);
}
tint_ExternalTextureParams tint_convert_tint_ExternalTextureParams(tint_ExternalTextureParams_std140 tint_input) {
- mat3 v_19 = mat3(tint_input.gamutConversionMatrix_col0, tint_input.gamutConversionMatrix_col1, tint_input.gamutConversionMatrix_col2);
- mat3x2 v_20 = mat3x2(tint_input.sampleTransform_col0, tint_input.sampleTransform_col1, tint_input.sampleTransform_col2);
- return tint_ExternalTextureParams(tint_input.numPlanes, tint_input.doYuvToRgbConversionOnly, tint_input.yuvToRgbConversionMatrix, tint_input.gammaDecodeParams, tint_input.gammaEncodeParams, v_19, v_20, mat3x2(tint_input.loadTransform_col0, tint_input.loadTransform_col1, tint_input.loadTransform_col2), tint_input.samplePlane0RectMin, tint_input.samplePlane0RectMax, tint_input.samplePlane1RectMin, tint_input.samplePlane1RectMax, tint_input.visibleSize, tint_input.plane1CoordFactor);
+ mat3 v_15 = mat3(tint_input.gamutConversionMatrix_col0, tint_input.gamutConversionMatrix_col1, tint_input.gamutConversionMatrix_col2);
+ mat3x2 v_16 = mat3x2(tint_input.sampleTransform_col0, tint_input.sampleTransform_col1, tint_input.sampleTransform_col2);
+ return tint_ExternalTextureParams(tint_input.numPlanes, tint_input.doYuvToRgbConversionOnly, tint_input.yuvToRgbConversionMatrix, tint_input.gammaDecodeParams, tint_input.gammaEncodeParams, v_15, v_16, mat3x2(tint_input.loadTransform_col0, tint_input.loadTransform_col1, tint_input.loadTransform_col2), tint_input.samplePlane0RectMin, tint_input.samplePlane0RectMax, tint_input.samplePlane1RectMin, tint_input.samplePlane1RectMax, tint_input.visibleSize, tint_input.plane1CoordFactor);
}
vec4 textureLoad_1bfdfb() {
uvec2 arg_1 = uvec2(1u);
- tint_ExternalTextureParams v_21 = tint_convert_tint_ExternalTextureParams(v_2.inner);
- vec4 res = tint_TextureLoadExternal(v_21, arg_1);
+ tint_ExternalTextureParams v_17 = tint_convert_tint_ExternalTextureParams(v_2.inner);
+ vec4 res = tint_TextureLoadExternal(v_17, arg_1);
return res;
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
@@ -308,47 +300,43 @@
layout(location = 0) flat out vec4 vertex_main_loc0_Output;
vec3 tint_GammaCorrection(vec3 v, tint_GammaTransferParams params) {
vec3 v_2 = vec3(params.G);
- vec3 v_3 = vec3(params.D);
- vec3 v_4 = abs(v);
- vec3 v_5 = sign(v);
- bvec3 v_6 = lessThan(v_4, v_3);
- return mix((v_5 * (pow(((params.A * v_4) + params.B), v_2) + params.E)), (v_5 * ((params.C * v_4) + params.F)), v_6);
+ return mix((sign(v) * (pow(((params.A * abs(v)) + params.B), v_2) + params.E)), (sign(v) * ((params.C * abs(v)) + params.F)), lessThan(abs(v), vec3(params.D)));
}
vec4 tint_TextureLoadExternal(tint_ExternalTextureParams params, uvec2 coords) {
- vec2 v_7 = round((params.loadTransform * vec3(vec2(min(coords, params.visibleSize)), 1.0f)));
- uvec2 v_8 = uvec2(v_7);
- vec3 v_9 = vec3(0.0f);
- float v_10 = 0.0f;
+ vec2 v_3 = round((params.loadTransform * vec3(vec2(min(coords, params.visibleSize)), 1.0f)));
+ uvec2 v_4 = uvec2(v_3);
+ vec3 v_5 = vec3(0.0f);
+ float v_6 = 0.0f;
if ((params.numPlanes == 1u)) {
- ivec2 v_11 = ivec2(v_8);
- vec4 v_12 = texelFetch(arg_0_plane0, v_11, int(0u));
- v_9 = v_12.xyz;
- v_10 = v_12[3u];
+ ivec2 v_7 = ivec2(v_4);
+ vec4 v_8 = texelFetch(arg_0_plane0, v_7, int(0u));
+ v_5 = v_8.xyz;
+ v_6 = v_8[3u];
} else {
- ivec2 v_13 = ivec2(v_8);
- float v_14 = texelFetch(arg_0_plane0, v_13, int(0u))[0u];
- ivec2 v_15 = ivec2(uvec2((v_7 * params.plane1CoordFactor)));
- v_9 = (vec4(v_14, texelFetch(arg_0_plane1, v_15, int(0u)).xy, 1.0f) * params.yuvToRgbConversionMatrix);
- v_10 = 1.0f;
+ ivec2 v_9 = ivec2(v_4);
+ float v_10 = texelFetch(arg_0_plane0, v_9, int(0u))[0u];
+ ivec2 v_11 = ivec2(uvec2((v_3 * params.plane1CoordFactor)));
+ v_5 = (vec4(v_10, texelFetch(arg_0_plane1, v_11, int(0u)).xy, 1.0f) * params.yuvToRgbConversionMatrix);
+ v_6 = 1.0f;
}
- vec3 v_16 = v_9;
- vec3 v_17 = vec3(0.0f);
+ vec3 v_12 = v_5;
+ vec3 v_13 = vec3(0.0f);
if ((params.doYuvToRgbConversionOnly == 0u)) {
- v_17 = tint_GammaCorrection((params.gamutConversionMatrix * tint_GammaCorrection(v_16, params.gammaDecodeParams)), params.gammaEncodeParams);
+ v_13 = tint_GammaCorrection((params.gamutConversionMatrix * tint_GammaCorrection(v_12, params.gammaDecodeParams)), params.gammaEncodeParams);
} else {
- v_17 = v_16;
+ v_13 = v_12;
}
- return vec4(v_17, v_10);
+ return vec4(v_13, v_6);
}
tint_ExternalTextureParams tint_convert_tint_ExternalTextureParams(tint_ExternalTextureParams_std140 tint_input) {
- mat3 v_18 = mat3(tint_input.gamutConversionMatrix_col0, tint_input.gamutConversionMatrix_col1, tint_input.gamutConversionMatrix_col2);
- mat3x2 v_19 = mat3x2(tint_input.sampleTransform_col0, tint_input.sampleTransform_col1, tint_input.sampleTransform_col2);
- return tint_ExternalTextureParams(tint_input.numPlanes, tint_input.doYuvToRgbConversionOnly, tint_input.yuvToRgbConversionMatrix, tint_input.gammaDecodeParams, tint_input.gammaEncodeParams, v_18, v_19, mat3x2(tint_input.loadTransform_col0, tint_input.loadTransform_col1, tint_input.loadTransform_col2), tint_input.samplePlane0RectMin, tint_input.samplePlane0RectMax, tint_input.samplePlane1RectMin, tint_input.samplePlane1RectMax, tint_input.visibleSize, tint_input.plane1CoordFactor);
+ mat3 v_14 = mat3(tint_input.gamutConversionMatrix_col0, tint_input.gamutConversionMatrix_col1, tint_input.gamutConversionMatrix_col2);
+ mat3x2 v_15 = mat3x2(tint_input.sampleTransform_col0, tint_input.sampleTransform_col1, tint_input.sampleTransform_col2);
+ return tint_ExternalTextureParams(tint_input.numPlanes, tint_input.doYuvToRgbConversionOnly, tint_input.yuvToRgbConversionMatrix, tint_input.gammaDecodeParams, tint_input.gammaEncodeParams, v_14, v_15, mat3x2(tint_input.loadTransform_col0, tint_input.loadTransform_col1, tint_input.loadTransform_col2), tint_input.samplePlane0RectMin, tint_input.samplePlane0RectMax, tint_input.samplePlane1RectMin, tint_input.samplePlane1RectMax, tint_input.visibleSize, tint_input.plane1CoordFactor);
}
vec4 textureLoad_1bfdfb() {
uvec2 arg_1 = uvec2(1u);
- tint_ExternalTextureParams v_20 = tint_convert_tint_ExternalTextureParams(v_1.inner);
- vec4 res = tint_TextureLoadExternal(v_20, arg_1);
+ tint_ExternalTextureParams v_16 = tint_convert_tint_ExternalTextureParams(v_1.inner);
+ vec4 res = tint_TextureLoadExternal(v_16, arg_1);
return res;
}
VertexOutput vertex_main_inner() {
@@ -358,10 +346,10 @@
return tint_symbol;
}
void main() {
- VertexOutput v_21 = vertex_main_inner();
- gl_Position = v_21.pos;
+ VertexOutput v_17 = vertex_main_inner();
+ gl_Position = v_17.pos;
gl_Position[1u] = -(gl_Position.y);
gl_Position[2u] = ((2.0f * gl_Position.z) - gl_Position.w);
- vertex_main_loc0_Output = v_21.prevent_dce;
+ vertex_main_loc0_Output = v_17.prevent_dce;
gl_PointSize = 1.0f;
}
diff --git a/test/tint/builtins/gen/var/textureLoad/1bfdfb.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/1bfdfb.wgsl.expected.ir.dxc.hlsl
index 468f99b..ed44183 100644
--- a/test/tint/builtins/gen/var/textureLoad/1bfdfb.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/1bfdfb.wgsl.expected.ir.dxc.hlsl
@@ -50,101 +50,89 @@
float3 tint_GammaCorrection(float3 v, tint_GammaTransferParams params) {
float3 v_1 = float3((params.G).xxx);
float3 v_2 = float3((params.D).xxx);
- float3 v_3 = abs(v);
- float3 v_4 = float3(sign(v));
- return (((v_3 < v_2)) ? ((v_4 * ((params.C * v_3) + params.F))) : ((v_4 * (pow(((params.A * v_3) + params.B), v_1) + params.E))));
+ float3 v_3 = float3(sign(v));
+ return (((abs(v) < v_2)) ? ((v_3 * ((params.C * abs(v)) + params.F))) : ((v_3 * (pow(((params.A * abs(v)) + params.B), v_1) + params.E))));
}
float4 tint_TextureLoadExternal(Texture2D<float4> plane_0, Texture2D<float4> plane_1, tint_ExternalTextureParams params, uint2 coords) {
- float2 v_5 = round(mul(float3(float2(min(coords, params.visibleSize)), 1.0f), params.loadTransform));
- uint2 v_6 = tint_v2f32_to_v2u32(v_5);
- float3 v_7 = (0.0f).xxx;
- float v_8 = 0.0f;
+ float2 v_4 = round(mul(float3(float2(min(coords, params.visibleSize)), 1.0f), params.loadTransform));
+ uint2 v_5 = tint_v2f32_to_v2u32(v_4);
+ float3 v_6 = (0.0f).xxx;
+ float v_7 = 0.0f;
if ((params.numPlanes == 1u)) {
- int2 v_9 = int2(v_6);
- float4 v_10 = float4(plane_0.Load(int3(v_9, int(0u))));
- v_7 = v_10.xyz;
- v_8 = v_10.w;
+ int2 v_8 = int2(v_5);
+ float4 v_9 = float4(plane_0.Load(int3(v_8, int(0u))));
+ v_6 = v_9.xyz;
+ v_7 = v_9.w;
} else {
- int2 v_11 = int2(v_6);
- float v_12 = float4(plane_0.Load(int3(v_11, int(0u)))).x;
- int2 v_13 = int2(tint_v2f32_to_v2u32((v_5 * params.plane1CoordFactor)));
- v_7 = mul(params.yuvToRgbConversionMatrix, float4(v_12, float4(plane_1.Load(int3(v_13, int(0u)))).xy, 1.0f));
- v_8 = 1.0f;
+ int2 v_10 = int2(v_5);
+ float v_11 = float4(plane_0.Load(int3(v_10, int(0u)))).x;
+ int2 v_12 = int2(tint_v2f32_to_v2u32((v_4 * params.plane1CoordFactor)));
+ v_6 = mul(params.yuvToRgbConversionMatrix, float4(v_11, float4(plane_1.Load(int3(v_12, int(0u)))).xy, 1.0f));
+ v_7 = 1.0f;
}
- float3 v_14 = v_7;
- float3 v_15 = (0.0f).xxx;
+ float3 v_13 = v_6;
+ float3 v_14 = (0.0f).xxx;
if ((params.doYuvToRgbConversionOnly == 0u)) {
- tint_GammaTransferParams v_16 = params.gammaDecodeParams;
- tint_GammaTransferParams v_17 = params.gammaEncodeParams;
- v_15 = tint_GammaCorrection(mul(tint_GammaCorrection(v_14, v_16), params.gamutConversionMatrix), v_17);
+ tint_GammaTransferParams v_15 = params.gammaDecodeParams;
+ tint_GammaTransferParams v_16 = params.gammaEncodeParams;
+ v_14 = tint_GammaCorrection(mul(tint_GammaCorrection(v_13, v_15), params.gamutConversionMatrix), v_16);
} else {
- v_15 = v_14;
+ v_14 = v_13;
}
- return float4(v_15, v_8);
+ return float4(v_14, v_7);
}
-float3x2 v_18(uint start_byte_offset) {
- uint4 v_19 = arg_0_params[(start_byte_offset / 16u)];
- float2 v_20 = asfloat((((((start_byte_offset % 16u) / 4u) == 2u)) ? (v_19.zw) : (v_19.xy)));
- uint4 v_21 = arg_0_params[((8u + start_byte_offset) / 16u)];
- float2 v_22 = asfloat(((((((8u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_21.zw) : (v_21.xy)));
- uint4 v_23 = arg_0_params[((16u + start_byte_offset) / 16u)];
- return float3x2(v_20, v_22, asfloat(((((((16u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_23.zw) : (v_23.xy))));
+float3x2 v_17(uint start_byte_offset) {
+ uint4 v_18 = arg_0_params[(start_byte_offset / 16u)];
+ float2 v_19 = asfloat((((((start_byte_offset % 16u) / 4u) == 2u)) ? (v_18.zw) : (v_18.xy)));
+ uint4 v_20 = arg_0_params[((8u + start_byte_offset) / 16u)];
+ float2 v_21 = asfloat(((((((8u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_20.zw) : (v_20.xy)));
+ uint4 v_22 = arg_0_params[((16u + start_byte_offset) / 16u)];
+ return float3x2(v_19, v_21, asfloat(((((((16u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_22.zw) : (v_22.xy))));
}
-float3x3 v_24(uint start_byte_offset) {
- float3 v_25 = asfloat(arg_0_params[(start_byte_offset / 16u)].xyz);
- float3 v_26 = asfloat(arg_0_params[((16u + start_byte_offset) / 16u)].xyz);
- return float3x3(v_25, v_26, asfloat(arg_0_params[((32u + start_byte_offset) / 16u)].xyz));
+float3x3 v_23(uint start_byte_offset) {
+ return float3x3(asfloat(arg_0_params[(start_byte_offset / 16u)].xyz), asfloat(arg_0_params[((16u + start_byte_offset) / 16u)].xyz), asfloat(arg_0_params[((32u + start_byte_offset) / 16u)].xyz));
}
-tint_GammaTransferParams v_27(uint start_byte_offset) {
- float v_28 = asfloat(arg_0_params[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]);
- float v_29 = asfloat(arg_0_params[((4u + start_byte_offset) / 16u)][(((4u + start_byte_offset) % 16u) / 4u)]);
- float v_30 = asfloat(arg_0_params[((8u + start_byte_offset) / 16u)][(((8u + start_byte_offset) % 16u) / 4u)]);
- float v_31 = asfloat(arg_0_params[((12u + start_byte_offset) / 16u)][(((12u + start_byte_offset) % 16u) / 4u)]);
- float v_32 = asfloat(arg_0_params[((16u + start_byte_offset) / 16u)][(((16u + start_byte_offset) % 16u) / 4u)]);
- float v_33 = asfloat(arg_0_params[((20u + start_byte_offset) / 16u)][(((20u + start_byte_offset) % 16u) / 4u)]);
- float v_34 = asfloat(arg_0_params[((24u + start_byte_offset) / 16u)][(((24u + start_byte_offset) % 16u) / 4u)]);
- tint_GammaTransferParams v_35 = {v_28, v_29, v_30, v_31, v_32, v_33, v_34, arg_0_params[((28u + start_byte_offset) / 16u)][(((28u + start_byte_offset) % 16u) / 4u)]};
- return v_35;
+tint_GammaTransferParams v_24(uint start_byte_offset) {
+ tint_GammaTransferParams v_25 = {asfloat(arg_0_params[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]), asfloat(arg_0_params[((4u + start_byte_offset) / 16u)][(((4u + start_byte_offset) % 16u) / 4u)]), asfloat(arg_0_params[((8u + start_byte_offset) / 16u)][(((8u + start_byte_offset) % 16u) / 4u)]), asfloat(arg_0_params[((12u + start_byte_offset) / 16u)][(((12u + start_byte_offset) % 16u) / 4u)]), asfloat(arg_0_params[((16u + start_byte_offset) / 16u)][(((16u + start_byte_offset) % 16u) / 4u)]), asfloat(arg_0_params[((20u + start_byte_offset) / 16u)][(((20u + start_byte_offset) % 16u) / 4u)]), asfloat(arg_0_params[((24u + start_byte_offset) / 16u)][(((24u + start_byte_offset) % 16u) / 4u)]), arg_0_params[((28u + start_byte_offset) / 16u)][(((28u + start_byte_offset) % 16u) / 4u)]};
+ return v_25;
}
-float3x4 v_36(uint start_byte_offset) {
- float4 v_37 = asfloat(arg_0_params[(start_byte_offset / 16u)]);
- float4 v_38 = asfloat(arg_0_params[((16u + start_byte_offset) / 16u)]);
- return float3x4(v_37, v_38, asfloat(arg_0_params[((32u + start_byte_offset) / 16u)]));
+float3x4 v_26(uint start_byte_offset) {
+ return float3x4(asfloat(arg_0_params[(start_byte_offset / 16u)]), asfloat(arg_0_params[((16u + start_byte_offset) / 16u)]), asfloat(arg_0_params[((32u + start_byte_offset) / 16u)]));
}
-tint_ExternalTextureParams v_39(uint start_byte_offset) {
- uint v_40 = arg_0_params[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)];
- uint v_41 = arg_0_params[((4u + start_byte_offset) / 16u)][(((4u + start_byte_offset) % 16u) / 4u)];
- float3x4 v_42 = v_36((16u + start_byte_offset));
- tint_GammaTransferParams v_43 = v_27((64u + start_byte_offset));
- tint_GammaTransferParams v_44 = v_27((96u + start_byte_offset));
- float3x3 v_45 = v_24((128u + start_byte_offset));
- float3x2 v_46 = v_18((176u + start_byte_offset));
- float3x2 v_47 = v_18((200u + start_byte_offset));
- uint4 v_48 = arg_0_params[((224u + start_byte_offset) / 16u)];
- float2 v_49 = asfloat(((((((224u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_48.zw) : (v_48.xy)));
- uint4 v_50 = arg_0_params[((232u + start_byte_offset) / 16u)];
- float2 v_51 = asfloat(((((((232u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_50.zw) : (v_50.xy)));
- uint4 v_52 = arg_0_params[((240u + start_byte_offset) / 16u)];
- float2 v_53 = asfloat(((((((240u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_52.zw) : (v_52.xy)));
- uint4 v_54 = arg_0_params[((248u + start_byte_offset) / 16u)];
- float2 v_55 = asfloat(((((((248u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_54.zw) : (v_54.xy)));
- uint4 v_56 = arg_0_params[((256u + start_byte_offset) / 16u)];
- uint2 v_57 = ((((((256u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_56.zw) : (v_56.xy));
- uint4 v_58 = arg_0_params[((264u + start_byte_offset) / 16u)];
- tint_ExternalTextureParams v_59 = {v_40, v_41, v_42, v_43, v_44, v_45, v_46, v_47, v_49, v_51, v_53, v_55, v_57, asfloat(((((((264u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_58.zw) : (v_58.xy)))};
- return v_59;
+tint_ExternalTextureParams v_27(uint start_byte_offset) {
+ uint v_28 = arg_0_params[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)];
+ uint v_29 = arg_0_params[((4u + start_byte_offset) / 16u)][(((4u + start_byte_offset) % 16u) / 4u)];
+ float3x4 v_30 = v_26((16u + start_byte_offset));
+ tint_GammaTransferParams v_31 = v_24((64u + start_byte_offset));
+ tint_GammaTransferParams v_32 = v_24((96u + start_byte_offset));
+ float3x3 v_33 = v_23((128u + start_byte_offset));
+ float3x2 v_34 = v_17((176u + start_byte_offset));
+ float3x2 v_35 = v_17((200u + start_byte_offset));
+ uint4 v_36 = arg_0_params[((224u + start_byte_offset) / 16u)];
+ float2 v_37 = asfloat(((((((224u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_36.zw) : (v_36.xy)));
+ uint4 v_38 = arg_0_params[((232u + start_byte_offset) / 16u)];
+ float2 v_39 = asfloat(((((((232u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_38.zw) : (v_38.xy)));
+ uint4 v_40 = arg_0_params[((240u + start_byte_offset) / 16u)];
+ float2 v_41 = asfloat(((((((240u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_40.zw) : (v_40.xy)));
+ uint4 v_42 = arg_0_params[((248u + start_byte_offset) / 16u)];
+ float2 v_43 = asfloat(((((((248u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_42.zw) : (v_42.xy)));
+ uint4 v_44 = arg_0_params[((256u + start_byte_offset) / 16u)];
+ uint2 v_45 = ((((((256u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_44.zw) : (v_44.xy));
+ uint4 v_46 = arg_0_params[((264u + start_byte_offset) / 16u)];
+ tint_ExternalTextureParams v_47 = {v_28, v_29, v_30, v_31, v_32, v_33, v_34, v_35, v_37, v_39, v_41, v_43, v_45, asfloat(((((((264u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_46.zw) : (v_46.xy)))};
+ return v_47;
}
float4 textureLoad_1bfdfb() {
uint2 arg_1 = (1u).xx;
- tint_ExternalTextureParams v_60 = v_39(0u);
- float4 res = tint_TextureLoadExternal(arg_0_plane0, arg_0_plane1, v_60, arg_1);
+ tint_ExternalTextureParams v_48 = v_27(0u);
+ float4 res = tint_TextureLoadExternal(arg_0_plane0, arg_0_plane1, v_48, arg_1);
return res;
}
@@ -161,13 +149,13 @@
VertexOutput tint_symbol = (VertexOutput)0;
tint_symbol.pos = (0.0f).xxxx;
tint_symbol.prevent_dce = textureLoad_1bfdfb();
- VertexOutput v_61 = tint_symbol;
- return v_61;
+ VertexOutput v_49 = tint_symbol;
+ return v_49;
}
vertex_main_outputs vertex_main() {
- VertexOutput v_62 = vertex_main_inner();
- vertex_main_outputs v_63 = {v_62.prevent_dce, v_62.pos};
- return v_63;
+ VertexOutput v_50 = vertex_main_inner();
+ vertex_main_outputs v_51 = {v_50.prevent_dce, v_50.pos};
+ return v_51;
}
diff --git a/test/tint/builtins/gen/var/textureLoad/1bfdfb.wgsl.expected.ir.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/1bfdfb.wgsl.expected.ir.fxc.hlsl
index 468f99b..ed44183 100644
--- a/test/tint/builtins/gen/var/textureLoad/1bfdfb.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/1bfdfb.wgsl.expected.ir.fxc.hlsl
@@ -50,101 +50,89 @@
float3 tint_GammaCorrection(float3 v, tint_GammaTransferParams params) {
float3 v_1 = float3((params.G).xxx);
float3 v_2 = float3((params.D).xxx);
- float3 v_3 = abs(v);
- float3 v_4 = float3(sign(v));
- return (((v_3 < v_2)) ? ((v_4 * ((params.C * v_3) + params.F))) : ((v_4 * (pow(((params.A * v_3) + params.B), v_1) + params.E))));
+ float3 v_3 = float3(sign(v));
+ return (((abs(v) < v_2)) ? ((v_3 * ((params.C * abs(v)) + params.F))) : ((v_3 * (pow(((params.A * abs(v)) + params.B), v_1) + params.E))));
}
float4 tint_TextureLoadExternal(Texture2D<float4> plane_0, Texture2D<float4> plane_1, tint_ExternalTextureParams params, uint2 coords) {
- float2 v_5 = round(mul(float3(float2(min(coords, params.visibleSize)), 1.0f), params.loadTransform));
- uint2 v_6 = tint_v2f32_to_v2u32(v_5);
- float3 v_7 = (0.0f).xxx;
- float v_8 = 0.0f;
+ float2 v_4 = round(mul(float3(float2(min(coords, params.visibleSize)), 1.0f), params.loadTransform));
+ uint2 v_5 = tint_v2f32_to_v2u32(v_4);
+ float3 v_6 = (0.0f).xxx;
+ float v_7 = 0.0f;
if ((params.numPlanes == 1u)) {
- int2 v_9 = int2(v_6);
- float4 v_10 = float4(plane_0.Load(int3(v_9, int(0u))));
- v_7 = v_10.xyz;
- v_8 = v_10.w;
+ int2 v_8 = int2(v_5);
+ float4 v_9 = float4(plane_0.Load(int3(v_8, int(0u))));
+ v_6 = v_9.xyz;
+ v_7 = v_9.w;
} else {
- int2 v_11 = int2(v_6);
- float v_12 = float4(plane_0.Load(int3(v_11, int(0u)))).x;
- int2 v_13 = int2(tint_v2f32_to_v2u32((v_5 * params.plane1CoordFactor)));
- v_7 = mul(params.yuvToRgbConversionMatrix, float4(v_12, float4(plane_1.Load(int3(v_13, int(0u)))).xy, 1.0f));
- v_8 = 1.0f;
+ int2 v_10 = int2(v_5);
+ float v_11 = float4(plane_0.Load(int3(v_10, int(0u)))).x;
+ int2 v_12 = int2(tint_v2f32_to_v2u32((v_4 * params.plane1CoordFactor)));
+ v_6 = mul(params.yuvToRgbConversionMatrix, float4(v_11, float4(plane_1.Load(int3(v_12, int(0u)))).xy, 1.0f));
+ v_7 = 1.0f;
}
- float3 v_14 = v_7;
- float3 v_15 = (0.0f).xxx;
+ float3 v_13 = v_6;
+ float3 v_14 = (0.0f).xxx;
if ((params.doYuvToRgbConversionOnly == 0u)) {
- tint_GammaTransferParams v_16 = params.gammaDecodeParams;
- tint_GammaTransferParams v_17 = params.gammaEncodeParams;
- v_15 = tint_GammaCorrection(mul(tint_GammaCorrection(v_14, v_16), params.gamutConversionMatrix), v_17);
+ tint_GammaTransferParams v_15 = params.gammaDecodeParams;
+ tint_GammaTransferParams v_16 = params.gammaEncodeParams;
+ v_14 = tint_GammaCorrection(mul(tint_GammaCorrection(v_13, v_15), params.gamutConversionMatrix), v_16);
} else {
- v_15 = v_14;
+ v_14 = v_13;
}
- return float4(v_15, v_8);
+ return float4(v_14, v_7);
}
-float3x2 v_18(uint start_byte_offset) {
- uint4 v_19 = arg_0_params[(start_byte_offset / 16u)];
- float2 v_20 = asfloat((((((start_byte_offset % 16u) / 4u) == 2u)) ? (v_19.zw) : (v_19.xy)));
- uint4 v_21 = arg_0_params[((8u + start_byte_offset) / 16u)];
- float2 v_22 = asfloat(((((((8u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_21.zw) : (v_21.xy)));
- uint4 v_23 = arg_0_params[((16u + start_byte_offset) / 16u)];
- return float3x2(v_20, v_22, asfloat(((((((16u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_23.zw) : (v_23.xy))));
+float3x2 v_17(uint start_byte_offset) {
+ uint4 v_18 = arg_0_params[(start_byte_offset / 16u)];
+ float2 v_19 = asfloat((((((start_byte_offset % 16u) / 4u) == 2u)) ? (v_18.zw) : (v_18.xy)));
+ uint4 v_20 = arg_0_params[((8u + start_byte_offset) / 16u)];
+ float2 v_21 = asfloat(((((((8u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_20.zw) : (v_20.xy)));
+ uint4 v_22 = arg_0_params[((16u + start_byte_offset) / 16u)];
+ return float3x2(v_19, v_21, asfloat(((((((16u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_22.zw) : (v_22.xy))));
}
-float3x3 v_24(uint start_byte_offset) {
- float3 v_25 = asfloat(arg_0_params[(start_byte_offset / 16u)].xyz);
- float3 v_26 = asfloat(arg_0_params[((16u + start_byte_offset) / 16u)].xyz);
- return float3x3(v_25, v_26, asfloat(arg_0_params[((32u + start_byte_offset) / 16u)].xyz));
+float3x3 v_23(uint start_byte_offset) {
+ return float3x3(asfloat(arg_0_params[(start_byte_offset / 16u)].xyz), asfloat(arg_0_params[((16u + start_byte_offset) / 16u)].xyz), asfloat(arg_0_params[((32u + start_byte_offset) / 16u)].xyz));
}
-tint_GammaTransferParams v_27(uint start_byte_offset) {
- float v_28 = asfloat(arg_0_params[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]);
- float v_29 = asfloat(arg_0_params[((4u + start_byte_offset) / 16u)][(((4u + start_byte_offset) % 16u) / 4u)]);
- float v_30 = asfloat(arg_0_params[((8u + start_byte_offset) / 16u)][(((8u + start_byte_offset) % 16u) / 4u)]);
- float v_31 = asfloat(arg_0_params[((12u + start_byte_offset) / 16u)][(((12u + start_byte_offset) % 16u) / 4u)]);
- float v_32 = asfloat(arg_0_params[((16u + start_byte_offset) / 16u)][(((16u + start_byte_offset) % 16u) / 4u)]);
- float v_33 = asfloat(arg_0_params[((20u + start_byte_offset) / 16u)][(((20u + start_byte_offset) % 16u) / 4u)]);
- float v_34 = asfloat(arg_0_params[((24u + start_byte_offset) / 16u)][(((24u + start_byte_offset) % 16u) / 4u)]);
- tint_GammaTransferParams v_35 = {v_28, v_29, v_30, v_31, v_32, v_33, v_34, arg_0_params[((28u + start_byte_offset) / 16u)][(((28u + start_byte_offset) % 16u) / 4u)]};
- return v_35;
+tint_GammaTransferParams v_24(uint start_byte_offset) {
+ tint_GammaTransferParams v_25 = {asfloat(arg_0_params[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]), asfloat(arg_0_params[((4u + start_byte_offset) / 16u)][(((4u + start_byte_offset) % 16u) / 4u)]), asfloat(arg_0_params[((8u + start_byte_offset) / 16u)][(((8u + start_byte_offset) % 16u) / 4u)]), asfloat(arg_0_params[((12u + start_byte_offset) / 16u)][(((12u + start_byte_offset) % 16u) / 4u)]), asfloat(arg_0_params[((16u + start_byte_offset) / 16u)][(((16u + start_byte_offset) % 16u) / 4u)]), asfloat(arg_0_params[((20u + start_byte_offset) / 16u)][(((20u + start_byte_offset) % 16u) / 4u)]), asfloat(arg_0_params[((24u + start_byte_offset) / 16u)][(((24u + start_byte_offset) % 16u) / 4u)]), arg_0_params[((28u + start_byte_offset) / 16u)][(((28u + start_byte_offset) % 16u) / 4u)]};
+ return v_25;
}
-float3x4 v_36(uint start_byte_offset) {
- float4 v_37 = asfloat(arg_0_params[(start_byte_offset / 16u)]);
- float4 v_38 = asfloat(arg_0_params[((16u + start_byte_offset) / 16u)]);
- return float3x4(v_37, v_38, asfloat(arg_0_params[((32u + start_byte_offset) / 16u)]));
+float3x4 v_26(uint start_byte_offset) {
+ return float3x4(asfloat(arg_0_params[(start_byte_offset / 16u)]), asfloat(arg_0_params[((16u + start_byte_offset) / 16u)]), asfloat(arg_0_params[((32u + start_byte_offset) / 16u)]));
}
-tint_ExternalTextureParams v_39(uint start_byte_offset) {
- uint v_40 = arg_0_params[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)];
- uint v_41 = arg_0_params[((4u + start_byte_offset) / 16u)][(((4u + start_byte_offset) % 16u) / 4u)];
- float3x4 v_42 = v_36((16u + start_byte_offset));
- tint_GammaTransferParams v_43 = v_27((64u + start_byte_offset));
- tint_GammaTransferParams v_44 = v_27((96u + start_byte_offset));
- float3x3 v_45 = v_24((128u + start_byte_offset));
- float3x2 v_46 = v_18((176u + start_byte_offset));
- float3x2 v_47 = v_18((200u + start_byte_offset));
- uint4 v_48 = arg_0_params[((224u + start_byte_offset) / 16u)];
- float2 v_49 = asfloat(((((((224u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_48.zw) : (v_48.xy)));
- uint4 v_50 = arg_0_params[((232u + start_byte_offset) / 16u)];
- float2 v_51 = asfloat(((((((232u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_50.zw) : (v_50.xy)));
- uint4 v_52 = arg_0_params[((240u + start_byte_offset) / 16u)];
- float2 v_53 = asfloat(((((((240u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_52.zw) : (v_52.xy)));
- uint4 v_54 = arg_0_params[((248u + start_byte_offset) / 16u)];
- float2 v_55 = asfloat(((((((248u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_54.zw) : (v_54.xy)));
- uint4 v_56 = arg_0_params[((256u + start_byte_offset) / 16u)];
- uint2 v_57 = ((((((256u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_56.zw) : (v_56.xy));
- uint4 v_58 = arg_0_params[((264u + start_byte_offset) / 16u)];
- tint_ExternalTextureParams v_59 = {v_40, v_41, v_42, v_43, v_44, v_45, v_46, v_47, v_49, v_51, v_53, v_55, v_57, asfloat(((((((264u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_58.zw) : (v_58.xy)))};
- return v_59;
+tint_ExternalTextureParams v_27(uint start_byte_offset) {
+ uint v_28 = arg_0_params[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)];
+ uint v_29 = arg_0_params[((4u + start_byte_offset) / 16u)][(((4u + start_byte_offset) % 16u) / 4u)];
+ float3x4 v_30 = v_26((16u + start_byte_offset));
+ tint_GammaTransferParams v_31 = v_24((64u + start_byte_offset));
+ tint_GammaTransferParams v_32 = v_24((96u + start_byte_offset));
+ float3x3 v_33 = v_23((128u + start_byte_offset));
+ float3x2 v_34 = v_17((176u + start_byte_offset));
+ float3x2 v_35 = v_17((200u + start_byte_offset));
+ uint4 v_36 = arg_0_params[((224u + start_byte_offset) / 16u)];
+ float2 v_37 = asfloat(((((((224u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_36.zw) : (v_36.xy)));
+ uint4 v_38 = arg_0_params[((232u + start_byte_offset) / 16u)];
+ float2 v_39 = asfloat(((((((232u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_38.zw) : (v_38.xy)));
+ uint4 v_40 = arg_0_params[((240u + start_byte_offset) / 16u)];
+ float2 v_41 = asfloat(((((((240u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_40.zw) : (v_40.xy)));
+ uint4 v_42 = arg_0_params[((248u + start_byte_offset) / 16u)];
+ float2 v_43 = asfloat(((((((248u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_42.zw) : (v_42.xy)));
+ uint4 v_44 = arg_0_params[((256u + start_byte_offset) / 16u)];
+ uint2 v_45 = ((((((256u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_44.zw) : (v_44.xy));
+ uint4 v_46 = arg_0_params[((264u + start_byte_offset) / 16u)];
+ tint_ExternalTextureParams v_47 = {v_28, v_29, v_30, v_31, v_32, v_33, v_34, v_35, v_37, v_39, v_41, v_43, v_45, asfloat(((((((264u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_46.zw) : (v_46.xy)))};
+ return v_47;
}
float4 textureLoad_1bfdfb() {
uint2 arg_1 = (1u).xx;
- tint_ExternalTextureParams v_60 = v_39(0u);
- float4 res = tint_TextureLoadExternal(arg_0_plane0, arg_0_plane1, v_60, arg_1);
+ tint_ExternalTextureParams v_48 = v_27(0u);
+ float4 res = tint_TextureLoadExternal(arg_0_plane0, arg_0_plane1, v_48, arg_1);
return res;
}
@@ -161,13 +149,13 @@
VertexOutput tint_symbol = (VertexOutput)0;
tint_symbol.pos = (0.0f).xxxx;
tint_symbol.prevent_dce = textureLoad_1bfdfb();
- VertexOutput v_61 = tint_symbol;
- return v_61;
+ VertexOutput v_49 = tint_symbol;
+ return v_49;
}
vertex_main_outputs vertex_main() {
- VertexOutput v_62 = vertex_main_inner();
- vertex_main_outputs v_63 = {v_62.prevent_dce, v_62.pos};
- return v_63;
+ VertexOutput v_50 = vertex_main_inner();
+ vertex_main_outputs v_51 = {v_50.prevent_dce, v_50.pos};
+ return v_51;
}
diff --git a/test/tint/builtins/gen/var/textureLoad/1bfdfb.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/1bfdfb.wgsl.expected.ir.msl
index 7f55812..ddf8c67 100644
--- a/test/tint/builtins/gen/var/textureLoad/1bfdfb.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/1bfdfb.wgsl.expected.ir.msl
@@ -83,53 +83,50 @@
float3 tint_GammaCorrection(float3 v, tint_GammaTransferParams params) {
float3 const v_1 = float3(params.G);
- float3 const v_2 = float3(params.D);
- float3 const v_3 = abs(v);
- float3 const v_4 = sign(v);
- return select((v_4 * (powr(((params.A * v_3) + params.B), v_1) + params.E)), (v_4 * ((params.C * v_3) + params.F)), (v_3 < v_2));
+ return select((sign(v) * (powr(((params.A * abs(v)) + params.B), v_1) + params.E)), (sign(v) * ((params.C * abs(v)) + params.F)), (abs(v) < float3(params.D)));
}
float4 tint_TextureLoadExternal(texture2d<float, access::sample> plane_0, texture2d<float, access::sample> plane_1, tint_ExternalTextureParams params, uint2 coords) {
- float2 const v_5 = rint((params.loadTransform * float3(float2(min(coords, params.visibleSize)), 1.0f)));
- uint2 const v_6 = uint2(v_5);
- float3 v_7 = 0.0f;
- float v_8 = 0.0f;
+ float2 const v_2 = rint((params.loadTransform * float3(float2(min(coords, params.visibleSize)), 1.0f)));
+ uint2 const v_3 = uint2(v_2);
+ float3 v_4 = 0.0f;
+ float v_5 = 0.0f;
if ((params.numPlanes == 1u)) {
- float4 const v_9 = plane_0.read(v_6, 0u);
- v_7 = v_9.xyz;
- v_8 = v_9[3u];
+ float4 const v_6 = plane_0.read(v_3, 0u);
+ v_4 = v_6.xyz;
+ v_5 = v_6[3u];
} else {
- float const v_10 = plane_0.read(v_6, 0u)[0u];
- v_7 = (float4(v_10, plane_1.read(uint2((v_5 * params.plane1CoordFactor)), 0u).xy, 1.0f) * params.yuvToRgbConversionMatrix);
- v_8 = 1.0f;
+ float const v_7 = plane_0.read(v_3, 0u)[0u];
+ v_4 = (float4(v_7, plane_1.read(uint2((v_2 * params.plane1CoordFactor)), 0u).xy, 1.0f) * params.yuvToRgbConversionMatrix);
+ v_5 = 1.0f;
}
- float3 const v_11 = v_7;
- float3 v_12 = 0.0f;
+ float3 const v_8 = v_4;
+ float3 v_9 = 0.0f;
if ((params.doYuvToRgbConversionOnly == 0u)) {
- v_12 = tint_GammaCorrection((params.gamutConversionMatrix * tint_GammaCorrection(v_11, params.gammaDecodeParams)), params.gammaEncodeParams);
+ v_9 = tint_GammaCorrection((params.gamutConversionMatrix * tint_GammaCorrection(v_8, params.gammaDecodeParams)), params.gammaEncodeParams);
} else {
- v_12 = v_11;
+ v_9 = v_8;
}
- return float4(v_12, v_8);
+ return float4(v_9, v_5);
}
tint_ExternalTextureParams tint_load_struct_packed_vec3(const constant tint_ExternalTextureParams_packed_vec3* const from) {
- uint const v_13 = (*from).numPlanes;
- uint const v_14 = (*from).doYuvToRgbConversionOnly;
- float3x4 const v_15 = (*from).yuvToRgbConversionMatrix;
- tint_GammaTransferParams const v_16 = (*from).gammaDecodeParams;
- tint_GammaTransferParams const v_17 = (*from).gammaEncodeParams;
- tint_array<tint_packed_vec3_f32_array_element, 3> const v_18 = (*from).gamutConversionMatrix;
- float3 const v_19 = float3(v_18[0u].packed);
- float3 const v_20 = float3(v_18[1u].packed);
- float3x3 const v_21 = float3x3(v_19, v_20, float3(v_18[2u].packed));
- return tint_ExternalTextureParams{.numPlanes=v_13, .doYuvToRgbConversionOnly=v_14, .yuvToRgbConversionMatrix=v_15, .gammaDecodeParams=v_16, .gammaEncodeParams=v_17, .gamutConversionMatrix=v_21, .sampleTransform=(*from).sampleTransform, .loadTransform=(*from).loadTransform, .samplePlane0RectMin=(*from).samplePlane0RectMin, .samplePlane0RectMax=(*from).samplePlane0RectMax, .samplePlane1RectMin=(*from).samplePlane1RectMin, .samplePlane1RectMax=(*from).samplePlane1RectMax, .visibleSize=(*from).visibleSize, .plane1CoordFactor=(*from).plane1CoordFactor};
+ uint const v_10 = (*from).numPlanes;
+ uint const v_11 = (*from).doYuvToRgbConversionOnly;
+ float3x4 const v_12 = (*from).yuvToRgbConversionMatrix;
+ tint_GammaTransferParams const v_13 = (*from).gammaDecodeParams;
+ tint_GammaTransferParams const v_14 = (*from).gammaEncodeParams;
+ tint_array<tint_packed_vec3_f32_array_element, 3> const v_15 = (*from).gamutConversionMatrix;
+ float3 const v_16 = float3(v_15[0u].packed);
+ float3 const v_17 = float3(v_15[1u].packed);
+ float3x3 const v_18 = float3x3(v_16, v_17, float3(v_15[2u].packed));
+ return tint_ExternalTextureParams{.numPlanes=v_10, .doYuvToRgbConversionOnly=v_11, .yuvToRgbConversionMatrix=v_12, .gammaDecodeParams=v_13, .gammaEncodeParams=v_14, .gamutConversionMatrix=v_18, .sampleTransform=(*from).sampleTransform, .loadTransform=(*from).loadTransform, .samplePlane0RectMin=(*from).samplePlane0RectMin, .samplePlane0RectMax=(*from).samplePlane0RectMax, .samplePlane1RectMin=(*from).samplePlane1RectMin, .samplePlane1RectMax=(*from).samplePlane1RectMax, .visibleSize=(*from).visibleSize, .plane1CoordFactor=(*from).plane1CoordFactor};
}
float4 textureLoad_1bfdfb(tint_module_vars_struct tint_module_vars) {
uint2 arg_1 = uint2(1u);
- tint_ExternalTextureParams const v_22 = tint_load_struct_packed_vec3(tint_module_vars.arg_0_params);
- float4 res = tint_TextureLoadExternal(tint_module_vars.arg_0_plane0, tint_module_vars.arg_0_plane1, v_22, arg_1);
+ tint_ExternalTextureParams const v_19 = tint_load_struct_packed_vec3(tint_module_vars.arg_0_params);
+ float4 res = tint_TextureLoadExternal(tint_module_vars.arg_0_plane0, tint_module_vars.arg_0_plane1, v_19, arg_1);
return res;
}
@@ -152,9 +149,9 @@
vertex vertex_main_outputs vertex_main(texture2d<float, access::sample> arg_0_plane0 [[texture(0)]], texture2d<float, access::sample> arg_0_plane1 [[texture(1)]], const constant tint_ExternalTextureParams_packed_vec3* arg_0_params [[buffer(2)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0_plane0=arg_0_plane0, .arg_0_plane1=arg_0_plane1, .arg_0_params=arg_0_params};
- VertexOutput const v_23 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v_20 = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_23.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_23.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v_20.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v_20.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureLoad/8acf41.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/8acf41.wgsl.expected.glsl
index 5e7dae4..eefb4f9 100644
--- a/test/tint/builtins/gen/var/textureLoad/8acf41.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureLoad/8acf41.wgsl.expected.glsl
@@ -71,47 +71,43 @@
uniform highp sampler2D arg_0_plane1;
vec3 tint_GammaCorrection(vec3 v, tint_GammaTransferParams params) {
vec3 v_3 = vec3(params.G);
- vec3 v_4 = vec3(params.D);
- vec3 v_5 = abs(v);
- vec3 v_6 = sign(v);
- bvec3 v_7 = lessThan(v_5, v_4);
- return mix((v_6 * (pow(((params.A * v_5) + params.B), v_3) + params.E)), (v_6 * ((params.C * v_5) + params.F)), v_7);
+ return mix((sign(v) * (pow(((params.A * abs(v)) + params.B), v_3) + params.E)), (sign(v) * ((params.C * abs(v)) + params.F)), lessThan(abs(v), vec3(params.D)));
}
vec4 tint_TextureLoadExternal(tint_ExternalTextureParams params, uvec2 coords) {
- vec2 v_8 = round((params.loadTransform * vec3(vec2(min(coords, params.visibleSize)), 1.0f)));
- uvec2 v_9 = uvec2(v_8);
- vec3 v_10 = vec3(0.0f);
- float v_11 = 0.0f;
+ vec2 v_4 = round((params.loadTransform * vec3(vec2(min(coords, params.visibleSize)), 1.0f)));
+ uvec2 v_5 = uvec2(v_4);
+ vec3 v_6 = vec3(0.0f);
+ float v_7 = 0.0f;
if ((params.numPlanes == 1u)) {
- ivec2 v_12 = ivec2(v_9);
- vec4 v_13 = texelFetch(arg_0_plane0, v_12, int(0u));
- v_10 = v_13.xyz;
- v_11 = v_13[3u];
+ ivec2 v_8 = ivec2(v_5);
+ vec4 v_9 = texelFetch(arg_0_plane0, v_8, int(0u));
+ v_6 = v_9.xyz;
+ v_7 = v_9[3u];
} else {
- ivec2 v_14 = ivec2(v_9);
- float v_15 = texelFetch(arg_0_plane0, v_14, int(0u))[0u];
- ivec2 v_16 = ivec2(uvec2((v_8 * params.plane1CoordFactor)));
- v_10 = (vec4(v_15, texelFetch(arg_0_plane1, v_16, int(0u)).xy, 1.0f) * params.yuvToRgbConversionMatrix);
- v_11 = 1.0f;
+ ivec2 v_10 = ivec2(v_5);
+ float v_11 = texelFetch(arg_0_plane0, v_10, int(0u))[0u];
+ ivec2 v_12 = ivec2(uvec2((v_4 * params.plane1CoordFactor)));
+ v_6 = (vec4(v_11, texelFetch(arg_0_plane1, v_12, int(0u)).xy, 1.0f) * params.yuvToRgbConversionMatrix);
+ v_7 = 1.0f;
}
- vec3 v_17 = v_10;
- vec3 v_18 = vec3(0.0f);
+ vec3 v_13 = v_6;
+ vec3 v_14 = vec3(0.0f);
if ((params.doYuvToRgbConversionOnly == 0u)) {
- v_18 = tint_GammaCorrection((params.gamutConversionMatrix * tint_GammaCorrection(v_17, params.gammaDecodeParams)), params.gammaEncodeParams);
+ v_14 = tint_GammaCorrection((params.gamutConversionMatrix * tint_GammaCorrection(v_13, params.gammaDecodeParams)), params.gammaEncodeParams);
} else {
- v_18 = v_17;
+ v_14 = v_13;
}
- return vec4(v_18, v_11);
+ return vec4(v_14, v_7);
}
tint_ExternalTextureParams tint_convert_tint_ExternalTextureParams(tint_ExternalTextureParams_std140 tint_input) {
- mat3 v_19 = mat3(tint_input.gamutConversionMatrix_col0, tint_input.gamutConversionMatrix_col1, tint_input.gamutConversionMatrix_col2);
- mat3x2 v_20 = mat3x2(tint_input.sampleTransform_col0, tint_input.sampleTransform_col1, tint_input.sampleTransform_col2);
- return tint_ExternalTextureParams(tint_input.numPlanes, tint_input.doYuvToRgbConversionOnly, tint_input.yuvToRgbConversionMatrix, tint_input.gammaDecodeParams, tint_input.gammaEncodeParams, v_19, v_20, mat3x2(tint_input.loadTransform_col0, tint_input.loadTransform_col1, tint_input.loadTransform_col2), tint_input.samplePlane0RectMin, tint_input.samplePlane0RectMax, tint_input.samplePlane1RectMin, tint_input.samplePlane1RectMax, tint_input.visibleSize, tint_input.plane1CoordFactor);
+ mat3 v_15 = mat3(tint_input.gamutConversionMatrix_col0, tint_input.gamutConversionMatrix_col1, tint_input.gamutConversionMatrix_col2);
+ mat3x2 v_16 = mat3x2(tint_input.sampleTransform_col0, tint_input.sampleTransform_col1, tint_input.sampleTransform_col2);
+ return tint_ExternalTextureParams(tint_input.numPlanes, tint_input.doYuvToRgbConversionOnly, tint_input.yuvToRgbConversionMatrix, tint_input.gammaDecodeParams, tint_input.gammaEncodeParams, v_15, v_16, mat3x2(tint_input.loadTransform_col0, tint_input.loadTransform_col1, tint_input.loadTransform_col2), tint_input.samplePlane0RectMin, tint_input.samplePlane0RectMax, tint_input.samplePlane1RectMin, tint_input.samplePlane1RectMax, tint_input.visibleSize, tint_input.plane1CoordFactor);
}
vec4 textureLoad_8acf41() {
ivec2 arg_1 = ivec2(1);
- tint_ExternalTextureParams v_21 = tint_convert_tint_ExternalTextureParams(v_2.inner);
- vec4 res = tint_TextureLoadExternal(v_21, uvec2(arg_1));
+ tint_ExternalTextureParams v_17 = tint_convert_tint_ExternalTextureParams(v_2.inner);
+ vec4 res = tint_TextureLoadExternal(v_17, uvec2(arg_1));
return res;
}
void main() {
@@ -188,47 +184,43 @@
uniform highp sampler2D arg_0_plane1;
vec3 tint_GammaCorrection(vec3 v, tint_GammaTransferParams params) {
vec3 v_3 = vec3(params.G);
- vec3 v_4 = vec3(params.D);
- vec3 v_5 = abs(v);
- vec3 v_6 = sign(v);
- bvec3 v_7 = lessThan(v_5, v_4);
- return mix((v_6 * (pow(((params.A * v_5) + params.B), v_3) + params.E)), (v_6 * ((params.C * v_5) + params.F)), v_7);
+ return mix((sign(v) * (pow(((params.A * abs(v)) + params.B), v_3) + params.E)), (sign(v) * ((params.C * abs(v)) + params.F)), lessThan(abs(v), vec3(params.D)));
}
vec4 tint_TextureLoadExternal(tint_ExternalTextureParams params, uvec2 coords) {
- vec2 v_8 = round((params.loadTransform * vec3(vec2(min(coords, params.visibleSize)), 1.0f)));
- uvec2 v_9 = uvec2(v_8);
- vec3 v_10 = vec3(0.0f);
- float v_11 = 0.0f;
+ vec2 v_4 = round((params.loadTransform * vec3(vec2(min(coords, params.visibleSize)), 1.0f)));
+ uvec2 v_5 = uvec2(v_4);
+ vec3 v_6 = vec3(0.0f);
+ float v_7 = 0.0f;
if ((params.numPlanes == 1u)) {
- ivec2 v_12 = ivec2(v_9);
- vec4 v_13 = texelFetch(arg_0_plane0, v_12, int(0u));
- v_10 = v_13.xyz;
- v_11 = v_13[3u];
+ ivec2 v_8 = ivec2(v_5);
+ vec4 v_9 = texelFetch(arg_0_plane0, v_8, int(0u));
+ v_6 = v_9.xyz;
+ v_7 = v_9[3u];
} else {
- ivec2 v_14 = ivec2(v_9);
- float v_15 = texelFetch(arg_0_plane0, v_14, int(0u))[0u];
- ivec2 v_16 = ivec2(uvec2((v_8 * params.plane1CoordFactor)));
- v_10 = (vec4(v_15, texelFetch(arg_0_plane1, v_16, int(0u)).xy, 1.0f) * params.yuvToRgbConversionMatrix);
- v_11 = 1.0f;
+ ivec2 v_10 = ivec2(v_5);
+ float v_11 = texelFetch(arg_0_plane0, v_10, int(0u))[0u];
+ ivec2 v_12 = ivec2(uvec2((v_4 * params.plane1CoordFactor)));
+ v_6 = (vec4(v_11, texelFetch(arg_0_plane1, v_12, int(0u)).xy, 1.0f) * params.yuvToRgbConversionMatrix);
+ v_7 = 1.0f;
}
- vec3 v_17 = v_10;
- vec3 v_18 = vec3(0.0f);
+ vec3 v_13 = v_6;
+ vec3 v_14 = vec3(0.0f);
if ((params.doYuvToRgbConversionOnly == 0u)) {
- v_18 = tint_GammaCorrection((params.gamutConversionMatrix * tint_GammaCorrection(v_17, params.gammaDecodeParams)), params.gammaEncodeParams);
+ v_14 = tint_GammaCorrection((params.gamutConversionMatrix * tint_GammaCorrection(v_13, params.gammaDecodeParams)), params.gammaEncodeParams);
} else {
- v_18 = v_17;
+ v_14 = v_13;
}
- return vec4(v_18, v_11);
+ return vec4(v_14, v_7);
}
tint_ExternalTextureParams tint_convert_tint_ExternalTextureParams(tint_ExternalTextureParams_std140 tint_input) {
- mat3 v_19 = mat3(tint_input.gamutConversionMatrix_col0, tint_input.gamutConversionMatrix_col1, tint_input.gamutConversionMatrix_col2);
- mat3x2 v_20 = mat3x2(tint_input.sampleTransform_col0, tint_input.sampleTransform_col1, tint_input.sampleTransform_col2);
- return tint_ExternalTextureParams(tint_input.numPlanes, tint_input.doYuvToRgbConversionOnly, tint_input.yuvToRgbConversionMatrix, tint_input.gammaDecodeParams, tint_input.gammaEncodeParams, v_19, v_20, mat3x2(tint_input.loadTransform_col0, tint_input.loadTransform_col1, tint_input.loadTransform_col2), tint_input.samplePlane0RectMin, tint_input.samplePlane0RectMax, tint_input.samplePlane1RectMin, tint_input.samplePlane1RectMax, tint_input.visibleSize, tint_input.plane1CoordFactor);
+ mat3 v_15 = mat3(tint_input.gamutConversionMatrix_col0, tint_input.gamutConversionMatrix_col1, tint_input.gamutConversionMatrix_col2);
+ mat3x2 v_16 = mat3x2(tint_input.sampleTransform_col0, tint_input.sampleTransform_col1, tint_input.sampleTransform_col2);
+ return tint_ExternalTextureParams(tint_input.numPlanes, tint_input.doYuvToRgbConversionOnly, tint_input.yuvToRgbConversionMatrix, tint_input.gammaDecodeParams, tint_input.gammaEncodeParams, v_15, v_16, mat3x2(tint_input.loadTransform_col0, tint_input.loadTransform_col1, tint_input.loadTransform_col2), tint_input.samplePlane0RectMin, tint_input.samplePlane0RectMax, tint_input.samplePlane1RectMin, tint_input.samplePlane1RectMax, tint_input.visibleSize, tint_input.plane1CoordFactor);
}
vec4 textureLoad_8acf41() {
ivec2 arg_1 = ivec2(1);
- tint_ExternalTextureParams v_21 = tint_convert_tint_ExternalTextureParams(v_2.inner);
- vec4 res = tint_TextureLoadExternal(v_21, uvec2(arg_1));
+ tint_ExternalTextureParams v_17 = tint_convert_tint_ExternalTextureParams(v_2.inner);
+ vec4 res = tint_TextureLoadExternal(v_17, uvec2(arg_1));
return res;
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
@@ -308,47 +300,43 @@
layout(location = 0) flat out vec4 vertex_main_loc0_Output;
vec3 tint_GammaCorrection(vec3 v, tint_GammaTransferParams params) {
vec3 v_2 = vec3(params.G);
- vec3 v_3 = vec3(params.D);
- vec3 v_4 = abs(v);
- vec3 v_5 = sign(v);
- bvec3 v_6 = lessThan(v_4, v_3);
- return mix((v_5 * (pow(((params.A * v_4) + params.B), v_2) + params.E)), (v_5 * ((params.C * v_4) + params.F)), v_6);
+ return mix((sign(v) * (pow(((params.A * abs(v)) + params.B), v_2) + params.E)), (sign(v) * ((params.C * abs(v)) + params.F)), lessThan(abs(v), vec3(params.D)));
}
vec4 tint_TextureLoadExternal(tint_ExternalTextureParams params, uvec2 coords) {
- vec2 v_7 = round((params.loadTransform * vec3(vec2(min(coords, params.visibleSize)), 1.0f)));
- uvec2 v_8 = uvec2(v_7);
- vec3 v_9 = vec3(0.0f);
- float v_10 = 0.0f;
+ vec2 v_3 = round((params.loadTransform * vec3(vec2(min(coords, params.visibleSize)), 1.0f)));
+ uvec2 v_4 = uvec2(v_3);
+ vec3 v_5 = vec3(0.0f);
+ float v_6 = 0.0f;
if ((params.numPlanes == 1u)) {
- ivec2 v_11 = ivec2(v_8);
- vec4 v_12 = texelFetch(arg_0_plane0, v_11, int(0u));
- v_9 = v_12.xyz;
- v_10 = v_12[3u];
+ ivec2 v_7 = ivec2(v_4);
+ vec4 v_8 = texelFetch(arg_0_plane0, v_7, int(0u));
+ v_5 = v_8.xyz;
+ v_6 = v_8[3u];
} else {
- ivec2 v_13 = ivec2(v_8);
- float v_14 = texelFetch(arg_0_plane0, v_13, int(0u))[0u];
- ivec2 v_15 = ivec2(uvec2((v_7 * params.plane1CoordFactor)));
- v_9 = (vec4(v_14, texelFetch(arg_0_plane1, v_15, int(0u)).xy, 1.0f) * params.yuvToRgbConversionMatrix);
- v_10 = 1.0f;
+ ivec2 v_9 = ivec2(v_4);
+ float v_10 = texelFetch(arg_0_plane0, v_9, int(0u))[0u];
+ ivec2 v_11 = ivec2(uvec2((v_3 * params.plane1CoordFactor)));
+ v_5 = (vec4(v_10, texelFetch(arg_0_plane1, v_11, int(0u)).xy, 1.0f) * params.yuvToRgbConversionMatrix);
+ v_6 = 1.0f;
}
- vec3 v_16 = v_9;
- vec3 v_17 = vec3(0.0f);
+ vec3 v_12 = v_5;
+ vec3 v_13 = vec3(0.0f);
if ((params.doYuvToRgbConversionOnly == 0u)) {
- v_17 = tint_GammaCorrection((params.gamutConversionMatrix * tint_GammaCorrection(v_16, params.gammaDecodeParams)), params.gammaEncodeParams);
+ v_13 = tint_GammaCorrection((params.gamutConversionMatrix * tint_GammaCorrection(v_12, params.gammaDecodeParams)), params.gammaEncodeParams);
} else {
- v_17 = v_16;
+ v_13 = v_12;
}
- return vec4(v_17, v_10);
+ return vec4(v_13, v_6);
}
tint_ExternalTextureParams tint_convert_tint_ExternalTextureParams(tint_ExternalTextureParams_std140 tint_input) {
- mat3 v_18 = mat3(tint_input.gamutConversionMatrix_col0, tint_input.gamutConversionMatrix_col1, tint_input.gamutConversionMatrix_col2);
- mat3x2 v_19 = mat3x2(tint_input.sampleTransform_col0, tint_input.sampleTransform_col1, tint_input.sampleTransform_col2);
- return tint_ExternalTextureParams(tint_input.numPlanes, tint_input.doYuvToRgbConversionOnly, tint_input.yuvToRgbConversionMatrix, tint_input.gammaDecodeParams, tint_input.gammaEncodeParams, v_18, v_19, mat3x2(tint_input.loadTransform_col0, tint_input.loadTransform_col1, tint_input.loadTransform_col2), tint_input.samplePlane0RectMin, tint_input.samplePlane0RectMax, tint_input.samplePlane1RectMin, tint_input.samplePlane1RectMax, tint_input.visibleSize, tint_input.plane1CoordFactor);
+ mat3 v_14 = mat3(tint_input.gamutConversionMatrix_col0, tint_input.gamutConversionMatrix_col1, tint_input.gamutConversionMatrix_col2);
+ mat3x2 v_15 = mat3x2(tint_input.sampleTransform_col0, tint_input.sampleTransform_col1, tint_input.sampleTransform_col2);
+ return tint_ExternalTextureParams(tint_input.numPlanes, tint_input.doYuvToRgbConversionOnly, tint_input.yuvToRgbConversionMatrix, tint_input.gammaDecodeParams, tint_input.gammaEncodeParams, v_14, v_15, mat3x2(tint_input.loadTransform_col0, tint_input.loadTransform_col1, tint_input.loadTransform_col2), tint_input.samplePlane0RectMin, tint_input.samplePlane0RectMax, tint_input.samplePlane1RectMin, tint_input.samplePlane1RectMax, tint_input.visibleSize, tint_input.plane1CoordFactor);
}
vec4 textureLoad_8acf41() {
ivec2 arg_1 = ivec2(1);
- tint_ExternalTextureParams v_20 = tint_convert_tint_ExternalTextureParams(v_1.inner);
- vec4 res = tint_TextureLoadExternal(v_20, uvec2(arg_1));
+ tint_ExternalTextureParams v_16 = tint_convert_tint_ExternalTextureParams(v_1.inner);
+ vec4 res = tint_TextureLoadExternal(v_16, uvec2(arg_1));
return res;
}
VertexOutput vertex_main_inner() {
@@ -358,10 +346,10 @@
return tint_symbol;
}
void main() {
- VertexOutput v_21 = vertex_main_inner();
- gl_Position = v_21.pos;
+ VertexOutput v_17 = vertex_main_inner();
+ gl_Position = v_17.pos;
gl_Position[1u] = -(gl_Position.y);
gl_Position[2u] = ((2.0f * gl_Position.z) - gl_Position.w);
- vertex_main_loc0_Output = v_21.prevent_dce;
+ vertex_main_loc0_Output = v_17.prevent_dce;
gl_PointSize = 1.0f;
}
diff --git a/test/tint/builtins/gen/var/textureLoad/8acf41.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/8acf41.wgsl.expected.ir.dxc.hlsl
index 428716e..8d61dea 100644
--- a/test/tint/builtins/gen/var/textureLoad/8acf41.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/8acf41.wgsl.expected.ir.dxc.hlsl
@@ -50,101 +50,89 @@
float3 tint_GammaCorrection(float3 v, tint_GammaTransferParams params) {
float3 v_1 = float3((params.G).xxx);
float3 v_2 = float3((params.D).xxx);
- float3 v_3 = abs(v);
- float3 v_4 = float3(sign(v));
- return (((v_3 < v_2)) ? ((v_4 * ((params.C * v_3) + params.F))) : ((v_4 * (pow(((params.A * v_3) + params.B), v_1) + params.E))));
+ float3 v_3 = float3(sign(v));
+ return (((abs(v) < v_2)) ? ((v_3 * ((params.C * abs(v)) + params.F))) : ((v_3 * (pow(((params.A * abs(v)) + params.B), v_1) + params.E))));
}
float4 tint_TextureLoadExternal(Texture2D<float4> plane_0, Texture2D<float4> plane_1, tint_ExternalTextureParams params, uint2 coords) {
- float2 v_5 = round(mul(float3(float2(min(coords, params.visibleSize)), 1.0f), params.loadTransform));
- uint2 v_6 = tint_v2f32_to_v2u32(v_5);
- float3 v_7 = (0.0f).xxx;
- float v_8 = 0.0f;
+ float2 v_4 = round(mul(float3(float2(min(coords, params.visibleSize)), 1.0f), params.loadTransform));
+ uint2 v_5 = tint_v2f32_to_v2u32(v_4);
+ float3 v_6 = (0.0f).xxx;
+ float v_7 = 0.0f;
if ((params.numPlanes == 1u)) {
- int2 v_9 = int2(v_6);
- float4 v_10 = float4(plane_0.Load(int3(v_9, int(0u))));
- v_7 = v_10.xyz;
- v_8 = v_10.w;
+ int2 v_8 = int2(v_5);
+ float4 v_9 = float4(plane_0.Load(int3(v_8, int(0u))));
+ v_6 = v_9.xyz;
+ v_7 = v_9.w;
} else {
- int2 v_11 = int2(v_6);
- float v_12 = float4(plane_0.Load(int3(v_11, int(0u)))).x;
- int2 v_13 = int2(tint_v2f32_to_v2u32((v_5 * params.plane1CoordFactor)));
- v_7 = mul(params.yuvToRgbConversionMatrix, float4(v_12, float4(plane_1.Load(int3(v_13, int(0u)))).xy, 1.0f));
- v_8 = 1.0f;
+ int2 v_10 = int2(v_5);
+ float v_11 = float4(plane_0.Load(int3(v_10, int(0u)))).x;
+ int2 v_12 = int2(tint_v2f32_to_v2u32((v_4 * params.plane1CoordFactor)));
+ v_6 = mul(params.yuvToRgbConversionMatrix, float4(v_11, float4(plane_1.Load(int3(v_12, int(0u)))).xy, 1.0f));
+ v_7 = 1.0f;
}
- float3 v_14 = v_7;
- float3 v_15 = (0.0f).xxx;
+ float3 v_13 = v_6;
+ float3 v_14 = (0.0f).xxx;
if ((params.doYuvToRgbConversionOnly == 0u)) {
- tint_GammaTransferParams v_16 = params.gammaDecodeParams;
- tint_GammaTransferParams v_17 = params.gammaEncodeParams;
- v_15 = tint_GammaCorrection(mul(tint_GammaCorrection(v_14, v_16), params.gamutConversionMatrix), v_17);
+ tint_GammaTransferParams v_15 = params.gammaDecodeParams;
+ tint_GammaTransferParams v_16 = params.gammaEncodeParams;
+ v_14 = tint_GammaCorrection(mul(tint_GammaCorrection(v_13, v_15), params.gamutConversionMatrix), v_16);
} else {
- v_15 = v_14;
+ v_14 = v_13;
}
- return float4(v_15, v_8);
+ return float4(v_14, v_7);
}
-float3x2 v_18(uint start_byte_offset) {
- uint4 v_19 = arg_0_params[(start_byte_offset / 16u)];
- float2 v_20 = asfloat((((((start_byte_offset % 16u) / 4u) == 2u)) ? (v_19.zw) : (v_19.xy)));
- uint4 v_21 = arg_0_params[((8u + start_byte_offset) / 16u)];
- float2 v_22 = asfloat(((((((8u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_21.zw) : (v_21.xy)));
- uint4 v_23 = arg_0_params[((16u + start_byte_offset) / 16u)];
- return float3x2(v_20, v_22, asfloat(((((((16u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_23.zw) : (v_23.xy))));
+float3x2 v_17(uint start_byte_offset) {
+ uint4 v_18 = arg_0_params[(start_byte_offset / 16u)];
+ float2 v_19 = asfloat((((((start_byte_offset % 16u) / 4u) == 2u)) ? (v_18.zw) : (v_18.xy)));
+ uint4 v_20 = arg_0_params[((8u + start_byte_offset) / 16u)];
+ float2 v_21 = asfloat(((((((8u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_20.zw) : (v_20.xy)));
+ uint4 v_22 = arg_0_params[((16u + start_byte_offset) / 16u)];
+ return float3x2(v_19, v_21, asfloat(((((((16u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_22.zw) : (v_22.xy))));
}
-float3x3 v_24(uint start_byte_offset) {
- float3 v_25 = asfloat(arg_0_params[(start_byte_offset / 16u)].xyz);
- float3 v_26 = asfloat(arg_0_params[((16u + start_byte_offset) / 16u)].xyz);
- return float3x3(v_25, v_26, asfloat(arg_0_params[((32u + start_byte_offset) / 16u)].xyz));
+float3x3 v_23(uint start_byte_offset) {
+ return float3x3(asfloat(arg_0_params[(start_byte_offset / 16u)].xyz), asfloat(arg_0_params[((16u + start_byte_offset) / 16u)].xyz), asfloat(arg_0_params[((32u + start_byte_offset) / 16u)].xyz));
}
-tint_GammaTransferParams v_27(uint start_byte_offset) {
- float v_28 = asfloat(arg_0_params[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]);
- float v_29 = asfloat(arg_0_params[((4u + start_byte_offset) / 16u)][(((4u + start_byte_offset) % 16u) / 4u)]);
- float v_30 = asfloat(arg_0_params[((8u + start_byte_offset) / 16u)][(((8u + start_byte_offset) % 16u) / 4u)]);
- float v_31 = asfloat(arg_0_params[((12u + start_byte_offset) / 16u)][(((12u + start_byte_offset) % 16u) / 4u)]);
- float v_32 = asfloat(arg_0_params[((16u + start_byte_offset) / 16u)][(((16u + start_byte_offset) % 16u) / 4u)]);
- float v_33 = asfloat(arg_0_params[((20u + start_byte_offset) / 16u)][(((20u + start_byte_offset) % 16u) / 4u)]);
- float v_34 = asfloat(arg_0_params[((24u + start_byte_offset) / 16u)][(((24u + start_byte_offset) % 16u) / 4u)]);
- tint_GammaTransferParams v_35 = {v_28, v_29, v_30, v_31, v_32, v_33, v_34, arg_0_params[((28u + start_byte_offset) / 16u)][(((28u + start_byte_offset) % 16u) / 4u)]};
- return v_35;
+tint_GammaTransferParams v_24(uint start_byte_offset) {
+ tint_GammaTransferParams v_25 = {asfloat(arg_0_params[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]), asfloat(arg_0_params[((4u + start_byte_offset) / 16u)][(((4u + start_byte_offset) % 16u) / 4u)]), asfloat(arg_0_params[((8u + start_byte_offset) / 16u)][(((8u + start_byte_offset) % 16u) / 4u)]), asfloat(arg_0_params[((12u + start_byte_offset) / 16u)][(((12u + start_byte_offset) % 16u) / 4u)]), asfloat(arg_0_params[((16u + start_byte_offset) / 16u)][(((16u + start_byte_offset) % 16u) / 4u)]), asfloat(arg_0_params[((20u + start_byte_offset) / 16u)][(((20u + start_byte_offset) % 16u) / 4u)]), asfloat(arg_0_params[((24u + start_byte_offset) / 16u)][(((24u + start_byte_offset) % 16u) / 4u)]), arg_0_params[((28u + start_byte_offset) / 16u)][(((28u + start_byte_offset) % 16u) / 4u)]};
+ return v_25;
}
-float3x4 v_36(uint start_byte_offset) {
- float4 v_37 = asfloat(arg_0_params[(start_byte_offset / 16u)]);
- float4 v_38 = asfloat(arg_0_params[((16u + start_byte_offset) / 16u)]);
- return float3x4(v_37, v_38, asfloat(arg_0_params[((32u + start_byte_offset) / 16u)]));
+float3x4 v_26(uint start_byte_offset) {
+ return float3x4(asfloat(arg_0_params[(start_byte_offset / 16u)]), asfloat(arg_0_params[((16u + start_byte_offset) / 16u)]), asfloat(arg_0_params[((32u + start_byte_offset) / 16u)]));
}
-tint_ExternalTextureParams v_39(uint start_byte_offset) {
- uint v_40 = arg_0_params[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)];
- uint v_41 = arg_0_params[((4u + start_byte_offset) / 16u)][(((4u + start_byte_offset) % 16u) / 4u)];
- float3x4 v_42 = v_36((16u + start_byte_offset));
- tint_GammaTransferParams v_43 = v_27((64u + start_byte_offset));
- tint_GammaTransferParams v_44 = v_27((96u + start_byte_offset));
- float3x3 v_45 = v_24((128u + start_byte_offset));
- float3x2 v_46 = v_18((176u + start_byte_offset));
- float3x2 v_47 = v_18((200u + start_byte_offset));
- uint4 v_48 = arg_0_params[((224u + start_byte_offset) / 16u)];
- float2 v_49 = asfloat(((((((224u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_48.zw) : (v_48.xy)));
- uint4 v_50 = arg_0_params[((232u + start_byte_offset) / 16u)];
- float2 v_51 = asfloat(((((((232u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_50.zw) : (v_50.xy)));
- uint4 v_52 = arg_0_params[((240u + start_byte_offset) / 16u)];
- float2 v_53 = asfloat(((((((240u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_52.zw) : (v_52.xy)));
- uint4 v_54 = arg_0_params[((248u + start_byte_offset) / 16u)];
- float2 v_55 = asfloat(((((((248u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_54.zw) : (v_54.xy)));
- uint4 v_56 = arg_0_params[((256u + start_byte_offset) / 16u)];
- uint2 v_57 = ((((((256u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_56.zw) : (v_56.xy));
- uint4 v_58 = arg_0_params[((264u + start_byte_offset) / 16u)];
- tint_ExternalTextureParams v_59 = {v_40, v_41, v_42, v_43, v_44, v_45, v_46, v_47, v_49, v_51, v_53, v_55, v_57, asfloat(((((((264u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_58.zw) : (v_58.xy)))};
- return v_59;
+tint_ExternalTextureParams v_27(uint start_byte_offset) {
+ uint v_28 = arg_0_params[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)];
+ uint v_29 = arg_0_params[((4u + start_byte_offset) / 16u)][(((4u + start_byte_offset) % 16u) / 4u)];
+ float3x4 v_30 = v_26((16u + start_byte_offset));
+ tint_GammaTransferParams v_31 = v_24((64u + start_byte_offset));
+ tint_GammaTransferParams v_32 = v_24((96u + start_byte_offset));
+ float3x3 v_33 = v_23((128u + start_byte_offset));
+ float3x2 v_34 = v_17((176u + start_byte_offset));
+ float3x2 v_35 = v_17((200u + start_byte_offset));
+ uint4 v_36 = arg_0_params[((224u + start_byte_offset) / 16u)];
+ float2 v_37 = asfloat(((((((224u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_36.zw) : (v_36.xy)));
+ uint4 v_38 = arg_0_params[((232u + start_byte_offset) / 16u)];
+ float2 v_39 = asfloat(((((((232u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_38.zw) : (v_38.xy)));
+ uint4 v_40 = arg_0_params[((240u + start_byte_offset) / 16u)];
+ float2 v_41 = asfloat(((((((240u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_40.zw) : (v_40.xy)));
+ uint4 v_42 = arg_0_params[((248u + start_byte_offset) / 16u)];
+ float2 v_43 = asfloat(((((((248u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_42.zw) : (v_42.xy)));
+ uint4 v_44 = arg_0_params[((256u + start_byte_offset) / 16u)];
+ uint2 v_45 = ((((((256u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_44.zw) : (v_44.xy));
+ uint4 v_46 = arg_0_params[((264u + start_byte_offset) / 16u)];
+ tint_ExternalTextureParams v_47 = {v_28, v_29, v_30, v_31, v_32, v_33, v_34, v_35, v_37, v_39, v_41, v_43, v_45, asfloat(((((((264u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_46.zw) : (v_46.xy)))};
+ return v_47;
}
float4 textureLoad_8acf41() {
int2 arg_1 = (int(1)).xx;
- tint_ExternalTextureParams v_60 = v_39(0u);
- float4 res = tint_TextureLoadExternal(arg_0_plane0, arg_0_plane1, v_60, uint2(arg_1));
+ tint_ExternalTextureParams v_48 = v_27(0u);
+ float4 res = tint_TextureLoadExternal(arg_0_plane0, arg_0_plane1, v_48, uint2(arg_1));
return res;
}
@@ -161,13 +149,13 @@
VertexOutput tint_symbol = (VertexOutput)0;
tint_symbol.pos = (0.0f).xxxx;
tint_symbol.prevent_dce = textureLoad_8acf41();
- VertexOutput v_61 = tint_symbol;
- return v_61;
+ VertexOutput v_49 = tint_symbol;
+ return v_49;
}
vertex_main_outputs vertex_main() {
- VertexOutput v_62 = vertex_main_inner();
- vertex_main_outputs v_63 = {v_62.prevent_dce, v_62.pos};
- return v_63;
+ VertexOutput v_50 = vertex_main_inner();
+ vertex_main_outputs v_51 = {v_50.prevent_dce, v_50.pos};
+ return v_51;
}
diff --git a/test/tint/builtins/gen/var/textureLoad/8acf41.wgsl.expected.ir.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/8acf41.wgsl.expected.ir.fxc.hlsl
index 428716e..8d61dea 100644
--- a/test/tint/builtins/gen/var/textureLoad/8acf41.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/8acf41.wgsl.expected.ir.fxc.hlsl
@@ -50,101 +50,89 @@
float3 tint_GammaCorrection(float3 v, tint_GammaTransferParams params) {
float3 v_1 = float3((params.G).xxx);
float3 v_2 = float3((params.D).xxx);
- float3 v_3 = abs(v);
- float3 v_4 = float3(sign(v));
- return (((v_3 < v_2)) ? ((v_4 * ((params.C * v_3) + params.F))) : ((v_4 * (pow(((params.A * v_3) + params.B), v_1) + params.E))));
+ float3 v_3 = float3(sign(v));
+ return (((abs(v) < v_2)) ? ((v_3 * ((params.C * abs(v)) + params.F))) : ((v_3 * (pow(((params.A * abs(v)) + params.B), v_1) + params.E))));
}
float4 tint_TextureLoadExternal(Texture2D<float4> plane_0, Texture2D<float4> plane_1, tint_ExternalTextureParams params, uint2 coords) {
- float2 v_5 = round(mul(float3(float2(min(coords, params.visibleSize)), 1.0f), params.loadTransform));
- uint2 v_6 = tint_v2f32_to_v2u32(v_5);
- float3 v_7 = (0.0f).xxx;
- float v_8 = 0.0f;
+ float2 v_4 = round(mul(float3(float2(min(coords, params.visibleSize)), 1.0f), params.loadTransform));
+ uint2 v_5 = tint_v2f32_to_v2u32(v_4);
+ float3 v_6 = (0.0f).xxx;
+ float v_7 = 0.0f;
if ((params.numPlanes == 1u)) {
- int2 v_9 = int2(v_6);
- float4 v_10 = float4(plane_0.Load(int3(v_9, int(0u))));
- v_7 = v_10.xyz;
- v_8 = v_10.w;
+ int2 v_8 = int2(v_5);
+ float4 v_9 = float4(plane_0.Load(int3(v_8, int(0u))));
+ v_6 = v_9.xyz;
+ v_7 = v_9.w;
} else {
- int2 v_11 = int2(v_6);
- float v_12 = float4(plane_0.Load(int3(v_11, int(0u)))).x;
- int2 v_13 = int2(tint_v2f32_to_v2u32((v_5 * params.plane1CoordFactor)));
- v_7 = mul(params.yuvToRgbConversionMatrix, float4(v_12, float4(plane_1.Load(int3(v_13, int(0u)))).xy, 1.0f));
- v_8 = 1.0f;
+ int2 v_10 = int2(v_5);
+ float v_11 = float4(plane_0.Load(int3(v_10, int(0u)))).x;
+ int2 v_12 = int2(tint_v2f32_to_v2u32((v_4 * params.plane1CoordFactor)));
+ v_6 = mul(params.yuvToRgbConversionMatrix, float4(v_11, float4(plane_1.Load(int3(v_12, int(0u)))).xy, 1.0f));
+ v_7 = 1.0f;
}
- float3 v_14 = v_7;
- float3 v_15 = (0.0f).xxx;
+ float3 v_13 = v_6;
+ float3 v_14 = (0.0f).xxx;
if ((params.doYuvToRgbConversionOnly == 0u)) {
- tint_GammaTransferParams v_16 = params.gammaDecodeParams;
- tint_GammaTransferParams v_17 = params.gammaEncodeParams;
- v_15 = tint_GammaCorrection(mul(tint_GammaCorrection(v_14, v_16), params.gamutConversionMatrix), v_17);
+ tint_GammaTransferParams v_15 = params.gammaDecodeParams;
+ tint_GammaTransferParams v_16 = params.gammaEncodeParams;
+ v_14 = tint_GammaCorrection(mul(tint_GammaCorrection(v_13, v_15), params.gamutConversionMatrix), v_16);
} else {
- v_15 = v_14;
+ v_14 = v_13;
}
- return float4(v_15, v_8);
+ return float4(v_14, v_7);
}
-float3x2 v_18(uint start_byte_offset) {
- uint4 v_19 = arg_0_params[(start_byte_offset / 16u)];
- float2 v_20 = asfloat((((((start_byte_offset % 16u) / 4u) == 2u)) ? (v_19.zw) : (v_19.xy)));
- uint4 v_21 = arg_0_params[((8u + start_byte_offset) / 16u)];
- float2 v_22 = asfloat(((((((8u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_21.zw) : (v_21.xy)));
- uint4 v_23 = arg_0_params[((16u + start_byte_offset) / 16u)];
- return float3x2(v_20, v_22, asfloat(((((((16u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_23.zw) : (v_23.xy))));
+float3x2 v_17(uint start_byte_offset) {
+ uint4 v_18 = arg_0_params[(start_byte_offset / 16u)];
+ float2 v_19 = asfloat((((((start_byte_offset % 16u) / 4u) == 2u)) ? (v_18.zw) : (v_18.xy)));
+ uint4 v_20 = arg_0_params[((8u + start_byte_offset) / 16u)];
+ float2 v_21 = asfloat(((((((8u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_20.zw) : (v_20.xy)));
+ uint4 v_22 = arg_0_params[((16u + start_byte_offset) / 16u)];
+ return float3x2(v_19, v_21, asfloat(((((((16u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_22.zw) : (v_22.xy))));
}
-float3x3 v_24(uint start_byte_offset) {
- float3 v_25 = asfloat(arg_0_params[(start_byte_offset / 16u)].xyz);
- float3 v_26 = asfloat(arg_0_params[((16u + start_byte_offset) / 16u)].xyz);
- return float3x3(v_25, v_26, asfloat(arg_0_params[((32u + start_byte_offset) / 16u)].xyz));
+float3x3 v_23(uint start_byte_offset) {
+ return float3x3(asfloat(arg_0_params[(start_byte_offset / 16u)].xyz), asfloat(arg_0_params[((16u + start_byte_offset) / 16u)].xyz), asfloat(arg_0_params[((32u + start_byte_offset) / 16u)].xyz));
}
-tint_GammaTransferParams v_27(uint start_byte_offset) {
- float v_28 = asfloat(arg_0_params[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]);
- float v_29 = asfloat(arg_0_params[((4u + start_byte_offset) / 16u)][(((4u + start_byte_offset) % 16u) / 4u)]);
- float v_30 = asfloat(arg_0_params[((8u + start_byte_offset) / 16u)][(((8u + start_byte_offset) % 16u) / 4u)]);
- float v_31 = asfloat(arg_0_params[((12u + start_byte_offset) / 16u)][(((12u + start_byte_offset) % 16u) / 4u)]);
- float v_32 = asfloat(arg_0_params[((16u + start_byte_offset) / 16u)][(((16u + start_byte_offset) % 16u) / 4u)]);
- float v_33 = asfloat(arg_0_params[((20u + start_byte_offset) / 16u)][(((20u + start_byte_offset) % 16u) / 4u)]);
- float v_34 = asfloat(arg_0_params[((24u + start_byte_offset) / 16u)][(((24u + start_byte_offset) % 16u) / 4u)]);
- tint_GammaTransferParams v_35 = {v_28, v_29, v_30, v_31, v_32, v_33, v_34, arg_0_params[((28u + start_byte_offset) / 16u)][(((28u + start_byte_offset) % 16u) / 4u)]};
- return v_35;
+tint_GammaTransferParams v_24(uint start_byte_offset) {
+ tint_GammaTransferParams v_25 = {asfloat(arg_0_params[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]), asfloat(arg_0_params[((4u + start_byte_offset) / 16u)][(((4u + start_byte_offset) % 16u) / 4u)]), asfloat(arg_0_params[((8u + start_byte_offset) / 16u)][(((8u + start_byte_offset) % 16u) / 4u)]), asfloat(arg_0_params[((12u + start_byte_offset) / 16u)][(((12u + start_byte_offset) % 16u) / 4u)]), asfloat(arg_0_params[((16u + start_byte_offset) / 16u)][(((16u + start_byte_offset) % 16u) / 4u)]), asfloat(arg_0_params[((20u + start_byte_offset) / 16u)][(((20u + start_byte_offset) % 16u) / 4u)]), asfloat(arg_0_params[((24u + start_byte_offset) / 16u)][(((24u + start_byte_offset) % 16u) / 4u)]), arg_0_params[((28u + start_byte_offset) / 16u)][(((28u + start_byte_offset) % 16u) / 4u)]};
+ return v_25;
}
-float3x4 v_36(uint start_byte_offset) {
- float4 v_37 = asfloat(arg_0_params[(start_byte_offset / 16u)]);
- float4 v_38 = asfloat(arg_0_params[((16u + start_byte_offset) / 16u)]);
- return float3x4(v_37, v_38, asfloat(arg_0_params[((32u + start_byte_offset) / 16u)]));
+float3x4 v_26(uint start_byte_offset) {
+ return float3x4(asfloat(arg_0_params[(start_byte_offset / 16u)]), asfloat(arg_0_params[((16u + start_byte_offset) / 16u)]), asfloat(arg_0_params[((32u + start_byte_offset) / 16u)]));
}
-tint_ExternalTextureParams v_39(uint start_byte_offset) {
- uint v_40 = arg_0_params[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)];
- uint v_41 = arg_0_params[((4u + start_byte_offset) / 16u)][(((4u + start_byte_offset) % 16u) / 4u)];
- float3x4 v_42 = v_36((16u + start_byte_offset));
- tint_GammaTransferParams v_43 = v_27((64u + start_byte_offset));
- tint_GammaTransferParams v_44 = v_27((96u + start_byte_offset));
- float3x3 v_45 = v_24((128u + start_byte_offset));
- float3x2 v_46 = v_18((176u + start_byte_offset));
- float3x2 v_47 = v_18((200u + start_byte_offset));
- uint4 v_48 = arg_0_params[((224u + start_byte_offset) / 16u)];
- float2 v_49 = asfloat(((((((224u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_48.zw) : (v_48.xy)));
- uint4 v_50 = arg_0_params[((232u + start_byte_offset) / 16u)];
- float2 v_51 = asfloat(((((((232u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_50.zw) : (v_50.xy)));
- uint4 v_52 = arg_0_params[((240u + start_byte_offset) / 16u)];
- float2 v_53 = asfloat(((((((240u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_52.zw) : (v_52.xy)));
- uint4 v_54 = arg_0_params[((248u + start_byte_offset) / 16u)];
- float2 v_55 = asfloat(((((((248u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_54.zw) : (v_54.xy)));
- uint4 v_56 = arg_0_params[((256u + start_byte_offset) / 16u)];
- uint2 v_57 = ((((((256u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_56.zw) : (v_56.xy));
- uint4 v_58 = arg_0_params[((264u + start_byte_offset) / 16u)];
- tint_ExternalTextureParams v_59 = {v_40, v_41, v_42, v_43, v_44, v_45, v_46, v_47, v_49, v_51, v_53, v_55, v_57, asfloat(((((((264u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_58.zw) : (v_58.xy)))};
- return v_59;
+tint_ExternalTextureParams v_27(uint start_byte_offset) {
+ uint v_28 = arg_0_params[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)];
+ uint v_29 = arg_0_params[((4u + start_byte_offset) / 16u)][(((4u + start_byte_offset) % 16u) / 4u)];
+ float3x4 v_30 = v_26((16u + start_byte_offset));
+ tint_GammaTransferParams v_31 = v_24((64u + start_byte_offset));
+ tint_GammaTransferParams v_32 = v_24((96u + start_byte_offset));
+ float3x3 v_33 = v_23((128u + start_byte_offset));
+ float3x2 v_34 = v_17((176u + start_byte_offset));
+ float3x2 v_35 = v_17((200u + start_byte_offset));
+ uint4 v_36 = arg_0_params[((224u + start_byte_offset) / 16u)];
+ float2 v_37 = asfloat(((((((224u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_36.zw) : (v_36.xy)));
+ uint4 v_38 = arg_0_params[((232u + start_byte_offset) / 16u)];
+ float2 v_39 = asfloat(((((((232u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_38.zw) : (v_38.xy)));
+ uint4 v_40 = arg_0_params[((240u + start_byte_offset) / 16u)];
+ float2 v_41 = asfloat(((((((240u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_40.zw) : (v_40.xy)));
+ uint4 v_42 = arg_0_params[((248u + start_byte_offset) / 16u)];
+ float2 v_43 = asfloat(((((((248u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_42.zw) : (v_42.xy)));
+ uint4 v_44 = arg_0_params[((256u + start_byte_offset) / 16u)];
+ uint2 v_45 = ((((((256u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_44.zw) : (v_44.xy));
+ uint4 v_46 = arg_0_params[((264u + start_byte_offset) / 16u)];
+ tint_ExternalTextureParams v_47 = {v_28, v_29, v_30, v_31, v_32, v_33, v_34, v_35, v_37, v_39, v_41, v_43, v_45, asfloat(((((((264u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_46.zw) : (v_46.xy)))};
+ return v_47;
}
float4 textureLoad_8acf41() {
int2 arg_1 = (int(1)).xx;
- tint_ExternalTextureParams v_60 = v_39(0u);
- float4 res = tint_TextureLoadExternal(arg_0_plane0, arg_0_plane1, v_60, uint2(arg_1));
+ tint_ExternalTextureParams v_48 = v_27(0u);
+ float4 res = tint_TextureLoadExternal(arg_0_plane0, arg_0_plane1, v_48, uint2(arg_1));
return res;
}
@@ -161,13 +149,13 @@
VertexOutput tint_symbol = (VertexOutput)0;
tint_symbol.pos = (0.0f).xxxx;
tint_symbol.prevent_dce = textureLoad_8acf41();
- VertexOutput v_61 = tint_symbol;
- return v_61;
+ VertexOutput v_49 = tint_symbol;
+ return v_49;
}
vertex_main_outputs vertex_main() {
- VertexOutput v_62 = vertex_main_inner();
- vertex_main_outputs v_63 = {v_62.prevent_dce, v_62.pos};
- return v_63;
+ VertexOutput v_50 = vertex_main_inner();
+ vertex_main_outputs v_51 = {v_50.prevent_dce, v_50.pos};
+ return v_51;
}
diff --git a/test/tint/builtins/gen/var/textureLoad/8acf41.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/8acf41.wgsl.expected.ir.msl
index 29fbdef..857119c 100644
--- a/test/tint/builtins/gen/var/textureLoad/8acf41.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/8acf41.wgsl.expected.ir.msl
@@ -83,53 +83,50 @@
float3 tint_GammaCorrection(float3 v, tint_GammaTransferParams params) {
float3 const v_1 = float3(params.G);
- float3 const v_2 = float3(params.D);
- float3 const v_3 = abs(v);
- float3 const v_4 = sign(v);
- return select((v_4 * (powr(((params.A * v_3) + params.B), v_1) + params.E)), (v_4 * ((params.C * v_3) + params.F)), (v_3 < v_2));
+ return select((sign(v) * (powr(((params.A * abs(v)) + params.B), v_1) + params.E)), (sign(v) * ((params.C * abs(v)) + params.F)), (abs(v) < float3(params.D)));
}
float4 tint_TextureLoadExternal(texture2d<float, access::sample> plane_0, texture2d<float, access::sample> plane_1, tint_ExternalTextureParams params, uint2 coords) {
- float2 const v_5 = rint((params.loadTransform * float3(float2(min(coords, params.visibleSize)), 1.0f)));
- uint2 const v_6 = uint2(v_5);
- float3 v_7 = 0.0f;
- float v_8 = 0.0f;
+ float2 const v_2 = rint((params.loadTransform * float3(float2(min(coords, params.visibleSize)), 1.0f)));
+ uint2 const v_3 = uint2(v_2);
+ float3 v_4 = 0.0f;
+ float v_5 = 0.0f;
if ((params.numPlanes == 1u)) {
- float4 const v_9 = plane_0.read(v_6, 0u);
- v_7 = v_9.xyz;
- v_8 = v_9[3u];
+ float4 const v_6 = plane_0.read(v_3, 0u);
+ v_4 = v_6.xyz;
+ v_5 = v_6[3u];
} else {
- float const v_10 = plane_0.read(v_6, 0u)[0u];
- v_7 = (float4(v_10, plane_1.read(uint2((v_5 * params.plane1CoordFactor)), 0u).xy, 1.0f) * params.yuvToRgbConversionMatrix);
- v_8 = 1.0f;
+ float const v_7 = plane_0.read(v_3, 0u)[0u];
+ v_4 = (float4(v_7, plane_1.read(uint2((v_2 * params.plane1CoordFactor)), 0u).xy, 1.0f) * params.yuvToRgbConversionMatrix);
+ v_5 = 1.0f;
}
- float3 const v_11 = v_7;
- float3 v_12 = 0.0f;
+ float3 const v_8 = v_4;
+ float3 v_9 = 0.0f;
if ((params.doYuvToRgbConversionOnly == 0u)) {
- v_12 = tint_GammaCorrection((params.gamutConversionMatrix * tint_GammaCorrection(v_11, params.gammaDecodeParams)), params.gammaEncodeParams);
+ v_9 = tint_GammaCorrection((params.gamutConversionMatrix * tint_GammaCorrection(v_8, params.gammaDecodeParams)), params.gammaEncodeParams);
} else {
- v_12 = v_11;
+ v_9 = v_8;
}
- return float4(v_12, v_8);
+ return float4(v_9, v_5);
}
tint_ExternalTextureParams tint_load_struct_packed_vec3(const constant tint_ExternalTextureParams_packed_vec3* const from) {
- uint const v_13 = (*from).numPlanes;
- uint const v_14 = (*from).doYuvToRgbConversionOnly;
- float3x4 const v_15 = (*from).yuvToRgbConversionMatrix;
- tint_GammaTransferParams const v_16 = (*from).gammaDecodeParams;
- tint_GammaTransferParams const v_17 = (*from).gammaEncodeParams;
- tint_array<tint_packed_vec3_f32_array_element, 3> const v_18 = (*from).gamutConversionMatrix;
- float3 const v_19 = float3(v_18[0u].packed);
- float3 const v_20 = float3(v_18[1u].packed);
- float3x3 const v_21 = float3x3(v_19, v_20, float3(v_18[2u].packed));
- return tint_ExternalTextureParams{.numPlanes=v_13, .doYuvToRgbConversionOnly=v_14, .yuvToRgbConversionMatrix=v_15, .gammaDecodeParams=v_16, .gammaEncodeParams=v_17, .gamutConversionMatrix=v_21, .sampleTransform=(*from).sampleTransform, .loadTransform=(*from).loadTransform, .samplePlane0RectMin=(*from).samplePlane0RectMin, .samplePlane0RectMax=(*from).samplePlane0RectMax, .samplePlane1RectMin=(*from).samplePlane1RectMin, .samplePlane1RectMax=(*from).samplePlane1RectMax, .visibleSize=(*from).visibleSize, .plane1CoordFactor=(*from).plane1CoordFactor};
+ uint const v_10 = (*from).numPlanes;
+ uint const v_11 = (*from).doYuvToRgbConversionOnly;
+ float3x4 const v_12 = (*from).yuvToRgbConversionMatrix;
+ tint_GammaTransferParams const v_13 = (*from).gammaDecodeParams;
+ tint_GammaTransferParams const v_14 = (*from).gammaEncodeParams;
+ tint_array<tint_packed_vec3_f32_array_element, 3> const v_15 = (*from).gamutConversionMatrix;
+ float3 const v_16 = float3(v_15[0u].packed);
+ float3 const v_17 = float3(v_15[1u].packed);
+ float3x3 const v_18 = float3x3(v_16, v_17, float3(v_15[2u].packed));
+ return tint_ExternalTextureParams{.numPlanes=v_10, .doYuvToRgbConversionOnly=v_11, .yuvToRgbConversionMatrix=v_12, .gammaDecodeParams=v_13, .gammaEncodeParams=v_14, .gamutConversionMatrix=v_18, .sampleTransform=(*from).sampleTransform, .loadTransform=(*from).loadTransform, .samplePlane0RectMin=(*from).samplePlane0RectMin, .samplePlane0RectMax=(*from).samplePlane0RectMax, .samplePlane1RectMin=(*from).samplePlane1RectMin, .samplePlane1RectMax=(*from).samplePlane1RectMax, .visibleSize=(*from).visibleSize, .plane1CoordFactor=(*from).plane1CoordFactor};
}
float4 textureLoad_8acf41(tint_module_vars_struct tint_module_vars) {
int2 arg_1 = int2(1);
- tint_ExternalTextureParams const v_22 = tint_load_struct_packed_vec3(tint_module_vars.arg_0_params);
- float4 res = tint_TextureLoadExternal(tint_module_vars.arg_0_plane0, tint_module_vars.arg_0_plane1, v_22, uint2(arg_1));
+ tint_ExternalTextureParams const v_19 = tint_load_struct_packed_vec3(tint_module_vars.arg_0_params);
+ float4 res = tint_TextureLoadExternal(tint_module_vars.arg_0_plane0, tint_module_vars.arg_0_plane1, v_19, uint2(arg_1));
return res;
}
@@ -152,9 +149,9 @@
vertex vertex_main_outputs vertex_main(texture2d<float, access::sample> arg_0_plane0 [[texture(0)]], texture2d<float, access::sample> arg_0_plane1 [[texture(1)]], const constant tint_ExternalTextureParams_packed_vec3* arg_0_params [[buffer(2)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0_plane0=arg_0_plane0, .arg_0_plane1=arg_0_plane1, .arg_0_params=arg_0_params};
- VertexOutput const v_23 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v_20 = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_23.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_23.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v_20.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v_20.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureSample/17e988.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureSample/17e988.wgsl.expected.ir.msl
index 57fb724..4d8db52 100644
--- a/test/tint/builtins/gen/var/textureSample/17e988.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureSample/17e988.wgsl.expected.ir.msl
@@ -10,8 +10,7 @@
float4 textureSample_17e988(tint_module_vars_struct tint_module_vars) {
float2 arg_2 = float2(1.0f);
int arg_3 = 1;
- float2 const v = arg_2;
- float4 res = tint_module_vars.arg_0.sample(tint_module_vars.arg_1, v, max(arg_3, 0), int2(1));
+ float4 res = tint_module_vars.arg_0.sample(tint_module_vars.arg_1, arg_2, max(arg_3, 0), int2(1));
return res;
}
diff --git a/test/tint/builtins/gen/var/textureSample/4dd1bf.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureSample/4dd1bf.wgsl.expected.ir.msl
index 3a6ed74..fb4e070 100644
--- a/test/tint/builtins/gen/var/textureSample/4dd1bf.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureSample/4dd1bf.wgsl.expected.ir.msl
@@ -10,8 +10,7 @@
float4 textureSample_4dd1bf(tint_module_vars_struct tint_module_vars) {
float3 arg_2 = float3(1.0f);
int arg_3 = 1;
- float3 const v = arg_2;
- float4 res = tint_module_vars.arg_0.sample(tint_module_vars.arg_1, v, max(arg_3, 0));
+ float4 res = tint_module_vars.arg_0.sample(tint_module_vars.arg_1, arg_2, max(arg_3, 0));
return res;
}
diff --git a/test/tint/builtins/gen/var/textureSample/60bf45.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureSample/60bf45.wgsl.expected.ir.msl
index 0051c40..48ce5af 100644
--- a/test/tint/builtins/gen/var/textureSample/60bf45.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureSample/60bf45.wgsl.expected.ir.msl
@@ -10,8 +10,7 @@
float textureSample_60bf45(tint_module_vars_struct tint_module_vars) {
float2 arg_2 = float2(1.0f);
int arg_3 = 1;
- float2 const v = arg_2;
- float res = tint_module_vars.arg_0.sample(tint_module_vars.arg_1, v, max(arg_3, 0), int2(1));
+ float res = tint_module_vars.arg_0.sample(tint_module_vars.arg_1, arg_2, max(arg_3, 0), int2(1));
return res;
}
diff --git a/test/tint/builtins/gen/var/textureSample/6717ca.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureSample/6717ca.wgsl.expected.ir.msl
index 0bc76f2..c72d519 100644
--- a/test/tint/builtins/gen/var/textureSample/6717ca.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureSample/6717ca.wgsl.expected.ir.msl
@@ -10,8 +10,7 @@
float4 textureSample_6717ca(tint_module_vars_struct tint_module_vars) {
float2 arg_2 = float2(1.0f);
int arg_3 = 1;
- float2 const v = arg_2;
- float4 res = tint_module_vars.arg_0.sample(tint_module_vars.arg_1, v, max(arg_3, 0));
+ float4 res = tint_module_vars.arg_0.sample(tint_module_vars.arg_1, arg_2, max(arg_3, 0));
return res;
}
diff --git a/test/tint/builtins/gen/var/textureSample/7e9ffd.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureSample/7e9ffd.wgsl.expected.ir.msl
index 20171b1..6103894 100644
--- a/test/tint/builtins/gen/var/textureSample/7e9ffd.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureSample/7e9ffd.wgsl.expected.ir.msl
@@ -10,8 +10,7 @@
float textureSample_7e9ffd(tint_module_vars_struct tint_module_vars) {
float2 arg_2 = float2(1.0f);
int arg_3 = 1;
- float2 const v = arg_2;
- float res = tint_module_vars.arg_0.sample(tint_module_vars.arg_1, v, max(arg_3, 0));
+ float res = tint_module_vars.arg_0.sample(tint_module_vars.arg_1, arg_2, max(arg_3, 0));
return res;
}
diff --git a/test/tint/builtins/gen/var/textureSample/c2f4e8.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureSample/c2f4e8.wgsl.expected.ir.msl
index a62f881..4e8bd43 100644
--- a/test/tint/builtins/gen/var/textureSample/c2f4e8.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureSample/c2f4e8.wgsl.expected.ir.msl
@@ -10,8 +10,7 @@
float textureSample_c2f4e8(tint_module_vars_struct tint_module_vars) {
float3 arg_2 = float3(1.0f);
int arg_3 = 1;
- float3 const v = arg_2;
- float res = tint_module_vars.arg_0.sample(tint_module_vars.arg_1, v, max(arg_3, 0));
+ float res = tint_module_vars.arg_0.sample(tint_module_vars.arg_1, arg_2, max(arg_3, 0));
return res;
}
diff --git a/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.glsl
index 82e7937..e4271b3 100644
--- a/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.glsl
@@ -71,45 +71,39 @@
uniform highp sampler2D arg_0_plane1_arg_1;
vec3 tint_GammaCorrection(vec3 v, tint_GammaTransferParams params) {
vec3 v_3 = vec3(params.G);
- vec3 v_4 = vec3(params.D);
- vec3 v_5 = abs(v);
- vec3 v_6 = sign(v);
- bvec3 v_7 = lessThan(v_5, v_4);
- return mix((v_6 * (pow(((params.A * v_5) + params.B), v_3) + params.E)), (v_6 * ((params.C * v_5) + params.F)), v_7);
+ return mix((sign(v) * (pow(((params.A * abs(v)) + params.B), v_3) + params.E)), (sign(v) * ((params.C * abs(v)) + params.F)), lessThan(abs(v), vec3(params.D)));
}
vec4 tint_TextureSampleExternal(tint_ExternalTextureParams params, vec2 coords) {
- vec2 v_8 = (params.sampleTransform * vec3(coords, 1.0f));
- vec2 v_9 = clamp(v_8, params.samplePlane0RectMin, params.samplePlane0RectMax);
- vec3 v_10 = vec3(0.0f);
- float v_11 = 0.0f;
+ vec2 v_4 = (params.sampleTransform * vec3(coords, 1.0f));
+ vec3 v_5 = vec3(0.0f);
+ float v_6 = 0.0f;
if ((params.numPlanes == 1u)) {
- vec4 v_12 = textureLod(arg_0_plane0_arg_1, v_9, float(0.0f));
- v_10 = v_12.xyz;
- v_11 = v_12[3u];
+ vec4 v_7 = textureLod(arg_0_plane0_arg_1, clamp(v_4, params.samplePlane0RectMin, params.samplePlane0RectMax), float(0.0f));
+ v_5 = v_7.xyz;
+ v_6 = v_7[3u];
} else {
- float v_13 = textureLod(arg_0_plane0_arg_1, v_9, float(0.0f))[0u];
- vec2 v_14 = clamp(v_8, params.samplePlane1RectMin, params.samplePlane1RectMax);
- v_10 = (vec4(v_13, textureLod(arg_0_plane1_arg_1, v_14, float(0.0f)).xy, 1.0f) * params.yuvToRgbConversionMatrix);
- v_11 = 1.0f;
+ float v_8 = textureLod(arg_0_plane0_arg_1, clamp(v_4, params.samplePlane0RectMin, params.samplePlane0RectMax), float(0.0f))[0u];
+ v_5 = (vec4(v_8, textureLod(arg_0_plane1_arg_1, clamp(v_4, params.samplePlane1RectMin, params.samplePlane1RectMax), float(0.0f)).xy, 1.0f) * params.yuvToRgbConversionMatrix);
+ v_6 = 1.0f;
}
- vec3 v_15 = v_10;
- vec3 v_16 = vec3(0.0f);
+ vec3 v_9 = v_5;
+ vec3 v_10 = vec3(0.0f);
if ((params.doYuvToRgbConversionOnly == 0u)) {
- v_16 = tint_GammaCorrection((params.gamutConversionMatrix * tint_GammaCorrection(v_15, params.gammaDecodeParams)), params.gammaEncodeParams);
+ v_10 = tint_GammaCorrection((params.gamutConversionMatrix * tint_GammaCorrection(v_9, params.gammaDecodeParams)), params.gammaEncodeParams);
} else {
- v_16 = v_15;
+ v_10 = v_9;
}
- return vec4(v_16, v_11);
+ return vec4(v_10, v_6);
}
tint_ExternalTextureParams tint_convert_tint_ExternalTextureParams(tint_ExternalTextureParams_std140 tint_input) {
- mat3 v_17 = mat3(tint_input.gamutConversionMatrix_col0, tint_input.gamutConversionMatrix_col1, tint_input.gamutConversionMatrix_col2);
- mat3x2 v_18 = mat3x2(tint_input.sampleTransform_col0, tint_input.sampleTransform_col1, tint_input.sampleTransform_col2);
- return tint_ExternalTextureParams(tint_input.numPlanes, tint_input.doYuvToRgbConversionOnly, tint_input.yuvToRgbConversionMatrix, tint_input.gammaDecodeParams, tint_input.gammaEncodeParams, v_17, v_18, mat3x2(tint_input.loadTransform_col0, tint_input.loadTransform_col1, tint_input.loadTransform_col2), tint_input.samplePlane0RectMin, tint_input.samplePlane0RectMax, tint_input.samplePlane1RectMin, tint_input.samplePlane1RectMax, tint_input.visibleSize, tint_input.plane1CoordFactor);
+ mat3 v_11 = mat3(tint_input.gamutConversionMatrix_col0, tint_input.gamutConversionMatrix_col1, tint_input.gamutConversionMatrix_col2);
+ mat3x2 v_12 = mat3x2(tint_input.sampleTransform_col0, tint_input.sampleTransform_col1, tint_input.sampleTransform_col2);
+ return tint_ExternalTextureParams(tint_input.numPlanes, tint_input.doYuvToRgbConversionOnly, tint_input.yuvToRgbConversionMatrix, tint_input.gammaDecodeParams, tint_input.gammaEncodeParams, v_11, v_12, mat3x2(tint_input.loadTransform_col0, tint_input.loadTransform_col1, tint_input.loadTransform_col2), tint_input.samplePlane0RectMin, tint_input.samplePlane0RectMax, tint_input.samplePlane1RectMin, tint_input.samplePlane1RectMax, tint_input.visibleSize, tint_input.plane1CoordFactor);
}
vec4 textureSampleBaseClampToEdge_7c04e6() {
vec2 arg_2 = vec2(1.0f);
- tint_ExternalTextureParams v_19 = tint_convert_tint_ExternalTextureParams(v_2.inner);
- vec4 res = tint_TextureSampleExternal(v_19, arg_2);
+ tint_ExternalTextureParams v_13 = tint_convert_tint_ExternalTextureParams(v_2.inner);
+ vec4 res = tint_TextureSampleExternal(v_13, arg_2);
return res;
}
void main() {
@@ -186,45 +180,39 @@
uniform highp sampler2D arg_0_plane1_arg_1;
vec3 tint_GammaCorrection(vec3 v, tint_GammaTransferParams params) {
vec3 v_3 = vec3(params.G);
- vec3 v_4 = vec3(params.D);
- vec3 v_5 = abs(v);
- vec3 v_6 = sign(v);
- bvec3 v_7 = lessThan(v_5, v_4);
- return mix((v_6 * (pow(((params.A * v_5) + params.B), v_3) + params.E)), (v_6 * ((params.C * v_5) + params.F)), v_7);
+ return mix((sign(v) * (pow(((params.A * abs(v)) + params.B), v_3) + params.E)), (sign(v) * ((params.C * abs(v)) + params.F)), lessThan(abs(v), vec3(params.D)));
}
vec4 tint_TextureSampleExternal(tint_ExternalTextureParams params, vec2 coords) {
- vec2 v_8 = (params.sampleTransform * vec3(coords, 1.0f));
- vec2 v_9 = clamp(v_8, params.samplePlane0RectMin, params.samplePlane0RectMax);
- vec3 v_10 = vec3(0.0f);
- float v_11 = 0.0f;
+ vec2 v_4 = (params.sampleTransform * vec3(coords, 1.0f));
+ vec3 v_5 = vec3(0.0f);
+ float v_6 = 0.0f;
if ((params.numPlanes == 1u)) {
- vec4 v_12 = textureLod(arg_0_plane0_arg_1, v_9, float(0.0f));
- v_10 = v_12.xyz;
- v_11 = v_12[3u];
+ vec4 v_7 = textureLod(arg_0_plane0_arg_1, clamp(v_4, params.samplePlane0RectMin, params.samplePlane0RectMax), float(0.0f));
+ v_5 = v_7.xyz;
+ v_6 = v_7[3u];
} else {
- float v_13 = textureLod(arg_0_plane0_arg_1, v_9, float(0.0f))[0u];
- vec2 v_14 = clamp(v_8, params.samplePlane1RectMin, params.samplePlane1RectMax);
- v_10 = (vec4(v_13, textureLod(arg_0_plane1_arg_1, v_14, float(0.0f)).xy, 1.0f) * params.yuvToRgbConversionMatrix);
- v_11 = 1.0f;
+ float v_8 = textureLod(arg_0_plane0_arg_1, clamp(v_4, params.samplePlane0RectMin, params.samplePlane0RectMax), float(0.0f))[0u];
+ v_5 = (vec4(v_8, textureLod(arg_0_plane1_arg_1, clamp(v_4, params.samplePlane1RectMin, params.samplePlane1RectMax), float(0.0f)).xy, 1.0f) * params.yuvToRgbConversionMatrix);
+ v_6 = 1.0f;
}
- vec3 v_15 = v_10;
- vec3 v_16 = vec3(0.0f);
+ vec3 v_9 = v_5;
+ vec3 v_10 = vec3(0.0f);
if ((params.doYuvToRgbConversionOnly == 0u)) {
- v_16 = tint_GammaCorrection((params.gamutConversionMatrix * tint_GammaCorrection(v_15, params.gammaDecodeParams)), params.gammaEncodeParams);
+ v_10 = tint_GammaCorrection((params.gamutConversionMatrix * tint_GammaCorrection(v_9, params.gammaDecodeParams)), params.gammaEncodeParams);
} else {
- v_16 = v_15;
+ v_10 = v_9;
}
- return vec4(v_16, v_11);
+ return vec4(v_10, v_6);
}
tint_ExternalTextureParams tint_convert_tint_ExternalTextureParams(tint_ExternalTextureParams_std140 tint_input) {
- mat3 v_17 = mat3(tint_input.gamutConversionMatrix_col0, tint_input.gamutConversionMatrix_col1, tint_input.gamutConversionMatrix_col2);
- mat3x2 v_18 = mat3x2(tint_input.sampleTransform_col0, tint_input.sampleTransform_col1, tint_input.sampleTransform_col2);
- return tint_ExternalTextureParams(tint_input.numPlanes, tint_input.doYuvToRgbConversionOnly, tint_input.yuvToRgbConversionMatrix, tint_input.gammaDecodeParams, tint_input.gammaEncodeParams, v_17, v_18, mat3x2(tint_input.loadTransform_col0, tint_input.loadTransform_col1, tint_input.loadTransform_col2), tint_input.samplePlane0RectMin, tint_input.samplePlane0RectMax, tint_input.samplePlane1RectMin, tint_input.samplePlane1RectMax, tint_input.visibleSize, tint_input.plane1CoordFactor);
+ mat3 v_11 = mat3(tint_input.gamutConversionMatrix_col0, tint_input.gamutConversionMatrix_col1, tint_input.gamutConversionMatrix_col2);
+ mat3x2 v_12 = mat3x2(tint_input.sampleTransform_col0, tint_input.sampleTransform_col1, tint_input.sampleTransform_col2);
+ return tint_ExternalTextureParams(tint_input.numPlanes, tint_input.doYuvToRgbConversionOnly, tint_input.yuvToRgbConversionMatrix, tint_input.gammaDecodeParams, tint_input.gammaEncodeParams, v_11, v_12, mat3x2(tint_input.loadTransform_col0, tint_input.loadTransform_col1, tint_input.loadTransform_col2), tint_input.samplePlane0RectMin, tint_input.samplePlane0RectMax, tint_input.samplePlane1RectMin, tint_input.samplePlane1RectMax, tint_input.visibleSize, tint_input.plane1CoordFactor);
}
vec4 textureSampleBaseClampToEdge_7c04e6() {
vec2 arg_2 = vec2(1.0f);
- tint_ExternalTextureParams v_19 = tint_convert_tint_ExternalTextureParams(v_2.inner);
- vec4 res = tint_TextureSampleExternal(v_19, arg_2);
+ tint_ExternalTextureParams v_13 = tint_convert_tint_ExternalTextureParams(v_2.inner);
+ vec4 res = tint_TextureSampleExternal(v_13, arg_2);
return res;
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
@@ -304,45 +292,39 @@
layout(location = 0) flat out vec4 vertex_main_loc0_Output;
vec3 tint_GammaCorrection(vec3 v, tint_GammaTransferParams params) {
vec3 v_2 = vec3(params.G);
- vec3 v_3 = vec3(params.D);
- vec3 v_4 = abs(v);
- vec3 v_5 = sign(v);
- bvec3 v_6 = lessThan(v_4, v_3);
- return mix((v_5 * (pow(((params.A * v_4) + params.B), v_2) + params.E)), (v_5 * ((params.C * v_4) + params.F)), v_6);
+ return mix((sign(v) * (pow(((params.A * abs(v)) + params.B), v_2) + params.E)), (sign(v) * ((params.C * abs(v)) + params.F)), lessThan(abs(v), vec3(params.D)));
}
vec4 tint_TextureSampleExternal(tint_ExternalTextureParams params, vec2 coords) {
- vec2 v_7 = (params.sampleTransform * vec3(coords, 1.0f));
- vec2 v_8 = clamp(v_7, params.samplePlane0RectMin, params.samplePlane0RectMax);
- vec3 v_9 = vec3(0.0f);
- float v_10 = 0.0f;
+ vec2 v_3 = (params.sampleTransform * vec3(coords, 1.0f));
+ vec3 v_4 = vec3(0.0f);
+ float v_5 = 0.0f;
if ((params.numPlanes == 1u)) {
- vec4 v_11 = textureLod(arg_0_plane0_arg_1, v_8, float(0.0f));
- v_9 = v_11.xyz;
- v_10 = v_11[3u];
+ vec4 v_6 = textureLod(arg_0_plane0_arg_1, clamp(v_3, params.samplePlane0RectMin, params.samplePlane0RectMax), float(0.0f));
+ v_4 = v_6.xyz;
+ v_5 = v_6[3u];
} else {
- float v_12 = textureLod(arg_0_plane0_arg_1, v_8, float(0.0f))[0u];
- vec2 v_13 = clamp(v_7, params.samplePlane1RectMin, params.samplePlane1RectMax);
- v_9 = (vec4(v_12, textureLod(arg_0_plane1_arg_1, v_13, float(0.0f)).xy, 1.0f) * params.yuvToRgbConversionMatrix);
- v_10 = 1.0f;
+ float v_7 = textureLod(arg_0_plane0_arg_1, clamp(v_3, params.samplePlane0RectMin, params.samplePlane0RectMax), float(0.0f))[0u];
+ v_4 = (vec4(v_7, textureLod(arg_0_plane1_arg_1, clamp(v_3, params.samplePlane1RectMin, params.samplePlane1RectMax), float(0.0f)).xy, 1.0f) * params.yuvToRgbConversionMatrix);
+ v_5 = 1.0f;
}
- vec3 v_14 = v_9;
- vec3 v_15 = vec3(0.0f);
+ vec3 v_8 = v_4;
+ vec3 v_9 = vec3(0.0f);
if ((params.doYuvToRgbConversionOnly == 0u)) {
- v_15 = tint_GammaCorrection((params.gamutConversionMatrix * tint_GammaCorrection(v_14, params.gammaDecodeParams)), params.gammaEncodeParams);
+ v_9 = tint_GammaCorrection((params.gamutConversionMatrix * tint_GammaCorrection(v_8, params.gammaDecodeParams)), params.gammaEncodeParams);
} else {
- v_15 = v_14;
+ v_9 = v_8;
}
- return vec4(v_15, v_10);
+ return vec4(v_9, v_5);
}
tint_ExternalTextureParams tint_convert_tint_ExternalTextureParams(tint_ExternalTextureParams_std140 tint_input) {
- mat3 v_16 = mat3(tint_input.gamutConversionMatrix_col0, tint_input.gamutConversionMatrix_col1, tint_input.gamutConversionMatrix_col2);
- mat3x2 v_17 = mat3x2(tint_input.sampleTransform_col0, tint_input.sampleTransform_col1, tint_input.sampleTransform_col2);
- return tint_ExternalTextureParams(tint_input.numPlanes, tint_input.doYuvToRgbConversionOnly, tint_input.yuvToRgbConversionMatrix, tint_input.gammaDecodeParams, tint_input.gammaEncodeParams, v_16, v_17, mat3x2(tint_input.loadTransform_col0, tint_input.loadTransform_col1, tint_input.loadTransform_col2), tint_input.samplePlane0RectMin, tint_input.samplePlane0RectMax, tint_input.samplePlane1RectMin, tint_input.samplePlane1RectMax, tint_input.visibleSize, tint_input.plane1CoordFactor);
+ mat3 v_10 = mat3(tint_input.gamutConversionMatrix_col0, tint_input.gamutConversionMatrix_col1, tint_input.gamutConversionMatrix_col2);
+ mat3x2 v_11 = mat3x2(tint_input.sampleTransform_col0, tint_input.sampleTransform_col1, tint_input.sampleTransform_col2);
+ return tint_ExternalTextureParams(tint_input.numPlanes, tint_input.doYuvToRgbConversionOnly, tint_input.yuvToRgbConversionMatrix, tint_input.gammaDecodeParams, tint_input.gammaEncodeParams, v_10, v_11, mat3x2(tint_input.loadTransform_col0, tint_input.loadTransform_col1, tint_input.loadTransform_col2), tint_input.samplePlane0RectMin, tint_input.samplePlane0RectMax, tint_input.samplePlane1RectMin, tint_input.samplePlane1RectMax, tint_input.visibleSize, tint_input.plane1CoordFactor);
}
vec4 textureSampleBaseClampToEdge_7c04e6() {
vec2 arg_2 = vec2(1.0f);
- tint_ExternalTextureParams v_18 = tint_convert_tint_ExternalTextureParams(v_1.inner);
- vec4 res = tint_TextureSampleExternal(v_18, arg_2);
+ tint_ExternalTextureParams v_12 = tint_convert_tint_ExternalTextureParams(v_1.inner);
+ vec4 res = tint_TextureSampleExternal(v_12, arg_2);
return res;
}
VertexOutput vertex_main_inner() {
@@ -352,10 +334,10 @@
return tint_symbol;
}
void main() {
- VertexOutput v_19 = vertex_main_inner();
- gl_Position = v_19.pos;
+ VertexOutput v_13 = vertex_main_inner();
+ gl_Position = v_13.pos;
gl_Position[1u] = -(gl_Position.y);
gl_Position[2u] = ((2.0f * gl_Position.z) - gl_Position.w);
- vertex_main_loc0_Output = v_19.prevent_dce;
+ vertex_main_loc0_Output = v_13.prevent_dce;
gl_PointSize = 1.0f;
}
diff --git a/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.ir.dxc.hlsl
index 2dccf00..2b01a3a 100644
--- a/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.ir.dxc.hlsl
@@ -47,99 +47,85 @@
float3 tint_GammaCorrection(float3 v, tint_GammaTransferParams params) {
float3 v_1 = float3((params.G).xxx);
float3 v_2 = float3((params.D).xxx);
- float3 v_3 = abs(v);
- float3 v_4 = float3(sign(v));
- return (((v_3 < v_2)) ? ((v_4 * ((params.C * v_3) + params.F))) : ((v_4 * (pow(((params.A * v_3) + params.B), v_1) + params.E))));
+ float3 v_3 = float3(sign(v));
+ return (((abs(v) < v_2)) ? ((v_3 * ((params.C * abs(v)) + params.F))) : ((v_3 * (pow(((params.A * abs(v)) + params.B), v_1) + params.E))));
}
float4 tint_TextureSampleExternal(Texture2D<float4> plane_0, Texture2D<float4> plane_1, tint_ExternalTextureParams params, SamplerState tint_sampler, float2 coords) {
- float2 v_5 = mul(float3(coords, 1.0f), params.sampleTransform);
- float2 v_6 = clamp(v_5, params.samplePlane0RectMin, params.samplePlane0RectMax);
- float3 v_7 = (0.0f).xxx;
- float v_8 = 0.0f;
+ float2 v_4 = mul(float3(coords, 1.0f), params.sampleTransform);
+ float3 v_5 = (0.0f).xxx;
+ float v_6 = 0.0f;
if ((params.numPlanes == 1u)) {
- float4 v_9 = plane_0.SampleLevel(tint_sampler, v_6, float(0.0f));
- v_7 = v_9.xyz;
- v_8 = v_9.w;
+ float4 v_7 = plane_0.SampleLevel(tint_sampler, clamp(v_4, params.samplePlane0RectMin, params.samplePlane0RectMax), float(0.0f));
+ v_5 = v_7.xyz;
+ v_6 = v_7.w;
} else {
- float v_10 = plane_0.SampleLevel(tint_sampler, v_6, float(0.0f)).x;
- float2 v_11 = clamp(v_5, params.samplePlane1RectMin, params.samplePlane1RectMax);
- v_7 = mul(params.yuvToRgbConversionMatrix, float4(v_10, plane_1.SampleLevel(tint_sampler, v_11, float(0.0f)).xy, 1.0f));
- v_8 = 1.0f;
+ float v_8 = plane_0.SampleLevel(tint_sampler, clamp(v_4, params.samplePlane0RectMin, params.samplePlane0RectMax), float(0.0f)).x;
+ v_5 = mul(params.yuvToRgbConversionMatrix, float4(v_8, plane_1.SampleLevel(tint_sampler, clamp(v_4, params.samplePlane1RectMin, params.samplePlane1RectMax), float(0.0f)).xy, 1.0f));
+ v_6 = 1.0f;
}
- float3 v_12 = v_7;
- float3 v_13 = (0.0f).xxx;
+ float3 v_9 = v_5;
+ float3 v_10 = (0.0f).xxx;
if ((params.doYuvToRgbConversionOnly == 0u)) {
- tint_GammaTransferParams v_14 = params.gammaDecodeParams;
- tint_GammaTransferParams v_15 = params.gammaEncodeParams;
- v_13 = tint_GammaCorrection(mul(tint_GammaCorrection(v_12, v_14), params.gamutConversionMatrix), v_15);
+ tint_GammaTransferParams v_11 = params.gammaDecodeParams;
+ tint_GammaTransferParams v_12 = params.gammaEncodeParams;
+ v_10 = tint_GammaCorrection(mul(tint_GammaCorrection(v_9, v_11), params.gamutConversionMatrix), v_12);
} else {
- v_13 = v_12;
+ v_10 = v_9;
}
- return float4(v_13, v_8);
+ return float4(v_10, v_6);
}
-float3x2 v_16(uint start_byte_offset) {
- uint4 v_17 = arg_0_params[(start_byte_offset / 16u)];
- float2 v_18 = asfloat((((((start_byte_offset % 16u) / 4u) == 2u)) ? (v_17.zw) : (v_17.xy)));
- uint4 v_19 = arg_0_params[((8u + start_byte_offset) / 16u)];
- float2 v_20 = asfloat(((((((8u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_19.zw) : (v_19.xy)));
- uint4 v_21 = arg_0_params[((16u + start_byte_offset) / 16u)];
- return float3x2(v_18, v_20, asfloat(((((((16u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_21.zw) : (v_21.xy))));
+float3x2 v_13(uint start_byte_offset) {
+ uint4 v_14 = arg_0_params[(start_byte_offset / 16u)];
+ float2 v_15 = asfloat((((((start_byte_offset % 16u) / 4u) == 2u)) ? (v_14.zw) : (v_14.xy)));
+ uint4 v_16 = arg_0_params[((8u + start_byte_offset) / 16u)];
+ float2 v_17 = asfloat(((((((8u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_16.zw) : (v_16.xy)));
+ uint4 v_18 = arg_0_params[((16u + start_byte_offset) / 16u)];
+ return float3x2(v_15, v_17, asfloat(((((((16u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_18.zw) : (v_18.xy))));
}
-float3x3 v_22(uint start_byte_offset) {
- float3 v_23 = asfloat(arg_0_params[(start_byte_offset / 16u)].xyz);
- float3 v_24 = asfloat(arg_0_params[((16u + start_byte_offset) / 16u)].xyz);
- return float3x3(v_23, v_24, asfloat(arg_0_params[((32u + start_byte_offset) / 16u)].xyz));
+float3x3 v_19(uint start_byte_offset) {
+ return float3x3(asfloat(arg_0_params[(start_byte_offset / 16u)].xyz), asfloat(arg_0_params[((16u + start_byte_offset) / 16u)].xyz), asfloat(arg_0_params[((32u + start_byte_offset) / 16u)].xyz));
}
-tint_GammaTransferParams v_25(uint start_byte_offset) {
- float v_26 = asfloat(arg_0_params[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]);
- float v_27 = asfloat(arg_0_params[((4u + start_byte_offset) / 16u)][(((4u + start_byte_offset) % 16u) / 4u)]);
- float v_28 = asfloat(arg_0_params[((8u + start_byte_offset) / 16u)][(((8u + start_byte_offset) % 16u) / 4u)]);
- float v_29 = asfloat(arg_0_params[((12u + start_byte_offset) / 16u)][(((12u + start_byte_offset) % 16u) / 4u)]);
- float v_30 = asfloat(arg_0_params[((16u + start_byte_offset) / 16u)][(((16u + start_byte_offset) % 16u) / 4u)]);
- float v_31 = asfloat(arg_0_params[((20u + start_byte_offset) / 16u)][(((20u + start_byte_offset) % 16u) / 4u)]);
- float v_32 = asfloat(arg_0_params[((24u + start_byte_offset) / 16u)][(((24u + start_byte_offset) % 16u) / 4u)]);
- tint_GammaTransferParams v_33 = {v_26, v_27, v_28, v_29, v_30, v_31, v_32, arg_0_params[((28u + start_byte_offset) / 16u)][(((28u + start_byte_offset) % 16u) / 4u)]};
- return v_33;
+tint_GammaTransferParams v_20(uint start_byte_offset) {
+ tint_GammaTransferParams v_21 = {asfloat(arg_0_params[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]), asfloat(arg_0_params[((4u + start_byte_offset) / 16u)][(((4u + start_byte_offset) % 16u) / 4u)]), asfloat(arg_0_params[((8u + start_byte_offset) / 16u)][(((8u + start_byte_offset) % 16u) / 4u)]), asfloat(arg_0_params[((12u + start_byte_offset) / 16u)][(((12u + start_byte_offset) % 16u) / 4u)]), asfloat(arg_0_params[((16u + start_byte_offset) / 16u)][(((16u + start_byte_offset) % 16u) / 4u)]), asfloat(arg_0_params[((20u + start_byte_offset) / 16u)][(((20u + start_byte_offset) % 16u) / 4u)]), asfloat(arg_0_params[((24u + start_byte_offset) / 16u)][(((24u + start_byte_offset) % 16u) / 4u)]), arg_0_params[((28u + start_byte_offset) / 16u)][(((28u + start_byte_offset) % 16u) / 4u)]};
+ return v_21;
}
-float3x4 v_34(uint start_byte_offset) {
- float4 v_35 = asfloat(arg_0_params[(start_byte_offset / 16u)]);
- float4 v_36 = asfloat(arg_0_params[((16u + start_byte_offset) / 16u)]);
- return float3x4(v_35, v_36, asfloat(arg_0_params[((32u + start_byte_offset) / 16u)]));
+float3x4 v_22(uint start_byte_offset) {
+ return float3x4(asfloat(arg_0_params[(start_byte_offset / 16u)]), asfloat(arg_0_params[((16u + start_byte_offset) / 16u)]), asfloat(arg_0_params[((32u + start_byte_offset) / 16u)]));
}
-tint_ExternalTextureParams v_37(uint start_byte_offset) {
- uint v_38 = arg_0_params[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)];
- uint v_39 = arg_0_params[((4u + start_byte_offset) / 16u)][(((4u + start_byte_offset) % 16u) / 4u)];
- float3x4 v_40 = v_34((16u + start_byte_offset));
- tint_GammaTransferParams v_41 = v_25((64u + start_byte_offset));
- tint_GammaTransferParams v_42 = v_25((96u + start_byte_offset));
- float3x3 v_43 = v_22((128u + start_byte_offset));
- float3x2 v_44 = v_16((176u + start_byte_offset));
- float3x2 v_45 = v_16((200u + start_byte_offset));
- uint4 v_46 = arg_0_params[((224u + start_byte_offset) / 16u)];
- float2 v_47 = asfloat(((((((224u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_46.zw) : (v_46.xy)));
- uint4 v_48 = arg_0_params[((232u + start_byte_offset) / 16u)];
- float2 v_49 = asfloat(((((((232u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_48.zw) : (v_48.xy)));
- uint4 v_50 = arg_0_params[((240u + start_byte_offset) / 16u)];
- float2 v_51 = asfloat(((((((240u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_50.zw) : (v_50.xy)));
- uint4 v_52 = arg_0_params[((248u + start_byte_offset) / 16u)];
- float2 v_53 = asfloat(((((((248u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_52.zw) : (v_52.xy)));
- uint4 v_54 = arg_0_params[((256u + start_byte_offset) / 16u)];
- uint2 v_55 = ((((((256u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_54.zw) : (v_54.xy));
- uint4 v_56 = arg_0_params[((264u + start_byte_offset) / 16u)];
- tint_ExternalTextureParams v_57 = {v_38, v_39, v_40, v_41, v_42, v_43, v_44, v_45, v_47, v_49, v_51, v_53, v_55, asfloat(((((((264u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_56.zw) : (v_56.xy)))};
- return v_57;
+tint_ExternalTextureParams v_23(uint start_byte_offset) {
+ uint v_24 = arg_0_params[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)];
+ uint v_25 = arg_0_params[((4u + start_byte_offset) / 16u)][(((4u + start_byte_offset) % 16u) / 4u)];
+ float3x4 v_26 = v_22((16u + start_byte_offset));
+ tint_GammaTransferParams v_27 = v_20((64u + start_byte_offset));
+ tint_GammaTransferParams v_28 = v_20((96u + start_byte_offset));
+ float3x3 v_29 = v_19((128u + start_byte_offset));
+ float3x2 v_30 = v_13((176u + start_byte_offset));
+ float3x2 v_31 = v_13((200u + start_byte_offset));
+ uint4 v_32 = arg_0_params[((224u + start_byte_offset) / 16u)];
+ float2 v_33 = asfloat(((((((224u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_32.zw) : (v_32.xy)));
+ uint4 v_34 = arg_0_params[((232u + start_byte_offset) / 16u)];
+ float2 v_35 = asfloat(((((((232u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_34.zw) : (v_34.xy)));
+ uint4 v_36 = arg_0_params[((240u + start_byte_offset) / 16u)];
+ float2 v_37 = asfloat(((((((240u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_36.zw) : (v_36.xy)));
+ uint4 v_38 = arg_0_params[((248u + start_byte_offset) / 16u)];
+ float2 v_39 = asfloat(((((((248u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_38.zw) : (v_38.xy)));
+ uint4 v_40 = arg_0_params[((256u + start_byte_offset) / 16u)];
+ uint2 v_41 = ((((((256u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_40.zw) : (v_40.xy));
+ uint4 v_42 = arg_0_params[((264u + start_byte_offset) / 16u)];
+ tint_ExternalTextureParams v_43 = {v_24, v_25, v_26, v_27, v_28, v_29, v_30, v_31, v_33, v_35, v_37, v_39, v_41, asfloat(((((((264u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_42.zw) : (v_42.xy)))};
+ return v_43;
}
float4 textureSampleBaseClampToEdge_7c04e6() {
float2 arg_2 = (1.0f).xx;
- tint_ExternalTextureParams v_58 = v_37(0u);
- float4 res = tint_TextureSampleExternal(arg_0_plane0, arg_0_plane1, v_58, arg_1, arg_2);
+ tint_ExternalTextureParams v_44 = v_23(0u);
+ float4 res = tint_TextureSampleExternal(arg_0_plane0, arg_0_plane1, v_44, arg_1, arg_2);
return res;
}
@@ -156,13 +142,13 @@
VertexOutput tint_symbol = (VertexOutput)0;
tint_symbol.pos = (0.0f).xxxx;
tint_symbol.prevent_dce = textureSampleBaseClampToEdge_7c04e6();
- VertexOutput v_59 = tint_symbol;
- return v_59;
+ VertexOutput v_45 = tint_symbol;
+ return v_45;
}
vertex_main_outputs vertex_main() {
- VertexOutput v_60 = vertex_main_inner();
- vertex_main_outputs v_61 = {v_60.prevent_dce, v_60.pos};
- return v_61;
+ VertexOutput v_46 = vertex_main_inner();
+ vertex_main_outputs v_47 = {v_46.prevent_dce, v_46.pos};
+ return v_47;
}
diff --git a/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.ir.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.ir.fxc.hlsl
index 2dccf00..2b01a3a 100644
--- a/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.ir.fxc.hlsl
@@ -47,99 +47,85 @@
float3 tint_GammaCorrection(float3 v, tint_GammaTransferParams params) {
float3 v_1 = float3((params.G).xxx);
float3 v_2 = float3((params.D).xxx);
- float3 v_3 = abs(v);
- float3 v_4 = float3(sign(v));
- return (((v_3 < v_2)) ? ((v_4 * ((params.C * v_3) + params.F))) : ((v_4 * (pow(((params.A * v_3) + params.B), v_1) + params.E))));
+ float3 v_3 = float3(sign(v));
+ return (((abs(v) < v_2)) ? ((v_3 * ((params.C * abs(v)) + params.F))) : ((v_3 * (pow(((params.A * abs(v)) + params.B), v_1) + params.E))));
}
float4 tint_TextureSampleExternal(Texture2D<float4> plane_0, Texture2D<float4> plane_1, tint_ExternalTextureParams params, SamplerState tint_sampler, float2 coords) {
- float2 v_5 = mul(float3(coords, 1.0f), params.sampleTransform);
- float2 v_6 = clamp(v_5, params.samplePlane0RectMin, params.samplePlane0RectMax);
- float3 v_7 = (0.0f).xxx;
- float v_8 = 0.0f;
+ float2 v_4 = mul(float3(coords, 1.0f), params.sampleTransform);
+ float3 v_5 = (0.0f).xxx;
+ float v_6 = 0.0f;
if ((params.numPlanes == 1u)) {
- float4 v_9 = plane_0.SampleLevel(tint_sampler, v_6, float(0.0f));
- v_7 = v_9.xyz;
- v_8 = v_9.w;
+ float4 v_7 = plane_0.SampleLevel(tint_sampler, clamp(v_4, params.samplePlane0RectMin, params.samplePlane0RectMax), float(0.0f));
+ v_5 = v_7.xyz;
+ v_6 = v_7.w;
} else {
- float v_10 = plane_0.SampleLevel(tint_sampler, v_6, float(0.0f)).x;
- float2 v_11 = clamp(v_5, params.samplePlane1RectMin, params.samplePlane1RectMax);
- v_7 = mul(params.yuvToRgbConversionMatrix, float4(v_10, plane_1.SampleLevel(tint_sampler, v_11, float(0.0f)).xy, 1.0f));
- v_8 = 1.0f;
+ float v_8 = plane_0.SampleLevel(tint_sampler, clamp(v_4, params.samplePlane0RectMin, params.samplePlane0RectMax), float(0.0f)).x;
+ v_5 = mul(params.yuvToRgbConversionMatrix, float4(v_8, plane_1.SampleLevel(tint_sampler, clamp(v_4, params.samplePlane1RectMin, params.samplePlane1RectMax), float(0.0f)).xy, 1.0f));
+ v_6 = 1.0f;
}
- float3 v_12 = v_7;
- float3 v_13 = (0.0f).xxx;
+ float3 v_9 = v_5;
+ float3 v_10 = (0.0f).xxx;
if ((params.doYuvToRgbConversionOnly == 0u)) {
- tint_GammaTransferParams v_14 = params.gammaDecodeParams;
- tint_GammaTransferParams v_15 = params.gammaEncodeParams;
- v_13 = tint_GammaCorrection(mul(tint_GammaCorrection(v_12, v_14), params.gamutConversionMatrix), v_15);
+ tint_GammaTransferParams v_11 = params.gammaDecodeParams;
+ tint_GammaTransferParams v_12 = params.gammaEncodeParams;
+ v_10 = tint_GammaCorrection(mul(tint_GammaCorrection(v_9, v_11), params.gamutConversionMatrix), v_12);
} else {
- v_13 = v_12;
+ v_10 = v_9;
}
- return float4(v_13, v_8);
+ return float4(v_10, v_6);
}
-float3x2 v_16(uint start_byte_offset) {
- uint4 v_17 = arg_0_params[(start_byte_offset / 16u)];
- float2 v_18 = asfloat((((((start_byte_offset % 16u) / 4u) == 2u)) ? (v_17.zw) : (v_17.xy)));
- uint4 v_19 = arg_0_params[((8u + start_byte_offset) / 16u)];
- float2 v_20 = asfloat(((((((8u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_19.zw) : (v_19.xy)));
- uint4 v_21 = arg_0_params[((16u + start_byte_offset) / 16u)];
- return float3x2(v_18, v_20, asfloat(((((((16u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_21.zw) : (v_21.xy))));
+float3x2 v_13(uint start_byte_offset) {
+ uint4 v_14 = arg_0_params[(start_byte_offset / 16u)];
+ float2 v_15 = asfloat((((((start_byte_offset % 16u) / 4u) == 2u)) ? (v_14.zw) : (v_14.xy)));
+ uint4 v_16 = arg_0_params[((8u + start_byte_offset) / 16u)];
+ float2 v_17 = asfloat(((((((8u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_16.zw) : (v_16.xy)));
+ uint4 v_18 = arg_0_params[((16u + start_byte_offset) / 16u)];
+ return float3x2(v_15, v_17, asfloat(((((((16u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_18.zw) : (v_18.xy))));
}
-float3x3 v_22(uint start_byte_offset) {
- float3 v_23 = asfloat(arg_0_params[(start_byte_offset / 16u)].xyz);
- float3 v_24 = asfloat(arg_0_params[((16u + start_byte_offset) / 16u)].xyz);
- return float3x3(v_23, v_24, asfloat(arg_0_params[((32u + start_byte_offset) / 16u)].xyz));
+float3x3 v_19(uint start_byte_offset) {
+ return float3x3(asfloat(arg_0_params[(start_byte_offset / 16u)].xyz), asfloat(arg_0_params[((16u + start_byte_offset) / 16u)].xyz), asfloat(arg_0_params[((32u + start_byte_offset) / 16u)].xyz));
}
-tint_GammaTransferParams v_25(uint start_byte_offset) {
- float v_26 = asfloat(arg_0_params[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]);
- float v_27 = asfloat(arg_0_params[((4u + start_byte_offset) / 16u)][(((4u + start_byte_offset) % 16u) / 4u)]);
- float v_28 = asfloat(arg_0_params[((8u + start_byte_offset) / 16u)][(((8u + start_byte_offset) % 16u) / 4u)]);
- float v_29 = asfloat(arg_0_params[((12u + start_byte_offset) / 16u)][(((12u + start_byte_offset) % 16u) / 4u)]);
- float v_30 = asfloat(arg_0_params[((16u + start_byte_offset) / 16u)][(((16u + start_byte_offset) % 16u) / 4u)]);
- float v_31 = asfloat(arg_0_params[((20u + start_byte_offset) / 16u)][(((20u + start_byte_offset) % 16u) / 4u)]);
- float v_32 = asfloat(arg_0_params[((24u + start_byte_offset) / 16u)][(((24u + start_byte_offset) % 16u) / 4u)]);
- tint_GammaTransferParams v_33 = {v_26, v_27, v_28, v_29, v_30, v_31, v_32, arg_0_params[((28u + start_byte_offset) / 16u)][(((28u + start_byte_offset) % 16u) / 4u)]};
- return v_33;
+tint_GammaTransferParams v_20(uint start_byte_offset) {
+ tint_GammaTransferParams v_21 = {asfloat(arg_0_params[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]), asfloat(arg_0_params[((4u + start_byte_offset) / 16u)][(((4u + start_byte_offset) % 16u) / 4u)]), asfloat(arg_0_params[((8u + start_byte_offset) / 16u)][(((8u + start_byte_offset) % 16u) / 4u)]), asfloat(arg_0_params[((12u + start_byte_offset) / 16u)][(((12u + start_byte_offset) % 16u) / 4u)]), asfloat(arg_0_params[((16u + start_byte_offset) / 16u)][(((16u + start_byte_offset) % 16u) / 4u)]), asfloat(arg_0_params[((20u + start_byte_offset) / 16u)][(((20u + start_byte_offset) % 16u) / 4u)]), asfloat(arg_0_params[((24u + start_byte_offset) / 16u)][(((24u + start_byte_offset) % 16u) / 4u)]), arg_0_params[((28u + start_byte_offset) / 16u)][(((28u + start_byte_offset) % 16u) / 4u)]};
+ return v_21;
}
-float3x4 v_34(uint start_byte_offset) {
- float4 v_35 = asfloat(arg_0_params[(start_byte_offset / 16u)]);
- float4 v_36 = asfloat(arg_0_params[((16u + start_byte_offset) / 16u)]);
- return float3x4(v_35, v_36, asfloat(arg_0_params[((32u + start_byte_offset) / 16u)]));
+float3x4 v_22(uint start_byte_offset) {
+ return float3x4(asfloat(arg_0_params[(start_byte_offset / 16u)]), asfloat(arg_0_params[((16u + start_byte_offset) / 16u)]), asfloat(arg_0_params[((32u + start_byte_offset) / 16u)]));
}
-tint_ExternalTextureParams v_37(uint start_byte_offset) {
- uint v_38 = arg_0_params[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)];
- uint v_39 = arg_0_params[((4u + start_byte_offset) / 16u)][(((4u + start_byte_offset) % 16u) / 4u)];
- float3x4 v_40 = v_34((16u + start_byte_offset));
- tint_GammaTransferParams v_41 = v_25((64u + start_byte_offset));
- tint_GammaTransferParams v_42 = v_25((96u + start_byte_offset));
- float3x3 v_43 = v_22((128u + start_byte_offset));
- float3x2 v_44 = v_16((176u + start_byte_offset));
- float3x2 v_45 = v_16((200u + start_byte_offset));
- uint4 v_46 = arg_0_params[((224u + start_byte_offset) / 16u)];
- float2 v_47 = asfloat(((((((224u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_46.zw) : (v_46.xy)));
- uint4 v_48 = arg_0_params[((232u + start_byte_offset) / 16u)];
- float2 v_49 = asfloat(((((((232u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_48.zw) : (v_48.xy)));
- uint4 v_50 = arg_0_params[((240u + start_byte_offset) / 16u)];
- float2 v_51 = asfloat(((((((240u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_50.zw) : (v_50.xy)));
- uint4 v_52 = arg_0_params[((248u + start_byte_offset) / 16u)];
- float2 v_53 = asfloat(((((((248u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_52.zw) : (v_52.xy)));
- uint4 v_54 = arg_0_params[((256u + start_byte_offset) / 16u)];
- uint2 v_55 = ((((((256u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_54.zw) : (v_54.xy));
- uint4 v_56 = arg_0_params[((264u + start_byte_offset) / 16u)];
- tint_ExternalTextureParams v_57 = {v_38, v_39, v_40, v_41, v_42, v_43, v_44, v_45, v_47, v_49, v_51, v_53, v_55, asfloat(((((((264u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_56.zw) : (v_56.xy)))};
- return v_57;
+tint_ExternalTextureParams v_23(uint start_byte_offset) {
+ uint v_24 = arg_0_params[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)];
+ uint v_25 = arg_0_params[((4u + start_byte_offset) / 16u)][(((4u + start_byte_offset) % 16u) / 4u)];
+ float3x4 v_26 = v_22((16u + start_byte_offset));
+ tint_GammaTransferParams v_27 = v_20((64u + start_byte_offset));
+ tint_GammaTransferParams v_28 = v_20((96u + start_byte_offset));
+ float3x3 v_29 = v_19((128u + start_byte_offset));
+ float3x2 v_30 = v_13((176u + start_byte_offset));
+ float3x2 v_31 = v_13((200u + start_byte_offset));
+ uint4 v_32 = arg_0_params[((224u + start_byte_offset) / 16u)];
+ float2 v_33 = asfloat(((((((224u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_32.zw) : (v_32.xy)));
+ uint4 v_34 = arg_0_params[((232u + start_byte_offset) / 16u)];
+ float2 v_35 = asfloat(((((((232u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_34.zw) : (v_34.xy)));
+ uint4 v_36 = arg_0_params[((240u + start_byte_offset) / 16u)];
+ float2 v_37 = asfloat(((((((240u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_36.zw) : (v_36.xy)));
+ uint4 v_38 = arg_0_params[((248u + start_byte_offset) / 16u)];
+ float2 v_39 = asfloat(((((((248u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_38.zw) : (v_38.xy)));
+ uint4 v_40 = arg_0_params[((256u + start_byte_offset) / 16u)];
+ uint2 v_41 = ((((((256u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_40.zw) : (v_40.xy));
+ uint4 v_42 = arg_0_params[((264u + start_byte_offset) / 16u)];
+ tint_ExternalTextureParams v_43 = {v_24, v_25, v_26, v_27, v_28, v_29, v_30, v_31, v_33, v_35, v_37, v_39, v_41, asfloat(((((((264u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_42.zw) : (v_42.xy)))};
+ return v_43;
}
float4 textureSampleBaseClampToEdge_7c04e6() {
float2 arg_2 = (1.0f).xx;
- tint_ExternalTextureParams v_58 = v_37(0u);
- float4 res = tint_TextureSampleExternal(arg_0_plane0, arg_0_plane1, v_58, arg_1, arg_2);
+ tint_ExternalTextureParams v_44 = v_23(0u);
+ float4 res = tint_TextureSampleExternal(arg_0_plane0, arg_0_plane1, v_44, arg_1, arg_2);
return res;
}
@@ -156,13 +142,13 @@
VertexOutput tint_symbol = (VertexOutput)0;
tint_symbol.pos = (0.0f).xxxx;
tint_symbol.prevent_dce = textureSampleBaseClampToEdge_7c04e6();
- VertexOutput v_59 = tint_symbol;
- return v_59;
+ VertexOutput v_45 = tint_symbol;
+ return v_45;
}
vertex_main_outputs vertex_main() {
- VertexOutput v_60 = vertex_main_inner();
- vertex_main_outputs v_61 = {v_60.prevent_dce, v_60.pos};
- return v_61;
+ VertexOutput v_46 = vertex_main_inner();
+ vertex_main_outputs v_47 = {v_46.prevent_dce, v_46.pos};
+ return v_47;
}
diff --git a/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.ir.msl
index f8fc00f..fffa3c4 100644
--- a/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.ir.msl
@@ -84,54 +84,49 @@
float3 tint_GammaCorrection(float3 v, tint_GammaTransferParams params) {
float3 const v_1 = float3(params.G);
- float3 const v_2 = float3(params.D);
- float3 const v_3 = abs(v);
- float3 const v_4 = sign(v);
- return select((v_4 * (powr(((params.A * v_3) + params.B), v_1) + params.E)), (v_4 * ((params.C * v_3) + params.F)), (v_3 < v_2));
+ return select((sign(v) * (powr(((params.A * abs(v)) + params.B), v_1) + params.E)), (sign(v) * ((params.C * abs(v)) + params.F)), (abs(v) < float3(params.D)));
}
float4 tint_TextureSampleExternal(texture2d<float, access::sample> plane_0, texture2d<float, access::sample> plane_1, tint_ExternalTextureParams params, sampler tint_sampler, float2 coords) {
- float2 const v_5 = (params.sampleTransform * float3(coords, 1.0f));
- float2 const v_6 = clamp(v_5, params.samplePlane0RectMin, params.samplePlane0RectMax);
- float3 v_7 = 0.0f;
- float v_8 = 0.0f;
+ float2 const v_2 = (params.sampleTransform * float3(coords, 1.0f));
+ float3 v_3 = 0.0f;
+ float v_4 = 0.0f;
if ((params.numPlanes == 1u)) {
- float4 const v_9 = plane_0.sample(tint_sampler, v_6, level(0.0f));
- v_7 = v_9.xyz;
- v_8 = v_9[3u];
+ float4 const v_5 = plane_0.sample(tint_sampler, clamp(v_2, params.samplePlane0RectMin, params.samplePlane0RectMax), level(0.0f));
+ v_3 = v_5.xyz;
+ v_4 = v_5[3u];
} else {
- float const v_10 = plane_0.sample(tint_sampler, v_6, level(0.0f))[0u];
- float2 const v_11 = clamp(v_5, params.samplePlane1RectMin, params.samplePlane1RectMax);
- v_7 = (float4(v_10, plane_1.sample(tint_sampler, v_11, level(0.0f)).xy, 1.0f) * params.yuvToRgbConversionMatrix);
- v_8 = 1.0f;
+ float const v_6 = plane_0.sample(tint_sampler, clamp(v_2, params.samplePlane0RectMin, params.samplePlane0RectMax), level(0.0f))[0u];
+ v_3 = (float4(v_6, plane_1.sample(tint_sampler, clamp(v_2, params.samplePlane1RectMin, params.samplePlane1RectMax), level(0.0f)).xy, 1.0f) * params.yuvToRgbConversionMatrix);
+ v_4 = 1.0f;
}
- float3 const v_12 = v_7;
- float3 v_13 = 0.0f;
+ float3 const v_7 = v_3;
+ float3 v_8 = 0.0f;
if ((params.doYuvToRgbConversionOnly == 0u)) {
- v_13 = tint_GammaCorrection((params.gamutConversionMatrix * tint_GammaCorrection(v_12, params.gammaDecodeParams)), params.gammaEncodeParams);
+ v_8 = tint_GammaCorrection((params.gamutConversionMatrix * tint_GammaCorrection(v_7, params.gammaDecodeParams)), params.gammaEncodeParams);
} else {
- v_13 = v_12;
+ v_8 = v_7;
}
- return float4(v_13, v_8);
+ return float4(v_8, v_4);
}
tint_ExternalTextureParams tint_load_struct_packed_vec3(const constant tint_ExternalTextureParams_packed_vec3* const from) {
- uint const v_14 = (*from).numPlanes;
- uint const v_15 = (*from).doYuvToRgbConversionOnly;
- float3x4 const v_16 = (*from).yuvToRgbConversionMatrix;
- tint_GammaTransferParams const v_17 = (*from).gammaDecodeParams;
- tint_GammaTransferParams const v_18 = (*from).gammaEncodeParams;
- tint_array<tint_packed_vec3_f32_array_element, 3> const v_19 = (*from).gamutConversionMatrix;
- float3 const v_20 = float3(v_19[0u].packed);
- float3 const v_21 = float3(v_19[1u].packed);
- float3x3 const v_22 = float3x3(v_20, v_21, float3(v_19[2u].packed));
- return tint_ExternalTextureParams{.numPlanes=v_14, .doYuvToRgbConversionOnly=v_15, .yuvToRgbConversionMatrix=v_16, .gammaDecodeParams=v_17, .gammaEncodeParams=v_18, .gamutConversionMatrix=v_22, .sampleTransform=(*from).sampleTransform, .loadTransform=(*from).loadTransform, .samplePlane0RectMin=(*from).samplePlane0RectMin, .samplePlane0RectMax=(*from).samplePlane0RectMax, .samplePlane1RectMin=(*from).samplePlane1RectMin, .samplePlane1RectMax=(*from).samplePlane1RectMax, .visibleSize=(*from).visibleSize, .plane1CoordFactor=(*from).plane1CoordFactor};
+ uint const v_9 = (*from).numPlanes;
+ uint const v_10 = (*from).doYuvToRgbConversionOnly;
+ float3x4 const v_11 = (*from).yuvToRgbConversionMatrix;
+ tint_GammaTransferParams const v_12 = (*from).gammaDecodeParams;
+ tint_GammaTransferParams const v_13 = (*from).gammaEncodeParams;
+ tint_array<tint_packed_vec3_f32_array_element, 3> const v_14 = (*from).gamutConversionMatrix;
+ float3 const v_15 = float3(v_14[0u].packed);
+ float3 const v_16 = float3(v_14[1u].packed);
+ float3x3 const v_17 = float3x3(v_15, v_16, float3(v_14[2u].packed));
+ return tint_ExternalTextureParams{.numPlanes=v_9, .doYuvToRgbConversionOnly=v_10, .yuvToRgbConversionMatrix=v_11, .gammaDecodeParams=v_12, .gammaEncodeParams=v_13, .gamutConversionMatrix=v_17, .sampleTransform=(*from).sampleTransform, .loadTransform=(*from).loadTransform, .samplePlane0RectMin=(*from).samplePlane0RectMin, .samplePlane0RectMax=(*from).samplePlane0RectMax, .samplePlane1RectMin=(*from).samplePlane1RectMin, .samplePlane1RectMax=(*from).samplePlane1RectMax, .visibleSize=(*from).visibleSize, .plane1CoordFactor=(*from).plane1CoordFactor};
}
float4 textureSampleBaseClampToEdge_7c04e6(tint_module_vars_struct tint_module_vars) {
float2 arg_2 = float2(1.0f);
- tint_ExternalTextureParams const v_23 = tint_load_struct_packed_vec3(tint_module_vars.arg_0_params);
- float4 res = tint_TextureSampleExternal(tint_module_vars.arg_0_plane0, tint_module_vars.arg_0_plane1, v_23, tint_module_vars.arg_1, arg_2);
+ tint_ExternalTextureParams const v_18 = tint_load_struct_packed_vec3(tint_module_vars.arg_0_params);
+ float4 res = tint_TextureSampleExternal(tint_module_vars.arg_0_plane0, tint_module_vars.arg_0_plane1, v_18, tint_module_vars.arg_1, arg_2);
return res;
}
@@ -154,9 +149,9 @@
vertex vertex_main_outputs vertex_main(texture2d<float, access::sample> arg_0_plane0 [[texture(0)]], texture2d<float, access::sample> arg_0_plane1 [[texture(1)]], const constant tint_ExternalTextureParams_packed_vec3* arg_0_params [[buffer(2)]], sampler arg_1 [[sampler(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0_plane0=arg_0_plane0, .arg_0_plane1=arg_0_plane1, .arg_0_params=arg_0_params, .arg_1=arg_1};
- VertexOutput const v_24 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v_19 = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_24.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_24.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v_19.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v_19.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/9ca02c.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/9ca02c.wgsl.expected.glsl
index 69cd7b6..19db76f 100644
--- a/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/9ca02c.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/9ca02c.wgsl.expected.glsl
@@ -11,8 +11,7 @@
vec2 arg_2 = vec2(1.0f);
vec2 v_1 = arg_2;
vec2 v_2 = (vec2(0.5f) / vec2(uvec2(textureSize(arg_0_arg_1, 0))));
- vec2 v_3 = clamp(v_1, v_2, (vec2(1.0f) - v_2));
- vec4 res = textureLod(arg_0_arg_1, v_3, float(0.0f));
+ vec4 res = textureLod(arg_0_arg_1, clamp(v_1, v_2, (vec2(1.0f) - v_2)), float(0.0f));
return res;
}
void main() {
@@ -29,8 +28,7 @@
vec2 arg_2 = vec2(1.0f);
vec2 v_1 = arg_2;
vec2 v_2 = (vec2(0.5f) / vec2(uvec2(textureSize(arg_0_arg_1, 0))));
- vec2 v_3 = clamp(v_1, v_2, (vec2(1.0f) - v_2));
- vec4 res = textureLod(arg_0_arg_1, v_3, float(0.0f));
+ vec4 res = textureLod(arg_0_arg_1, clamp(v_1, v_2, (vec2(1.0f) - v_2)), float(0.0f));
return res;
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
@@ -51,8 +49,7 @@
vec2 arg_2 = vec2(1.0f);
vec2 v = arg_2;
vec2 v_1 = (vec2(0.5f) / vec2(uvec2(textureSize(arg_0_arg_1, 0))));
- vec2 v_2 = clamp(v, v_1, (vec2(1.0f) - v_1));
- vec4 res = textureLod(arg_0_arg_1, v_2, float(0.0f));
+ vec4 res = textureLod(arg_0_arg_1, clamp(v, v_1, (vec2(1.0f) - v_1)), float(0.0f));
return res;
}
VertexOutput vertex_main_inner() {
@@ -62,10 +59,10 @@
return tint_symbol;
}
void main() {
- VertexOutput v_3 = vertex_main_inner();
- gl_Position = v_3.pos;
+ VertexOutput v_2 = vertex_main_inner();
+ gl_Position = v_2.pos;
gl_Position[1u] = -(gl_Position.y);
gl_Position[2u] = ((2.0f * gl_Position.z) - gl_Position.w);
- vertex_main_loc0_Output = v_3.prevent_dce;
+ vertex_main_loc0_Output = v_2.prevent_dce;
gl_PointSize = 1.0f;
}
diff --git a/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/9ca02c.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/9ca02c.wgsl.expected.ir.dxc.hlsl
index db5d092..ecbb4cb 100644
--- a/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/9ca02c.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/9ca02c.wgsl.expected.ir.dxc.hlsl
@@ -18,8 +18,7 @@
uint2 v_1 = (0u).xx;
arg_0.GetDimensions(v_1.x, v_1.y);
float2 v_2 = ((0.5f).xx / float2(v_1));
- float2 v_3 = clamp(v, v_2, ((1.0f).xx - v_2));
- float4 res = arg_0.SampleLevel(arg_1, v_3, float(0.0f));
+ float4 res = arg_0.SampleLevel(arg_1, clamp(v, v_2, ((1.0f).xx - v_2)), float(0.0f));
return res;
}
@@ -36,13 +35,13 @@
VertexOutput tint_symbol = (VertexOutput)0;
tint_symbol.pos = (0.0f).xxxx;
tint_symbol.prevent_dce = textureSampleBaseClampToEdge_9ca02c();
- VertexOutput v_4 = tint_symbol;
- return v_4;
+ VertexOutput v_3 = tint_symbol;
+ return v_3;
}
vertex_main_outputs vertex_main() {
- VertexOutput v_5 = vertex_main_inner();
- vertex_main_outputs v_6 = {v_5.prevent_dce, v_5.pos};
- return v_6;
+ VertexOutput v_4 = vertex_main_inner();
+ vertex_main_outputs v_5 = {v_4.prevent_dce, v_4.pos};
+ return v_5;
}
diff --git a/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/9ca02c.wgsl.expected.ir.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/9ca02c.wgsl.expected.ir.fxc.hlsl
index db5d092..ecbb4cb 100644
--- a/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/9ca02c.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/9ca02c.wgsl.expected.ir.fxc.hlsl
@@ -18,8 +18,7 @@
uint2 v_1 = (0u).xx;
arg_0.GetDimensions(v_1.x, v_1.y);
float2 v_2 = ((0.5f).xx / float2(v_1));
- float2 v_3 = clamp(v, v_2, ((1.0f).xx - v_2));
- float4 res = arg_0.SampleLevel(arg_1, v_3, float(0.0f));
+ float4 res = arg_0.SampleLevel(arg_1, clamp(v, v_2, ((1.0f).xx - v_2)), float(0.0f));
return res;
}
@@ -36,13 +35,13 @@
VertexOutput tint_symbol = (VertexOutput)0;
tint_symbol.pos = (0.0f).xxxx;
tint_symbol.prevent_dce = textureSampleBaseClampToEdge_9ca02c();
- VertexOutput v_4 = tint_symbol;
- return v_4;
+ VertexOutput v_3 = tint_symbol;
+ return v_3;
}
vertex_main_outputs vertex_main() {
- VertexOutput v_5 = vertex_main_inner();
- vertex_main_outputs v_6 = {v_5.prevent_dce, v_5.pos};
- return v_6;
+ VertexOutput v_4 = vertex_main_inner();
+ vertex_main_outputs v_5 = {v_4.prevent_dce, v_4.pos};
+ return v_5;
}
diff --git a/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/9ca02c.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/9ca02c.wgsl.expected.ir.msl
index 9cb3c66..7c0f286 100644
--- a/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/9ca02c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/9ca02c.wgsl.expected.ir.msl
@@ -20,10 +20,8 @@
float4 textureSampleBaseClampToEdge_9ca02c(tint_module_vars_struct tint_module_vars) {
float2 arg_2 = float2(1.0f);
float2 const v = arg_2;
- uint const v_1 = tint_module_vars.arg_0.get_width(0u);
- float2 const v_2 = (float2(0.5f) / float2(uint2(v_1, tint_module_vars.arg_0.get_height(0u))));
- float2 const v_3 = clamp(v, v_2, (float2(1.0f) - v_2));
- float4 res = tint_module_vars.arg_0.sample(tint_module_vars.arg_1, v_3, level(0.0f));
+ float2 const v_1 = (float2(0.5f) / float2(uint2(tint_module_vars.arg_0.get_width(0u), tint_module_vars.arg_0.get_height(0u))));
+ float4 res = tint_module_vars.arg_0.sample(tint_module_vars.arg_1, clamp(v, v_1, (float2(1.0f) - v_1)), level(0.0f));
return res;
}
@@ -46,9 +44,9 @@
vertex vertex_main_outputs vertex_main(texture2d<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1};
- VertexOutput const v_4 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_4.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_4.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v_2.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v_2.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureSampleBias/1c707e.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSampleBias/1c707e.wgsl.expected.glsl
index 612aa3a..2eaf6a8 100644
--- a/test/tint/builtins/gen/var/textureSampleBias/1c707e.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureSampleBias/1c707e.wgsl.expected.glsl
@@ -12,9 +12,8 @@
uint arg_3 = 1u;
float arg_4 = 1.0f;
vec2 v_1 = arg_2;
- uint v_2 = arg_3;
- float v_3 = clamp(arg_4, -16.0f, 15.9899997711181640625f);
- vec4 res = texture(arg_0_arg_1, vec3(v_1, float(v_2)), v_3);
+ float v_2 = clamp(arg_4, -16.0f, 15.9899997711181640625f);
+ vec4 res = texture(arg_0_arg_1, vec3(v_1, float(arg_3)), v_2);
return res;
}
void main() {
diff --git a/test/tint/builtins/gen/var/textureSampleBias/1c707e.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleBias/1c707e.wgsl.expected.ir.dxc.hlsl
index f4507d5..7eb1301 100644
--- a/test/tint/builtins/gen/var/textureSampleBias/1c707e.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleBias/1c707e.wgsl.expected.ir.dxc.hlsl
@@ -7,9 +7,8 @@
uint arg_3 = 1u;
float arg_4 = 1.0f;
float2 v = arg_2;
- uint v_1 = arg_3;
- float v_2 = clamp(arg_4, -16.0f, 15.9899997711181640625f);
- float4 res = arg_0.SampleBias(arg_1, float3(v, float(v_1)), v_2);
+ float v_1 = clamp(arg_4, -16.0f, 15.9899997711181640625f);
+ float4 res = arg_0.SampleBias(arg_1, float3(v, float(arg_3)), v_1);
return res;
}
diff --git a/test/tint/builtins/gen/var/textureSampleBias/1c707e.wgsl.expected.ir.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleBias/1c707e.wgsl.expected.ir.fxc.hlsl
index f4507d5..7eb1301 100644
--- a/test/tint/builtins/gen/var/textureSampleBias/1c707e.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleBias/1c707e.wgsl.expected.ir.fxc.hlsl
@@ -7,9 +7,8 @@
uint arg_3 = 1u;
float arg_4 = 1.0f;
float2 v = arg_2;
- uint v_1 = arg_3;
- float v_2 = clamp(arg_4, -16.0f, 15.9899997711181640625f);
- float4 res = arg_0.SampleBias(arg_1, float3(v, float(v_1)), v_2);
+ float v_1 = clamp(arg_4, -16.0f, 15.9899997711181640625f);
+ float4 res = arg_0.SampleBias(arg_1, float3(v, float(arg_3)), v_1);
return res;
}
diff --git a/test/tint/builtins/gen/var/textureSampleBias/53b9f7.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSampleBias/53b9f7.wgsl.expected.glsl
index 497f9bd..2736569 100644
--- a/test/tint/builtins/gen/var/textureSampleBias/53b9f7.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureSampleBias/53b9f7.wgsl.expected.glsl
@@ -10,8 +10,7 @@
vec4 textureSampleBias_53b9f7() {
vec3 arg_2 = vec3(1.0f);
float arg_3 = 1.0f;
- vec3 v_1 = arg_2;
- vec4 res = texture(arg_0_arg_1, v_1, clamp(arg_3, -16.0f, 15.9899997711181640625f));
+ vec4 res = texture(arg_0_arg_1, arg_2, clamp(arg_3, -16.0f, 15.9899997711181640625f));
return res;
}
void main() {
diff --git a/test/tint/builtins/gen/var/textureSampleBias/53b9f7.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleBias/53b9f7.wgsl.expected.ir.dxc.hlsl
index 45976f5..427da72 100644
--- a/test/tint/builtins/gen/var/textureSampleBias/53b9f7.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleBias/53b9f7.wgsl.expected.ir.dxc.hlsl
@@ -5,8 +5,7 @@
float4 textureSampleBias_53b9f7() {
float3 arg_2 = (1.0f).xxx;
float arg_3 = 1.0f;
- float3 v = arg_2;
- float4 res = arg_0.SampleBias(arg_1, v, clamp(arg_3, -16.0f, 15.9899997711181640625f));
+ float4 res = arg_0.SampleBias(arg_1, arg_2, clamp(arg_3, -16.0f, 15.9899997711181640625f));
return res;
}
diff --git a/test/tint/builtins/gen/var/textureSampleBias/53b9f7.wgsl.expected.ir.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleBias/53b9f7.wgsl.expected.ir.fxc.hlsl
index 45976f5..427da72 100644
--- a/test/tint/builtins/gen/var/textureSampleBias/53b9f7.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleBias/53b9f7.wgsl.expected.ir.fxc.hlsl
@@ -5,8 +5,7 @@
float4 textureSampleBias_53b9f7() {
float3 arg_2 = (1.0f).xxx;
float arg_3 = 1.0f;
- float3 v = arg_2;
- float4 res = arg_0.SampleBias(arg_1, v, clamp(arg_3, -16.0f, 15.9899997711181640625f));
+ float4 res = arg_0.SampleBias(arg_1, arg_2, clamp(arg_3, -16.0f, 15.9899997711181640625f));
return res;
}
diff --git a/test/tint/builtins/gen/var/textureSampleBias/594824.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSampleBias/594824.wgsl.expected.glsl
index f8f69e2..49986ba 100644
--- a/test/tint/builtins/gen/var/textureSampleBias/594824.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureSampleBias/594824.wgsl.expected.glsl
@@ -10,8 +10,7 @@
vec4 textureSampleBias_594824() {
vec3 arg_2 = vec3(1.0f);
float arg_3 = 1.0f;
- vec3 v_1 = arg_2;
- vec4 res = textureOffset(arg_0_arg_1, v_1, ivec3(1), clamp(arg_3, -16.0f, 15.9899997711181640625f));
+ vec4 res = textureOffset(arg_0_arg_1, arg_2, ivec3(1), clamp(arg_3, -16.0f, 15.9899997711181640625f));
return res;
}
void main() {
diff --git a/test/tint/builtins/gen/var/textureSampleBias/594824.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleBias/594824.wgsl.expected.ir.dxc.hlsl
index 06a3d35..1c59716 100644
--- a/test/tint/builtins/gen/var/textureSampleBias/594824.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleBias/594824.wgsl.expected.ir.dxc.hlsl
@@ -5,8 +5,7 @@
float4 textureSampleBias_594824() {
float3 arg_2 = (1.0f).xxx;
float arg_3 = 1.0f;
- float3 v = arg_2;
- float4 res = arg_0.SampleBias(arg_1, v, clamp(arg_3, -16.0f, 15.9899997711181640625f), (int(1)).xxx);
+ float4 res = arg_0.SampleBias(arg_1, arg_2, clamp(arg_3, -16.0f, 15.9899997711181640625f), (int(1)).xxx);
return res;
}
diff --git a/test/tint/builtins/gen/var/textureSampleBias/594824.wgsl.expected.ir.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleBias/594824.wgsl.expected.ir.fxc.hlsl
index 06a3d35..1c59716 100644
--- a/test/tint/builtins/gen/var/textureSampleBias/594824.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleBias/594824.wgsl.expected.ir.fxc.hlsl
@@ -5,8 +5,7 @@
float4 textureSampleBias_594824() {
float3 arg_2 = (1.0f).xxx;
float arg_3 = 1.0f;
- float3 v = arg_2;
- float4 res = arg_0.SampleBias(arg_1, v, clamp(arg_3, -16.0f, 15.9899997711181640625f), (int(1)).xxx);
+ float4 res = arg_0.SampleBias(arg_1, arg_2, clamp(arg_3, -16.0f, 15.9899997711181640625f), (int(1)).xxx);
return res;
}
diff --git a/test/tint/builtins/gen/var/textureSampleBias/6a9113.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSampleBias/6a9113.wgsl.expected.glsl
index e004614..1671cd5 100644
--- a/test/tint/builtins/gen/var/textureSampleBias/6a9113.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureSampleBias/6a9113.wgsl.expected.glsl
@@ -10,8 +10,7 @@
vec4 textureSampleBias_6a9113() {
vec2 arg_2 = vec2(1.0f);
float arg_3 = 1.0f;
- vec2 v_1 = arg_2;
- vec4 res = texture(arg_0_arg_1, v_1, clamp(arg_3, -16.0f, 15.9899997711181640625f));
+ vec4 res = texture(arg_0_arg_1, arg_2, clamp(arg_3, -16.0f, 15.9899997711181640625f));
return res;
}
void main() {
diff --git a/test/tint/builtins/gen/var/textureSampleBias/6a9113.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleBias/6a9113.wgsl.expected.ir.dxc.hlsl
index de9229f..192651d 100644
--- a/test/tint/builtins/gen/var/textureSampleBias/6a9113.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleBias/6a9113.wgsl.expected.ir.dxc.hlsl
@@ -5,8 +5,7 @@
float4 textureSampleBias_6a9113() {
float2 arg_2 = (1.0f).xx;
float arg_3 = 1.0f;
- float2 v = arg_2;
- float4 res = arg_0.SampleBias(arg_1, v, clamp(arg_3, -16.0f, 15.9899997711181640625f));
+ float4 res = arg_0.SampleBias(arg_1, arg_2, clamp(arg_3, -16.0f, 15.9899997711181640625f));
return res;
}
diff --git a/test/tint/builtins/gen/var/textureSampleBias/6a9113.wgsl.expected.ir.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleBias/6a9113.wgsl.expected.ir.fxc.hlsl
index de9229f..192651d 100644
--- a/test/tint/builtins/gen/var/textureSampleBias/6a9113.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleBias/6a9113.wgsl.expected.ir.fxc.hlsl
@@ -5,8 +5,7 @@
float4 textureSampleBias_6a9113() {
float2 arg_2 = (1.0f).xx;
float arg_3 = 1.0f;
- float2 v = arg_2;
- float4 res = arg_0.SampleBias(arg_1, v, clamp(arg_3, -16.0f, 15.9899997711181640625f));
+ float4 res = arg_0.SampleBias(arg_1, arg_2, clamp(arg_3, -16.0f, 15.9899997711181640625f));
return res;
}
diff --git a/test/tint/builtins/gen/var/textureSampleBias/80e579.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSampleBias/80e579.wgsl.expected.glsl
index 3884411..c19ae61 100644
--- a/test/tint/builtins/gen/var/textureSampleBias/80e579.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureSampleBias/80e579.wgsl.expected.glsl
@@ -12,9 +12,8 @@
int arg_3 = 1;
float arg_4 = 1.0f;
vec2 v_1 = arg_2;
- int v_2 = arg_3;
- float v_3 = clamp(arg_4, -16.0f, 15.9899997711181640625f);
- vec4 res = texture(arg_0_arg_1, vec3(v_1, float(v_2)), v_3);
+ float v_2 = clamp(arg_4, -16.0f, 15.9899997711181640625f);
+ vec4 res = texture(arg_0_arg_1, vec3(v_1, float(arg_3)), v_2);
return res;
}
void main() {
diff --git a/test/tint/builtins/gen/var/textureSampleBias/80e579.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleBias/80e579.wgsl.expected.ir.dxc.hlsl
index 979bf89..118b81a 100644
--- a/test/tint/builtins/gen/var/textureSampleBias/80e579.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleBias/80e579.wgsl.expected.ir.dxc.hlsl
@@ -7,9 +7,8 @@
int arg_3 = int(1);
float arg_4 = 1.0f;
float2 v = arg_2;
- int v_1 = arg_3;
- float v_2 = clamp(arg_4, -16.0f, 15.9899997711181640625f);
- float4 res = arg_0.SampleBias(arg_1, float3(v, float(v_1)), v_2);
+ float v_1 = clamp(arg_4, -16.0f, 15.9899997711181640625f);
+ float4 res = arg_0.SampleBias(arg_1, float3(v, float(arg_3)), v_1);
return res;
}
diff --git a/test/tint/builtins/gen/var/textureSampleBias/80e579.wgsl.expected.ir.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleBias/80e579.wgsl.expected.ir.fxc.hlsl
index 979bf89..118b81a 100644
--- a/test/tint/builtins/gen/var/textureSampleBias/80e579.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleBias/80e579.wgsl.expected.ir.fxc.hlsl
@@ -7,9 +7,8 @@
int arg_3 = int(1);
float arg_4 = 1.0f;
float2 v = arg_2;
- int v_1 = arg_3;
- float v_2 = clamp(arg_4, -16.0f, 15.9899997711181640625f);
- float4 res = arg_0.SampleBias(arg_1, float3(v, float(v_1)), v_2);
+ float v_1 = clamp(arg_4, -16.0f, 15.9899997711181640625f);
+ float4 res = arg_0.SampleBias(arg_1, float3(v, float(arg_3)), v_1);
return res;
}
diff --git a/test/tint/builtins/gen/var/textureSampleBias/80e579.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureSampleBias/80e579.wgsl.expected.ir.msl
index 444cc90..d98ba9b 100644
--- a/test/tint/builtins/gen/var/textureSampleBias/80e579.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureSampleBias/80e579.wgsl.expected.ir.msl
@@ -13,8 +13,7 @@
float arg_4 = 1.0f;
float2 const v = arg_2;
int const v_1 = arg_3;
- bias const v_2 = bias(clamp(arg_4, -16.0f, 15.9899997711181640625f));
- float4 res = tint_module_vars.arg_0.sample(tint_module_vars.arg_1, v, max(v_1, 0), v_2);
+ float4 res = tint_module_vars.arg_0.sample(tint_module_vars.arg_1, v, max(v_1, 0), bias(clamp(arg_4, -16.0f, 15.9899997711181640625f)));
return res;
}
diff --git a/test/tint/builtins/gen/var/textureSampleBias/87915c.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSampleBias/87915c.wgsl.expected.glsl
index 6dcb90b..f52cef0 100644
--- a/test/tint/builtins/gen/var/textureSampleBias/87915c.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureSampleBias/87915c.wgsl.expected.glsl
@@ -12,9 +12,8 @@
uint arg_3 = 1u;
float arg_4 = 1.0f;
vec2 v_1 = arg_2;
- uint v_2 = arg_3;
- float v_3 = clamp(arg_4, -16.0f, 15.9899997711181640625f);
- vec4 res = textureOffset(arg_0_arg_1, vec3(v_1, float(v_2)), ivec2(1), v_3);
+ float v_2 = clamp(arg_4, -16.0f, 15.9899997711181640625f);
+ vec4 res = textureOffset(arg_0_arg_1, vec3(v_1, float(arg_3)), ivec2(1), v_2);
return res;
}
void main() {
diff --git a/test/tint/builtins/gen/var/textureSampleBias/87915c.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleBias/87915c.wgsl.expected.ir.dxc.hlsl
index bbbf2fc..5bd7c42 100644
--- a/test/tint/builtins/gen/var/textureSampleBias/87915c.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleBias/87915c.wgsl.expected.ir.dxc.hlsl
@@ -7,9 +7,8 @@
uint arg_3 = 1u;
float arg_4 = 1.0f;
float2 v = arg_2;
- uint v_1 = arg_3;
- float v_2 = clamp(arg_4, -16.0f, 15.9899997711181640625f);
- float4 res = arg_0.SampleBias(arg_1, float3(v, float(v_1)), v_2, (int(1)).xx);
+ float v_1 = clamp(arg_4, -16.0f, 15.9899997711181640625f);
+ float4 res = arg_0.SampleBias(arg_1, float3(v, float(arg_3)), v_1, (int(1)).xx);
return res;
}
diff --git a/test/tint/builtins/gen/var/textureSampleBias/87915c.wgsl.expected.ir.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleBias/87915c.wgsl.expected.ir.fxc.hlsl
index bbbf2fc..5bd7c42 100644
--- a/test/tint/builtins/gen/var/textureSampleBias/87915c.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleBias/87915c.wgsl.expected.ir.fxc.hlsl
@@ -7,9 +7,8 @@
uint arg_3 = 1u;
float arg_4 = 1.0f;
float2 v = arg_2;
- uint v_1 = arg_3;
- float v_2 = clamp(arg_4, -16.0f, 15.9899997711181640625f);
- float4 res = arg_0.SampleBias(arg_1, float3(v, float(v_1)), v_2, (int(1)).xx);
+ float v_1 = clamp(arg_4, -16.0f, 15.9899997711181640625f);
+ float4 res = arg_0.SampleBias(arg_1, float3(v, float(arg_3)), v_1, (int(1)).xx);
return res;
}
diff --git a/test/tint/builtins/gen/var/textureSampleBias/9dbb51.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSampleBias/9dbb51.wgsl.expected.glsl
index f7c301a..e5e5a2b 100644
--- a/test/tint/builtins/gen/var/textureSampleBias/9dbb51.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureSampleBias/9dbb51.wgsl.expected.glsl
@@ -12,9 +12,8 @@
int arg_3 = 1;
float arg_4 = 1.0f;
vec2 v_1 = arg_2;
- int v_2 = arg_3;
- float v_3 = clamp(arg_4, -16.0f, 15.9899997711181640625f);
- vec4 res = textureOffset(arg_0_arg_1, vec3(v_1, float(v_2)), ivec2(1), v_3);
+ float v_2 = clamp(arg_4, -16.0f, 15.9899997711181640625f);
+ vec4 res = textureOffset(arg_0_arg_1, vec3(v_1, float(arg_3)), ivec2(1), v_2);
return res;
}
void main() {
diff --git a/test/tint/builtins/gen/var/textureSampleBias/9dbb51.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleBias/9dbb51.wgsl.expected.ir.dxc.hlsl
index 241afcd..cfc8995 100644
--- a/test/tint/builtins/gen/var/textureSampleBias/9dbb51.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleBias/9dbb51.wgsl.expected.ir.dxc.hlsl
@@ -7,9 +7,8 @@
int arg_3 = int(1);
float arg_4 = 1.0f;
float2 v = arg_2;
- int v_1 = arg_3;
- float v_2 = clamp(arg_4, -16.0f, 15.9899997711181640625f);
- float4 res = arg_0.SampleBias(arg_1, float3(v, float(v_1)), v_2, (int(1)).xx);
+ float v_1 = clamp(arg_4, -16.0f, 15.9899997711181640625f);
+ float4 res = arg_0.SampleBias(arg_1, float3(v, float(arg_3)), v_1, (int(1)).xx);
return res;
}
diff --git a/test/tint/builtins/gen/var/textureSampleBias/9dbb51.wgsl.expected.ir.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleBias/9dbb51.wgsl.expected.ir.fxc.hlsl
index 241afcd..cfc8995 100644
--- a/test/tint/builtins/gen/var/textureSampleBias/9dbb51.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleBias/9dbb51.wgsl.expected.ir.fxc.hlsl
@@ -7,9 +7,8 @@
int arg_3 = int(1);
float arg_4 = 1.0f;
float2 v = arg_2;
- int v_1 = arg_3;
- float v_2 = clamp(arg_4, -16.0f, 15.9899997711181640625f);
- float4 res = arg_0.SampleBias(arg_1, float3(v, float(v_1)), v_2, (int(1)).xx);
+ float v_1 = clamp(arg_4, -16.0f, 15.9899997711181640625f);
+ float4 res = arg_0.SampleBias(arg_1, float3(v, float(arg_3)), v_1, (int(1)).xx);
return res;
}
diff --git a/test/tint/builtins/gen/var/textureSampleBias/9dbb51.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureSampleBias/9dbb51.wgsl.expected.ir.msl
index b3d12fd..636a2da 100644
--- a/test/tint/builtins/gen/var/textureSampleBias/9dbb51.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureSampleBias/9dbb51.wgsl.expected.ir.msl
@@ -13,8 +13,7 @@
float arg_4 = 1.0f;
float2 const v = arg_2;
int const v_1 = arg_3;
- bias const v_2 = bias(clamp(arg_4, -16.0f, 15.9899997711181640625f));
- float4 res = tint_module_vars.arg_0.sample(tint_module_vars.arg_1, v, max(v_1, 0), v_2, int2(1));
+ float4 res = tint_module_vars.arg_0.sample(tint_module_vars.arg_1, v, max(v_1, 0), bias(clamp(arg_4, -16.0f, 15.9899997711181640625f)), int2(1));
return res;
}
diff --git a/test/tint/builtins/gen/var/textureSampleBias/a161cf.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSampleBias/a161cf.wgsl.expected.glsl
index 709925d..b5b65c5 100644
--- a/test/tint/builtins/gen/var/textureSampleBias/a161cf.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureSampleBias/a161cf.wgsl.expected.glsl
@@ -10,8 +10,7 @@
vec4 textureSampleBias_a161cf() {
vec2 arg_2 = vec2(1.0f);
float arg_3 = 1.0f;
- vec2 v_1 = arg_2;
- vec4 res = textureOffset(arg_0_arg_1, v_1, ivec2(1), clamp(arg_3, -16.0f, 15.9899997711181640625f));
+ vec4 res = textureOffset(arg_0_arg_1, arg_2, ivec2(1), clamp(arg_3, -16.0f, 15.9899997711181640625f));
return res;
}
void main() {
diff --git a/test/tint/builtins/gen/var/textureSampleBias/a161cf.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleBias/a161cf.wgsl.expected.ir.dxc.hlsl
index 9d373d9..808f0bf 100644
--- a/test/tint/builtins/gen/var/textureSampleBias/a161cf.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleBias/a161cf.wgsl.expected.ir.dxc.hlsl
@@ -5,8 +5,7 @@
float4 textureSampleBias_a161cf() {
float2 arg_2 = (1.0f).xx;
float arg_3 = 1.0f;
- float2 v = arg_2;
- float4 res = arg_0.SampleBias(arg_1, v, clamp(arg_3, -16.0f, 15.9899997711181640625f), (int(1)).xx);
+ float4 res = arg_0.SampleBias(arg_1, arg_2, clamp(arg_3, -16.0f, 15.9899997711181640625f), (int(1)).xx);
return res;
}
diff --git a/test/tint/builtins/gen/var/textureSampleBias/a161cf.wgsl.expected.ir.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleBias/a161cf.wgsl.expected.ir.fxc.hlsl
index 9d373d9..808f0bf 100644
--- a/test/tint/builtins/gen/var/textureSampleBias/a161cf.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleBias/a161cf.wgsl.expected.ir.fxc.hlsl
@@ -5,8 +5,7 @@
float4 textureSampleBias_a161cf() {
float2 arg_2 = (1.0f).xx;
float arg_3 = 1.0f;
- float2 v = arg_2;
- float4 res = arg_0.SampleBias(arg_1, v, clamp(arg_3, -16.0f, 15.9899997711181640625f), (int(1)).xx);
+ float4 res = arg_0.SampleBias(arg_1, arg_2, clamp(arg_3, -16.0f, 15.9899997711181640625f), (int(1)).xx);
return res;
}
diff --git a/test/tint/builtins/gen/var/textureSampleBias/c6953d.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSampleBias/c6953d.wgsl.expected.glsl
index ac88071..873c59e 100644
--- a/test/tint/builtins/gen/var/textureSampleBias/c6953d.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureSampleBias/c6953d.wgsl.expected.glsl
@@ -12,9 +12,8 @@
uint arg_3 = 1u;
float arg_4 = 1.0f;
vec3 v_1 = arg_2;
- uint v_2 = arg_3;
- float v_3 = clamp(arg_4, -16.0f, 15.9899997711181640625f);
- vec4 res = texture(arg_0_arg_1, vec4(v_1, float(v_2)), v_3);
+ float v_2 = clamp(arg_4, -16.0f, 15.9899997711181640625f);
+ vec4 res = texture(arg_0_arg_1, vec4(v_1, float(arg_3)), v_2);
return res;
}
void main() {
diff --git a/test/tint/builtins/gen/var/textureSampleBias/c6953d.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleBias/c6953d.wgsl.expected.ir.dxc.hlsl
index bbc99e5..04b8da8 100644
--- a/test/tint/builtins/gen/var/textureSampleBias/c6953d.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleBias/c6953d.wgsl.expected.ir.dxc.hlsl
@@ -7,9 +7,8 @@
uint arg_3 = 1u;
float arg_4 = 1.0f;
float3 v = arg_2;
- uint v_1 = arg_3;
- float v_2 = clamp(arg_4, -16.0f, 15.9899997711181640625f);
- float4 res = arg_0.SampleBias(arg_1, float4(v, float(v_1)), v_2);
+ float v_1 = clamp(arg_4, -16.0f, 15.9899997711181640625f);
+ float4 res = arg_0.SampleBias(arg_1, float4(v, float(arg_3)), v_1);
return res;
}
diff --git a/test/tint/builtins/gen/var/textureSampleBias/c6953d.wgsl.expected.ir.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleBias/c6953d.wgsl.expected.ir.fxc.hlsl
index bbc99e5..04b8da8 100644
--- a/test/tint/builtins/gen/var/textureSampleBias/c6953d.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleBias/c6953d.wgsl.expected.ir.fxc.hlsl
@@ -7,9 +7,8 @@
uint arg_3 = 1u;
float arg_4 = 1.0f;
float3 v = arg_2;
- uint v_1 = arg_3;
- float v_2 = clamp(arg_4, -16.0f, 15.9899997711181640625f);
- float4 res = arg_0.SampleBias(arg_1, float4(v, float(v_1)), v_2);
+ float v_1 = clamp(arg_4, -16.0f, 15.9899997711181640625f);
+ float4 res = arg_0.SampleBias(arg_1, float4(v, float(arg_3)), v_1);
return res;
}
diff --git a/test/tint/builtins/gen/var/textureSampleBias/d3fa1b.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSampleBias/d3fa1b.wgsl.expected.glsl
index bf6a847..487a015 100644
--- a/test/tint/builtins/gen/var/textureSampleBias/d3fa1b.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureSampleBias/d3fa1b.wgsl.expected.glsl
@@ -10,8 +10,7 @@
vec4 textureSampleBias_d3fa1b() {
vec3 arg_2 = vec3(1.0f);
float arg_3 = 1.0f;
- vec3 v_1 = arg_2;
- vec4 res = texture(arg_0_arg_1, v_1, clamp(arg_3, -16.0f, 15.9899997711181640625f));
+ vec4 res = texture(arg_0_arg_1, arg_2, clamp(arg_3, -16.0f, 15.9899997711181640625f));
return res;
}
void main() {
diff --git a/test/tint/builtins/gen/var/textureSampleBias/d3fa1b.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleBias/d3fa1b.wgsl.expected.ir.dxc.hlsl
index 933da98..b8bec1c 100644
--- a/test/tint/builtins/gen/var/textureSampleBias/d3fa1b.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleBias/d3fa1b.wgsl.expected.ir.dxc.hlsl
@@ -5,8 +5,7 @@
float4 textureSampleBias_d3fa1b() {
float3 arg_2 = (1.0f).xxx;
float arg_3 = 1.0f;
- float3 v = arg_2;
- float4 res = arg_0.SampleBias(arg_1, v, clamp(arg_3, -16.0f, 15.9899997711181640625f));
+ float4 res = arg_0.SampleBias(arg_1, arg_2, clamp(arg_3, -16.0f, 15.9899997711181640625f));
return res;
}
diff --git a/test/tint/builtins/gen/var/textureSampleBias/d3fa1b.wgsl.expected.ir.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleBias/d3fa1b.wgsl.expected.ir.fxc.hlsl
index 933da98..b8bec1c 100644
--- a/test/tint/builtins/gen/var/textureSampleBias/d3fa1b.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleBias/d3fa1b.wgsl.expected.ir.fxc.hlsl
@@ -5,8 +5,7 @@
float4 textureSampleBias_d3fa1b() {
float3 arg_2 = (1.0f).xxx;
float arg_3 = 1.0f;
- float3 v = arg_2;
- float4 res = arg_0.SampleBias(arg_1, v, clamp(arg_3, -16.0f, 15.9899997711181640625f));
+ float4 res = arg_0.SampleBias(arg_1, arg_2, clamp(arg_3, -16.0f, 15.9899997711181640625f));
return res;
}
diff --git a/test/tint/builtins/gen/var/textureSampleBias/eed7c4.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSampleBias/eed7c4.wgsl.expected.glsl
index fa9eee1..880a055 100644
--- a/test/tint/builtins/gen/var/textureSampleBias/eed7c4.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureSampleBias/eed7c4.wgsl.expected.glsl
@@ -12,9 +12,8 @@
int arg_3 = 1;
float arg_4 = 1.0f;
vec3 v_1 = arg_2;
- int v_2 = arg_3;
- float v_3 = clamp(arg_4, -16.0f, 15.9899997711181640625f);
- vec4 res = texture(arg_0_arg_1, vec4(v_1, float(v_2)), v_3);
+ float v_2 = clamp(arg_4, -16.0f, 15.9899997711181640625f);
+ vec4 res = texture(arg_0_arg_1, vec4(v_1, float(arg_3)), v_2);
return res;
}
void main() {
diff --git a/test/tint/builtins/gen/var/textureSampleBias/eed7c4.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleBias/eed7c4.wgsl.expected.ir.dxc.hlsl
index 3a63937..dbb32b8 100644
--- a/test/tint/builtins/gen/var/textureSampleBias/eed7c4.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleBias/eed7c4.wgsl.expected.ir.dxc.hlsl
@@ -7,9 +7,8 @@
int arg_3 = int(1);
float arg_4 = 1.0f;
float3 v = arg_2;
- int v_1 = arg_3;
- float v_2 = clamp(arg_4, -16.0f, 15.9899997711181640625f);
- float4 res = arg_0.SampleBias(arg_1, float4(v, float(v_1)), v_2);
+ float v_1 = clamp(arg_4, -16.0f, 15.9899997711181640625f);
+ float4 res = arg_0.SampleBias(arg_1, float4(v, float(arg_3)), v_1);
return res;
}
diff --git a/test/tint/builtins/gen/var/textureSampleBias/eed7c4.wgsl.expected.ir.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleBias/eed7c4.wgsl.expected.ir.fxc.hlsl
index 3a63937..dbb32b8 100644
--- a/test/tint/builtins/gen/var/textureSampleBias/eed7c4.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleBias/eed7c4.wgsl.expected.ir.fxc.hlsl
@@ -7,9 +7,8 @@
int arg_3 = int(1);
float arg_4 = 1.0f;
float3 v = arg_2;
- int v_1 = arg_3;
- float v_2 = clamp(arg_4, -16.0f, 15.9899997711181640625f);
- float4 res = arg_0.SampleBias(arg_1, float4(v, float(v_1)), v_2);
+ float v_1 = clamp(arg_4, -16.0f, 15.9899997711181640625f);
+ float4 res = arg_0.SampleBias(arg_1, float4(v, float(arg_3)), v_1);
return res;
}
diff --git a/test/tint/builtins/gen/var/textureSampleBias/eed7c4.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureSampleBias/eed7c4.wgsl.expected.ir.msl
index 4632eb9..e7a81de7 100644
--- a/test/tint/builtins/gen/var/textureSampleBias/eed7c4.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureSampleBias/eed7c4.wgsl.expected.ir.msl
@@ -13,8 +13,7 @@
float arg_4 = 1.0f;
float3 const v = arg_2;
int const v_1 = arg_3;
- bias const v_2 = bias(clamp(arg_4, -16.0f, 15.9899997711181640625f));
- float4 res = tint_module_vars.arg_0.sample(tint_module_vars.arg_1, v, max(v_1, 0), v_2);
+ float4 res = tint_module_vars.arg_0.sample(tint_module_vars.arg_1, v, max(v_1, 0), bias(clamp(arg_4, -16.0f, 15.9899997711181640625f)));
return res;
}
diff --git a/test/tint/builtins/gen/var/textureSampleCompare/a3ca7e.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureSampleCompare/a3ca7e.wgsl.expected.ir.msl
index bf27600..941c84f 100644
--- a/test/tint/builtins/gen/var/textureSampleCompare/a3ca7e.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureSampleCompare/a3ca7e.wgsl.expected.ir.msl
@@ -11,9 +11,7 @@
float3 arg_2 = float3(1.0f);
int arg_3 = 1;
float arg_4 = 1.0f;
- float3 const v = arg_2;
- float const v_1 = arg_4;
- float res = tint_module_vars.arg_0.sample_compare(tint_module_vars.arg_1, v, max(arg_3, 0), v_1);
+ float res = tint_module_vars.arg_0.sample_compare(tint_module_vars.arg_1, arg_2, max(arg_3, 0), arg_4);
return res;
}
diff --git a/test/tint/builtins/gen/var/textureSampleCompare/af1051.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureSampleCompare/af1051.wgsl.expected.ir.msl
index 2951fd5..adc35a3 100644
--- a/test/tint/builtins/gen/var/textureSampleCompare/af1051.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureSampleCompare/af1051.wgsl.expected.ir.msl
@@ -11,9 +11,7 @@
float2 arg_2 = float2(1.0f);
int arg_3 = 1;
float arg_4 = 1.0f;
- float2 const v = arg_2;
- float const v_1 = arg_4;
- float res = tint_module_vars.arg_0.sample_compare(tint_module_vars.arg_1, v, max(arg_3, 0), v_1, int2(1));
+ float res = tint_module_vars.arg_0.sample_compare(tint_module_vars.arg_1, arg_2, max(arg_3, 0), arg_4, int2(1));
return res;
}
diff --git a/test/tint/builtins/gen/var/textureSampleCompare/dd431d.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureSampleCompare/dd431d.wgsl.expected.ir.msl
index f795d83..f0c3b2b 100644
--- a/test/tint/builtins/gen/var/textureSampleCompare/dd431d.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureSampleCompare/dd431d.wgsl.expected.ir.msl
@@ -11,9 +11,7 @@
float2 arg_2 = float2(1.0f);
int arg_3 = 1;
float arg_4 = 1.0f;
- float2 const v = arg_2;
- float const v_1 = arg_4;
- float res = tint_module_vars.arg_0.sample_compare(tint_module_vars.arg_1, v, max(arg_3, 0), v_1);
+ float res = tint_module_vars.arg_0.sample_compare(tint_module_vars.arg_1, arg_2, max(arg_3, 0), arg_4);
return res;
}
diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/1116ed.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureSampleCompareLevel/1116ed.wgsl.expected.ir.msl
index 0301b23..47a419a 100644
--- a/test/tint/builtins/gen/var/textureSampleCompareLevel/1116ed.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/1116ed.wgsl.expected.ir.msl
@@ -24,8 +24,7 @@
float2 const v = arg_2;
int const v_1 = arg_3;
float const v_2 = arg_4;
- level const v_3 = level(0u);
- float res = tint_module_vars.arg_0.sample_compare(tint_module_vars.arg_1, v, max(v_1, 0), v_2, v_3);
+ float res = tint_module_vars.arg_0.sample_compare(tint_module_vars.arg_1, v, max(v_1, 0), v_2, level(0u));
return res;
}
@@ -48,9 +47,9 @@
vertex vertex_main_outputs vertex_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1};
- VertexOutput const v_4 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v_3 = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_4.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_4.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v_3.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v_3.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/4cf3a2.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureSampleCompareLevel/4cf3a2.wgsl.expected.ir.msl
index 0774c4f..7d220d7 100644
--- a/test/tint/builtins/gen/var/textureSampleCompareLevel/4cf3a2.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/4cf3a2.wgsl.expected.ir.msl
@@ -24,8 +24,7 @@
float3 const v = arg_2;
int const v_1 = arg_3;
float const v_2 = arg_4;
- level const v_3 = level(0u);
- float res = tint_module_vars.arg_0.sample_compare(tint_module_vars.arg_1, v, max(v_1, 0), v_2, v_3);
+ float res = tint_module_vars.arg_0.sample_compare(tint_module_vars.arg_1, v, max(v_1, 0), v_2, level(0u));
return res;
}
@@ -48,9 +47,9 @@
vertex vertex_main_outputs vertex_main(depthcube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1};
- VertexOutput const v_4 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v_3 = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_4.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_4.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v_3.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v_3.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/b6e47c.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureSampleCompareLevel/b6e47c.wgsl.expected.ir.msl
index 389b21a..5dd81da 100644
--- a/test/tint/builtins/gen/var/textureSampleCompareLevel/b6e47c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/b6e47c.wgsl.expected.ir.msl
@@ -24,8 +24,7 @@
float2 const v = arg_2;
int const v_1 = arg_3;
float const v_2 = arg_4;
- level const v_3 = level(0u);
- float res = tint_module_vars.arg_0.sample_compare(tint_module_vars.arg_1, v, max(v_1, 0), v_2, v_3, int2(1));
+ float res = tint_module_vars.arg_0.sample_compare(tint_module_vars.arg_1, v, max(v_1, 0), v_2, level(0u), int2(1));
return res;
}
@@ -48,9 +47,9 @@
vertex vertex_main_outputs vertex_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1};
- VertexOutput const v_4 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v_3 = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_4.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_4.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v_3.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v_3.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureSampleGrad/2ecd8f.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureSampleGrad/2ecd8f.wgsl.expected.ir.msl
index 54e71e6..5ffc684 100644
--- a/test/tint/builtins/gen/var/textureSampleGrad/2ecd8f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureSampleGrad/2ecd8f.wgsl.expected.ir.msl
@@ -24,8 +24,7 @@
float2 arg_5 = float2(1.0f);
float2 const v = arg_2;
int const v_1 = arg_3;
- gradient2d const v_2 = gradient2d(arg_4, arg_5);
- float4 res = tint_module_vars.arg_0.sample(tint_module_vars.arg_1, v, max(v_1, 0), v_2);
+ float4 res = tint_module_vars.arg_0.sample(tint_module_vars.arg_1, v, max(v_1, 0), gradient2d(arg_4, arg_5));
return res;
}
@@ -48,9 +47,9 @@
vertex vertex_main_outputs vertex_main(texture2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1};
- VertexOutput const v_3 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_3.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_3.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v_2.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v_2.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureSampleGrad/d65515.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureSampleGrad/d65515.wgsl.expected.ir.msl
index e629fc2..692d427 100644
--- a/test/tint/builtins/gen/var/textureSampleGrad/d65515.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureSampleGrad/d65515.wgsl.expected.ir.msl
@@ -24,8 +24,7 @@
float2 arg_5 = float2(1.0f);
float2 const v = arg_2;
int const v_1 = arg_3;
- gradient2d const v_2 = gradient2d(arg_4, arg_5);
- float4 res = tint_module_vars.arg_0.sample(tint_module_vars.arg_1, v, max(v_1, 0), v_2, int2(1));
+ float4 res = tint_module_vars.arg_0.sample(tint_module_vars.arg_1, v, max(v_1, 0), gradient2d(arg_4, arg_5), int2(1));
return res;
}
@@ -48,9 +47,9 @@
vertex vertex_main_outputs vertex_main(texture2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1};
- VertexOutput const v_3 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_3.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_3.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v_2.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v_2.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureSampleGrad/e383db.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureSampleGrad/e383db.wgsl.expected.ir.msl
index ce2713d..76d0727 100644
--- a/test/tint/builtins/gen/var/textureSampleGrad/e383db.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureSampleGrad/e383db.wgsl.expected.ir.msl
@@ -24,8 +24,7 @@
float3 arg_5 = float3(1.0f);
float3 const v = arg_2;
int const v_1 = arg_3;
- gradientcube const v_2 = gradientcube(arg_4, arg_5);
- float4 res = tint_module_vars.arg_0.sample(tint_module_vars.arg_1, v, max(v_1, 0), v_2);
+ float4 res = tint_module_vars.arg_0.sample(tint_module_vars.arg_1, v, max(v_1, 0), gradientcube(arg_4, arg_5));
return res;
}
@@ -48,9 +47,9 @@
vertex vertex_main_outputs vertex_main(texturecube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1};
- VertexOutput const v_3 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_3.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_3.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v_2.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v_2.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/0bdd9a.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureSampleLevel/0bdd9a.wgsl.expected.ir.msl
index 800152f..561c6ac 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/0bdd9a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/0bdd9a.wgsl.expected.ir.msl
@@ -23,8 +23,7 @@
float arg_4 = 1.0f;
float3 const v = arg_2;
int const v_1 = arg_3;
- level const v_2 = level(arg_4);
- float4 res = tint_module_vars.arg_0.sample(tint_module_vars.arg_1, v, max(v_1, 0), v_2);
+ float4 res = tint_module_vars.arg_0.sample(tint_module_vars.arg_1, v, max(v_1, 0), level(arg_4));
return res;
}
@@ -47,9 +46,9 @@
vertex vertex_main_outputs vertex_main(texturecube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1};
- VertexOutput const v_3 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_3.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_3.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v_2.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v_2.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/1bf73e.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureSampleLevel/1bf73e.wgsl.expected.ir.msl
index 493b2fd..4fec445 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/1bf73e.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/1bf73e.wgsl.expected.ir.msl
@@ -23,8 +23,7 @@
int arg_4 = 1;
float2 const v = arg_2;
int const v_1 = arg_3;
- level const v_2 = level(arg_4);
- float res = tint_module_vars.arg_0.sample(tint_module_vars.arg_1, v, max(v_1, 0), v_2);
+ float res = tint_module_vars.arg_0.sample(tint_module_vars.arg_1, v, max(v_1, 0), level(arg_4));
return res;
}
@@ -47,9 +46,9 @@
vertex vertex_main_outputs vertex_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1};
- VertexOutput const v_3 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_3.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_3.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v_2.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v_2.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/2974eb.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureSampleLevel/2974eb.wgsl.expected.ir.msl
index b2a82eb..e744f8e 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/2974eb.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/2974eb.wgsl.expected.ir.msl
@@ -23,8 +23,7 @@
uint arg_4 = 1u;
float2 const v = arg_2;
int const v_1 = arg_3;
- level const v_2 = level(arg_4);
- float res = tint_module_vars.arg_0.sample(tint_module_vars.arg_1, v, max(v_1, 0), v_2);
+ float res = tint_module_vars.arg_0.sample(tint_module_vars.arg_1, v, max(v_1, 0), level(arg_4));
return res;
}
@@ -47,9 +46,9 @@
vertex vertex_main_outputs vertex_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1};
- VertexOutput const v_3 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_3.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_3.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v_2.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v_2.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/302be4.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureSampleLevel/302be4.wgsl.expected.ir.msl
index 93aa2c9..676db99 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/302be4.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/302be4.wgsl.expected.ir.msl
@@ -23,8 +23,7 @@
float arg_4 = 1.0f;
float2 const v = arg_2;
int const v_1 = arg_3;
- level const v_2 = level(arg_4);
- float4 res = tint_module_vars.arg_0.sample(tint_module_vars.arg_1, v, max(v_1, 0), v_2);
+ float4 res = tint_module_vars.arg_0.sample(tint_module_vars.arg_1, v, max(v_1, 0), level(arg_4));
return res;
}
@@ -47,9 +46,9 @@
vertex vertex_main_outputs vertex_main(texture2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1};
- VertexOutput const v_3 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_3.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_3.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v_2.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v_2.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/36780e.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureSampleLevel/36780e.wgsl.expected.ir.msl
index 7ec35a1..334ccb8 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/36780e.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/36780e.wgsl.expected.ir.msl
@@ -23,8 +23,7 @@
int arg_4 = 1;
float2 const v = arg_2;
int const v_1 = arg_3;
- level const v_2 = level(arg_4);
- float res = tint_module_vars.arg_0.sample(tint_module_vars.arg_1, v, max(v_1, 0), v_2, int2(1));
+ float res = tint_module_vars.arg_0.sample(tint_module_vars.arg_1, v, max(v_1, 0), level(arg_4), int2(1));
return res;
}
@@ -47,9 +46,9 @@
vertex vertex_main_outputs vertex_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1};
- VertexOutput const v_3 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_3.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_3.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v_2.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v_2.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/36f0d3.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureSampleLevel/36f0d3.wgsl.expected.ir.msl
index ac0148d..981d4a3 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/36f0d3.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/36f0d3.wgsl.expected.ir.msl
@@ -23,8 +23,7 @@
uint arg_4 = 1u;
float2 const v = arg_2;
int const v_1 = arg_3;
- level const v_2 = level(arg_4);
- float res = tint_module_vars.arg_0.sample(tint_module_vars.arg_1, v, max(v_1, 0), v_2, int2(1));
+ float res = tint_module_vars.arg_0.sample(tint_module_vars.arg_1, v, max(v_1, 0), level(arg_4), int2(1));
return res;
}
@@ -47,9 +46,9 @@
vertex vertex_main_outputs vertex_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1};
- VertexOutput const v_3 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_3.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_3.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v_2.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v_2.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/a12142.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureSampleLevel/a12142.wgsl.expected.ir.msl
index c786e5d..191bd95 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/a12142.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/a12142.wgsl.expected.ir.msl
@@ -23,8 +23,7 @@
uint arg_4 = 1u;
float3 const v = arg_2;
int const v_1 = arg_3;
- level const v_2 = level(arg_4);
- float res = tint_module_vars.arg_0.sample(tint_module_vars.arg_1, v, max(v_1, 0), v_2);
+ float res = tint_module_vars.arg_0.sample(tint_module_vars.arg_1, v, max(v_1, 0), level(arg_4));
return res;
}
@@ -47,9 +46,9 @@
vertex vertex_main_outputs vertex_main(depthcube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1};
- VertexOutput const v_3 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_3.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_3.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v_2.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v_2.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/ae5e39.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureSampleLevel/ae5e39.wgsl.expected.ir.msl
index f4c62c0..5eeb317 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/ae5e39.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/ae5e39.wgsl.expected.ir.msl
@@ -23,8 +23,7 @@
int arg_4 = 1;
float3 const v = arg_2;
int const v_1 = arg_3;
- level const v_2 = level(arg_4);
- float res = tint_module_vars.arg_0.sample(tint_module_vars.arg_1, v, max(v_1, 0), v_2);
+ float res = tint_module_vars.arg_0.sample(tint_module_vars.arg_1, v, max(v_1, 0), level(arg_4));
return res;
}
@@ -47,9 +46,9 @@
vertex vertex_main_outputs vertex_main(depthcube_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1};
- VertexOutput const v_3 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_3.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_3.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v_2.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v_2.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/b7c55c.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureSampleLevel/b7c55c.wgsl.expected.ir.msl
index 473945a..e16c46d 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/b7c55c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/b7c55c.wgsl.expected.ir.msl
@@ -23,8 +23,7 @@
float arg_4 = 1.0f;
float2 const v = arg_2;
int const v_1 = arg_3;
- level const v_2 = level(arg_4);
- float4 res = tint_module_vars.arg_0.sample(tint_module_vars.arg_1, v, max(v_1, 0), v_2, int2(1));
+ float4 res = tint_module_vars.arg_0.sample(tint_module_vars.arg_1, v, max(v_1, 0), level(arg_4), int2(1));
return res;
}
@@ -47,9 +46,9 @@
vertex vertex_main_outputs vertex_main(texture2d_array<float, access::sample> arg_0 [[texture(0)]], sampler arg_1 [[sampler(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .arg_1=arg_1};
- VertexOutput const v_3 = vertex_main_inner(tint_module_vars);
+ VertexOutput const v_2 = vertex_main_inner(tint_module_vars);
vertex_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_pos = v_3.pos;
- tint_wrapper_result.VertexOutput_prevent_dce = v_3.prevent_dce;
+ tint_wrapper_result.VertexOutput_pos = v_2.pos;
+ tint_wrapper_result.VertexOutput_prevent_dce = v_2.prevent_dce;
return tint_wrapper_result;
}
diff --git a/test/tint/builtins/gen/var/trunc/103ab8.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/gen/var/trunc/103ab8.wgsl.expected.ir.dxc.hlsl
index 7249b04..d9097e3 100644
--- a/test/tint/builtins/gen/var/trunc/103ab8.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/gen/var/trunc/103ab8.wgsl.expected.ir.dxc.hlsl
@@ -13,8 +13,7 @@
vector<float16_t, 3> trunc_103ab8() {
vector<float16_t, 3> arg_0 = (float16_t(1.5h)).xxx;
vector<float16_t, 3> v = arg_0;
- vector<float16_t, 3> v_1 = floor(v);
- vector<float16_t, 3> res = (((v < (float16_t(0.0h)).xxx)) ? (ceil(v)) : (v_1));
+ vector<float16_t, 3> res = (((v < (float16_t(0.0h)).xxx)) ? (ceil(v)) : (floor(v)));
return res;
}
@@ -31,13 +30,13 @@
VertexOutput tint_symbol = (VertexOutput)0;
tint_symbol.pos = (0.0f).xxxx;
tint_symbol.prevent_dce = trunc_103ab8();
- VertexOutput v_2 = tint_symbol;
- return v_2;
+ VertexOutput v_1 = tint_symbol;
+ return v_1;
}
vertex_main_outputs vertex_main() {
- VertexOutput v_3 = vertex_main_inner();
- vertex_main_outputs v_4 = {v_3.prevent_dce, v_3.pos};
- return v_4;
+ VertexOutput v_2 = vertex_main_inner();
+ vertex_main_outputs v_3 = {v_2.prevent_dce, v_2.pos};
+ return v_3;
}
diff --git a/test/tint/builtins/gen/var/trunc/562d05.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/gen/var/trunc/562d05.wgsl.expected.ir.dxc.hlsl
index 316148c..7e2bcae 100644
--- a/test/tint/builtins/gen/var/trunc/562d05.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/gen/var/trunc/562d05.wgsl.expected.ir.dxc.hlsl
@@ -13,8 +13,7 @@
float3 trunc_562d05() {
float3 arg_0 = (1.5f).xxx;
float3 v = arg_0;
- float3 v_1 = floor(v);
- float3 res = (((v < (0.0f).xxx)) ? (ceil(v)) : (v_1));
+ float3 res = (((v < (0.0f).xxx)) ? (ceil(v)) : (floor(v)));
return res;
}
@@ -31,13 +30,13 @@
VertexOutput tint_symbol = (VertexOutput)0;
tint_symbol.pos = (0.0f).xxxx;
tint_symbol.prevent_dce = trunc_562d05();
- VertexOutput v_2 = tint_symbol;
- return v_2;
+ VertexOutput v_1 = tint_symbol;
+ return v_1;
}
vertex_main_outputs vertex_main() {
- VertexOutput v_3 = vertex_main_inner();
- vertex_main_outputs v_4 = {v_3.prevent_dce, v_3.pos};
- return v_4;
+ VertexOutput v_2 = vertex_main_inner();
+ vertex_main_outputs v_3 = {v_2.prevent_dce, v_2.pos};
+ return v_3;
}
diff --git a/test/tint/builtins/gen/var/trunc/562d05.wgsl.expected.ir.fxc.hlsl b/test/tint/builtins/gen/var/trunc/562d05.wgsl.expected.ir.fxc.hlsl
index 316148c..7e2bcae 100644
--- a/test/tint/builtins/gen/var/trunc/562d05.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/builtins/gen/var/trunc/562d05.wgsl.expected.ir.fxc.hlsl
@@ -13,8 +13,7 @@
float3 trunc_562d05() {
float3 arg_0 = (1.5f).xxx;
float3 v = arg_0;
- float3 v_1 = floor(v);
- float3 res = (((v < (0.0f).xxx)) ? (ceil(v)) : (v_1));
+ float3 res = (((v < (0.0f).xxx)) ? (ceil(v)) : (floor(v)));
return res;
}
@@ -31,13 +30,13 @@
VertexOutput tint_symbol = (VertexOutput)0;
tint_symbol.pos = (0.0f).xxxx;
tint_symbol.prevent_dce = trunc_562d05();
- VertexOutput v_2 = tint_symbol;
- return v_2;
+ VertexOutput v_1 = tint_symbol;
+ return v_1;
}
vertex_main_outputs vertex_main() {
- VertexOutput v_3 = vertex_main_inner();
- vertex_main_outputs v_4 = {v_3.prevent_dce, v_3.pos};
- return v_4;
+ VertexOutput v_2 = vertex_main_inner();
+ vertex_main_outputs v_3 = {v_2.prevent_dce, v_2.pos};
+ return v_3;
}
diff --git a/test/tint/builtins/gen/var/trunc/a56109.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/gen/var/trunc/a56109.wgsl.expected.ir.dxc.hlsl
index 6cbf4d7..138c7b9 100644
--- a/test/tint/builtins/gen/var/trunc/a56109.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/gen/var/trunc/a56109.wgsl.expected.ir.dxc.hlsl
@@ -13,8 +13,7 @@
vector<float16_t, 2> trunc_a56109() {
vector<float16_t, 2> arg_0 = (float16_t(1.5h)).xx;
vector<float16_t, 2> v = arg_0;
- vector<float16_t, 2> v_1 = floor(v);
- vector<float16_t, 2> res = (((v < (float16_t(0.0h)).xx)) ? (ceil(v)) : (v_1));
+ vector<float16_t, 2> res = (((v < (float16_t(0.0h)).xx)) ? (ceil(v)) : (floor(v)));
return res;
}
@@ -31,13 +30,13 @@
VertexOutput tint_symbol = (VertexOutput)0;
tint_symbol.pos = (0.0f).xxxx;
tint_symbol.prevent_dce = trunc_a56109();
- VertexOutput v_2 = tint_symbol;
- return v_2;
+ VertexOutput v_1 = tint_symbol;
+ return v_1;
}
vertex_main_outputs vertex_main() {
- VertexOutput v_3 = vertex_main_inner();
- vertex_main_outputs v_4 = {v_3.prevent_dce, v_3.pos};
- return v_4;
+ VertexOutput v_2 = vertex_main_inner();
+ vertex_main_outputs v_3 = {v_2.prevent_dce, v_2.pos};
+ return v_3;
}
diff --git a/test/tint/builtins/gen/var/trunc/cc2b0d.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/gen/var/trunc/cc2b0d.wgsl.expected.ir.dxc.hlsl
index f2c5e45..f1c3fe7 100644
--- a/test/tint/builtins/gen/var/trunc/cc2b0d.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/gen/var/trunc/cc2b0d.wgsl.expected.ir.dxc.hlsl
@@ -13,8 +13,7 @@
float16_t trunc_cc2b0d() {
float16_t arg_0 = float16_t(1.5h);
float16_t v = arg_0;
- float16_t v_1 = floor(v);
- float16_t res = (((v < float16_t(0.0h))) ? (ceil(v)) : (v_1));
+ float16_t res = (((v < float16_t(0.0h))) ? (ceil(v)) : (floor(v)));
return res;
}
@@ -31,13 +30,13 @@
VertexOutput tint_symbol = (VertexOutput)0;
tint_symbol.pos = (0.0f).xxxx;
tint_symbol.prevent_dce = trunc_cc2b0d();
- VertexOutput v_2 = tint_symbol;
- return v_2;
+ VertexOutput v_1 = tint_symbol;
+ return v_1;
}
vertex_main_outputs vertex_main() {
- VertexOutput v_3 = vertex_main_inner();
- vertex_main_outputs v_4 = {v_3.prevent_dce, v_3.pos};
- return v_4;
+ VertexOutput v_2 = vertex_main_inner();
+ vertex_main_outputs v_3 = {v_2.prevent_dce, v_2.pos};
+ return v_3;
}
diff --git a/test/tint/builtins/gen/var/trunc/ce7c17.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/gen/var/trunc/ce7c17.wgsl.expected.ir.dxc.hlsl
index daff1df..0f532a2 100644
--- a/test/tint/builtins/gen/var/trunc/ce7c17.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/gen/var/trunc/ce7c17.wgsl.expected.ir.dxc.hlsl
@@ -13,8 +13,7 @@
vector<float16_t, 4> trunc_ce7c17() {
vector<float16_t, 4> arg_0 = (float16_t(1.5h)).xxxx;
vector<float16_t, 4> v = arg_0;
- vector<float16_t, 4> v_1 = floor(v);
- vector<float16_t, 4> res = (((v < (float16_t(0.0h)).xxxx)) ? (ceil(v)) : (v_1));
+ vector<float16_t, 4> res = (((v < (float16_t(0.0h)).xxxx)) ? (ceil(v)) : (floor(v)));
return res;
}
@@ -31,13 +30,13 @@
VertexOutput tint_symbol = (VertexOutput)0;
tint_symbol.pos = (0.0f).xxxx;
tint_symbol.prevent_dce = trunc_ce7c17();
- VertexOutput v_2 = tint_symbol;
- return v_2;
+ VertexOutput v_1 = tint_symbol;
+ return v_1;
}
vertex_main_outputs vertex_main() {
- VertexOutput v_3 = vertex_main_inner();
- vertex_main_outputs v_4 = {v_3.prevent_dce, v_3.pos};
- return v_4;
+ VertexOutput v_2 = vertex_main_inner();
+ vertex_main_outputs v_3 = {v_2.prevent_dce, v_2.pos};
+ return v_3;
}
diff --git a/test/tint/builtins/gen/var/trunc/e183aa.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/gen/var/trunc/e183aa.wgsl.expected.ir.dxc.hlsl
index 995220f..a96baf8 100644
--- a/test/tint/builtins/gen/var/trunc/e183aa.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/gen/var/trunc/e183aa.wgsl.expected.ir.dxc.hlsl
@@ -13,8 +13,7 @@
float4 trunc_e183aa() {
float4 arg_0 = (1.5f).xxxx;
float4 v = arg_0;
- float4 v_1 = floor(v);
- float4 res = (((v < (0.0f).xxxx)) ? (ceil(v)) : (v_1));
+ float4 res = (((v < (0.0f).xxxx)) ? (ceil(v)) : (floor(v)));
return res;
}
@@ -31,13 +30,13 @@
VertexOutput tint_symbol = (VertexOutput)0;
tint_symbol.pos = (0.0f).xxxx;
tint_symbol.prevent_dce = trunc_e183aa();
- VertexOutput v_2 = tint_symbol;
- return v_2;
+ VertexOutput v_1 = tint_symbol;
+ return v_1;
}
vertex_main_outputs vertex_main() {
- VertexOutput v_3 = vertex_main_inner();
- vertex_main_outputs v_4 = {v_3.prevent_dce, v_3.pos};
- return v_4;
+ VertexOutput v_2 = vertex_main_inner();
+ vertex_main_outputs v_3 = {v_2.prevent_dce, v_2.pos};
+ return v_3;
}
diff --git a/test/tint/builtins/gen/var/trunc/e183aa.wgsl.expected.ir.fxc.hlsl b/test/tint/builtins/gen/var/trunc/e183aa.wgsl.expected.ir.fxc.hlsl
index 995220f..a96baf8 100644
--- a/test/tint/builtins/gen/var/trunc/e183aa.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/builtins/gen/var/trunc/e183aa.wgsl.expected.ir.fxc.hlsl
@@ -13,8 +13,7 @@
float4 trunc_e183aa() {
float4 arg_0 = (1.5f).xxxx;
float4 v = arg_0;
- float4 v_1 = floor(v);
- float4 res = (((v < (0.0f).xxxx)) ? (ceil(v)) : (v_1));
+ float4 res = (((v < (0.0f).xxxx)) ? (ceil(v)) : (floor(v)));
return res;
}
@@ -31,13 +30,13 @@
VertexOutput tint_symbol = (VertexOutput)0;
tint_symbol.pos = (0.0f).xxxx;
tint_symbol.prevent_dce = trunc_e183aa();
- VertexOutput v_2 = tint_symbol;
- return v_2;
+ VertexOutput v_1 = tint_symbol;
+ return v_1;
}
vertex_main_outputs vertex_main() {
- VertexOutput v_3 = vertex_main_inner();
- vertex_main_outputs v_4 = {v_3.prevent_dce, v_3.pos};
- return v_4;
+ VertexOutput v_2 = vertex_main_inner();
+ vertex_main_outputs v_3 = {v_2.prevent_dce, v_2.pos};
+ return v_3;
}
diff --git a/test/tint/builtins/gen/var/trunc/eb83df.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/gen/var/trunc/eb83df.wgsl.expected.ir.dxc.hlsl
index 5751b38..d4eec85 100644
--- a/test/tint/builtins/gen/var/trunc/eb83df.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/gen/var/trunc/eb83df.wgsl.expected.ir.dxc.hlsl
@@ -13,8 +13,7 @@
float trunc_eb83df() {
float arg_0 = 1.5f;
float v = arg_0;
- float v_1 = floor(v);
- float res = (((v < 0.0f)) ? (ceil(v)) : (v_1));
+ float res = (((v < 0.0f)) ? (ceil(v)) : (floor(v)));
return res;
}
@@ -31,13 +30,13 @@
VertexOutput tint_symbol = (VertexOutput)0;
tint_symbol.pos = (0.0f).xxxx;
tint_symbol.prevent_dce = trunc_eb83df();
- VertexOutput v_2 = tint_symbol;
- return v_2;
+ VertexOutput v_1 = tint_symbol;
+ return v_1;
}
vertex_main_outputs vertex_main() {
- VertexOutput v_3 = vertex_main_inner();
- vertex_main_outputs v_4 = {v_3.prevent_dce, v_3.pos};
- return v_4;
+ VertexOutput v_2 = vertex_main_inner();
+ vertex_main_outputs v_3 = {v_2.prevent_dce, v_2.pos};
+ return v_3;
}
diff --git a/test/tint/builtins/gen/var/trunc/eb83df.wgsl.expected.ir.fxc.hlsl b/test/tint/builtins/gen/var/trunc/eb83df.wgsl.expected.ir.fxc.hlsl
index 5751b38..d4eec85 100644
--- a/test/tint/builtins/gen/var/trunc/eb83df.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/builtins/gen/var/trunc/eb83df.wgsl.expected.ir.fxc.hlsl
@@ -13,8 +13,7 @@
float trunc_eb83df() {
float arg_0 = 1.5f;
float v = arg_0;
- float v_1 = floor(v);
- float res = (((v < 0.0f)) ? (ceil(v)) : (v_1));
+ float res = (((v < 0.0f)) ? (ceil(v)) : (floor(v)));
return res;
}
@@ -31,13 +30,13 @@
VertexOutput tint_symbol = (VertexOutput)0;
tint_symbol.pos = (0.0f).xxxx;
tint_symbol.prevent_dce = trunc_eb83df();
- VertexOutput v_2 = tint_symbol;
- return v_2;
+ VertexOutput v_1 = tint_symbol;
+ return v_1;
}
vertex_main_outputs vertex_main() {
- VertexOutput v_3 = vertex_main_inner();
- vertex_main_outputs v_4 = {v_3.prevent_dce, v_3.pos};
- return v_4;
+ VertexOutput v_2 = vertex_main_inner();
+ vertex_main_outputs v_3 = {v_2.prevent_dce, v_2.pos};
+ return v_3;
}
diff --git a/test/tint/builtins/gen/var/trunc/f370d3.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/gen/var/trunc/f370d3.wgsl.expected.ir.dxc.hlsl
index b0aa352..8ce2743 100644
--- a/test/tint/builtins/gen/var/trunc/f370d3.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/gen/var/trunc/f370d3.wgsl.expected.ir.dxc.hlsl
@@ -13,8 +13,7 @@
float2 trunc_f370d3() {
float2 arg_0 = (1.5f).xx;
float2 v = arg_0;
- float2 v_1 = floor(v);
- float2 res = (((v < (0.0f).xx)) ? (ceil(v)) : (v_1));
+ float2 res = (((v < (0.0f).xx)) ? (ceil(v)) : (floor(v)));
return res;
}
@@ -31,13 +30,13 @@
VertexOutput tint_symbol = (VertexOutput)0;
tint_symbol.pos = (0.0f).xxxx;
tint_symbol.prevent_dce = trunc_f370d3();
- VertexOutput v_2 = tint_symbol;
- return v_2;
+ VertexOutput v_1 = tint_symbol;
+ return v_1;
}
vertex_main_outputs vertex_main() {
- VertexOutput v_3 = vertex_main_inner();
- vertex_main_outputs v_4 = {v_3.prevent_dce, v_3.pos};
- return v_4;
+ VertexOutput v_2 = vertex_main_inner();
+ vertex_main_outputs v_3 = {v_2.prevent_dce, v_2.pos};
+ return v_3;
}
diff --git a/test/tint/builtins/gen/var/trunc/f370d3.wgsl.expected.ir.fxc.hlsl b/test/tint/builtins/gen/var/trunc/f370d3.wgsl.expected.ir.fxc.hlsl
index b0aa352..8ce2743 100644
--- a/test/tint/builtins/gen/var/trunc/f370d3.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/builtins/gen/var/trunc/f370d3.wgsl.expected.ir.fxc.hlsl
@@ -13,8 +13,7 @@
float2 trunc_f370d3() {
float2 arg_0 = (1.5f).xx;
float2 v = arg_0;
- float2 v_1 = floor(v);
- float2 res = (((v < (0.0f).xx)) ? (ceil(v)) : (v_1));
+ float2 res = (((v < (0.0f).xx)) ? (ceil(v)) : (floor(v)));
return res;
}
@@ -31,13 +30,13 @@
VertexOutput tint_symbol = (VertexOutput)0;
tint_symbol.pos = (0.0f).xxxx;
tint_symbol.prevent_dce = trunc_f370d3();
- VertexOutput v_2 = tint_symbol;
- return v_2;
+ VertexOutput v_1 = tint_symbol;
+ return v_1;
}
vertex_main_outputs vertex_main() {
- VertexOutput v_3 = vertex_main_inner();
- vertex_main_outputs v_4 = {v_3.prevent_dce, v_3.pos};
- return v_4;
+ VertexOutput v_2 = vertex_main_inner();
+ vertex_main_outputs v_3 = {v_2.prevent_dce, v_2.pos};
+ return v_3;
}
diff --git a/test/tint/builtins/insertBits/scalar/i32.spvasm.expected.glsl b/test/tint/builtins/insertBits/scalar/i32.spvasm.expected.glsl
index 139c7be..b82b0a1 100644
--- a/test/tint/builtins/insertBits/scalar/i32.spvasm.expected.glsl
+++ b/test/tint/builtins/insertBits/scalar/i32.spvasm.expected.glsl
@@ -7,11 +7,10 @@
uint count = 0u;
int v_1 = v;
int v_2 = n;
- uint v_3 = count;
- uint v_4 = min(offset_1, 32u);
- uint v_5 = min(v_3, (32u - v_4));
- int v_6 = int(v_4);
- int x_15 = bitfieldInsert(v_1, v_2, v_6, int(v_5));
+ uint v_3 = min(offset_1, 32u);
+ uint v_4 = min(count, (32u - v_3));
+ int v_5 = int(v_3);
+ int x_15 = bitfieldInsert(v_1, v_2, v_5, int(v_4));
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
diff --git a/test/tint/builtins/insertBits/scalar/i32.spvasm.expected.ir.msl b/test/tint/builtins/insertBits/scalar/i32.spvasm.expected.ir.msl
index 34f38e6..0097341 100644
--- a/test/tint/builtins/insertBits/scalar/i32.spvasm.expected.ir.msl
+++ b/test/tint/builtins/insertBits/scalar/i32.spvasm.expected.ir.msl
@@ -6,11 +6,8 @@
int n = 0;
uint offset_1 = 0u;
uint count = 0u;
- int const v_1 = v;
- int const v_2 = n;
- uint const v_3 = count;
- uint const v_4 = min(offset_1, 32u);
- int const x_15 = insert_bits(v_1, v_2, v_4, min(v_3, (32u - v_4)));
+ uint const v_1 = min(offset_1, 32u);
+ int const x_15 = insert_bits(v, n, v_1, min(count, (32u - v_1)));
}
kernel void f() {
diff --git a/test/tint/builtins/insertBits/scalar/u32.spvasm.expected.glsl b/test/tint/builtins/insertBits/scalar/u32.spvasm.expected.glsl
index 999e1d7..4c0bc16 100644
--- a/test/tint/builtins/insertBits/scalar/u32.spvasm.expected.glsl
+++ b/test/tint/builtins/insertBits/scalar/u32.spvasm.expected.glsl
@@ -7,11 +7,10 @@
uint count = 0u;
uint v_1 = v;
uint v_2 = n;
- uint v_3 = count;
- uint v_4 = min(offset_1, 32u);
- uint v_5 = min(v_3, (32u - v_4));
- int v_6 = int(v_4);
- uint x_12 = bitfieldInsert(v_1, v_2, v_6, int(v_5));
+ uint v_3 = min(offset_1, 32u);
+ uint v_4 = min(count, (32u - v_3));
+ int v_5 = int(v_3);
+ uint x_12 = bitfieldInsert(v_1, v_2, v_5, int(v_4));
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
diff --git a/test/tint/builtins/insertBits/scalar/u32.spvasm.expected.ir.msl b/test/tint/builtins/insertBits/scalar/u32.spvasm.expected.ir.msl
index 80b5800..0cacf62 100644
--- a/test/tint/builtins/insertBits/scalar/u32.spvasm.expected.ir.msl
+++ b/test/tint/builtins/insertBits/scalar/u32.spvasm.expected.ir.msl
@@ -6,11 +6,8 @@
uint n = 0u;
uint offset_1 = 0u;
uint count = 0u;
- uint const v_1 = v;
- uint const v_2 = n;
- uint const v_3 = count;
- uint const v_4 = min(offset_1, 32u);
- uint const x_12 = insert_bits(v_1, v_2, v_4, min(v_3, (32u - v_4)));
+ uint const v_1 = min(offset_1, 32u);
+ uint const x_12 = insert_bits(v, n, v_1, min(count, (32u - v_1)));
}
kernel void f() {
diff --git a/test/tint/builtins/insertBits/vec3/i32.spvasm.expected.glsl b/test/tint/builtins/insertBits/vec3/i32.spvasm.expected.glsl
index 7b5ab20..e1aa777 100644
--- a/test/tint/builtins/insertBits/vec3/i32.spvasm.expected.glsl
+++ b/test/tint/builtins/insertBits/vec3/i32.spvasm.expected.glsl
@@ -7,11 +7,10 @@
uint count = 0u;
ivec3 v_1 = v;
ivec3 v_2 = n;
- uint v_3 = count;
- uint v_4 = min(offset_1, 32u);
- uint v_5 = min(v_3, (32u - v_4));
- int v_6 = int(v_4);
- ivec3 x_16 = bitfieldInsert(v_1, v_2, v_6, int(v_5));
+ uint v_3 = min(offset_1, 32u);
+ uint v_4 = min(count, (32u - v_3));
+ int v_5 = int(v_3);
+ ivec3 x_16 = bitfieldInsert(v_1, v_2, v_5, int(v_4));
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
diff --git a/test/tint/builtins/insertBits/vec3/i32.spvasm.expected.ir.msl b/test/tint/builtins/insertBits/vec3/i32.spvasm.expected.ir.msl
index a86c2a02..e952c38 100644
--- a/test/tint/builtins/insertBits/vec3/i32.spvasm.expected.ir.msl
+++ b/test/tint/builtins/insertBits/vec3/i32.spvasm.expected.ir.msl
@@ -6,11 +6,8 @@
int3 n = int3(0);
uint offset_1 = 0u;
uint count = 0u;
- int3 const v_1 = v;
- int3 const v_2 = n;
- uint const v_3 = count;
- uint const v_4 = min(offset_1, 32u);
- int3 const x_16 = insert_bits(v_1, v_2, v_4, min(v_3, (32u - v_4)));
+ uint const v_1 = min(offset_1, 32u);
+ int3 const x_16 = insert_bits(v, n, v_1, min(count, (32u - v_1)));
}
kernel void f() {
diff --git a/test/tint/builtins/insertBits/vec3/u32.spvasm.expected.glsl b/test/tint/builtins/insertBits/vec3/u32.spvasm.expected.glsl
index b737b57..a03f73c 100644
--- a/test/tint/builtins/insertBits/vec3/u32.spvasm.expected.glsl
+++ b/test/tint/builtins/insertBits/vec3/u32.spvasm.expected.glsl
@@ -7,11 +7,10 @@
uint count = 0u;
uvec3 v_1 = v;
uvec3 v_2 = n;
- uint v_3 = count;
- uint v_4 = min(offset_1, 32u);
- uint v_5 = min(v_3, (32u - v_4));
- int v_6 = int(v_4);
- uvec3 x_15 = bitfieldInsert(v_1, v_2, v_6, int(v_5));
+ uint v_3 = min(offset_1, 32u);
+ uint v_4 = min(count, (32u - v_3));
+ int v_5 = int(v_3);
+ uvec3 x_15 = bitfieldInsert(v_1, v_2, v_5, int(v_4));
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
diff --git a/test/tint/builtins/insertBits/vec3/u32.spvasm.expected.ir.msl b/test/tint/builtins/insertBits/vec3/u32.spvasm.expected.ir.msl
index 9086593..673bbae 100644
--- a/test/tint/builtins/insertBits/vec3/u32.spvasm.expected.ir.msl
+++ b/test/tint/builtins/insertBits/vec3/u32.spvasm.expected.ir.msl
@@ -6,11 +6,8 @@
uint3 n = uint3(0u);
uint offset_1 = 0u;
uint count = 0u;
- uint3 const v_1 = v;
- uint3 const v_2 = n;
- uint const v_3 = count;
- uint const v_4 = min(offset_1, 32u);
- uint3 const x_15 = insert_bits(v_1, v_2, v_4, min(v_3, (32u - v_4)));
+ uint const v_1 = min(offset_1, 32u);
+ uint3 const x_15 = insert_bits(v, n, v_1, min(count, (32u - v_1)));
}
kernel void f() {
diff --git a/test/tint/builtins/modf/scalar/mixed.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/modf/scalar/mixed.wgsl.expected.ir.dxc.hlsl
index 55d5071..657d034 100644
--- a/test/tint/builtins/modf/scalar/mixed.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/modf/scalar/mixed.wgsl.expected.ir.dxc.hlsl
@@ -9,11 +9,10 @@
float runtime_in = 1.25f;
modf_result_f32 res = {0.25f, 1.0f};
float v = 0.0f;
- float v_1 = modf(runtime_in, v);
- modf_result_f32 v_2 = {v_1, v};
+ modf_result_f32 v_1 = {modf(runtime_in, v), v};
+ res = v_1;
+ modf_result_f32 v_2 = {0.25f, 1.0f};
res = v_2;
- modf_result_f32 v_3 = {0.25f, 1.0f};
- res = v_3;
float fract = res.fract;
float whole = res.whole;
}
diff --git a/test/tint/builtins/modf/scalar/mixed.wgsl.expected.ir.fxc.hlsl b/test/tint/builtins/modf/scalar/mixed.wgsl.expected.ir.fxc.hlsl
index 55d5071..657d034 100644
--- a/test/tint/builtins/modf/scalar/mixed.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/builtins/modf/scalar/mixed.wgsl.expected.ir.fxc.hlsl
@@ -9,11 +9,10 @@
float runtime_in = 1.25f;
modf_result_f32 res = {0.25f, 1.0f};
float v = 0.0f;
- float v_1 = modf(runtime_in, v);
- modf_result_f32 v_2 = {v_1, v};
+ modf_result_f32 v_1 = {modf(runtime_in, v), v};
+ res = v_1;
+ modf_result_f32 v_2 = {0.25f, 1.0f};
res = v_2;
- modf_result_f32 v_3 = {0.25f, 1.0f};
- res = v_3;
float fract = res.fract;
float whole = res.whole;
}
diff --git a/test/tint/builtins/modf/scalar/runtime.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/modf/scalar/runtime.wgsl.expected.ir.dxc.hlsl
index d70a1c3..f72ce73 100644
--- a/test/tint/builtins/modf/scalar/runtime.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/modf/scalar/runtime.wgsl.expected.ir.dxc.hlsl
@@ -8,8 +8,7 @@
void main() {
float tint_symbol = 1.25f;
float v = 0.0f;
- float v_1 = modf(tint_symbol, v);
- modf_result_f32 res = {v_1, v};
+ modf_result_f32 res = {modf(tint_symbol, v), v};
float fract = res.fract;
float whole = res.whole;
}
diff --git a/test/tint/builtins/modf/scalar/runtime.wgsl.expected.ir.fxc.hlsl b/test/tint/builtins/modf/scalar/runtime.wgsl.expected.ir.fxc.hlsl
index d70a1c3..f72ce73 100644
--- a/test/tint/builtins/modf/scalar/runtime.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/builtins/modf/scalar/runtime.wgsl.expected.ir.fxc.hlsl
@@ -8,8 +8,7 @@
void main() {
float tint_symbol = 1.25f;
float v = 0.0f;
- float v_1 = modf(tint_symbol, v);
- modf_result_f32 res = {v_1, v};
+ modf_result_f32 res = {modf(tint_symbol, v), v};
float fract = res.fract;
float whole = res.whole;
}
diff --git a/test/tint/builtins/modf/vector/mixed.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/modf/vector/mixed.wgsl.expected.ir.dxc.hlsl
index 3aa1172..f0ff41c 100644
--- a/test/tint/builtins/modf/vector/mixed.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/modf/vector/mixed.wgsl.expected.ir.dxc.hlsl
@@ -9,11 +9,10 @@
float2 runtime_in = float2(1.25f, 3.75f);
modf_result_vec2_f32 res = {float2(0.25f, 0.75f), float2(1.0f, 3.0f)};
float2 v = (0.0f).xx;
- float2 v_1 = modf(runtime_in, v);
- modf_result_vec2_f32 v_2 = {v_1, v};
+ modf_result_vec2_f32 v_1 = {modf(runtime_in, v), v};
+ res = v_1;
+ modf_result_vec2_f32 v_2 = {float2(0.25f, 0.75f), float2(1.0f, 3.0f)};
res = v_2;
- modf_result_vec2_f32 v_3 = {float2(0.25f, 0.75f), float2(1.0f, 3.0f)};
- res = v_3;
float2 fract = res.fract;
float2 whole = res.whole;
}
diff --git a/test/tint/builtins/modf/vector/mixed.wgsl.expected.ir.fxc.hlsl b/test/tint/builtins/modf/vector/mixed.wgsl.expected.ir.fxc.hlsl
index 3aa1172..f0ff41c 100644
--- a/test/tint/builtins/modf/vector/mixed.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/builtins/modf/vector/mixed.wgsl.expected.ir.fxc.hlsl
@@ -9,11 +9,10 @@
float2 runtime_in = float2(1.25f, 3.75f);
modf_result_vec2_f32 res = {float2(0.25f, 0.75f), float2(1.0f, 3.0f)};
float2 v = (0.0f).xx;
- float2 v_1 = modf(runtime_in, v);
- modf_result_vec2_f32 v_2 = {v_1, v};
+ modf_result_vec2_f32 v_1 = {modf(runtime_in, v), v};
+ res = v_1;
+ modf_result_vec2_f32 v_2 = {float2(0.25f, 0.75f), float2(1.0f, 3.0f)};
res = v_2;
- modf_result_vec2_f32 v_3 = {float2(0.25f, 0.75f), float2(1.0f, 3.0f)};
- res = v_3;
float2 fract = res.fract;
float2 whole = res.whole;
}
diff --git a/test/tint/builtins/modf/vector/runtime.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/modf/vector/runtime.wgsl.expected.ir.dxc.hlsl
index 211bac0..a6ea686 100644
--- a/test/tint/builtins/modf/vector/runtime.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/modf/vector/runtime.wgsl.expected.ir.dxc.hlsl
@@ -8,8 +8,7 @@
void main() {
float2 tint_symbol = float2(1.25f, 3.75f);
float2 v = (0.0f).xx;
- float2 v_1 = modf(tint_symbol, v);
- modf_result_vec2_f32 res = {v_1, v};
+ modf_result_vec2_f32 res = {modf(tint_symbol, v), v};
float2 fract = res.fract;
float2 whole = res.whole;
}
diff --git a/test/tint/builtins/modf/vector/runtime.wgsl.expected.ir.fxc.hlsl b/test/tint/builtins/modf/vector/runtime.wgsl.expected.ir.fxc.hlsl
index 211bac0..a6ea686 100644
--- a/test/tint/builtins/modf/vector/runtime.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/builtins/modf/vector/runtime.wgsl.expected.ir.fxc.hlsl
@@ -8,8 +8,7 @@
void main() {
float2 tint_symbol = float2(1.25f, 3.75f);
float2 v = (0.0f).xx;
- float2 v_1 = modf(tint_symbol, v);
- modf_result_vec2_f32 res = {v_1, v};
+ modf_result_vec2_f32 res = {modf(tint_symbol, v), v};
float2 fract = res.fract;
float2 whole = res.whole;
}
diff --git a/test/tint/builtins/textureDimensions/depth_ms.spvasm.expected.ir.msl b/test/tint/builtins/textureDimensions/depth_ms.spvasm.expected.ir.msl
index d095f4a..cd6c5c0 100644
--- a/test/tint/builtins/textureDimensions/depth_ms.spvasm.expected.ir.msl
+++ b/test/tint/builtins/textureDimensions/depth_ms.spvasm.expected.ir.msl
@@ -16,8 +16,7 @@
void textureDimensions_f60bdb(tint_module_vars_struct tint_module_vars) {
int2 res = int2(0);
- uint const v = tint_module_vars.arg_0.get_width();
- res = int2(uint2(v, tint_module_vars.arg_0.get_height()));
+ res = int2(uint2(tint_module_vars.arg_0.get_width(), tint_module_vars.arg_0.get_height()));
}
void tint_symbol_2(float4 tint_symbol, tint_module_vars_struct tint_module_vars) {
diff --git a/test/tint/builtins/textureLoad/texture_external_param.wgsl.expected.glsl b/test/tint/builtins/textureLoad/texture_external_param.wgsl.expected.glsl
index 34dfc49..dbd5919 100644
--- a/test/tint/builtins/textureLoad/texture_external_param.wgsl.expected.glsl
+++ b/test/tint/builtins/textureLoad/texture_external_param.wgsl.expected.glsl
@@ -65,45 +65,41 @@
uniform highp sampler2D arg_0_plane1;
vec3 tint_GammaCorrection(vec3 v, tint_GammaTransferParams params) {
vec3 v_2 = vec3(params.G);
- vec3 v_3 = vec3(params.D);
- vec3 v_4 = abs(v);
- vec3 v_5 = sign(v);
- bvec3 v_6 = lessThan(v_4, v_3);
- return mix((v_5 * (pow(((params.A * v_4) + params.B), v_2) + params.E)), (v_5 * ((params.C * v_4) + params.F)), v_6);
+ return mix((sign(v) * (pow(((params.A * abs(v)) + params.B), v_2) + params.E)), (sign(v) * ((params.C * abs(v)) + params.F)), lessThan(abs(v), vec3(params.D)));
}
vec4 tint_TextureLoadExternal(tint_ExternalTextureParams params, uvec2 coords) {
- vec2 v_7 = round((params.loadTransform * vec3(vec2(min(coords, params.visibleSize)), 1.0f)));
- uvec2 v_8 = uvec2(v_7);
- vec3 v_9 = vec3(0.0f);
- float v_10 = 0.0f;
+ vec2 v_3 = round((params.loadTransform * vec3(vec2(min(coords, params.visibleSize)), 1.0f)));
+ uvec2 v_4 = uvec2(v_3);
+ vec3 v_5 = vec3(0.0f);
+ float v_6 = 0.0f;
if ((params.numPlanes == 1u)) {
- ivec2 v_11 = ivec2(v_8);
- vec4 v_12 = texelFetch(arg_0_plane0, v_11, int(0u));
- v_9 = v_12.xyz;
- v_10 = v_12[3u];
+ ivec2 v_7 = ivec2(v_4);
+ vec4 v_8 = texelFetch(arg_0_plane0, v_7, int(0u));
+ v_5 = v_8.xyz;
+ v_6 = v_8[3u];
} else {
- ivec2 v_13 = ivec2(v_8);
- float v_14 = texelFetch(arg_0_plane0, v_13, int(0u))[0u];
- ivec2 v_15 = ivec2(uvec2((v_7 * params.plane1CoordFactor)));
- v_9 = (vec4(v_14, texelFetch(arg_0_plane1, v_15, int(0u)).xy, 1.0f) * params.yuvToRgbConversionMatrix);
- v_10 = 1.0f;
+ ivec2 v_9 = ivec2(v_4);
+ float v_10 = texelFetch(arg_0_plane0, v_9, int(0u))[0u];
+ ivec2 v_11 = ivec2(uvec2((v_3 * params.plane1CoordFactor)));
+ v_5 = (vec4(v_10, texelFetch(arg_0_plane1, v_11, int(0u)).xy, 1.0f) * params.yuvToRgbConversionMatrix);
+ v_6 = 1.0f;
}
- vec3 v_16 = v_9;
- vec3 v_17 = vec3(0.0f);
+ vec3 v_12 = v_5;
+ vec3 v_13 = vec3(0.0f);
if ((params.doYuvToRgbConversionOnly == 0u)) {
- v_17 = tint_GammaCorrection((params.gamutConversionMatrix * tint_GammaCorrection(v_16, params.gammaDecodeParams)), params.gammaEncodeParams);
+ v_13 = tint_GammaCorrection((params.gamutConversionMatrix * tint_GammaCorrection(v_12, params.gammaDecodeParams)), params.gammaEncodeParams);
} else {
- v_17 = v_16;
+ v_13 = v_12;
}
- return vec4(v_17, v_10);
+ return vec4(v_13, v_6);
}
vec4 textureLoad2d(tint_ExternalTextureParams tint_symbol_params, ivec2 coords) {
return tint_TextureLoadExternal(tint_symbol_params, uvec2(coords));
}
tint_ExternalTextureParams tint_convert_tint_ExternalTextureParams(tint_ExternalTextureParams_std140 tint_input) {
- mat3 v_18 = mat3(tint_input.gamutConversionMatrix_col0, tint_input.gamutConversionMatrix_col1, tint_input.gamutConversionMatrix_col2);
- mat3x2 v_19 = mat3x2(tint_input.sampleTransform_col0, tint_input.sampleTransform_col1, tint_input.sampleTransform_col2);
- return tint_ExternalTextureParams(tint_input.numPlanes, tint_input.doYuvToRgbConversionOnly, tint_input.yuvToRgbConversionMatrix, tint_input.gammaDecodeParams, tint_input.gammaEncodeParams, v_18, v_19, mat3x2(tint_input.loadTransform_col0, tint_input.loadTransform_col1, tint_input.loadTransform_col2), tint_input.samplePlane0RectMin, tint_input.samplePlane0RectMax, tint_input.samplePlane1RectMin, tint_input.samplePlane1RectMax, tint_input.visibleSize, tint_input.plane1CoordFactor);
+ mat3 v_14 = mat3(tint_input.gamutConversionMatrix_col0, tint_input.gamutConversionMatrix_col1, tint_input.gamutConversionMatrix_col2);
+ mat3x2 v_15 = mat3x2(tint_input.sampleTransform_col0, tint_input.sampleTransform_col1, tint_input.sampleTransform_col2);
+ return tint_ExternalTextureParams(tint_input.numPlanes, tint_input.doYuvToRgbConversionOnly, tint_input.yuvToRgbConversionMatrix, tint_input.gammaDecodeParams, tint_input.gammaEncodeParams, v_14, v_15, mat3x2(tint_input.loadTransform_col0, tint_input.loadTransform_col1, tint_input.loadTransform_col2), tint_input.samplePlane0RectMin, tint_input.samplePlane0RectMax, tint_input.samplePlane1RectMin, tint_input.samplePlane1RectMax, tint_input.visibleSize, tint_input.plane1CoordFactor);
}
void doTextureLoad() {
vec4 res = textureLoad2d(tint_convert_tint_ExternalTextureParams(v_1.inner), ivec2(0));
@@ -187,45 +183,41 @@
uniform highp sampler2D arg_0_plane1;
vec3 tint_GammaCorrection(vec3 v, tint_GammaTransferParams params) {
vec3 v_2 = vec3(params.G);
- vec3 v_3 = vec3(params.D);
- vec3 v_4 = abs(v);
- vec3 v_5 = sign(v);
- bvec3 v_6 = lessThan(v_4, v_3);
- return mix((v_5 * (pow(((params.A * v_4) + params.B), v_2) + params.E)), (v_5 * ((params.C * v_4) + params.F)), v_6);
+ return mix((sign(v) * (pow(((params.A * abs(v)) + params.B), v_2) + params.E)), (sign(v) * ((params.C * abs(v)) + params.F)), lessThan(abs(v), vec3(params.D)));
}
vec4 tint_TextureLoadExternal(tint_ExternalTextureParams params, uvec2 coords) {
- vec2 v_7 = round((params.loadTransform * vec3(vec2(min(coords, params.visibleSize)), 1.0f)));
- uvec2 v_8 = uvec2(v_7);
- vec3 v_9 = vec3(0.0f);
- float v_10 = 0.0f;
+ vec2 v_3 = round((params.loadTransform * vec3(vec2(min(coords, params.visibleSize)), 1.0f)));
+ uvec2 v_4 = uvec2(v_3);
+ vec3 v_5 = vec3(0.0f);
+ float v_6 = 0.0f;
if ((params.numPlanes == 1u)) {
- ivec2 v_11 = ivec2(v_8);
- vec4 v_12 = texelFetch(arg_0_plane0, v_11, int(0u));
- v_9 = v_12.xyz;
- v_10 = v_12[3u];
+ ivec2 v_7 = ivec2(v_4);
+ vec4 v_8 = texelFetch(arg_0_plane0, v_7, int(0u));
+ v_5 = v_8.xyz;
+ v_6 = v_8[3u];
} else {
- ivec2 v_13 = ivec2(v_8);
- float v_14 = texelFetch(arg_0_plane0, v_13, int(0u))[0u];
- ivec2 v_15 = ivec2(uvec2((v_7 * params.plane1CoordFactor)));
- v_9 = (vec4(v_14, texelFetch(arg_0_plane1, v_15, int(0u)).xy, 1.0f) * params.yuvToRgbConversionMatrix);
- v_10 = 1.0f;
+ ivec2 v_9 = ivec2(v_4);
+ float v_10 = texelFetch(arg_0_plane0, v_9, int(0u))[0u];
+ ivec2 v_11 = ivec2(uvec2((v_3 * params.plane1CoordFactor)));
+ v_5 = (vec4(v_10, texelFetch(arg_0_plane1, v_11, int(0u)).xy, 1.0f) * params.yuvToRgbConversionMatrix);
+ v_6 = 1.0f;
}
- vec3 v_16 = v_9;
- vec3 v_17 = vec3(0.0f);
+ vec3 v_12 = v_5;
+ vec3 v_13 = vec3(0.0f);
if ((params.doYuvToRgbConversionOnly == 0u)) {
- v_17 = tint_GammaCorrection((params.gamutConversionMatrix * tint_GammaCorrection(v_16, params.gammaDecodeParams)), params.gammaEncodeParams);
+ v_13 = tint_GammaCorrection((params.gamutConversionMatrix * tint_GammaCorrection(v_12, params.gammaDecodeParams)), params.gammaEncodeParams);
} else {
- v_17 = v_16;
+ v_13 = v_12;
}
- return vec4(v_17, v_10);
+ return vec4(v_13, v_6);
}
vec4 textureLoad2d(tint_ExternalTextureParams tint_symbol_params, ivec2 coords) {
return tint_TextureLoadExternal(tint_symbol_params, uvec2(coords));
}
tint_ExternalTextureParams tint_convert_tint_ExternalTextureParams(tint_ExternalTextureParams_std140 tint_input) {
- mat3 v_18 = mat3(tint_input.gamutConversionMatrix_col0, tint_input.gamutConversionMatrix_col1, tint_input.gamutConversionMatrix_col2);
- mat3x2 v_19 = mat3x2(tint_input.sampleTransform_col0, tint_input.sampleTransform_col1, tint_input.sampleTransform_col2);
- return tint_ExternalTextureParams(tint_input.numPlanes, tint_input.doYuvToRgbConversionOnly, tint_input.yuvToRgbConversionMatrix, tint_input.gammaDecodeParams, tint_input.gammaEncodeParams, v_18, v_19, mat3x2(tint_input.loadTransform_col0, tint_input.loadTransform_col1, tint_input.loadTransform_col2), tint_input.samplePlane0RectMin, tint_input.samplePlane0RectMax, tint_input.samplePlane1RectMin, tint_input.samplePlane1RectMax, tint_input.visibleSize, tint_input.plane1CoordFactor);
+ mat3 v_14 = mat3(tint_input.gamutConversionMatrix_col0, tint_input.gamutConversionMatrix_col1, tint_input.gamutConversionMatrix_col2);
+ mat3x2 v_15 = mat3x2(tint_input.sampleTransform_col0, tint_input.sampleTransform_col1, tint_input.sampleTransform_col2);
+ return tint_ExternalTextureParams(tint_input.numPlanes, tint_input.doYuvToRgbConversionOnly, tint_input.yuvToRgbConversionMatrix, tint_input.gammaDecodeParams, tint_input.gammaEncodeParams, v_14, v_15, mat3x2(tint_input.loadTransform_col0, tint_input.loadTransform_col1, tint_input.loadTransform_col2), tint_input.samplePlane0RectMin, tint_input.samplePlane0RectMax, tint_input.samplePlane1RectMin, tint_input.samplePlane1RectMax, tint_input.visibleSize, tint_input.plane1CoordFactor);
}
void doTextureLoad() {
vec4 res = textureLoad2d(tint_convert_tint_ExternalTextureParams(v_1.inner), ivec2(0));
@@ -300,45 +292,41 @@
uniform highp sampler2D arg_0_plane1;
vec3 tint_GammaCorrection(vec3 v, tint_GammaTransferParams params) {
vec3 v_2 = vec3(params.G);
- vec3 v_3 = vec3(params.D);
- vec3 v_4 = abs(v);
- vec3 v_5 = sign(v);
- bvec3 v_6 = lessThan(v_4, v_3);
- return mix((v_5 * (pow(((params.A * v_4) + params.B), v_2) + params.E)), (v_5 * ((params.C * v_4) + params.F)), v_6);
+ return mix((sign(v) * (pow(((params.A * abs(v)) + params.B), v_2) + params.E)), (sign(v) * ((params.C * abs(v)) + params.F)), lessThan(abs(v), vec3(params.D)));
}
vec4 tint_TextureLoadExternal(tint_ExternalTextureParams params, uvec2 coords) {
- vec2 v_7 = round((params.loadTransform * vec3(vec2(min(coords, params.visibleSize)), 1.0f)));
- uvec2 v_8 = uvec2(v_7);
- vec3 v_9 = vec3(0.0f);
- float v_10 = 0.0f;
+ vec2 v_3 = round((params.loadTransform * vec3(vec2(min(coords, params.visibleSize)), 1.0f)));
+ uvec2 v_4 = uvec2(v_3);
+ vec3 v_5 = vec3(0.0f);
+ float v_6 = 0.0f;
if ((params.numPlanes == 1u)) {
- ivec2 v_11 = ivec2(v_8);
- vec4 v_12 = texelFetch(arg_0_plane0, v_11, int(0u));
- v_9 = v_12.xyz;
- v_10 = v_12[3u];
+ ivec2 v_7 = ivec2(v_4);
+ vec4 v_8 = texelFetch(arg_0_plane0, v_7, int(0u));
+ v_5 = v_8.xyz;
+ v_6 = v_8[3u];
} else {
- ivec2 v_13 = ivec2(v_8);
- float v_14 = texelFetch(arg_0_plane0, v_13, int(0u))[0u];
- ivec2 v_15 = ivec2(uvec2((v_7 * params.plane1CoordFactor)));
- v_9 = (vec4(v_14, texelFetch(arg_0_plane1, v_15, int(0u)).xy, 1.0f) * params.yuvToRgbConversionMatrix);
- v_10 = 1.0f;
+ ivec2 v_9 = ivec2(v_4);
+ float v_10 = texelFetch(arg_0_plane0, v_9, int(0u))[0u];
+ ivec2 v_11 = ivec2(uvec2((v_3 * params.plane1CoordFactor)));
+ v_5 = (vec4(v_10, texelFetch(arg_0_plane1, v_11, int(0u)).xy, 1.0f) * params.yuvToRgbConversionMatrix);
+ v_6 = 1.0f;
}
- vec3 v_16 = v_9;
- vec3 v_17 = vec3(0.0f);
+ vec3 v_12 = v_5;
+ vec3 v_13 = vec3(0.0f);
if ((params.doYuvToRgbConversionOnly == 0u)) {
- v_17 = tint_GammaCorrection((params.gamutConversionMatrix * tint_GammaCorrection(v_16, params.gammaDecodeParams)), params.gammaEncodeParams);
+ v_13 = tint_GammaCorrection((params.gamutConversionMatrix * tint_GammaCorrection(v_12, params.gammaDecodeParams)), params.gammaEncodeParams);
} else {
- v_17 = v_16;
+ v_13 = v_12;
}
- return vec4(v_17, v_10);
+ return vec4(v_13, v_6);
}
vec4 textureLoad2d(tint_ExternalTextureParams tint_symbol_params, ivec2 coords) {
return tint_TextureLoadExternal(tint_symbol_params, uvec2(coords));
}
tint_ExternalTextureParams tint_convert_tint_ExternalTextureParams(tint_ExternalTextureParams_std140 tint_input) {
- mat3 v_18 = mat3(tint_input.gamutConversionMatrix_col0, tint_input.gamutConversionMatrix_col1, tint_input.gamutConversionMatrix_col2);
- mat3x2 v_19 = mat3x2(tint_input.sampleTransform_col0, tint_input.sampleTransform_col1, tint_input.sampleTransform_col2);
- return tint_ExternalTextureParams(tint_input.numPlanes, tint_input.doYuvToRgbConversionOnly, tint_input.yuvToRgbConversionMatrix, tint_input.gammaDecodeParams, tint_input.gammaEncodeParams, v_18, v_19, mat3x2(tint_input.loadTransform_col0, tint_input.loadTransform_col1, tint_input.loadTransform_col2), tint_input.samplePlane0RectMin, tint_input.samplePlane0RectMax, tint_input.samplePlane1RectMin, tint_input.samplePlane1RectMax, tint_input.visibleSize, tint_input.plane1CoordFactor);
+ mat3 v_14 = mat3(tint_input.gamutConversionMatrix_col0, tint_input.gamutConversionMatrix_col1, tint_input.gamutConversionMatrix_col2);
+ mat3x2 v_15 = mat3x2(tint_input.sampleTransform_col0, tint_input.sampleTransform_col1, tint_input.sampleTransform_col2);
+ return tint_ExternalTextureParams(tint_input.numPlanes, tint_input.doYuvToRgbConversionOnly, tint_input.yuvToRgbConversionMatrix, tint_input.gammaDecodeParams, tint_input.gammaEncodeParams, v_14, v_15, mat3x2(tint_input.loadTransform_col0, tint_input.loadTransform_col1, tint_input.loadTransform_col2), tint_input.samplePlane0RectMin, tint_input.samplePlane0RectMax, tint_input.samplePlane1RectMin, tint_input.samplePlane1RectMax, tint_input.visibleSize, tint_input.plane1CoordFactor);
}
void doTextureLoad() {
vec4 res = textureLoad2d(tint_convert_tint_ExternalTextureParams(v_1.inner), ivec2(0));
diff --git a/test/tint/builtins/textureLoad/texture_external_param.wgsl.expected.ir.dxc.hlsl b/test/tint/builtins/textureLoad/texture_external_param.wgsl.expected.ir.dxc.hlsl
index 44c0766..ae60969 100644
--- a/test/tint/builtins/textureLoad/texture_external_param.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/builtins/textureLoad/texture_external_param.wgsl.expected.ir.dxc.hlsl
@@ -43,104 +43,92 @@
float3 tint_GammaCorrection(float3 v, tint_GammaTransferParams params) {
float3 v_1 = float3((params.G).xxx);
float3 v_2 = float3((params.D).xxx);
- float3 v_3 = abs(v);
- float3 v_4 = float3(sign(v));
- return (((v_3 < v_2)) ? ((v_4 * ((params.C * v_3) + params.F))) : ((v_4 * (pow(((params.A * v_3) + params.B), v_1) + params.E))));
+ float3 v_3 = float3(sign(v));
+ return (((abs(v) < v_2)) ? ((v_3 * ((params.C * abs(v)) + params.F))) : ((v_3 * (pow(((params.A * abs(v)) + params.B), v_1) + params.E))));
}
float4 tint_TextureLoadExternal(Texture2D<float4> plane_0, Texture2D<float4> plane_1, tint_ExternalTextureParams params, uint2 coords) {
- float2 v_5 = round(mul(float3(float2(min(coords, params.visibleSize)), 1.0f), params.loadTransform));
- uint2 v_6 = tint_v2f32_to_v2u32(v_5);
- float3 v_7 = (0.0f).xxx;
- float v_8 = 0.0f;
+ float2 v_4 = round(mul(float3(float2(min(coords, params.visibleSize)), 1.0f), params.loadTransform));
+ uint2 v_5 = tint_v2f32_to_v2u32(v_4);
+ float3 v_6 = (0.0f).xxx;
+ float v_7 = 0.0f;
if ((params.numPlanes == 1u)) {
- int2 v_9 = int2(v_6);
- float4 v_10 = float4(plane_0.Load(int3(v_9, int(0u))));
- v_7 = v_10.xyz;
- v_8 = v_10.w;
+ int2 v_8 = int2(v_5);
+ float4 v_9 = float4(plane_0.Load(int3(v_8, int(0u))));
+ v_6 = v_9.xyz;
+ v_7 = v_9.w;
} else {
- int2 v_11 = int2(v_6);
- float v_12 = float4(plane_0.Load(int3(v_11, int(0u)))).x;
- int2 v_13 = int2(tint_v2f32_to_v2u32((v_5 * params.plane1CoordFactor)));
- v_7 = mul(params.yuvToRgbConversionMatrix, float4(v_12, float4(plane_1.Load(int3(v_13, int(0u)))).xy, 1.0f));
- v_8 = 1.0f;
+ int2 v_10 = int2(v_5);
+ float v_11 = float4(plane_0.Load(int3(v_10, int(0u)))).x;
+ int2 v_12 = int2(tint_v2f32_to_v2u32((v_4 * params.plane1CoordFactor)));
+ v_6 = mul(params.yuvToRgbConversionMatrix, float4(v_11, float4(plane_1.Load(int3(v_12, int(0u)))).xy, 1.0f));
+ v_7 = 1.0f;
}
- float3 v_14 = v_7;
- float3 v_15 = (0.0f).xxx;
+ float3 v_13 = v_6;
+ float3 v_14 = (0.0f).xxx;
if ((params.doYuvToRgbConversionOnly == 0u)) {
- tint_GammaTransferParams v_16 = params.gammaDecodeParams;
- tint_GammaTransferParams v_17 = params.gammaEncodeParams;
- v_15 = tint_GammaCorrection(mul(tint_GammaCorrection(v_14, v_16), params.gamutConversionMatrix), v_17);
+ tint_GammaTransferParams v_15 = params.gammaDecodeParams;
+ tint_GammaTransferParams v_16 = params.gammaEncodeParams;
+ v_14 = tint_GammaCorrection(mul(tint_GammaCorrection(v_13, v_15), params.gamutConversionMatrix), v_16);
} else {
- v_15 = v_14;
+ v_14 = v_13;
}
- return float4(v_15, v_8);
+ return float4(v_14, v_7);
}
float4 textureLoad2d(Texture2D<float4> tint_symbol_plane0, Texture2D<float4> tint_symbol_plane1, tint_ExternalTextureParams tint_symbol_params, int2 coords) {
return tint_TextureLoadExternal(tint_symbol_plane0, tint_symbol_plane1, tint_symbol_params, uint2(coords));
}
-float3x2 v_18(uint start_byte_offset) {
- uint4 v_19 = arg_0_params[(start_byte_offset / 16u)];
- float2 v_20 = asfloat((((((start_byte_offset % 16u) / 4u) == 2u)) ? (v_19.zw) : (v_19.xy)));
- uint4 v_21 = arg_0_params[((8u + start_byte_offset) / 16u)];
- float2 v_22 = asfloat(((((((8u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_21.zw) : (v_21.xy)));
- uint4 v_23 = arg_0_params[((16u + start_byte_offset) / 16u)];
- return float3x2(v_20, v_22, asfloat(((((((16u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_23.zw) : (v_23.xy))));
+float3x2 v_17(uint start_byte_offset) {
+ uint4 v_18 = arg_0_params[(start_byte_offset / 16u)];
+ float2 v_19 = asfloat((((((start_byte_offset % 16u) / 4u) == 2u)) ? (v_18.zw) : (v_18.xy)));
+ uint4 v_20 = arg_0_params[((8u + start_byte_offset) / 16u)];
+ float2 v_21 = asfloat(((((((8u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_20.zw) : (v_20.xy)));
+ uint4 v_22 = arg_0_params[((16u + start_byte_offset) / 16u)];
+ return float3x2(v_19, v_21, asfloat(((((((16u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_22.zw) : (v_22.xy))));
}
-float3x3 v_24(uint start_byte_offset) {
- float3 v_25 = asfloat(arg_0_params[(start_byte_offset / 16u)].xyz);
- float3 v_26 = asfloat(arg_0_params[((16u + start_byte_offset) / 16u)].xyz);
- return float3x3(v_25, v_26, asfloat(arg_0_params[((32u + start_byte_offset) / 16u)].xyz));
+float3x3 v_23(uint start_byte_offset) {
+ return float3x3(asfloat(arg_0_params[(start_byte_offset / 16u)].xyz), asfloat(arg_0_params[((16u + start_byte_offset) / 16u)].xyz), asfloat(arg_0_params[((32u + start_byte_offset) / 16u)].xyz));
}
-tint_GammaTransferParams v_27(uint start_byte_offset) {
- float v_28 = asfloat(arg_0_params[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]);
- float v_29 = asfloat(arg_0_params[((4u + start_byte_offset) / 16u)][(((4u + start_byte_offset) % 16u) / 4u)]);
- float v_30 = asfloat(arg_0_params[((8u + start_byte_offset) / 16u)][(((8u + start_byte_offset) % 16u) / 4u)]);
- float v_31 = asfloat(arg_0_params[((12u + start_byte_offset) / 16u)][(((12u + start_byte_offset) % 16u) / 4u)]);
- float v_32 = asfloat(arg_0_params[((16u + start_byte_offset) / 16u)][(((16u + start_byte_offset) % 16u) / 4u)]);
- float v_33 = asfloat(arg_0_params[((20u + start_byte_offset) / 16u)][(((20u + start_byte_offset) % 16u) / 4u)]);
- float v_34 = asfloat(arg_0_params[((24u + start_byte_offset) / 16u)][(((24u + start_byte_offset) % 16u) / 4u)]);
- tint_GammaTransferParams v_35 = {v_28, v_29, v_30, v_31, v_32, v_33, v_34, arg_0_params[((28u + start_byte_offset) / 16u)][(((28u + start_byte_offset) % 16u) / 4u)]};
- return v_35;
+tint_GammaTransferParams v_24(uint start_byte_offset) {
+ tint_GammaTransferParams v_25 = {asfloat(arg_0_params[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]), asfloat(arg_0_params[((4u + start_byte_offset) / 16u)][(((4u + start_byte_offset) % 16u) / 4u)]), asfloat(arg_0_params[((8u + start_byte_offset) / 16u)][(((8u + start_byte_offset) % 16u) / 4u)]), asfloat(arg_0_params[((12u + start_byte_offset) / 16u)][(((12u + start_byte_offset) % 16u) / 4u)]), asfloat(arg_0_params[((16u + start_byte_offset) / 16u)][(((16u + start_byte_offset) % 16u) / 4u)]), asfloat(arg_0_params[((20u + start_byte_offset) / 16u)][(((20u + start_byte_offset) % 16u) / 4u)]), asfloat(arg_0_params[((24u + start_byte_offset) / 16u)][(((24u + start_byte_offset) % 16u) / 4u)]), arg_0_params[((28u + start_byte_offset) / 16u)][(((28u + start_byte_offset) % 16u) / 4u)]};
+ return v_25;
}
-float3x4 v_36(uint start_byte_offset) {
- float4 v_37 = asfloat(arg_0_params[(start_byte_offset / 16u)]);
- float4 v_38 = asfloat(arg_0_params[((16u + start_byte_offset) / 16u)]);
- return float3x4(v_37, v_38, asfloat(arg_0_params[((32u + start_byte_offset) / 16u)]));
+float3x4 v_26(uint start_byte_offset) {
+ return float3x4(asfloat(arg_0_params[(start_byte_offset / 16u)]), asfloat(arg_0_params[((16u + start_byte_offset) / 16u)]), asfloat(arg_0_params[((32u + start_byte_offset) / 16u)]));
}
-tint_ExternalTextureParams v_39(uint start_byte_offset) {
- uint v_40 = arg_0_params[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)];
- uint v_41 = arg_0_params[((4u + start_byte_offset) / 16u)][(((4u + start_byte_offset) % 16u) / 4u)];
- float3x4 v_42 = v_36((16u + start_byte_offset));
- tint_GammaTransferParams v_43 = v_27((64u + start_byte_offset));
- tint_GammaTransferParams v_44 = v_27((96u + start_byte_offset));
- float3x3 v_45 = v_24((128u + start_byte_offset));
- float3x2 v_46 = v_18((176u + start_byte_offset));
- float3x2 v_47 = v_18((200u + start_byte_offset));
- uint4 v_48 = arg_0_params[((224u + start_byte_offset) / 16u)];
- float2 v_49 = asfloat(((((((224u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_48.zw) : (v_48.xy)));
- uint4 v_50 = arg_0_params[((232u + start_byte_offset) / 16u)];
- float2 v_51 = asfloat(((((((232u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_50.zw) : (v_50.xy)));
- uint4 v_52 = arg_0_params[((240u + start_byte_offset) / 16u)];
- float2 v_53 = asfloat(((((((240u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_52.zw) : (v_52.xy)));
- uint4 v_54 = arg_0_params[((248u + start_byte_offset) / 16u)];
- float2 v_55 = asfloat(((((((248u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_54.zw) : (v_54.xy)));
- uint4 v_56 = arg_0_params[((256u + start_byte_offset) / 16u)];
- uint2 v_57 = ((((((256u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_56.zw) : (v_56.xy));
- uint4 v_58 = arg_0_params[((264u + start_byte_offset) / 16u)];
- tint_ExternalTextureParams v_59 = {v_40, v_41, v_42, v_43, v_44, v_45, v_46, v_47, v_49, v_51, v_53, v_55, v_57, asfloat(((((((264u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_58.zw) : (v_58.xy)))};
- return v_59;
+tint_ExternalTextureParams v_27(uint start_byte_offset) {
+ uint v_28 = arg_0_params[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)];
+ uint v_29 = arg_0_params[((4u + start_byte_offset) / 16u)][(((4u + start_byte_offset) % 16u) / 4u)];
+ float3x4 v_30 = v_26((16u + start_byte_offset));
+ tint_GammaTransferParams v_31 = v_24((64u + start_byte_offset));
+ tint_GammaTransferParams v_32 = v_24((96u + start_byte_offset));
+ float3x3 v_33 = v_23((128u + start_byte_offset));
+ float3x2 v_34 = v_17((176u + start_byte_offset));
+ float3x2 v_35 = v_17((200u + start_byte_offset));
+ uint4 v_36 = arg_0_params[((224u + start_byte_offset) / 16u)];
+ float2 v_37 = asfloat(((((((224u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_36.zw) : (v_36.xy)));
+ uint4 v_38 = arg_0_params[((232u + start_byte_offset) / 16u)];
+ float2 v_39 = asfloat(((((((232u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_38.zw) : (v_38.xy)));
+ uint4 v_40 = arg_0_params[((240u + start_byte_offset) / 16u)];
+ float2 v_41 = asfloat(((((((240u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_40.zw) : (v_40.xy)));
+ uint4 v_42 = arg_0_params[((248u + start_byte_offset) / 16u)];
+ float2 v_43 = asfloat(((((((248u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_42.zw) : (v_42.xy)));
+ uint4 v_44 = arg_0_params[((256u + start_byte_offset) / 16u)];
+ uint2 v_45 = ((((((256u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_44.zw) : (v_44.xy));
+ uint4 v_46 = arg_0_params[((264u + start_byte_offset) / 16u)];
+ tint_ExternalTextureParams v_47 = {v_28, v_29, v_30, v_31, v_32, v_33, v_34, v_35, v_37, v_39, v_41, v_43, v_45, asfloat(((((((264u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_46.zw) : (v_46.xy)))};
+ return v_47;
}
void doTextureLoad() {
- tint_ExternalTextureParams v_60 = v_39(0u);
- float4 res = textureLoad2d(arg_0_plane0, arg_0_plane1, v_60, (int(0)).xx);
+ tint_ExternalTextureParams v_48 = v_27(0u);
+ float4 res = textureLoad2d(arg_0_plane0, arg_0_plane1, v_48, (int(0)).xx);
}
float4 vertex_main_inner() {
@@ -158,7 +146,7 @@
}
vertex_main_outputs vertex_main() {
- vertex_main_outputs v_61 = {vertex_main_inner()};
- return v_61;
+ vertex_main_outputs v_49 = {vertex_main_inner()};
+ return v_49;
}
diff --git a/test/tint/builtins/textureLoad/texture_external_param.wgsl.expected.ir.fxc.hlsl b/test/tint/builtins/textureLoad/texture_external_param.wgsl.expected.ir.fxc.hlsl
index 44c0766..ae60969 100644
--- a/test/tint/builtins/textureLoad/texture_external_param.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/builtins/textureLoad/texture_external_param.wgsl.expected.ir.fxc.hlsl
@@ -43,104 +43,92 @@
float3 tint_GammaCorrection(float3 v, tint_GammaTransferParams params) {
float3 v_1 = float3((params.G).xxx);
float3 v_2 = float3((params.D).xxx);
- float3 v_3 = abs(v);
- float3 v_4 = float3(sign(v));
- return (((v_3 < v_2)) ? ((v_4 * ((params.C * v_3) + params.F))) : ((v_4 * (pow(((params.A * v_3) + params.B), v_1) + params.E))));
+ float3 v_3 = float3(sign(v));
+ return (((abs(v) < v_2)) ? ((v_3 * ((params.C * abs(v)) + params.F))) : ((v_3 * (pow(((params.A * abs(v)) + params.B), v_1) + params.E))));
}
float4 tint_TextureLoadExternal(Texture2D<float4> plane_0, Texture2D<float4> plane_1, tint_ExternalTextureParams params, uint2 coords) {
- float2 v_5 = round(mul(float3(float2(min(coords, params.visibleSize)), 1.0f), params.loadTransform));
- uint2 v_6 = tint_v2f32_to_v2u32(v_5);
- float3 v_7 = (0.0f).xxx;
- float v_8 = 0.0f;
+ float2 v_4 = round(mul(float3(float2(min(coords, params.visibleSize)), 1.0f), params.loadTransform));
+ uint2 v_5 = tint_v2f32_to_v2u32(v_4);
+ float3 v_6 = (0.0f).xxx;
+ float v_7 = 0.0f;
if ((params.numPlanes == 1u)) {
- int2 v_9 = int2(v_6);
- float4 v_10 = float4(plane_0.Load(int3(v_9, int(0u))));
- v_7 = v_10.xyz;
- v_8 = v_10.w;
+ int2 v_8 = int2(v_5);
+ float4 v_9 = float4(plane_0.Load(int3(v_8, int(0u))));
+ v_6 = v_9.xyz;
+ v_7 = v_9.w;
} else {
- int2 v_11 = int2(v_6);
- float v_12 = float4(plane_0.Load(int3(v_11, int(0u)))).x;
- int2 v_13 = int2(tint_v2f32_to_v2u32((v_5 * params.plane1CoordFactor)));
- v_7 = mul(params.yuvToRgbConversionMatrix, float4(v_12, float4(plane_1.Load(int3(v_13, int(0u)))).xy, 1.0f));
- v_8 = 1.0f;
+ int2 v_10 = int2(v_5);
+ float v_11 = float4(plane_0.Load(int3(v_10, int(0u)))).x;
+ int2 v_12 = int2(tint_v2f32_to_v2u32((v_4 * params.plane1CoordFactor)));
+ v_6 = mul(params.yuvToRgbConversionMatrix, float4(v_11, float4(plane_1.Load(int3(v_12, int(0u)))).xy, 1.0f));
+ v_7 = 1.0f;
}
- float3 v_14 = v_7;
- float3 v_15 = (0.0f).xxx;
+ float3 v_13 = v_6;
+ float3 v_14 = (0.0f).xxx;
if ((params.doYuvToRgbConversionOnly == 0u)) {
- tint_GammaTransferParams v_16 = params.gammaDecodeParams;
- tint_GammaTransferParams v_17 = params.gammaEncodeParams;
- v_15 = tint_GammaCorrection(mul(tint_GammaCorrection(v_14, v_16), params.gamutConversionMatrix), v_17);
+ tint_GammaTransferParams v_15 = params.gammaDecodeParams;
+ tint_GammaTransferParams v_16 = params.gammaEncodeParams;
+ v_14 = tint_GammaCorrection(mul(tint_GammaCorrection(v_13, v_15), params.gamutConversionMatrix), v_16);
} else {
- v_15 = v_14;
+ v_14 = v_13;
}
- return float4(v_15, v_8);
+ return float4(v_14, v_7);
}
float4 textureLoad2d(Texture2D<float4> tint_symbol_plane0, Texture2D<float4> tint_symbol_plane1, tint_ExternalTextureParams tint_symbol_params, int2 coords) {
return tint_TextureLoadExternal(tint_symbol_plane0, tint_symbol_plane1, tint_symbol_params, uint2(coords));
}
-float3x2 v_18(uint start_byte_offset) {
- uint4 v_19 = arg_0_params[(start_byte_offset / 16u)];
- float2 v_20 = asfloat((((((start_byte_offset % 16u) / 4u) == 2u)) ? (v_19.zw) : (v_19.xy)));
- uint4 v_21 = arg_0_params[((8u + start_byte_offset) / 16u)];
- float2 v_22 = asfloat(((((((8u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_21.zw) : (v_21.xy)));
- uint4 v_23 = arg_0_params[((16u + start_byte_offset) / 16u)];
- return float3x2(v_20, v_22, asfloat(((((((16u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_23.zw) : (v_23.xy))));
+float3x2 v_17(uint start_byte_offset) {
+ uint4 v_18 = arg_0_params[(start_byte_offset / 16u)];
+ float2 v_19 = asfloat((((((start_byte_offset % 16u) / 4u) == 2u)) ? (v_18.zw) : (v_18.xy)));
+ uint4 v_20 = arg_0_params[((8u + start_byte_offset) / 16u)];
+ float2 v_21 = asfloat(((((((8u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_20.zw) : (v_20.xy)));
+ uint4 v_22 = arg_0_params[((16u + start_byte_offset) / 16u)];
+ return float3x2(v_19, v_21, asfloat(((((((16u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_22.zw) : (v_22.xy))));
}
-float3x3 v_24(uint start_byte_offset) {
- float3 v_25 = asfloat(arg_0_params[(start_byte_offset / 16u)].xyz);
- float3 v_26 = asfloat(arg_0_params[((16u + start_byte_offset) / 16u)].xyz);
- return float3x3(v_25, v_26, asfloat(arg_0_params[((32u + start_byte_offset) / 16u)].xyz));
+float3x3 v_23(uint start_byte_offset) {
+ return float3x3(asfloat(arg_0_params[(start_byte_offset / 16u)].xyz), asfloat(arg_0_params[((16u + start_byte_offset) / 16u)].xyz), asfloat(arg_0_params[((32u + start_byte_offset) / 16u)].xyz));
}
-tint_GammaTransferParams v_27(uint start_byte_offset) {
- float v_28 = asfloat(arg_0_params[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]);
- float v_29 = asfloat(arg_0_params[((4u + start_byte_offset) / 16u)][(((4u + start_byte_offset) % 16u) / 4u)]);
- float v_30 = asfloat(arg_0_params[((8u + start_byte_offset) / 16u)][(((8u + start_byte_offset) % 16u) / 4u)]);
- float v_31 = asfloat(arg_0_params[((12u + start_byte_offset) / 16u)][(((12u + start_byte_offset) % 16u) / 4u)]);
- float v_32 = asfloat(arg_0_params[((16u + start_byte_offset) / 16u)][(((16u + start_byte_offset) % 16u) / 4u)]);
- float v_33 = asfloat(arg_0_params[((20u + start_byte_offset) / 16u)][(((20u + start_byte_offset) % 16u) / 4u)]);
- float v_34 = asfloat(arg_0_params[((24u + start_byte_offset) / 16u)][(((24u + start_byte_offset) % 16u) / 4u)]);
- tint_GammaTransferParams v_35 = {v_28, v_29, v_30, v_31, v_32, v_33, v_34, arg_0_params[((28u + start_byte_offset) / 16u)][(((28u + start_byte_offset) % 16u) / 4u)]};
- return v_35;
+tint_GammaTransferParams v_24(uint start_byte_offset) {
+ tint_GammaTransferParams v_25 = {asfloat(arg_0_params[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]), asfloat(arg_0_params[((4u + start_byte_offset) / 16u)][(((4u + start_byte_offset) % 16u) / 4u)]), asfloat(arg_0_params[((8u + start_byte_offset) / 16u)][(((8u + start_byte_offset) % 16u) / 4u)]), asfloat(arg_0_params[((12u + start_byte_offset) / 16u)][(((12u + start_byte_offset) % 16u) / 4u)]), asfloat(arg_0_params[((16u + start_byte_offset) / 16u)][(((16u + start_byte_offset) % 16u) / 4u)]), asfloat(arg_0_params[((20u + start_byte_offset) / 16u)][(((20u + start_byte_offset) % 16u) / 4u)]), asfloat(arg_0_params[((24u + start_byte_offset) / 16u)][(((24u + start_byte_offset) % 16u) / 4u)]), arg_0_params[((28u + start_byte_offset) / 16u)][(((28u + start_byte_offset) % 16u) / 4u)]};
+ return v_25;
}
-float3x4 v_36(uint start_byte_offset) {
- float4 v_37 = asfloat(arg_0_params[(start_byte_offset / 16u)]);
- float4 v_38 = asfloat(arg_0_params[((16u + start_byte_offset) / 16u)]);
- return float3x4(v_37, v_38, asfloat(arg_0_params[((32u + start_byte_offset) / 16u)]));
+float3x4 v_26(uint start_byte_offset) {
+ return float3x4(asfloat(arg_0_params[(start_byte_offset / 16u)]), asfloat(arg_0_params[((16u + start_byte_offset) / 16u)]), asfloat(arg_0_params[((32u + start_byte_offset) / 16u)]));
}
-tint_ExternalTextureParams v_39(uint start_byte_offset) {
- uint v_40 = arg_0_params[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)];
- uint v_41 = arg_0_params[((4u + start_byte_offset) / 16u)][(((4u + start_byte_offset) % 16u) / 4u)];
- float3x4 v_42 = v_36((16u + start_byte_offset));
- tint_GammaTransferParams v_43 = v_27((64u + start_byte_offset));
- tint_GammaTransferParams v_44 = v_27((96u + start_byte_offset));
- float3x3 v_45 = v_24((128u + start_byte_offset));
- float3x2 v_46 = v_18((176u + start_byte_offset));
- float3x2 v_47 = v_18((200u + start_byte_offset));
- uint4 v_48 = arg_0_params[((224u + start_byte_offset) / 16u)];
- float2 v_49 = asfloat(((((((224u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_48.zw) : (v_48.xy)));
- uint4 v_50 = arg_0_params[((232u + start_byte_offset) / 16u)];
- float2 v_51 = asfloat(((((((232u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_50.zw) : (v_50.xy)));
- uint4 v_52 = arg_0_params[((240u + start_byte_offset) / 16u)];
- float2 v_53 = asfloat(((((((240u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_52.zw) : (v_52.xy)));
- uint4 v_54 = arg_0_params[((248u + start_byte_offset) / 16u)];
- float2 v_55 = asfloat(((((((248u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_54.zw) : (v_54.xy)));
- uint4 v_56 = arg_0_params[((256u + start_byte_offset) / 16u)];
- uint2 v_57 = ((((((256u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_56.zw) : (v_56.xy));
- uint4 v_58 = arg_0_params[((264u + start_byte_offset) / 16u)];
- tint_ExternalTextureParams v_59 = {v_40, v_41, v_42, v_43, v_44, v_45, v_46, v_47, v_49, v_51, v_53, v_55, v_57, asfloat(((((((264u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_58.zw) : (v_58.xy)))};
- return v_59;
+tint_ExternalTextureParams v_27(uint start_byte_offset) {
+ uint v_28 = arg_0_params[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)];
+ uint v_29 = arg_0_params[((4u + start_byte_offset) / 16u)][(((4u + start_byte_offset) % 16u) / 4u)];
+ float3x4 v_30 = v_26((16u + start_byte_offset));
+ tint_GammaTransferParams v_31 = v_24((64u + start_byte_offset));
+ tint_GammaTransferParams v_32 = v_24((96u + start_byte_offset));
+ float3x3 v_33 = v_23((128u + start_byte_offset));
+ float3x2 v_34 = v_17((176u + start_byte_offset));
+ float3x2 v_35 = v_17((200u + start_byte_offset));
+ uint4 v_36 = arg_0_params[((224u + start_byte_offset) / 16u)];
+ float2 v_37 = asfloat(((((((224u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_36.zw) : (v_36.xy)));
+ uint4 v_38 = arg_0_params[((232u + start_byte_offset) / 16u)];
+ float2 v_39 = asfloat(((((((232u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_38.zw) : (v_38.xy)));
+ uint4 v_40 = arg_0_params[((240u + start_byte_offset) / 16u)];
+ float2 v_41 = asfloat(((((((240u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_40.zw) : (v_40.xy)));
+ uint4 v_42 = arg_0_params[((248u + start_byte_offset) / 16u)];
+ float2 v_43 = asfloat(((((((248u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_42.zw) : (v_42.xy)));
+ uint4 v_44 = arg_0_params[((256u + start_byte_offset) / 16u)];
+ uint2 v_45 = ((((((256u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_44.zw) : (v_44.xy));
+ uint4 v_46 = arg_0_params[((264u + start_byte_offset) / 16u)];
+ tint_ExternalTextureParams v_47 = {v_28, v_29, v_30, v_31, v_32, v_33, v_34, v_35, v_37, v_39, v_41, v_43, v_45, asfloat(((((((264u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_46.zw) : (v_46.xy)))};
+ return v_47;
}
void doTextureLoad() {
- tint_ExternalTextureParams v_60 = v_39(0u);
- float4 res = textureLoad2d(arg_0_plane0, arg_0_plane1, v_60, (int(0)).xx);
+ tint_ExternalTextureParams v_48 = v_27(0u);
+ float4 res = textureLoad2d(arg_0_plane0, arg_0_plane1, v_48, (int(0)).xx);
}
float4 vertex_main_inner() {
@@ -158,7 +146,7 @@
}
vertex_main_outputs vertex_main() {
- vertex_main_outputs v_61 = {vertex_main_inner()};
- return v_61;
+ vertex_main_outputs v_49 = {vertex_main_inner()};
+ return v_49;
}
diff --git a/test/tint/builtins/textureLoad/texture_external_param.wgsl.expected.ir.msl b/test/tint/builtins/textureLoad/texture_external_param.wgsl.expected.ir.msl
index 5491287..6c58292 100644
--- a/test/tint/builtins/textureLoad/texture_external_param.wgsl.expected.ir.msl
+++ b/test/tint/builtins/textureLoad/texture_external_param.wgsl.expected.ir.msl
@@ -76,34 +76,31 @@
float3 tint_GammaCorrection(float3 v, tint_GammaTransferParams params) {
float3 const v_1 = float3(params.G);
- float3 const v_2 = float3(params.D);
- float3 const v_3 = abs(v);
- float3 const v_4 = sign(v);
- return select((v_4 * (powr(((params.A * v_3) + params.B), v_1) + params.E)), (v_4 * ((params.C * v_3) + params.F)), (v_3 < v_2));
+ return select((sign(v) * (powr(((params.A * abs(v)) + params.B), v_1) + params.E)), (sign(v) * ((params.C * abs(v)) + params.F)), (abs(v) < float3(params.D)));
}
float4 tint_TextureLoadExternal(texture2d<float, access::sample> plane_0, texture2d<float, access::sample> plane_1, tint_ExternalTextureParams params, uint2 coords) {
- float2 const v_5 = rint((params.loadTransform * float3(float2(min(coords, params.visibleSize)), 1.0f)));
- uint2 const v_6 = uint2(v_5);
- float3 v_7 = 0.0f;
- float v_8 = 0.0f;
+ float2 const v_2 = rint((params.loadTransform * float3(float2(min(coords, params.visibleSize)), 1.0f)));
+ uint2 const v_3 = uint2(v_2);
+ float3 v_4 = 0.0f;
+ float v_5 = 0.0f;
if ((params.numPlanes == 1u)) {
- float4 const v_9 = plane_0.read(v_6, 0u);
- v_7 = v_9.xyz;
- v_8 = v_9[3u];
+ float4 const v_6 = plane_0.read(v_3, 0u);
+ v_4 = v_6.xyz;
+ v_5 = v_6[3u];
} else {
- float const v_10 = plane_0.read(v_6, 0u)[0u];
- v_7 = (float4(v_10, plane_1.read(uint2((v_5 * params.plane1CoordFactor)), 0u).xy, 1.0f) * params.yuvToRgbConversionMatrix);
- v_8 = 1.0f;
+ float const v_7 = plane_0.read(v_3, 0u)[0u];
+ v_4 = (float4(v_7, plane_1.read(uint2((v_2 * params.plane1CoordFactor)), 0u).xy, 1.0f) * params.yuvToRgbConversionMatrix);
+ v_5 = 1.0f;
}
- float3 const v_11 = v_7;
- float3 v_12 = 0.0f;
+ float3 const v_8 = v_4;
+ float3 v_9 = 0.0f;
if ((params.doYuvToRgbConversionOnly == 0u)) {
- v_12 = tint_GammaCorrection((params.gamutConversionMatrix * tint_GammaCorrection(v_11, params.gammaDecodeParams)), params.gammaEncodeParams);
+ v_9 = tint_GammaCorrection((params.gamutConversionMatrix * tint_GammaCorrection(v_8, params.gammaDecodeParams)), params.gammaEncodeParams);
} else {
- v_12 = v_11;
+ v_9 = v_8;
}
- return float4(v_12, v_8);
+ return float4(v_9, v_5);
}
float4 textureLoad2d(texture2d<float, access::sample> tint_symbol_plane0, texture2d<float, access::sample> tint_symbol_plane1, tint_ExternalTextureParams tint_symbol_params, int2 coords) {
@@ -111,16 +108,16 @@
}
tint_ExternalTextureParams tint_load_struct_packed_vec3(const constant tint_ExternalTextureParams_packed_vec3* const from) {
- uint const v_13 = (*from).numPlanes;
- uint const v_14 = (*from).doYuvToRgbConversionOnly;
- float3x4 const v_15 = (*from).yuvToRgbConversionMatrix;
- tint_GammaTransferParams const v_16 = (*from).gammaDecodeParams;
- tint_GammaTransferParams const v_17 = (*from).gammaEncodeParams;
- tint_array<tint_packed_vec3_f32_array_element, 3> const v_18 = (*from).gamutConversionMatrix;
- float3 const v_19 = float3(v_18[0u].packed);
- float3 const v_20 = float3(v_18[1u].packed);
- float3x3 const v_21 = float3x3(v_19, v_20, float3(v_18[2u].packed));
- return tint_ExternalTextureParams{.numPlanes=v_13, .doYuvToRgbConversionOnly=v_14, .yuvToRgbConversionMatrix=v_15, .gammaDecodeParams=v_16, .gammaEncodeParams=v_17, .gamutConversionMatrix=v_21, .sampleTransform=(*from).sampleTransform, .loadTransform=(*from).loadTransform, .samplePlane0RectMin=(*from).samplePlane0RectMin, .samplePlane0RectMax=(*from).samplePlane0RectMax, .samplePlane1RectMin=(*from).samplePlane1RectMin, .samplePlane1RectMax=(*from).samplePlane1RectMax, .visibleSize=(*from).visibleSize, .plane1CoordFactor=(*from).plane1CoordFactor};
+ uint const v_10 = (*from).numPlanes;
+ uint const v_11 = (*from).doYuvToRgbConversionOnly;
+ float3x4 const v_12 = (*from).yuvToRgbConversionMatrix;
+ tint_GammaTransferParams const v_13 = (*from).gammaDecodeParams;
+ tint_GammaTransferParams const v_14 = (*from).gammaEncodeParams;
+ tint_array<tint_packed_vec3_f32_array_element, 3> const v_15 = (*from).gamutConversionMatrix;
+ float3 const v_16 = float3(v_15[0u].packed);
+ float3 const v_17 = float3(v_15[1u].packed);
+ float3x3 const v_18 = float3x3(v_16, v_17, float3(v_15[2u].packed));
+ return tint_ExternalTextureParams{.numPlanes=v_10, .doYuvToRgbConversionOnly=v_11, .yuvToRgbConversionMatrix=v_12, .gammaDecodeParams=v_13, .gammaEncodeParams=v_14, .gamutConversionMatrix=v_18, .sampleTransform=(*from).sampleTransform, .loadTransform=(*from).loadTransform, .samplePlane0RectMin=(*from).samplePlane0RectMin, .samplePlane0RectMax=(*from).samplePlane0RectMax, .samplePlane1RectMin=(*from).samplePlane1RectMin, .samplePlane1RectMax=(*from).samplePlane1RectMax, .visibleSize=(*from).visibleSize, .plane1CoordFactor=(*from).plane1CoordFactor};
}
void doTextureLoad(tint_module_vars_struct tint_module_vars) {