[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/src/tint/lang/core/ir/bitcast.h b/src/tint/lang/core/ir/bitcast.h
index a6f5cd1..f75d007 100644
--- a/src/tint/lang/core/ir/bitcast.h
+++ b/src/tint/lang/core/ir/bitcast.h
@@ -70,6 +70,9 @@
/// @returns the friendly name for the instruction
std::string FriendlyName() const override { return "bitcast"; }
+
+ /// @returns an empty access as the bitcast neither loads nor stores.
+ Accesses GetSideEffects() const override { return Accesses{}; }
};
} // namespace tint::core::ir
diff --git a/src/tint/lang/core/ir/call.h b/src/tint/lang/core/ir/call.h
index 932ee53..fa9951f 100644
--- a/src/tint/lang/core/ir/call.h
+++ b/src/tint/lang/core/ir/call.h
@@ -57,6 +57,9 @@
/// @param arg the argument value to append
void AppendArg(ir::Value* arg) { AddOperand(operands_.Length(), arg); }
+ /// @returns the side effects for this instruction
+ Accesses GetSideEffects() const override { return Accesses{Access::kLoad, Access::kStore}; }
+
protected:
/// Constructor
explicit Call(Id id);
diff --git a/src/tint/lang/core/ir/core_builtin_call.cc b/src/tint/lang/core/ir/core_builtin_call.cc
index d7457d7..03e2f01 100644
--- a/src/tint/lang/core/ir/core_builtin_call.cc
+++ b/src/tint/lang/core/ir/core_builtin_call.cc
@@ -55,4 +55,163 @@
return ctx.ir.CreateInstruction<CoreBuiltinCall>(new_result, func_, args);
}
+tint::core::ir::Instruction::Accesses CoreBuiltinCall::GetSideEffects() const {
+ switch (func_) {
+ case BuiltinFn::kAtomicLoad:
+ case BuiltinFn::kInputAttachmentLoad:
+ case BuiltinFn::kTextureSample:
+ case BuiltinFn::kTextureSampleBias:
+ case BuiltinFn::kTextureSampleCompare:
+ case BuiltinFn::kTextureSampleCompareLevel:
+ case BuiltinFn::kTextureSampleGrad:
+ case BuiltinFn::kTextureSampleLevel:
+ case BuiltinFn::kTextureSampleBaseClampToEdge:
+ case BuiltinFn::kTextureLoad:
+ return Accesses{Access::kLoad};
+
+ case BuiltinFn::kTextureStore:
+ return Accesses{Access::kStore};
+
+ case BuiltinFn::kAtomicStore:
+ case BuiltinFn::kAtomicAdd:
+ case BuiltinFn::kAtomicSub:
+ case BuiltinFn::kAtomicMax:
+ case BuiltinFn::kAtomicMin:
+ case BuiltinFn::kAtomicAnd:
+ case BuiltinFn::kAtomicOr:
+ case BuiltinFn::kAtomicXor:
+ case BuiltinFn::kAtomicExchange:
+ case BuiltinFn::kAtomicCompareExchangeWeak:
+ case BuiltinFn::kDpdx:
+ case BuiltinFn::kDpdxCoarse:
+ case BuiltinFn::kDpdxFine:
+ case BuiltinFn::kDpdy:
+ case BuiltinFn::kDpdyCoarse:
+ case BuiltinFn::kDpdyFine:
+ case BuiltinFn::kFwidth:
+ case BuiltinFn::kFwidthCoarse:
+ case BuiltinFn::kFwidthFine:
+ case BuiltinFn::kSubgroupBallot:
+ case BuiltinFn::kSubgroupElect:
+ case BuiltinFn::kSubgroupBroadcast:
+ case BuiltinFn::kSubgroupBroadcastFirst:
+ case BuiltinFn::kSubgroupShuffle:
+ case BuiltinFn::kSubgroupShuffleXor:
+ case BuiltinFn::kSubgroupShuffleUp:
+ case BuiltinFn::kSubgroupShuffleDown:
+ case BuiltinFn::kSubgroupAdd:
+ case BuiltinFn::kSubgroupInclusiveAdd:
+ case BuiltinFn::kSubgroupExclusiveAdd:
+ case BuiltinFn::kSubgroupMul:
+ case BuiltinFn::kSubgroupInclusiveMul:
+ case BuiltinFn::kSubgroupExclusiveMul:
+ case BuiltinFn::kSubgroupAnd:
+ case BuiltinFn::kSubgroupOr:
+ case BuiltinFn::kSubgroupXor:
+ case BuiltinFn::kSubgroupMin:
+ case BuiltinFn::kSubgroupMax:
+ case BuiltinFn::kSubgroupAll:
+ case BuiltinFn::kSubgroupAny:
+ case BuiltinFn::kQuadBroadcast:
+ case BuiltinFn::kQuadSwapX:
+ case BuiltinFn::kQuadSwapY:
+ case BuiltinFn::kQuadSwapDiagonal:
+ case BuiltinFn::kStorageBarrier:
+ case BuiltinFn::kWorkgroupBarrier:
+ case BuiltinFn::kTextureBarrier:
+ return Accesses{Access::kLoad, Access::kStore};
+
+ case BuiltinFn::kAbs:
+ case BuiltinFn::kAcos:
+ case BuiltinFn::kAcosh:
+ case BuiltinFn::kAll:
+ case BuiltinFn::kAny:
+ case BuiltinFn::kArrayLength:
+ case BuiltinFn::kAsin:
+ case BuiltinFn::kAsinh:
+ case BuiltinFn::kAtan:
+ case BuiltinFn::kAtan2:
+ case BuiltinFn::kAtanh:
+ case BuiltinFn::kCeil:
+ case BuiltinFn::kClamp:
+ case BuiltinFn::kCos:
+ case BuiltinFn::kCosh:
+ case BuiltinFn::kCountLeadingZeros:
+ case BuiltinFn::kCountOneBits:
+ case BuiltinFn::kCountTrailingZeros:
+ case BuiltinFn::kCross:
+ case BuiltinFn::kDegrees:
+ case BuiltinFn::kDeterminant:
+ case BuiltinFn::kDistance:
+ case BuiltinFn::kDot:
+ case BuiltinFn::kDot4I8Packed:
+ case BuiltinFn::kDot4U8Packed:
+ case BuiltinFn::kExp:
+ case BuiltinFn::kExp2:
+ case BuiltinFn::kExtractBits:
+ case BuiltinFn::kFaceForward:
+ case BuiltinFn::kFirstLeadingBit:
+ case BuiltinFn::kFirstTrailingBit:
+ case BuiltinFn::kFloor:
+ case BuiltinFn::kFma:
+ case BuiltinFn::kFract:
+ case BuiltinFn::kFrexp:
+ case BuiltinFn::kInsertBits:
+ case BuiltinFn::kInverseSqrt:
+ case BuiltinFn::kLdexp:
+ case BuiltinFn::kLength:
+ case BuiltinFn::kLog:
+ case BuiltinFn::kLog2:
+ case BuiltinFn::kMax:
+ case BuiltinFn::kMin:
+ case BuiltinFn::kMix:
+ case BuiltinFn::kModf:
+ case BuiltinFn::kNormalize:
+ case BuiltinFn::kPack2X16Float:
+ case BuiltinFn::kPack2X16Snorm:
+ case BuiltinFn::kPack2X16Unorm:
+ case BuiltinFn::kPack4X8Snorm:
+ case BuiltinFn::kPack4X8Unorm:
+ case BuiltinFn::kPack4XI8:
+ case BuiltinFn::kPack4XU8:
+ case BuiltinFn::kPack4XI8Clamp:
+ case BuiltinFn::kPack4XU8Clamp:
+ case BuiltinFn::kPow:
+ case BuiltinFn::kQuantizeToF16:
+ case BuiltinFn::kRadians:
+ case BuiltinFn::kReflect:
+ case BuiltinFn::kRefract:
+ case BuiltinFn::kReverseBits:
+ case BuiltinFn::kRound:
+ case BuiltinFn::kSaturate:
+ case BuiltinFn::kSelect:
+ case BuiltinFn::kSign:
+ case BuiltinFn::kSin:
+ case BuiltinFn::kSinh:
+ case BuiltinFn::kSmoothstep:
+ case BuiltinFn::kSqrt:
+ case BuiltinFn::kStep:
+ case BuiltinFn::kTan:
+ case BuiltinFn::kTanh:
+ case BuiltinFn::kTextureDimensions:
+ case BuiltinFn::kTextureGather:
+ case BuiltinFn::kTextureGatherCompare:
+ case BuiltinFn::kTextureNumLayers:
+ case BuiltinFn::kTextureNumLevels:
+ case BuiltinFn::kTextureNumSamples:
+ case BuiltinFn::kTranspose:
+ case BuiltinFn::kTrunc:
+ case BuiltinFn::kUnpack2X16Float:
+ case BuiltinFn::kUnpack2X16Snorm:
+ case BuiltinFn::kUnpack2X16Unorm:
+ case BuiltinFn::kUnpack4X8Snorm:
+ case BuiltinFn::kUnpack4X8Unorm:
+ case BuiltinFn::kUnpack4XI8:
+ case BuiltinFn::kUnpack4XU8:
+ case BuiltinFn::kNone:
+ break;
+ }
+ return Accesses{};
+}
+
} // namespace tint::core::ir
diff --git a/src/tint/lang/core/ir/core_builtin_call.h b/src/tint/lang/core/ir/core_builtin_call.h
index 4ef792e..599951c 100644
--- a/src/tint/lang/core/ir/core_builtin_call.h
+++ b/src/tint/lang/core/ir/core_builtin_call.h
@@ -77,6 +77,9 @@
return core::intrinsic::Dialect::kData;
}
+ /// @returns an access information for the function
+ Accesses GetSideEffects() const override;
+
private:
core::BuiltinFn func_;
};
diff --git a/src/tint/lang/core/ir/instruction.h b/src/tint/lang/core/ir/instruction.h
index 0bad68b..31215a1 100644
--- a/src/tint/lang/core/ir/instruction.h
+++ b/src/tint/lang/core/ir/instruction.h
@@ -49,6 +49,14 @@
public:
using Id = uint32_t;
+ /// Kinds of memory access the call will do.
+ enum class Access {
+ kLoad,
+ kStore,
+ };
+ /// Accesses is a set of of Access
+ using Accesses = EnumSet<Access>;
+
/// Destructor
~Instruction() override;
@@ -98,6 +106,9 @@
/// @returns a clone of this instruction
virtual Instruction* Clone(CloneContext& ctx) = 0;
+ /// @returns the side effects for this instruction
+ virtual Accesses GetSideEffects() const { return Accesses{}; }
+
/// @returns true if the Instruction has not been destroyed with Destroy()
bool Alive() const { return !flags_.Contains(Flag::kDead); }
diff --git a/src/tint/lang/core/ir/load.cc b/src/tint/lang/core/ir/load.cc
index 9d2add5..691cbea 100644
--- a/src/tint/lang/core/ir/load.cc
+++ b/src/tint/lang/core/ir/load.cc
@@ -55,4 +55,12 @@
return ctx.ir.CreateInstruction<Load>(new_result, from);
}
+core::ir::Instruction::Accesses Load::GetSideEffects() const {
+ // Always inline things in the `handle` address space
+ if (From()->Type()->As<core::type::Pointer>()->AddressSpace() == core::AddressSpace::kHandle) {
+ return Instruction::Accesses{};
+ }
+ return Instruction::Accesses{Instruction::Access::kLoad};
+}
+
} // namespace tint::core::ir
diff --git a/src/tint/lang/core/ir/load.h b/src/tint/lang/core/ir/load.h
index 96e97ad..9181a4c 100644
--- a/src/tint/lang/core/ir/load.h
+++ b/src/tint/lang/core/ir/load.h
@@ -70,6 +70,9 @@
/// @returns the friendly name for the instruction
std::string FriendlyName() const override { return "load"; }
+
+ /// @returns the side effects for this instruction
+ Accesses GetSideEffects() const override;
};
} // namespace tint::core::ir
diff --git a/src/tint/lang/core/ir/load_vector_element.h b/src/tint/lang/core/ir/load_vector_element.h
index 44e3a8c..d1f3adb 100644
--- a/src/tint/lang/core/ir/load_vector_element.h
+++ b/src/tint/lang/core/ir/load_vector_element.h
@@ -80,6 +80,9 @@
/// @returns the friendly name for the instruction
std::string FriendlyName() const override { return "load_vector_element"; }
+
+ /// @returns the side effects for this instruction
+ Accesses GetSideEffects() const override { return Accesses{Access::kLoad}; }
};
} // namespace tint::core::ir
diff --git a/src/tint/lang/core/ir/store.h b/src/tint/lang/core/ir/store.h
index aecd476..4ffc07b 100644
--- a/src/tint/lang/core/ir/store.h
+++ b/src/tint/lang/core/ir/store.h
@@ -82,6 +82,9 @@
/// @returns the friendly name for the instruction
std::string FriendlyName() const override { return "store"; }
+
+ /// @returns the side effects for this instruction
+ Accesses GetSideEffects() const override { return Accesses{Access::kStore}; }
};
} // namespace tint::core::ir
diff --git a/src/tint/lang/core/ir/store_vector_element.h b/src/tint/lang/core/ir/store_vector_element.h
index 4a97f2f..92baed0 100644
--- a/src/tint/lang/core/ir/store_vector_element.h
+++ b/src/tint/lang/core/ir/store_vector_element.h
@@ -89,6 +89,9 @@
/// @returns the friendly name for the instruction
std::string FriendlyName() const override { return "store_vector_element"; }
+
+ /// @returns the side effects for this instruction
+ Accesses GetSideEffects() const override { return Accesses{Access::kStore}; }
};
} // namespace tint::core::ir
diff --git a/src/tint/lang/core/ir/transform/value_to_let.cc b/src/tint/lang/core/ir/transform/value_to_let.cc
index ffa5f44..1c193bf 100644
--- a/src/tint/lang/core/ir/transform/value_to_let.cc
+++ b/src/tint/lang/core/ir/transform/value_to_let.cc
@@ -37,11 +37,6 @@
namespace {
-/// Access is an enumerator of memory access operations
-enum class Access : uint8_t { kLoad, kStore };
-/// Accesses is a set of of Access
-using Accesses = EnumSet<Access>;
-
/// PIMPL state for the transform.
struct State {
/// The IR module.
@@ -60,7 +55,7 @@
// marked-for or ruled-out-for inlining.
Hashset<ir::InstructionResult*, 32> pending_resolution{};
// The accesses of the values in pending_resolution.
- Access pending_access = Access::kLoad;
+ Instruction::Access pending_access = Instruction::Access::kLoad;
/// Process the module.
void Process() {
@@ -80,7 +75,7 @@
TINT_ASSERT(inst->Results().Length() < 2);
// The memory accesses of this instruction
- auto accesses = AccessesFor(inst);
+ auto accesses = inst->GetSideEffects();
// A pointer access chain will be inlined by the backends. For backends which don't
// provide pointer lets we need to force any arguments into lets such the occur in the
@@ -129,44 +124,21 @@
}
}
- if (accesses.Contains(Access::kStore)) { // Note: Also handles load + store
+ if (accesses.Contains(
+ Instruction::Access::kStore)) { // Note: Also handles load + store
PutPendingInLets();
- pending_access = Access::kStore;
+ pending_access = Instruction::Access::kStore;
inst = MaybePutInLet(inst, accesses);
- } else if (accesses.Contains(Access::kLoad)) {
- if (pending_access != Access::kLoad) {
+ } else if (accesses.Contains(Instruction::Access::kLoad)) {
+ if (pending_access != Instruction::Access::kLoad) {
PutPendingInLets();
- pending_access = Access::kLoad;
+ pending_access = Instruction::Access::kLoad;
}
inst = MaybePutInLet(inst, accesses);
}
}
}
- /// @returns the accesses that may be performed by the instruction @p inst
- Accesses AccessesFor(ir::Instruction* inst) {
- return tint::Switch<Accesses>(
- inst, //
- [&](const ir::Load* l) {
- // Always inline things in the `handle` address space
- if (l->From()->Type()->As<core::type::Pointer>()->AddressSpace() ==
- core::AddressSpace::kHandle) {
- return Accesses{};
- }
- return Accesses{Access::kLoad};
- }, //
- [&](const ir::LoadVectorElement*) { return Access::kLoad; }, //
- [&](const ir::Store*) { return Access::kStore; }, //
- [&](const ir::StoreVectorElement*) { return Access::kStore; }, //
- [&](const ir::Call*) {
- if (inst->IsAnyOf<core::ir::Bitcast>()) {
- return Accesses{};
- }
- return Accesses{Access::kLoad, Access::kStore};
- },
- [&](Default) { return Accesses{}; });
- }
-
void PutPendingInLets() {
for (auto& pending : pending_resolution) {
PutInLet(pending);
@@ -174,12 +146,13 @@
pending_resolution.Clear();
}
- core::ir::Instruction* MaybePutInLet(core::ir::Instruction* inst, Accesses& accesses) {
+ core::ir::Instruction* MaybePutInLet(core::ir::Instruction* inst,
+ Instruction::Accesses& accesses) {
if (auto* result = inst->Result(0)) {
auto& usages = result->UsagesUnsorted();
switch (result->NumUsages()) {
case 0: // No usage
- if (accesses.Contains(Access::kStore)) {
+ if (accesses.Contains(Instruction::Access::kStore)) {
// This instruction needs to be emitted but has no uses, so we need to
// make sure that it will be used in a statement. Function call
// instructions with no uses will be emitted as call statements, so we
diff --git a/src/tint/lang/core/ir/transform/value_to_let_test.cc b/src/tint/lang/core/ir/transform/value_to_let_test.cc
index 288a7a6..219c619 100644
--- a/src/tint/lang/core/ir/transform/value_to_let_test.cc
+++ b/src/tint/lang/core/ir/transform/value_to_let_test.cc
@@ -972,8 +972,7 @@
$B1: {
%i:i32 = max 1i, 2i
%v:ptr<function, i32, read_write> = var, %i
- %4:i32 = max 3i, 4i
- %x:i32 = let %4
+ %x:i32 = max 3i, 4i
%y:i32 = load %v
%z:i32 = add %y, %x
store %v, %z
diff --git a/src/tint/lang/glsl/BUILD.bazel b/src/tint/lang/glsl/BUILD.bazel
index 6459e96..b1ce803 100644
--- a/src/tint/lang/glsl/BUILD.bazel
+++ b/src/tint/lang/glsl/BUILD.bazel
@@ -45,7 +45,16 @@
"builtin_fn.h",
],
deps = [
+ "//src/tint/lang/core/ir",
+ "//src/tint/lang/core/type",
+ "//src/tint/utils/containers",
+ "//src/tint/utils/ice",
+ "//src/tint/utils/macros",
+ "//src/tint/utils/math",
+ "//src/tint/utils/memory",
+ "//src/tint/utils/rtti",
"//src/tint/utils/traits",
+ "//src/utils",
],
copts = COPTS,
visibility = ["//visibility:public"],
diff --git a/src/tint/lang/glsl/BUILD.cmake b/src/tint/lang/glsl/BUILD.cmake
index 646aa99..ff26266 100644
--- a/src/tint/lang/glsl/BUILD.cmake
+++ b/src/tint/lang/glsl/BUILD.cmake
@@ -49,5 +49,17 @@
)
tint_target_add_dependencies(tint_lang_glsl lib
+ tint_lang_core_ir
+ tint_lang_core_type
+ tint_utils_containers
+ tint_utils_ice
+ tint_utils_macros
+ tint_utils_math
+ tint_utils_memory
+ tint_utils_rtti
tint_utils_traits
)
+
+tint_target_add_external_dependencies(tint_lang_glsl lib
+ "src_utils"
+)
diff --git a/src/tint/lang/glsl/BUILD.gn b/src/tint/lang/glsl/BUILD.gn
index dc42ba4..2d9bdee 100644
--- a/src/tint/lang/glsl/BUILD.gn
+++ b/src/tint/lang/glsl/BUILD.gn
@@ -44,5 +44,16 @@
"builtin_fn.cc",
"builtin_fn.h",
]
- deps = [ "${tint_src_dir}/utils/traits" ]
+ deps = [
+ "${dawn_root}/src/utils:utils",
+ "${tint_src_dir}/lang/core/ir",
+ "${tint_src_dir}/lang/core/type",
+ "${tint_src_dir}/utils/containers",
+ "${tint_src_dir}/utils/ice",
+ "${tint_src_dir}/utils/macros",
+ "${tint_src_dir}/utils/math",
+ "${tint_src_dir}/utils/memory",
+ "${tint_src_dir}/utils/rtti",
+ "${tint_src_dir}/utils/traits",
+ ]
}
diff --git a/src/tint/lang/glsl/builtin_fn.cc b/src/tint/lang/glsl/builtin_fn.cc
index c5761fb..629ae38 100644
--- a/src/tint/lang/glsl/builtin_fn.cc
+++ b/src/tint/lang/glsl/builtin_fn.cc
@@ -132,4 +132,62 @@
return "<unknown>";
}
+tint::core::ir::Instruction::Accesses GetSideEffects(BuiltinFn fn) {
+ switch (fn) {
+ case BuiltinFn::kBarrier:
+ case BuiltinFn::kMemoryBarrierBuffer:
+ case BuiltinFn::kMemoryBarrierImage:
+ case BuiltinFn::kAtomicCompSwap:
+ case BuiltinFn::kAtomicSub:
+ return core::ir::Instruction::Accesses{core::ir::Instruction::Access::kLoad,
+ core::ir::Instruction::Access::kStore};
+
+ case BuiltinFn::kTexture:
+ case BuiltinFn::kTextureOffset:
+ case BuiltinFn::kTextureLod:
+ case BuiltinFn::kExtTextureLod:
+ case BuiltinFn::kTextureLodOffset:
+ case BuiltinFn::kExtTextureLodOffset:
+ case BuiltinFn::kTextureGrad:
+ case BuiltinFn::kTextureGradOffset:
+ case BuiltinFn::kTextureGather:
+ case BuiltinFn::kTextureGatherOffset:
+ case BuiltinFn::kTexelFetch:
+ case BuiltinFn::kImageLoad:
+ return core::ir::Instruction::Accesses{core::ir::Instruction::Access::kLoad};
+
+ case BuiltinFn::kImageStore:
+ return core::ir::Instruction::Accesses{core::ir::Instruction::Access::kStore};
+
+ case BuiltinFn::kLength:
+ case BuiltinFn::kFloatBitsToInt:
+ case BuiltinFn::kFloatBitsToUint:
+ case BuiltinFn::kIntBitsToFloat:
+ case BuiltinFn::kUintBitsToFloat:
+ case BuiltinFn::kBitCount:
+ case BuiltinFn::kBitfieldExtract:
+ case BuiltinFn::kBitfieldInsert:
+ case BuiltinFn::kPackFloat2X16:
+ case BuiltinFn::kUnpackFloat2X16:
+ case BuiltinFn::kAbs:
+ case BuiltinFn::kAny:
+ case BuiltinFn::kAll:
+ case BuiltinFn::kDot:
+ case BuiltinFn::kMix:
+ case BuiltinFn::kModf:
+ case BuiltinFn::kFrexp:
+ case BuiltinFn::kLessThan:
+ case BuiltinFn::kLessThanEqual:
+ case BuiltinFn::kGreaterThan:
+ case BuiltinFn::kGreaterThanEqual:
+ case BuiltinFn::kEqual:
+ case BuiltinFn::kNotEqual:
+ case BuiltinFn::kTextureSize:
+ case BuiltinFn::kImageSize:
+ case BuiltinFn::kNone:
+ break;
+ }
+ return core::ir::Instruction::Accesses{};
+}
+
} // namespace tint::glsl
diff --git a/src/tint/lang/glsl/builtin_fn.cc.tmpl b/src/tint/lang/glsl/builtin_fn.cc.tmpl
index 4c5db03..a9a2adf 100644
--- a/src/tint/lang/glsl/builtin_fn.cc.tmpl
+++ b/src/tint/lang/glsl/builtin_fn.cc.tmpl
@@ -28,4 +28,61 @@
return "<unknown>";
}
+tint::core::ir::Instruction::Accesses GetSideEffects(BuiltinFn fn) {
+ switch (fn) {
+ case BuiltinFn::kBarrier:
+ case BuiltinFn::kMemoryBarrierBuffer:
+ case BuiltinFn::kMemoryBarrierImage:
+ case BuiltinFn::kAtomicCompSwap:
+ case BuiltinFn::kAtomicSub:
+ return core::ir::Instruction::Accesses{core::ir::Instruction::Access::kLoad, core::ir::Instruction::Access::kStore};
+
+ case BuiltinFn::kTexture:
+ case BuiltinFn::kTextureOffset:
+ case BuiltinFn::kTextureLod:
+ case BuiltinFn::kExtTextureLod:
+ case BuiltinFn::kTextureLodOffset:
+ case BuiltinFn::kExtTextureLodOffset:
+ case BuiltinFn::kTextureGrad:
+ case BuiltinFn::kTextureGradOffset:
+ case BuiltinFn::kTextureGather:
+ case BuiltinFn::kTextureGatherOffset:
+ case BuiltinFn::kTexelFetch:
+ case BuiltinFn::kImageLoad:
+ return core::ir::Instruction::Accesses{core::ir::Instruction::Access::kLoad};
+
+ case BuiltinFn::kImageStore:
+ return core::ir::Instruction::Accesses{core::ir::Instruction::Access::kStore};
+
+ case BuiltinFn::kLength:
+ case BuiltinFn::kFloatBitsToInt:
+ case BuiltinFn::kFloatBitsToUint:
+ case BuiltinFn::kIntBitsToFloat:
+ case BuiltinFn::kUintBitsToFloat:
+ case BuiltinFn::kBitCount:
+ case BuiltinFn::kBitfieldExtract:
+ case BuiltinFn::kBitfieldInsert:
+ case BuiltinFn::kPackFloat2X16:
+ case BuiltinFn::kUnpackFloat2X16:
+ case BuiltinFn::kAbs:
+ case BuiltinFn::kAny:
+ case BuiltinFn::kAll:
+ case BuiltinFn::kDot:
+ case BuiltinFn::kMix:
+ case BuiltinFn::kModf:
+ case BuiltinFn::kFrexp:
+ case BuiltinFn::kLessThan:
+ case BuiltinFn::kLessThanEqual:
+ case BuiltinFn::kGreaterThan:
+ case BuiltinFn::kGreaterThanEqual:
+ case BuiltinFn::kEqual:
+ case BuiltinFn::kNotEqual:
+ case BuiltinFn::kTextureSize:
+ case BuiltinFn::kImageSize:
+ case BuiltinFn::kNone:
+ break;
+ }
+ return core::ir::Instruction::Accesses{};
+}
+
} // namespace tint::glsl
diff --git a/src/tint/lang/glsl/builtin_fn.h b/src/tint/lang/glsl/builtin_fn.h
index 46eb78a..ddde918 100644
--- a/src/tint/lang/glsl/builtin_fn.h
+++ b/src/tint/lang/glsl/builtin_fn.h
@@ -40,6 +40,7 @@
#include <cstdint>
#include <string>
+#include "src/tint/lang/core/ir/call.h"
#include "src/tint/utils/traits/traits.h"
// \cond DO_NOT_DOCUMENT
@@ -102,6 +103,9 @@
return o << str(i);
}
+/// @returns access restrictions for a function
+tint::core::ir::Instruction::Accesses GetSideEffects(BuiltinFn fn);
+
} // namespace tint::glsl
// \endcond
diff --git a/src/tint/lang/glsl/builtin_fn.h.tmpl b/src/tint/lang/glsl/builtin_fn.h.tmpl
index 7dc1fc9..d6ebfbe 100644
--- a/src/tint/lang/glsl/builtin_fn.h.tmpl
+++ b/src/tint/lang/glsl/builtin_fn.h.tmpl
@@ -20,6 +20,7 @@
#include <string>
#include "src/tint/utils/traits/traits.h"
+#include "src/tint/lang/core/ir/call.h"
// \cond DO_NOT_DOCUMENT
namespace tint::glsl {
@@ -41,6 +42,9 @@
return o << str(i);
}
+/// @returns access restrictions for a function
+tint::core::ir::Instruction::Accesses GetSideEffects(BuiltinFn fn);
+
} // namespace tint::glsl
// \endcond
diff --git a/src/tint/lang/glsl/intrinsic/BUILD.bazel b/src/tint/lang/glsl/intrinsic/BUILD.bazel
index 66d9b4d..9018316 100644
--- a/src/tint/lang/glsl/intrinsic/BUILD.bazel
+++ b/src/tint/lang/glsl/intrinsic/BUILD.bazel
@@ -48,6 +48,7 @@
"//src/tint/lang/core",
"//src/tint/lang/core/constant",
"//src/tint/lang/core/intrinsic",
+ "//src/tint/lang/core/ir",
"//src/tint/lang/core/type",
"//src/tint/lang/glsl",
"//src/tint/utils/containers",
diff --git a/src/tint/lang/glsl/intrinsic/BUILD.cmake b/src/tint/lang/glsl/intrinsic/BUILD.cmake
index 9b20294..ce01c0a 100644
--- a/src/tint/lang/glsl/intrinsic/BUILD.cmake
+++ b/src/tint/lang/glsl/intrinsic/BUILD.cmake
@@ -47,6 +47,7 @@
tint_lang_core
tint_lang_core_constant
tint_lang_core_intrinsic
+ tint_lang_core_ir
tint_lang_core_type
tint_lang_glsl
tint_utils_containers
diff --git a/src/tint/lang/glsl/intrinsic/BUILD.gn b/src/tint/lang/glsl/intrinsic/BUILD.gn
index 76bdad3..d53e307 100644
--- a/src/tint/lang/glsl/intrinsic/BUILD.gn
+++ b/src/tint/lang/glsl/intrinsic/BUILD.gn
@@ -49,6 +49,7 @@
"${tint_src_dir}/lang/core",
"${tint_src_dir}/lang/core/constant",
"${tint_src_dir}/lang/core/intrinsic",
+ "${tint_src_dir}/lang/core/ir",
"${tint_src_dir}/lang/core/type",
"${tint_src_dir}/lang/glsl",
"${tint_src_dir}/utils/containers",
diff --git a/src/tint/lang/glsl/ir/builtin_call.cc b/src/tint/lang/glsl/ir/builtin_call.cc
index a32eebb..0389b7e 100644
--- a/src/tint/lang/glsl/ir/builtin_call.cc
+++ b/src/tint/lang/glsl/ir/builtin_call.cc
@@ -54,4 +54,8 @@
return ctx.ir.CreateInstruction<BuiltinCall>(new_result, func_, new_args);
}
+tint::core::ir::Instruction::Accesses BuiltinCall::GetSideEffects() const {
+ return glsl::GetSideEffects(func_);
+}
+
} // namespace tint::glsl::ir
diff --git a/src/tint/lang/glsl/ir/builtin_call.h b/src/tint/lang/glsl/ir/builtin_call.h
index 17011d6..591f8a5 100644
--- a/src/tint/lang/glsl/ir/builtin_call.h
+++ b/src/tint/lang/glsl/ir/builtin_call.h
@@ -70,6 +70,9 @@
return glsl::intrinsic::Dialect::kData;
}
+ /// @returns an access information for the function
+ Accesses GetSideEffects() const override;
+
private:
BuiltinFn func_;
};
diff --git a/src/tint/lang/glsl/ir/member_builtin_call.cc b/src/tint/lang/glsl/ir/member_builtin_call.cc
index 129ada0..3220e52 100644
--- a/src/tint/lang/glsl/ir/member_builtin_call.cc
+++ b/src/tint/lang/glsl/ir/member_builtin_call.cc
@@ -61,4 +61,8 @@
std::move(new_args));
}
+tint::core::ir::Instruction::Accesses MemberBuiltinCall::GetSideEffects() const {
+ return glsl::GetSideEffects(func_);
+}
+
} // namespace tint::glsl::ir
diff --git a/src/tint/lang/glsl/ir/member_builtin_call.h b/src/tint/lang/glsl/ir/member_builtin_call.h
index 2de89ab..a7af421 100644
--- a/src/tint/lang/glsl/ir/member_builtin_call.h
+++ b/src/tint/lang/glsl/ir/member_builtin_call.h
@@ -72,6 +72,9 @@
return glsl::intrinsic::Dialect::kData;
}
+ /// @returns an access information for the function
+ Accesses GetSideEffects() const override;
+
private:
BuiltinFn func_;
};
diff --git a/src/tint/lang/glsl/writer/access_test.cc b/src/tint/lang/glsl/writer/access_test.cc
index 4a2453c..d7070d1 100644
--- a/src/tint/lang/glsl/writer/access_test.cc
+++ b/src/tint/lang/glsl/writer/access_test.cc
@@ -735,8 +735,7 @@
int v_2 = k;
uint v_3 = (uint(sb.b_2.length()) - 1u);
uint v_4 = min(uint(v), v_3);
- uint v_5 = min(v_1, 2u);
- float x = sb.b_2[v_4].b_1[v_5].b[min(uint(v_2), 2u)];
+ float x = sb.b_2[v_4].b_1[min(v_1, 2u)].b[min(uint(v_2), 2u)];
}
)");
}
@@ -809,8 +808,7 @@
uint j = 1u;
uint v = j;
uint v_1 = min(4u, (uint(sb.b_2.length()) - 1u));
- uint v_2 = min(v, 2u);
- float x = sb.b_2[v_1].b_1[v_2].b.z;
+ float x = sb.b_2[v_1].b_1[min(v, 2u)].b.z;
}
)");
}
diff --git a/src/tint/lang/glsl/writer/builtin_test.cc b/src/tint/lang/glsl/writer/builtin_test.cc
index fc690bf..d25eb9c 100644
--- a/src/tint/lang/glsl/writer/builtin_test.cc
+++ b/src/tint/lang/glsl/writer/builtin_test.cc
@@ -691,8 +691,7 @@
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));
}
void main() {
ivec2 a = ivec2(1, 2);
@@ -715,8 +714,7 @@
precision highp int;
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)));
}
void main() {
f16vec4 a = f16vec4(1.0hf, 2.0hf, 3.0hf, 4.0hf);
@@ -740,8 +738,7 @@
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));
}
void main() {
uvec2 a = uvec2(1u, 2u);
@@ -764,8 +761,7 @@
precision highp int;
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)));
}
void main() {
f16vec4 a = f16vec4(1.0hf, 2.0hf, 3.0hf, 4.0hf);
@@ -788,9 +784,7 @@
precision highp int;
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));
}
void main() {
vec2 a = vec2(1.0f, 2.0f);
@@ -813,8 +807,7 @@
precision highp int;
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)));
}
void main() {
f16vec4 a = f16vec4(1.0hf, 2.0hf, 3.0hf, 4.0hf);
@@ -1007,10 +1000,8 @@
precision highp int;
void main() {
- uint v = min(2u, 32u);
- uint v_1 = min(3u, (32u - v));
- int v_2 = int(v);
- uint x = bitfieldExtract(1u, v_2, int(v_1));
+ int v = int(min(2u, 32u));
+ uint x = bitfieldExtract(1u, v, int(min(3u, (32u - min(2u, 32u)))));
}
)");
}
@@ -1027,10 +1018,8 @@
precision highp int;
void main() {
- uint v = min(3u, 32u);
- uint v_1 = min(4u, (32u - v));
- int v_2 = int(v);
- uint x = bitfieldInsert(1u, 2u, v_2, int(v_1));
+ int v = int(min(3u, 32u));
+ uint x = bitfieldInsert(1u, 2u, v, int(min(4u, (32u - min(3u, 32u)))));
}
)");
}
@@ -2732,8 +2721,7 @@
uniform highp sampler2D t_s;
void main() {
- vec2 v = vec2(1.0f, 2.0f);
- vec4 x = texture(t_s, v, clamp(3.0f, -16.0f, 15.9899997711181640625f));
+ vec4 x = texture(t_s, vec2(1.0f, 2.0f), clamp(3.0f, -16.0f, 15.9899997711181640625f));
}
)");
}
@@ -2769,8 +2757,7 @@
uniform highp sampler2D t_s;
void main() {
- vec2 v = vec2(1.0f, 2.0f);
- vec4 x = textureOffset(t_s, v, ivec2(4, 5), clamp(3.0f, -16.0f, 15.9899997711181640625f));
+ vec4 x = textureOffset(t_s, vec2(1.0f, 2.0f), ivec2(4, 5), clamp(3.0f, -16.0f, 15.9899997711181640625f));
}
)");
}
@@ -2807,8 +2794,7 @@
uniform highp sampler2DArray t_s;
void main() {
vec2 v = vec2(1.0f, 2.0f);
- float v_1 = clamp(3.0f, -16.0f, 15.9899997711181640625f);
- vec4 x = texture(t_s, vec3(v, float(4u)), v_1);
+ vec4 x = texture(t_s, vec3(v, float(4u)), clamp(3.0f, -16.0f, 15.9899997711181640625f));
}
)");
}
@@ -2846,8 +2832,7 @@
uniform highp sampler2DArray t_s;
void main() {
vec2 v = vec2(1.0f, 2.0f);
- float v_1 = clamp(3.0f, -16.0f, 15.9899997711181640625f);
- vec4 x = textureOffset(t_s, vec3(v, float(4u)), ivec2(4, 5), v_1);
+ vec4 x = textureOffset(t_s, vec3(v, float(4u)), ivec2(4, 5), clamp(3.0f, -16.0f, 15.9899997711181640625f));
}
)");
}
@@ -2881,8 +2866,7 @@
uniform highp sampler3D t_s;
void main() {
- vec3 v = vec3(1.0f, 2.0f, 3.0f);
- vec4 x = texture(t_s, v, clamp(3.0f, -16.0f, 15.9899997711181640625f));
+ vec4 x = texture(t_s, vec3(1.0f, 2.0f, 3.0f), clamp(3.0f, -16.0f, 15.9899997711181640625f));
}
)");
}
@@ -2918,8 +2902,7 @@
uniform highp sampler3D t_s;
void main() {
- vec3 v = vec3(1.0f, 2.0f, 3.0f);
- vec4 x = textureOffset(t_s, v, ivec3(4, 5, 6), clamp(3.0f, -16.0f, 15.9899997711181640625f));
+ vec4 x = textureOffset(t_s, vec3(1.0f, 2.0f, 3.0f), ivec3(4, 5, 6), clamp(3.0f, -16.0f, 15.9899997711181640625f));
}
)");
}
@@ -2953,8 +2936,7 @@
uniform highp samplerCube t_s;
void main() {
- vec3 v = vec3(1.0f, 2.0f, 3.0f);
- vec4 x = texture(t_s, v, clamp(3.0f, -16.0f, 15.9899997711181640625f));
+ vec4 x = texture(t_s, vec3(1.0f, 2.0f, 3.0f), clamp(3.0f, -16.0f, 15.9899997711181640625f));
}
)");
}
@@ -2994,8 +2976,7 @@
uniform highp samplerCubeArray t_s;
void main() {
vec3 v = vec3(1.0f, 2.0f, 3.0f);
- float v_1 = clamp(3.0f, -16.0f, 15.9899997711181640625f);
- vec4 x = texture(t_s, vec4(v, float(4u)), v_1);
+ vec4 x = texture(t_s, vec4(v, float(4u)), clamp(3.0f, -16.0f, 15.9899997711181640625f));
}
)");
}
diff --git a/src/tint/lang/hlsl/BUILD.bazel b/src/tint/lang/hlsl/BUILD.bazel
index 5470814..20794fb 100644
--- a/src/tint/lang/hlsl/BUILD.bazel
+++ b/src/tint/lang/hlsl/BUILD.bazel
@@ -45,7 +45,16 @@
"builtin_fn.h",
],
deps = [
+ "//src/tint/lang/core/ir",
+ "//src/tint/lang/core/type",
+ "//src/tint/utils/containers",
+ "//src/tint/utils/ice",
+ "//src/tint/utils/macros",
+ "//src/tint/utils/math",
+ "//src/tint/utils/memory",
+ "//src/tint/utils/rtti",
"//src/tint/utils/traits",
+ "//src/utils",
],
copts = COPTS,
visibility = ["//visibility:public"],
diff --git a/src/tint/lang/hlsl/BUILD.cmake b/src/tint/lang/hlsl/BUILD.cmake
index f9cf59d..99b7c80 100644
--- a/src/tint/lang/hlsl/BUILD.cmake
+++ b/src/tint/lang/hlsl/BUILD.cmake
@@ -50,5 +50,17 @@
)
tint_target_add_dependencies(tint_lang_hlsl lib
+ tint_lang_core_ir
+ tint_lang_core_type
+ tint_utils_containers
+ tint_utils_ice
+ tint_utils_macros
+ tint_utils_math
+ tint_utils_memory
+ tint_utils_rtti
tint_utils_traits
)
+
+tint_target_add_external_dependencies(tint_lang_hlsl lib
+ "src_utils"
+)
diff --git a/src/tint/lang/hlsl/BUILD.gn b/src/tint/lang/hlsl/BUILD.gn
index 1465ca2..878fc2f 100644
--- a/src/tint/lang/hlsl/BUILD.gn
+++ b/src/tint/lang/hlsl/BUILD.gn
@@ -44,5 +44,16 @@
"builtin_fn.cc",
"builtin_fn.h",
]
- deps = [ "${tint_src_dir}/utils/traits" ]
+ deps = [
+ "${dawn_root}/src/utils:utils",
+ "${tint_src_dir}/lang/core/ir",
+ "${tint_src_dir}/lang/core/type",
+ "${tint_src_dir}/utils/containers",
+ "${tint_src_dir}/utils/ice",
+ "${tint_src_dir}/utils/macros",
+ "${tint_src_dir}/utils/math",
+ "${tint_src_dir}/utils/memory",
+ "${tint_src_dir}/utils/rtti",
+ "${tint_src_dir}/utils/traits",
+ ]
}
diff --git a/src/tint/lang/hlsl/builtin_fn.cc b/src/tint/lang/hlsl/builtin_fn.cc
index 74e4cb6..eb0c72c 100644
--- a/src/tint/lang/hlsl/builtin_fn.cc
+++ b/src/tint/lang/hlsl/builtin_fn.cc
@@ -160,4 +160,76 @@
return "<unknown>";
}
+tint::core::ir::Instruction::Accesses GetSideEffects(BuiltinFn fn) {
+ switch (fn) {
+ case BuiltinFn::kInterlockedCompareExchange:
+ case BuiltinFn::kInterlockedExchange:
+ case BuiltinFn::kInterlockedAdd:
+ case BuiltinFn::kInterlockedMax:
+ case BuiltinFn::kInterlockedMin:
+ case BuiltinFn::kInterlockedAnd:
+ case BuiltinFn::kInterlockedOr:
+ case BuiltinFn::kInterlockedXor:
+ case BuiltinFn::kWaveReadLaneAt:
+ return core::ir::Instruction::Accesses{core::ir::Instruction::Access::kLoad,
+ core::ir::Instruction::Access::kStore};
+
+ case BuiltinFn::kTextureStore:
+ case BuiltinFn::kStore:
+ case BuiltinFn::kStore2:
+ case BuiltinFn::kStore3:
+ case BuiltinFn::kStore4:
+ case BuiltinFn::kStoreF16:
+ case BuiltinFn::kStore2F16:
+ case BuiltinFn::kStore3F16:
+ case BuiltinFn::kStore4F16:
+ return core::ir::Instruction::Accesses{core::ir::Instruction::Access::kStore};
+
+ case BuiltinFn::kLoad:
+ case BuiltinFn::kLoad2:
+ case BuiltinFn::kLoad3:
+ case BuiltinFn::kLoad4:
+ case BuiltinFn::kLoadF16:
+ case BuiltinFn::kLoad2F16:
+ case BuiltinFn::kLoad3F16:
+ case BuiltinFn::kLoad4F16:
+ case BuiltinFn::kGatherCmp:
+ case BuiltinFn::kGather:
+ case BuiltinFn::kGatherAlpha:
+ case BuiltinFn::kGatherBlue:
+ case BuiltinFn::kGatherGreen:
+ case BuiltinFn::kGatherRed:
+ case BuiltinFn::kSample:
+ case BuiltinFn::kSampleBias:
+ case BuiltinFn::kSampleCmp:
+ case BuiltinFn::kSampleCmpLevelZero:
+ case BuiltinFn::kSampleGrad:
+ case BuiltinFn::kSampleLevel:
+ return core::ir::Instruction::Accesses{core::ir::Instruction::Access::kLoad};
+
+ case BuiltinFn::kAsint:
+ case BuiltinFn::kAsuint:
+ case BuiltinFn::kAsfloat:
+ case BuiltinFn::kDot4AddI8Packed:
+ case BuiltinFn::kDot4AddU8Packed:
+ case BuiltinFn::kF32Tof16:
+ case BuiltinFn::kF16Tof32:
+ case BuiltinFn::kFrexp:
+ case BuiltinFn::kGetDimensions:
+ case BuiltinFn::kModf:
+ case BuiltinFn::kMul:
+ case BuiltinFn::kPackU8:
+ case BuiltinFn::kPackS8:
+ case BuiltinFn::kPackClampS8:
+ case BuiltinFn::kSign:
+ case BuiltinFn::kUnpackS8S32:
+ case BuiltinFn::kUnpackU8U32:
+ case BuiltinFn::kWaveGetLaneIndex:
+ case BuiltinFn::kWaveGetLaneCount:
+ case BuiltinFn::kNone:
+ break;
+ }
+ return core::ir::Instruction::Accesses{};
+}
+
} // namespace tint::hlsl
diff --git a/src/tint/lang/hlsl/builtin_fn.cc.tmpl b/src/tint/lang/hlsl/builtin_fn.cc.tmpl
index 0a81199..a0b4c62 100644
--- a/src/tint/lang/hlsl/builtin_fn.cc.tmpl
+++ b/src/tint/lang/hlsl/builtin_fn.cc.tmpl
@@ -28,4 +28,75 @@
return "<unknown>";
}
+tint::core::ir::Instruction::Accesses GetSideEffects(BuiltinFn fn) {
+ switch (fn) {
+ case BuiltinFn::kInterlockedCompareExchange:
+ case BuiltinFn::kInterlockedExchange:
+ case BuiltinFn::kInterlockedAdd:
+ case BuiltinFn::kInterlockedMax:
+ case BuiltinFn::kInterlockedMin:
+ case BuiltinFn::kInterlockedAnd:
+ case BuiltinFn::kInterlockedOr:
+ case BuiltinFn::kInterlockedXor:
+ case BuiltinFn::kWaveReadLaneAt:
+ return core::ir::Instruction::Accesses{core::ir::Instruction::Access::kLoad, core::ir::Instruction::Access::kStore};
+
+ case BuiltinFn::kTextureStore:
+ case BuiltinFn::kStore:
+ case BuiltinFn::kStore2:
+ case BuiltinFn::kStore3:
+ case BuiltinFn::kStore4:
+ case BuiltinFn::kStoreF16:
+ case BuiltinFn::kStore2F16:
+ case BuiltinFn::kStore3F16:
+ case BuiltinFn::kStore4F16:
+ return core::ir::Instruction::Accesses{core::ir::Instruction::Access::kStore};
+
+ case BuiltinFn::kLoad:
+ case BuiltinFn::kLoad2:
+ case BuiltinFn::kLoad3:
+ case BuiltinFn::kLoad4:
+ case BuiltinFn::kLoadF16:
+ case BuiltinFn::kLoad2F16:
+ case BuiltinFn::kLoad3F16:
+ case BuiltinFn::kLoad4F16:
+ case BuiltinFn::kGatherCmp:
+ case BuiltinFn::kGather:
+ case BuiltinFn::kGatherAlpha:
+ case BuiltinFn::kGatherBlue:
+ case BuiltinFn::kGatherGreen:
+ case BuiltinFn::kGatherRed:
+ case BuiltinFn::kSample:
+ case BuiltinFn::kSampleBias:
+ case BuiltinFn::kSampleCmp:
+ case BuiltinFn::kSampleCmpLevelZero:
+ case BuiltinFn::kSampleGrad:
+ case BuiltinFn::kSampleLevel:
+ return core::ir::Instruction::Accesses{core::ir::Instruction::Access::kLoad};
+
+ case BuiltinFn::kAsint:
+ case BuiltinFn::kAsuint:
+ case BuiltinFn::kAsfloat:
+ case BuiltinFn::kDot4AddI8Packed:
+ case BuiltinFn::kDot4AddU8Packed:
+ case BuiltinFn::kF32Tof16:
+ case BuiltinFn::kF16Tof32:
+ case BuiltinFn::kFrexp:
+ case BuiltinFn::kGetDimensions:
+ case BuiltinFn::kModf:
+ case BuiltinFn::kMul:
+ case BuiltinFn::kPackU8:
+ case BuiltinFn::kPackS8:
+ case BuiltinFn::kPackClampS8:
+ case BuiltinFn::kSign:
+ case BuiltinFn::kUnpackS8S32:
+ case BuiltinFn::kUnpackU8U32:
+ case BuiltinFn::kWaveGetLaneIndex:
+ case BuiltinFn::kWaveGetLaneCount:
+ case BuiltinFn::kNone:
+ break;
+ }
+ return core::ir::Instruction::Accesses{};
+}
+
} // namespace tint::hlsl
diff --git a/src/tint/lang/hlsl/builtin_fn.h b/src/tint/lang/hlsl/builtin_fn.h
index 5be7e6b..5c31465 100644
--- a/src/tint/lang/hlsl/builtin_fn.h
+++ b/src/tint/lang/hlsl/builtin_fn.h
@@ -40,6 +40,7 @@
#include <cstdint>
#include <string>
+#include "src/tint/lang/core/ir/call.h"
#include "src/tint/utils/traits/traits.h"
// \cond DO_NOT_DOCUMENT
@@ -116,6 +117,9 @@
return o << str(i);
}
+/// @returns access restrictions for a function
+tint::core::ir::Instruction::Accesses GetSideEffects(BuiltinFn fn);
+
} // namespace tint::hlsl
// \endcond
diff --git a/src/tint/lang/hlsl/builtin_fn.h.tmpl b/src/tint/lang/hlsl/builtin_fn.h.tmpl
index 566bd9b..14d1fe4 100644
--- a/src/tint/lang/hlsl/builtin_fn.h.tmpl
+++ b/src/tint/lang/hlsl/builtin_fn.h.tmpl
@@ -19,6 +19,7 @@
#include <cstdint>
#include <string>
+#include "src/tint/lang/core/ir/call.h"
#include "src/tint/utils/traits/traits.h"
// \cond DO_NOT_DOCUMENT
@@ -41,6 +42,9 @@
return o << str(i);
}
+/// @returns access restrictions for a function
+tint::core::ir::Instruction::Accesses GetSideEffects(BuiltinFn fn);
+
} // namespace tint::hlsl
// \endcond
diff --git a/src/tint/lang/hlsl/intrinsic/BUILD.bazel b/src/tint/lang/hlsl/intrinsic/BUILD.bazel
index b92c957..82589b0 100644
--- a/src/tint/lang/hlsl/intrinsic/BUILD.bazel
+++ b/src/tint/lang/hlsl/intrinsic/BUILD.bazel
@@ -49,6 +49,7 @@
"//src/tint/lang/core",
"//src/tint/lang/core/constant",
"//src/tint/lang/core/intrinsic",
+ "//src/tint/lang/core/ir",
"//src/tint/lang/core/type",
"//src/tint/lang/hlsl",
"//src/tint/lang/hlsl/type",
diff --git a/src/tint/lang/hlsl/intrinsic/BUILD.cmake b/src/tint/lang/hlsl/intrinsic/BUILD.cmake
index 7dd49d3..7b314f1 100644
--- a/src/tint/lang/hlsl/intrinsic/BUILD.cmake
+++ b/src/tint/lang/hlsl/intrinsic/BUILD.cmake
@@ -48,6 +48,7 @@
tint_lang_core
tint_lang_core_constant
tint_lang_core_intrinsic
+ tint_lang_core_ir
tint_lang_core_type
tint_lang_hlsl
tint_lang_hlsl_type
diff --git a/src/tint/lang/hlsl/intrinsic/BUILD.gn b/src/tint/lang/hlsl/intrinsic/BUILD.gn
index f6a7ba6..a482d84 100644
--- a/src/tint/lang/hlsl/intrinsic/BUILD.gn
+++ b/src/tint/lang/hlsl/intrinsic/BUILD.gn
@@ -50,6 +50,7 @@
"${tint_src_dir}/lang/core",
"${tint_src_dir}/lang/core/constant",
"${tint_src_dir}/lang/core/intrinsic",
+ "${tint_src_dir}/lang/core/ir",
"${tint_src_dir}/lang/core/type",
"${tint_src_dir}/lang/hlsl",
"${tint_src_dir}/lang/hlsl/type",
diff --git a/src/tint/lang/hlsl/ir/builtin_call.cc b/src/tint/lang/hlsl/ir/builtin_call.cc
index 39f7c05..54d1517 100644
--- a/src/tint/lang/hlsl/ir/builtin_call.cc
+++ b/src/tint/lang/hlsl/ir/builtin_call.cc
@@ -54,4 +54,8 @@
return ctx.ir.CreateInstruction<BuiltinCall>(new_result, func_, new_args);
}
+tint::core::ir::Instruction::Accesses BuiltinCall::GetSideEffects() const {
+ return tint::hlsl::GetSideEffects(func_);
+}
+
} // namespace tint::hlsl::ir
diff --git a/src/tint/lang/hlsl/ir/builtin_call.h b/src/tint/lang/hlsl/ir/builtin_call.h
index 6fff0ee..5beb3bb 100644
--- a/src/tint/lang/hlsl/ir/builtin_call.h
+++ b/src/tint/lang/hlsl/ir/builtin_call.h
@@ -70,6 +70,9 @@
return hlsl::intrinsic::Dialect::kData;
}
+ /// @returns an access information for the function
+ Accesses GetSideEffects() const override;
+
private:
BuiltinFn func_;
};
diff --git a/src/tint/lang/hlsl/ir/member_builtin_call.cc b/src/tint/lang/hlsl/ir/member_builtin_call.cc
index d595917..f5fc6ba 100644
--- a/src/tint/lang/hlsl/ir/member_builtin_call.cc
+++ b/src/tint/lang/hlsl/ir/member_builtin_call.cc
@@ -61,4 +61,8 @@
std::move(new_args));
}
+tint::core::ir::Instruction::Accesses MemberBuiltinCall::GetSideEffects() const {
+ return hlsl::GetSideEffects(func_);
+}
+
} // namespace tint::hlsl::ir
diff --git a/src/tint/lang/hlsl/ir/member_builtin_call.h b/src/tint/lang/hlsl/ir/member_builtin_call.h
index d7e2110..3b748a0 100644
--- a/src/tint/lang/hlsl/ir/member_builtin_call.h
+++ b/src/tint/lang/hlsl/ir/member_builtin_call.h
@@ -72,6 +72,9 @@
return hlsl::intrinsic::Dialect::kData;
}
+ /// @returns an access information for the function
+ Accesses GetSideEffects() const override;
+
private:
BuiltinFn func_;
};
diff --git a/src/tint/lang/hlsl/writer/access_test.cc b/src/tint/lang/hlsl/writer/access_test.cc
index 91f63a0..147d96e 100644
--- a/src/tint/lang/hlsl/writer/access_test.cc
+++ b/src/tint/lang/hlsl/writer/access_test.cc
@@ -338,10 +338,7 @@
EXPECT_EQ(output_.hlsl, R"(
ByteAddressBuffer v : register(t0);
float4x4 v_1(uint offset) {
- float4 v_2 = asfloat(v.Load4((offset + 0u)));
- float4 v_3 = asfloat(v.Load4((offset + 16u)));
- float4 v_4 = asfloat(v.Load4((offset + 32u)));
- return float4x4(v_2, v_3, v_4, asfloat(v.Load4((offset + 48u))));
+ return float4x4(asfloat(v.Load4((offset + 0u))), asfloat(v.Load4((offset + 16u))), asfloat(v.Load4((offset + 32u))), asfloat(v.Load4((offset + 48u))));
}
void foo() {
@@ -424,9 +421,8 @@
ByteAddressBuffer v : register(t0);
SB v_1(uint offset) {
- int v_2 = asint(v.Load((offset + 0u)));
- SB v_3 = {v_2, asfloat(v.Load((offset + 4u)))};
- return v_3;
+ SB v_2 = {asint(v.Load((offset + 0u))), asfloat(v.Load((offset + 4u)))};
+ return v_2;
}
void foo() {
@@ -507,34 +503,32 @@
}
float3x3 v_5(uint offset) {
- float3 v_6 = asfloat(v.Load3((offset + 0u)));
- float3 v_7 = asfloat(v.Load3((offset + 16u)));
- return float3x3(v_6, v_7, asfloat(v.Load3((offset + 32u))));
+ return float3x3(asfloat(v.Load3((offset + 0u))), asfloat(v.Load3((offset + 16u))), asfloat(v.Load3((offset + 32u))));
}
-Inner v_8(uint offset) {
- float3x3 v_9 = v_5((offset + 0u));
- float3 v_10[5] = v_1((offset + 48u));
- Inner v_11 = {v_9, v_10};
- return v_11;
+Inner v_6(uint offset) {
+ float3x3 v_7 = v_5((offset + 0u));
+ float3 v_8[5] = v_1((offset + 48u));
+ Inner v_9 = {v_7, v_8};
+ return v_9;
}
-Outer v_12(uint offset) {
- float v_13 = asfloat(v.Load((offset + 0u)));
- Inner v_14 = v_8((offset + 16u));
- Outer v_15 = {v_13, v_14};
- return v_15;
+Outer v_10(uint offset) {
+ float v_11 = asfloat(v.Load((offset + 0u)));
+ Inner v_12 = v_6((offset + 16u));
+ Outer v_13 = {v_11, v_12};
+ return v_13;
}
-SB v_16(uint offset) {
- int v_17 = asint(v.Load((offset + 0u)));
- Outer v_18 = v_12((offset + 16u));
- SB v_19 = {v_17, v_18};
- return v_19;
+SB v_14(uint offset) {
+ int v_15 = asint(v.Load((offset + 0u)));
+ Outer v_16 = v_10((offset + 16u));
+ SB v_17 = {v_15, v_16};
+ return v_17;
}
void foo() {
- SB a = v_16(0u);
+ SB a = v_14(0u);
float b = asfloat(v.Load(136u));
}
@@ -717,19 +711,16 @@
RWByteAddressBuffer sb : register(u0);
void foo() {
int i = int(4);
- int v = i;
uint j = 1u;
- uint v_1 = j;
+ uint v = j;
int k = int(2);
- int v_2 = k;
- uint v_3 = 0u;
- sb.GetDimensions(v_3);
- uint v_4 = (((v_3 - 16u) / 128u) - 1u);
- uint v_5 = min(uint(v), v_4);
- uint v_6 = min(v_1, 2u);
- uint v_7 = (uint(v_5) * 128u);
- uint v_8 = (uint(v_6) * 32u);
- float x = asfloat(sb.Load((((48u + v_7) + v_8) + (uint(min(uint(v_2), 2u)) * 4u))));
+ int v_1 = k;
+ uint v_2 = 0u;
+ sb.GetDimensions(v_2);
+ uint v_3 = (((v_2 - 16u) / 128u) - 1u);
+ uint v_4 = (uint(min(uint(i), v_3)) * 128u);
+ uint v_5 = (uint(min(v, 2u)) * 32u);
+ float x = asfloat(sb.Load((((48u + v_4) + v_5) + (uint(min(uint(v_1), 2u)) * 4u))));
}
)");
@@ -770,13 +761,11 @@
RWByteAddressBuffer sb : register(u0);
void foo() {
uint j = 1u;
- uint v = j;
- uint v_1 = 0u;
- sb.GetDimensions(v_1);
- uint v_2 = min(4u, (((v_1 - 16u) / 128u) - 1u));
- uint v_3 = min(v, 2u);
- uint v_4 = (uint(v_2) * 128u);
- float x = asfloat(sb.Load(((56u + v_4) + (uint(v_3) * 32u))));
+ uint v = 0u;
+ sb.GetDimensions(v);
+ uint v_1 = min(j, 2u);
+ uint v_2 = (uint(min(4u, (((v - 16u) / 128u) - 1u))) * 128u);
+ float x = asfloat(sb.Load(((56u + v_2) + (uint(v_1) * 32u))));
}
)");
@@ -1002,10 +991,7 @@
uint4 v[4];
};
float4x4 v_1(uint start_byte_offset) {
- float4 v_2 = asfloat(v[(start_byte_offset / 16u)]);
- float4 v_3 = asfloat(v[((16u + start_byte_offset) / 16u)]);
- float4 v_4 = asfloat(v[((32u + start_byte_offset) / 16u)]);
- return float4x4(v_2, v_3, v_4, asfloat(v[((48u + start_byte_offset) / 16u)]));
+ return float4x4(asfloat(v[(start_byte_offset / 16u)]), asfloat(v[((16u + start_byte_offset) / 16u)]), asfloat(v[((32u + start_byte_offset) / 16u)]), asfloat(v[((48u + start_byte_offset) / 16u)]));
}
void foo() {
@@ -1037,8 +1023,7 @@
uint4 v[2];
};
float2x3 v_1(uint start_byte_offset) {
- float3 v_2 = asfloat(v[(start_byte_offset / 16u)].xyz);
- return float2x3(v_2, asfloat(v[((16u + start_byte_offset) / 16u)].xyz));
+ return float2x3(asfloat(v[(start_byte_offset / 16u)].xyz), asfloat(v[((16u + start_byte_offset) / 16u)].xyz));
}
void foo() {
@@ -1390,9 +1375,8 @@
uint4 v[1];
};
SB v_1(uint start_byte_offset) {
- int v_2 = asint(v[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]);
- SB v_3 = {v_2, asfloat(v[((4u + start_byte_offset) / 16u)][(((4u + start_byte_offset) % 16u) / 4u)])};
- return v_3;
+ SB v_2 = {asint(v[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]), asfloat(v[((4u + start_byte_offset) / 16u)][(((4u + start_byte_offset) % 16u) / 4u)])};
+ return v_2;
}
void foo() {
@@ -1517,34 +1501,32 @@
}
float3x3 v_5(uint start_byte_offset) {
- float3 v_6 = asfloat(v[(start_byte_offset / 16u)].xyz);
- float3 v_7 = asfloat(v[((16u + start_byte_offset) / 16u)].xyz);
- return float3x3(v_6, v_7, asfloat(v[((32u + start_byte_offset) / 16u)].xyz));
+ return float3x3(asfloat(v[(start_byte_offset / 16u)].xyz), asfloat(v[((16u + start_byte_offset) / 16u)].xyz), asfloat(v[((32u + start_byte_offset) / 16u)].xyz));
}
-Inner v_8(uint start_byte_offset) {
- float3x3 v_9 = v_5(start_byte_offset);
- float3 v_10[5] = v_1((48u + start_byte_offset));
- Inner v_11 = {v_9, v_10};
- return v_11;
+Inner v_6(uint start_byte_offset) {
+ float3x3 v_7 = v_5(start_byte_offset);
+ float3 v_8[5] = v_1((48u + start_byte_offset));
+ Inner v_9 = {v_7, v_8};
+ return v_9;
}
-Outer v_12(uint start_byte_offset) {
- float v_13 = asfloat(v[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]);
- Inner v_14 = v_8((16u + start_byte_offset));
- Outer v_15 = {v_13, v_14};
- return v_15;
+Outer v_10(uint start_byte_offset) {
+ float v_11 = asfloat(v[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]);
+ Inner v_12 = v_6((16u + start_byte_offset));
+ Outer v_13 = {v_11, v_12};
+ return v_13;
}
-SB v_16(uint start_byte_offset) {
- int v_17 = asint(v[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]);
- Outer v_18 = v_12((16u + start_byte_offset));
- SB v_19 = {v_17, v_18};
- return v_19;
+SB v_14(uint start_byte_offset) {
+ int v_15 = asint(v[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]);
+ Outer v_16 = v_10((16u + start_byte_offset));
+ SB v_17 = {v_15, v_16};
+ return v_17;
}
void foo() {
- SB a = v_16(0u);
+ SB a = v_14(0u);
float b = asfloat(v[8u].z);
}
diff --git a/src/tint/lang/hlsl/writer/binary_test.cc b/src/tint/lang/hlsl/writer/binary_test.cc
index 0494e05..001de3e 100644
--- a/src/tint/lang/hlsl/writer/binary_test.cc
+++ b/src/tint/lang/hlsl/writer/binary_test.cc
@@ -235,8 +235,7 @@
float v = left;
float v_1 = right;
float v_2 = (v / v_1);
- float v_3 = floor(v_2);
- float val = (v - ((((v_2 < 0.0f)) ? (ceil(v_2)) : (v_3)) * v_1));
+ float val = (v - ((((v_2 < 0.0f)) ? (ceil(v_2)) : (floor(v_2))) * v_1));
}
)");
@@ -265,8 +264,7 @@
float16_t v = left;
float16_t v_1 = right;
float16_t v_2 = (v / v_1);
- float16_t v_3 = floor(v_2);
- float16_t val = (v - ((((v_2 < float16_t(0.0h))) ? (ceil(v_2)) : (v_3)) * v_1));
+ float16_t val = (v - ((((v_2 < float16_t(0.0h))) ? (ceil(v_2)) : (floor(v_2))) * v_1));
}
)");
@@ -295,8 +293,7 @@
float3 v = left;
float3 v_1 = right;
float3 v_2 = (v / v_1);
- float3 v_3 = floor(v_2);
- float3 val = (v - ((((v_2 < (0.0f).xxx)) ? (ceil(v_2)) : (v_3)) * v_1));
+ float3 val = (v - ((((v_2 < (0.0f).xxx)) ? (ceil(v_2)) : (floor(v_2))) * v_1));
}
)");
@@ -325,8 +322,7 @@
vector<float16_t, 3> v = left;
vector<float16_t, 3> v_1 = right;
vector<float16_t, 3> v_2 = (v / v_1);
- vector<float16_t, 3> v_3 = floor(v_2);
- vector<float16_t, 3> val = (v - ((((v_2 < (float16_t(0.0h)).xxx)) ? (ceil(v_2)) : (v_3)) * v_1));
+ vector<float16_t, 3> val = (v - ((((v_2 < (float16_t(0.0h)).xxx)) ? (ceil(v_2)) : (floor(v_2))) * v_1));
}
)");
diff --git a/src/tint/lang/hlsl/writer/builtin_test.cc b/src/tint/lang/hlsl/writer/builtin_test.cc
index 24fc5b3..819ce7b 100644
--- a/src/tint/lang/hlsl/writer/builtin_test.cc
+++ b/src/tint/lang/hlsl/writer/builtin_test.cc
@@ -109,8 +109,7 @@
void foo() {
float v = 0.0f;
float v_1 = v;
- float v_2 = floor(v_1);
- float val = (((v_1 < 0.0f)) ? (ceil(v_1)) : (v_2));
+ float val = (((v_1 < 0.0f)) ? (ceil(v_1)) : (floor(v_1)));
}
)");
@@ -133,8 +132,7 @@
void foo() {
float3 v = (2.0f).xxx;
float3 v_1 = v;
- float3 v_2 = floor(v_1);
- float3 val = (((v_1 < (0.0f).xxx)) ? (ceil(v_1)) : (v_2));
+ float3 val = (((v_1 < (0.0f).xxx)) ? (ceil(v_1)) : (floor(v_1)));
}
)");
@@ -157,8 +155,7 @@
void foo() {
float16_t v = float16_t(0.0h);
float16_t v_1 = v;
- float16_t v_2 = floor(v_1);
- float16_t val = (((v_1 < float16_t(0.0h))) ? (ceil(v_1)) : (v_2));
+ float16_t val = (((v_1 < float16_t(0.0h))) ? (ceil(v_1)) : (floor(v_1)));
}
)");
@@ -2049,9 +2046,8 @@
int4 u = (int(2)).xxxx;
int4 v = u;
uint4 v_1 = uint4(0u, 8u, 16u, 24u);
- uint4 v_2 = asuint(v);
- uint4 v_3 = ((v_2 & uint4((255u).xxxx)) << v_1);
- uint a = dot(v_3, uint4((1u).xxxx));
+ uint4 v_2 = ((asuint(v) & uint4((255u).xxxx)) << v_1);
+ uint a = dot(v_2, uint4((1u).xxxx));
}
)");
@@ -2772,8 +2768,7 @@
Texture2D<float4> v : register(t0);
SamplerState v_1 : register(s1);
void foo() {
- float2 v_2 = float2(1.0f, 2.0f);
- float4 x = v.SampleBias(v_1, v_2, clamp(3.0f, -16.0f, 15.9899997711181640625f));
+ float4 x = v.SampleBias(v_1, float2(1.0f, 2.0f), clamp(3.0f, -16.0f, 15.9899997711181640625f));
}
)");
@@ -2809,8 +2804,7 @@
Texture2D<float4> v : register(t0);
SamplerState v_1 : register(s1);
void foo() {
- float2 v_2 = float2(1.0f, 2.0f);
- float4 x = v.SampleBias(v_1, v_2, clamp(3.0f, -16.0f, 15.9899997711181640625f), int2(int(4), int(5)));
+ float4 x = v.SampleBias(v_1, float2(1.0f, 2.0f), clamp(3.0f, -16.0f, 15.9899997711181640625f), int2(int(4), int(5)));
}
)");
@@ -2847,8 +2841,7 @@
SamplerState v_1 : register(s1);
void foo() {
float2 v_2 = float2(1.0f, 2.0f);
- float v_3 = clamp(3.0f, -16.0f, 15.9899997711181640625f);
- float4 x = v.SampleBias(v_1, float3(v_2, float(4u)), v_3);
+ float4 x = v.SampleBias(v_1, float3(v_2, float(4u)), clamp(3.0f, -16.0f, 15.9899997711181640625f));
}
)");
@@ -2886,8 +2879,7 @@
SamplerState v_1 : register(s1);
void foo() {
float2 v_2 = float2(1.0f, 2.0f);
- float v_3 = clamp(3.0f, -16.0f, 15.9899997711181640625f);
- float4 x = v.SampleBias(v_1, float3(v_2, float(4u)), v_3, int2(int(4), int(5)));
+ float4 x = v.SampleBias(v_1, float3(v_2, float(4u)), clamp(3.0f, -16.0f, 15.9899997711181640625f), int2(int(4), int(5)));
}
)");
@@ -2921,8 +2913,7 @@
Texture3D<float4> v : register(t0);
SamplerState v_1 : register(s1);
void foo() {
- float3 v_2 = float3(1.0f, 2.0f, 3.0f);
- float4 x = v.SampleBias(v_1, v_2, clamp(3.0f, -16.0f, 15.9899997711181640625f));
+ float4 x = v.SampleBias(v_1, float3(1.0f, 2.0f, 3.0f), clamp(3.0f, -16.0f, 15.9899997711181640625f));
}
)");
@@ -2958,8 +2949,7 @@
Texture3D<float4> v : register(t0);
SamplerState v_1 : register(s1);
void foo() {
- float3 v_2 = float3(1.0f, 2.0f, 3.0f);
- float4 x = v.SampleBias(v_1, v_2, clamp(3.0f, -16.0f, 15.9899997711181640625f), int3(int(4), int(5), int(6)));
+ float4 x = v.SampleBias(v_1, float3(1.0f, 2.0f, 3.0f), clamp(3.0f, -16.0f, 15.9899997711181640625f), int3(int(4), int(5), int(6)));
}
)");
@@ -2993,8 +2983,7 @@
TextureCube<float4> v : register(t0);
SamplerState v_1 : register(s1);
void foo() {
- float3 v_2 = float3(1.0f, 2.0f, 3.0f);
- float4 x = v.SampleBias(v_1, v_2, clamp(3.0f, -16.0f, 15.9899997711181640625f));
+ float4 x = v.SampleBias(v_1, float3(1.0f, 2.0f, 3.0f), clamp(3.0f, -16.0f, 15.9899997711181640625f));
}
)");
@@ -3031,8 +3020,7 @@
SamplerState v_1 : register(s1);
void foo() {
float3 v_2 = float3(1.0f, 2.0f, 3.0f);
- float v_3 = clamp(3.0f, -16.0f, 15.9899997711181640625f);
- float4 x = v.SampleBias(v_1, float4(v_2, float(4u)), v_3);
+ float4 x = v.SampleBias(v_1, float4(v_2, float(4u)), clamp(3.0f, -16.0f, 15.9899997711181640625f));
}
)");
diff --git a/src/tint/lang/hlsl/writer/raise/builtin_polyfill.cc b/src/tint/lang/hlsl/writer/raise/builtin_polyfill.cc
index 222465f..8c118d5 100644
--- a/src/tint/lang/hlsl/writer/raise/builtin_polyfill.cc
+++ b/src/tint/lang/hlsl/writer/raise/builtin_polyfill.cc
@@ -1046,8 +1046,10 @@
TINT_UNREACHABLE();
}
- core::ir::Instruction* builtin = b.MemberCall<hlsl::ir::MemberBuiltinCall>(
+ auto* member_call = b.MemberCall<hlsl::ir::MemberBuiltinCall>(
ty.vec4(ret_ty), hlsl::BuiltinFn::kLoad, tex, call_args);
+
+ core::ir::Instruction* builtin = member_call;
if (!swizzle.IsEmpty()) {
builtin = b.Swizzle(ty.f32(), builtin, swizzle);
} else {
diff --git a/src/tint/lang/msl/BUILD.bazel b/src/tint/lang/msl/BUILD.bazel
index af698ff..930390d 100644
--- a/src/tint/lang/msl/BUILD.bazel
+++ b/src/tint/lang/msl/BUILD.bazel
@@ -46,7 +46,16 @@
"builtin_fn.h",
],
deps = [
+ "//src/tint/lang/core/ir",
+ "//src/tint/lang/core/type",
+ "//src/tint/utils/containers",
+ "//src/tint/utils/ice",
+ "//src/tint/utils/macros",
+ "//src/tint/utils/math",
+ "//src/tint/utils/memory",
+ "//src/tint/utils/rtti",
"//src/tint/utils/traits",
+ "//src/utils",
],
copts = COPTS,
visibility = ["//visibility:public"],
diff --git a/src/tint/lang/msl/BUILD.cmake b/src/tint/lang/msl/BUILD.cmake
index ab1dba6..cefb3a9 100644
--- a/src/tint/lang/msl/BUILD.cmake
+++ b/src/tint/lang/msl/BUILD.cmake
@@ -51,5 +51,17 @@
)
tint_target_add_dependencies(tint_lang_msl lib
+ tint_lang_core_ir
+ tint_lang_core_type
+ tint_utils_containers
+ tint_utils_ice
+ tint_utils_macros
+ tint_utils_math
+ tint_utils_memory
+ tint_utils_rtti
tint_utils_traits
)
+
+tint_target_add_external_dependencies(tint_lang_msl lib
+ "src_utils"
+)
diff --git a/src/tint/lang/msl/BUILD.gn b/src/tint/lang/msl/BUILD.gn
index bde0625..2fb0a4e 100644
--- a/src/tint/lang/msl/BUILD.gn
+++ b/src/tint/lang/msl/BUILD.gn
@@ -45,5 +45,16 @@
"builtin_fn.cc",
"builtin_fn.h",
]
- deps = [ "${tint_src_dir}/utils/traits" ]
+ deps = [
+ "${dawn_root}/src/utils:utils",
+ "${tint_src_dir}/lang/core/ir",
+ "${tint_src_dir}/lang/core/type",
+ "${tint_src_dir}/utils/containers",
+ "${tint_src_dir}/utils/ice",
+ "${tint_src_dir}/utils/macros",
+ "${tint_src_dir}/utils/math",
+ "${tint_src_dir}/utils/memory",
+ "${tint_src_dir}/utils/rtti",
+ "${tint_src_dir}/utils/traits",
+ ]
}
diff --git a/src/tint/lang/msl/builtin_fn.cc b/src/tint/lang/msl/builtin_fn.cc
index 3cb2af1..667fa26 100644
--- a/src/tint/lang/msl/builtin_fn.cc
+++ b/src/tint/lang/msl/builtin_fn.cc
@@ -114,4 +114,53 @@
return "<unknown>";
}
+tint::core::ir::Instruction::Accesses GetSideEffects(BuiltinFn fn) {
+ switch (fn) {
+ case BuiltinFn::kAtomicCompareExchangeWeakExplicit:
+ case BuiltinFn::kAtomicExchangeExplicit:
+ case BuiltinFn::kAtomicFetchAddExplicit:
+ case BuiltinFn::kAtomicFetchAndExplicit:
+ case BuiltinFn::kAtomicFetchMaxExplicit:
+ case BuiltinFn::kAtomicFetchMinExplicit:
+ case BuiltinFn::kAtomicFetchOrExplicit:
+ case BuiltinFn::kAtomicFetchSubExplicit:
+ case BuiltinFn::kAtomicFetchXorExplicit:
+ case BuiltinFn::kAtomicStoreExplicit:
+ case BuiltinFn::kFence:
+ case BuiltinFn::kThreadgroupBarrier:
+ case BuiltinFn::kSimdBallot:
+ case BuiltinFn::kQuadShuffleXor:
+ return core::ir::Instruction::Accesses{core::ir::Instruction::Access::kLoad,
+ core::ir::Instruction::Access::kStore};
+
+ case BuiltinFn::kAtomicLoadExplicit:
+ case BuiltinFn::kGather:
+ case BuiltinFn::kGatherCompare:
+ case BuiltinFn::kRead:
+ case BuiltinFn::kSample:
+ case BuiltinFn::kSampleCompare:
+ return core::ir::Instruction::Accesses{core::ir::Instruction::Access::kLoad};
+
+ case BuiltinFn::kWrite:
+ return core::ir::Instruction::Accesses{core::ir::Instruction::Access::kStore};
+
+ case BuiltinFn::kDistance:
+ case BuiltinFn::kDot:
+ case BuiltinFn::kFmod:
+ case BuiltinFn::kFrexp:
+ case BuiltinFn::kGetWidth:
+ case BuiltinFn::kGetHeight:
+ case BuiltinFn::kGetDepth:
+ case BuiltinFn::kGetArraySize:
+ case BuiltinFn::kGetNumMipLevels:
+ case BuiltinFn::kGetNumSamples:
+ case BuiltinFn::kLength:
+ case BuiltinFn::kModf:
+ case BuiltinFn::kSign:
+ case BuiltinFn::kNone:
+ break;
+ }
+ return core::ir::Instruction::Accesses{};
+}
+
} // namespace tint::msl
diff --git a/src/tint/lang/msl/builtin_fn.cc.tmpl b/src/tint/lang/msl/builtin_fn.cc.tmpl
index 139045f..3a03670 100644
--- a/src/tint/lang/msl/builtin_fn.cc.tmpl
+++ b/src/tint/lang/msl/builtin_fn.cc.tmpl
@@ -28,4 +28,52 @@
return "<unknown>";
}
+tint::core::ir::Instruction::Accesses GetSideEffects(BuiltinFn fn) {
+ switch (fn) {
+ case BuiltinFn::kAtomicCompareExchangeWeakExplicit:
+ case BuiltinFn::kAtomicExchangeExplicit:
+ case BuiltinFn::kAtomicFetchAddExplicit:
+ case BuiltinFn::kAtomicFetchAndExplicit:
+ case BuiltinFn::kAtomicFetchMaxExplicit:
+ case BuiltinFn::kAtomicFetchMinExplicit:
+ case BuiltinFn::kAtomicFetchOrExplicit:
+ case BuiltinFn::kAtomicFetchSubExplicit:
+ case BuiltinFn::kAtomicFetchXorExplicit:
+ case BuiltinFn::kAtomicStoreExplicit:
+ case BuiltinFn::kFence:
+ case BuiltinFn::kThreadgroupBarrier:
+ case BuiltinFn::kSimdBallot:
+ case BuiltinFn::kQuadShuffleXor:
+ return core::ir::Instruction::Accesses{core::ir::Instruction::Access::kLoad, core::ir::Instruction::Access::kStore};
+
+ case BuiltinFn::kAtomicLoadExplicit:
+ case BuiltinFn::kGather:
+ case BuiltinFn::kGatherCompare:
+ case BuiltinFn::kRead:
+ case BuiltinFn::kSample:
+ case BuiltinFn::kSampleCompare:
+ return core::ir::Instruction::Accesses{core::ir::Instruction::Access::kLoad};
+
+ case BuiltinFn::kWrite:
+ return core::ir::Instruction::Accesses{core::ir::Instruction::Access::kStore};
+
+ case BuiltinFn::kDistance:
+ case BuiltinFn::kDot:
+ case BuiltinFn::kFmod:
+ case BuiltinFn::kFrexp:
+ case BuiltinFn::kGetWidth:
+ case BuiltinFn::kGetHeight:
+ case BuiltinFn::kGetDepth:
+ case BuiltinFn::kGetArraySize:
+ case BuiltinFn::kGetNumMipLevels:
+ case BuiltinFn::kGetNumSamples:
+ case BuiltinFn::kLength:
+ case BuiltinFn::kModf:
+ case BuiltinFn::kSign:
+ case BuiltinFn::kNone:
+ break;
+ }
+ return core::ir::Instruction::Accesses{};
+}
+
} // namespace tint::msl
diff --git a/src/tint/lang/msl/builtin_fn.h b/src/tint/lang/msl/builtin_fn.h
index 56843d8..f27a232 100644
--- a/src/tint/lang/msl/builtin_fn.h
+++ b/src/tint/lang/msl/builtin_fn.h
@@ -40,6 +40,7 @@
#include <cstdint>
#include <string>
+#include "src/tint/lang/core/ir/call.h"
#include "src/tint/utils/traits/traits.h"
// \cond DO_NOT_DOCUMENT
@@ -93,6 +94,9 @@
return o << str(i);
}
+/// @returns access restrictions for a function
+tint::core::ir::Instruction::Accesses GetSideEffects(BuiltinFn fn);
+
} // namespace tint::msl
// \endcond
diff --git a/src/tint/lang/msl/builtin_fn.h.tmpl b/src/tint/lang/msl/builtin_fn.h.tmpl
index 491524f..53b7389 100644
--- a/src/tint/lang/msl/builtin_fn.h.tmpl
+++ b/src/tint/lang/msl/builtin_fn.h.tmpl
@@ -20,6 +20,7 @@
#include <string>
#include "src/tint/utils/traits/traits.h"
+#include "src/tint/lang/core/ir/call.h"
// \cond DO_NOT_DOCUMENT
namespace tint::msl {
@@ -41,6 +42,9 @@
return o << str(i);
}
+/// @returns access restrictions for a function
+tint::core::ir::Instruction::Accesses GetSideEffects(BuiltinFn fn);
+
} // namespace tint::msl
// \endcond
diff --git a/src/tint/lang/msl/intrinsic/BUILD.bazel b/src/tint/lang/msl/intrinsic/BUILD.bazel
index 59b25ef..93e61be 100644
--- a/src/tint/lang/msl/intrinsic/BUILD.bazel
+++ b/src/tint/lang/msl/intrinsic/BUILD.bazel
@@ -49,6 +49,7 @@
"//src/tint/lang/core",
"//src/tint/lang/core/constant",
"//src/tint/lang/core/intrinsic",
+ "//src/tint/lang/core/ir",
"//src/tint/lang/core/type",
"//src/tint/lang/msl",
"//src/tint/lang/msl/type",
diff --git a/src/tint/lang/msl/intrinsic/BUILD.cmake b/src/tint/lang/msl/intrinsic/BUILD.cmake
index 483dd22..a424ec3 100644
--- a/src/tint/lang/msl/intrinsic/BUILD.cmake
+++ b/src/tint/lang/msl/intrinsic/BUILD.cmake
@@ -48,6 +48,7 @@
tint_lang_core
tint_lang_core_constant
tint_lang_core_intrinsic
+ tint_lang_core_ir
tint_lang_core_type
tint_lang_msl
tint_lang_msl_type
diff --git a/src/tint/lang/msl/intrinsic/BUILD.gn b/src/tint/lang/msl/intrinsic/BUILD.gn
index 5c0b4f0..a93b65e 100644
--- a/src/tint/lang/msl/intrinsic/BUILD.gn
+++ b/src/tint/lang/msl/intrinsic/BUILD.gn
@@ -50,6 +50,7 @@
"${tint_src_dir}/lang/core",
"${tint_src_dir}/lang/core/constant",
"${tint_src_dir}/lang/core/intrinsic",
+ "${tint_src_dir}/lang/core/ir",
"${tint_src_dir}/lang/core/type",
"${tint_src_dir}/lang/msl",
"${tint_src_dir}/lang/msl/type",
diff --git a/src/tint/lang/msl/ir/builtin_call.cc b/src/tint/lang/msl/ir/builtin_call.cc
index 06519c4..0d3d2de 100644
--- a/src/tint/lang/msl/ir/builtin_call.cc
+++ b/src/tint/lang/msl/ir/builtin_call.cc
@@ -54,4 +54,8 @@
return ctx.ir.CreateInstruction<BuiltinCall>(new_result, func_, new_args);
}
+tint::core::ir::Instruction::Accesses BuiltinCall::GetSideEffects() const {
+ return msl::GetSideEffects(func_);
+}
+
} // namespace tint::msl::ir
diff --git a/src/tint/lang/msl/ir/builtin_call.h b/src/tint/lang/msl/ir/builtin_call.h
index 8003ad4..26b1736 100644
--- a/src/tint/lang/msl/ir/builtin_call.h
+++ b/src/tint/lang/msl/ir/builtin_call.h
@@ -69,6 +69,9 @@
return msl::intrinsic::Dialect::kData;
}
+ /// @returns an access information for the function
+ Accesses GetSideEffects() const override;
+
private:
BuiltinFn func_;
};
diff --git a/src/tint/lang/msl/ir/member_builtin_call.cc b/src/tint/lang/msl/ir/member_builtin_call.cc
index 0857f37..d3925e8 100644
--- a/src/tint/lang/msl/ir/member_builtin_call.cc
+++ b/src/tint/lang/msl/ir/member_builtin_call.cc
@@ -61,4 +61,8 @@
std::move(new_args));
}
+tint::core::ir::Instruction::Accesses MemberBuiltinCall::GetSideEffects() const {
+ return msl::GetSideEffects(func_);
+}
+
} // namespace tint::msl::ir
diff --git a/src/tint/lang/msl/ir/member_builtin_call.h b/src/tint/lang/msl/ir/member_builtin_call.h
index da47b18..b17788c 100644
--- a/src/tint/lang/msl/ir/member_builtin_call.h
+++ b/src/tint/lang/msl/ir/member_builtin_call.h
@@ -72,6 +72,9 @@
return msl::intrinsic::Dialect::kData;
}
+ /// @returns an access information for the function
+ Accesses GetSideEffects() const override;
+
private:
BuiltinFn func_;
};
diff --git a/src/tint/lang/msl/writer/binary_test.cc b/src/tint/lang/msl/writer/binary_test.cc
index f5ece1d..2639ef1 100644
--- a/src/tint/lang/msl/writer/binary_test.cc
+++ b/src/tint/lang/msl/writer/binary_test.cc
@@ -116,8 +116,7 @@
ASSERT_TRUE(Generate()) << err_ << output_.msl;
EXPECT_EQ(output_.msl, MetalHeader() + R"(
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))));
}
void foo() {
diff --git a/src/tint/lang/spirv/BUILD.bazel b/src/tint/lang/spirv/BUILD.bazel
index e371f60..04a0e9f 100644
--- a/src/tint/lang/spirv/BUILD.bazel
+++ b/src/tint/lang/spirv/BUILD.bazel
@@ -45,7 +45,16 @@
"builtin_fn.h",
],
deps = [
+ "//src/tint/lang/core/ir",
+ "//src/tint/lang/core/type",
+ "//src/tint/utils/containers",
+ "//src/tint/utils/ice",
+ "//src/tint/utils/macros",
+ "//src/tint/utils/math",
+ "//src/tint/utils/memory",
+ "//src/tint/utils/rtti",
"//src/tint/utils/traits",
+ "//src/utils",
],
copts = COPTS,
visibility = ["//visibility:public"],
diff --git a/src/tint/lang/spirv/BUILD.cmake b/src/tint/lang/spirv/BUILD.cmake
index 06f7cfd..6164fee 100644
--- a/src/tint/lang/spirv/BUILD.cmake
+++ b/src/tint/lang/spirv/BUILD.cmake
@@ -51,5 +51,17 @@
)
tint_target_add_dependencies(tint_lang_spirv lib
+ tint_lang_core_ir
+ tint_lang_core_type
+ tint_utils_containers
+ tint_utils_ice
+ tint_utils_macros
+ tint_utils_math
+ tint_utils_memory
+ tint_utils_rtti
tint_utils_traits
)
+
+tint_target_add_external_dependencies(tint_lang_spirv lib
+ "src_utils"
+)
diff --git a/src/tint/lang/spirv/BUILD.gn b/src/tint/lang/spirv/BUILD.gn
index 1633f6d..478ff8f 100644
--- a/src/tint/lang/spirv/BUILD.gn
+++ b/src/tint/lang/spirv/BUILD.gn
@@ -44,5 +44,16 @@
"builtin_fn.cc",
"builtin_fn.h",
]
- deps = [ "${tint_src_dir}/utils/traits" ]
+ deps = [
+ "${dawn_root}/src/utils:utils",
+ "${tint_src_dir}/lang/core/ir",
+ "${tint_src_dir}/lang/core/type",
+ "${tint_src_dir}/utils/containers",
+ "${tint_src_dir}/utils/ice",
+ "${tint_src_dir}/utils/macros",
+ "${tint_src_dir}/utils/math",
+ "${tint_src_dir}/utils/memory",
+ "${tint_src_dir}/utils/rtti",
+ "${tint_src_dir}/utils/traits",
+ ]
}
diff --git a/src/tint/lang/spirv/builtin_fn.cc b/src/tint/lang/spirv/builtin_fn.cc
index 3237412..c2380c36 100644
--- a/src/tint/lang/spirv/builtin_fn.cc
+++ b/src/tint/lang/spirv/builtin_fn.cc
@@ -116,4 +116,54 @@
return "<unknown>";
}
+tint::core::ir::Instruction::Accesses GetSideEffects(BuiltinFn fn) {
+ switch (fn) {
+ case BuiltinFn::kAtomicLoad:
+ case BuiltinFn::kImageDrefGather:
+ case BuiltinFn::kImageFetch:
+ case BuiltinFn::kImageGather:
+ case BuiltinFn::kImageRead:
+ case BuiltinFn::kImageSampleImplicitLod:
+ case BuiltinFn::kImageSampleExplicitLod:
+ case BuiltinFn::kImageSampleDrefImplicitLod:
+ case BuiltinFn::kImageSampleDrefExplicitLod:
+ case BuiltinFn::kSampledImage:
+ return core::ir::Instruction::Accesses{core::ir::Instruction::Access::kLoad};
+
+ case BuiltinFn::kImageWrite:
+ return core::ir::Instruction::Accesses{core::ir::Instruction::Access::kStore};
+
+ case BuiltinFn::kAtomicAnd:
+ case BuiltinFn::kAtomicCompareExchange:
+ case BuiltinFn::kAtomicExchange:
+ case BuiltinFn::kAtomicIadd:
+ case BuiltinFn::kAtomicIsub:
+ case BuiltinFn::kAtomicOr:
+ case BuiltinFn::kAtomicSmax:
+ case BuiltinFn::kAtomicSmin:
+ case BuiltinFn::kAtomicStore:
+ case BuiltinFn::kAtomicUmax:
+ case BuiltinFn::kAtomicUmin:
+ case BuiltinFn::kAtomicXor:
+ return core::ir::Instruction::Accesses{core::ir::Instruction::Access::kLoad,
+ core::ir::Instruction::Access::kStore};
+
+ case BuiltinFn::kArrayLength:
+ case BuiltinFn::kDot:
+ case BuiltinFn::kImageQuerySize:
+ case BuiltinFn::kImageQuerySizeLod:
+ case BuiltinFn::kMatrixTimesMatrix:
+ case BuiltinFn::kMatrixTimesScalar:
+ case BuiltinFn::kMatrixTimesVector:
+ case BuiltinFn::kSelect:
+ case BuiltinFn::kVectorTimesMatrix:
+ case BuiltinFn::kVectorTimesScalar:
+ case BuiltinFn::kSdot:
+ case BuiltinFn::kUdot:
+ case BuiltinFn::kNone:
+ break;
+ }
+ return core::ir::Instruction::Accesses{};
+}
+
} // namespace tint::spirv
diff --git a/src/tint/lang/spirv/builtin_fn.cc.tmpl b/src/tint/lang/spirv/builtin_fn.cc.tmpl
index 9e20878..a539fa5 100644
--- a/src/tint/lang/spirv/builtin_fn.cc.tmpl
+++ b/src/tint/lang/spirv/builtin_fn.cc.tmpl
@@ -28,4 +28,53 @@
return "<unknown>";
}
+tint::core::ir::Instruction::Accesses GetSideEffects(BuiltinFn fn) {
+ switch (fn) {
+ case BuiltinFn::kAtomicLoad:
+ case BuiltinFn::kImageDrefGather:
+ case BuiltinFn::kImageFetch:
+ case BuiltinFn::kImageGather:
+ case BuiltinFn::kImageRead:
+ case BuiltinFn::kImageSampleImplicitLod:
+ case BuiltinFn::kImageSampleExplicitLod:
+ case BuiltinFn::kImageSampleDrefImplicitLod:
+ case BuiltinFn::kImageSampleDrefExplicitLod:
+ case BuiltinFn::kSampledImage:
+ return core::ir::Instruction::Accesses{core::ir::Instruction::Access::kLoad};
+
+ case BuiltinFn::kImageWrite:
+ return core::ir::Instruction::Accesses{core::ir::Instruction::Access::kStore};
+
+ case BuiltinFn::kAtomicAnd:
+ case BuiltinFn::kAtomicCompareExchange:
+ case BuiltinFn::kAtomicExchange:
+ case BuiltinFn::kAtomicIadd:
+ case BuiltinFn::kAtomicIsub:
+ case BuiltinFn::kAtomicOr:
+ case BuiltinFn::kAtomicSmax:
+ case BuiltinFn::kAtomicSmin:
+ case BuiltinFn::kAtomicStore:
+ case BuiltinFn::kAtomicUmax:
+ case BuiltinFn::kAtomicUmin:
+ case BuiltinFn::kAtomicXor:
+ return core::ir::Instruction::Accesses{core::ir::Instruction::Access::kLoad, core::ir::Instruction::Access::kStore};
+
+ case BuiltinFn::kArrayLength:
+ case BuiltinFn::kDot:
+ case BuiltinFn::kImageQuerySize:
+ case BuiltinFn::kImageQuerySizeLod:
+ case BuiltinFn::kMatrixTimesMatrix:
+ case BuiltinFn::kMatrixTimesScalar:
+ case BuiltinFn::kMatrixTimesVector:
+ case BuiltinFn::kSelect:
+ case BuiltinFn::kVectorTimesMatrix:
+ case BuiltinFn::kVectorTimesScalar:
+ case BuiltinFn::kSdot:
+ case BuiltinFn::kUdot:
+ case BuiltinFn::kNone:
+ break;
+ }
+ return core::ir::Instruction::Accesses{};
+}
+
} // namespace tint::spirv
diff --git a/src/tint/lang/spirv/builtin_fn.h b/src/tint/lang/spirv/builtin_fn.h
index 9cac695..77389ad 100644
--- a/src/tint/lang/spirv/builtin_fn.h
+++ b/src/tint/lang/spirv/builtin_fn.h
@@ -40,6 +40,7 @@
#include <cstdint>
#include <string>
+#include "src/tint/lang/core/ir/call.h"
#include "src/tint/utils/traits/traits.h"
// \cond DO_NOT_DOCUMENT
@@ -96,6 +97,9 @@
return o << str(i);
}
+/// @returns access restrictions for a function
+tint::core::ir::Instruction::Accesses GetSideEffects(BuiltinFn fn);
+
} // namespace tint::spirv
// \endcond
diff --git a/src/tint/lang/spirv/builtin_fn.h.tmpl b/src/tint/lang/spirv/builtin_fn.h.tmpl
index 94c6bca..15c9445 100644
--- a/src/tint/lang/spirv/builtin_fn.h.tmpl
+++ b/src/tint/lang/spirv/builtin_fn.h.tmpl
@@ -20,6 +20,7 @@
#include <string>
#include "src/tint/utils/traits/traits.h"
+#include "src/tint/lang/core/ir/call.h"
// \cond DO_NOT_DOCUMENT
namespace tint::spirv {
@@ -43,6 +44,9 @@
return o << str(i);
}
+/// @returns access restrictions for a function
+tint::core::ir::Instruction::Accesses GetSideEffects(BuiltinFn fn);
+
} // namespace tint::spirv
// \endcond
diff --git a/src/tint/lang/spirv/ir/builtin_call.cc b/src/tint/lang/spirv/ir/builtin_call.cc
index 3359fb0..ea2fd2a 100644
--- a/src/tint/lang/spirv/ir/builtin_call.cc
+++ b/src/tint/lang/spirv/ir/builtin_call.cc
@@ -54,4 +54,8 @@
return ctx.ir.CreateInstruction<BuiltinCall>(new_result, func_, new_args);
}
+tint::core::ir::Instruction::Accesses BuiltinCall::GetSideEffects() const {
+ return spirv::GetSideEffects(func_);
+}
+
} // namespace tint::spirv::ir
diff --git a/src/tint/lang/spirv/ir/builtin_call.h b/src/tint/lang/spirv/ir/builtin_call.h
index 1b3cf11..733b3da 100644
--- a/src/tint/lang/spirv/ir/builtin_call.h
+++ b/src/tint/lang/spirv/ir/builtin_call.h
@@ -70,6 +70,9 @@
return spirv::intrinsic::Dialect::kData;
}
+ /// @returns an access information for the function
+ Accesses GetSideEffects() const override;
+
private:
BuiltinFn func_;
};
diff --git a/test/tint/buffer/storage/dynamic_index/read.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/storage/dynamic_index/read.wgsl.expected.ir.dxc.hlsl
index 7e250e5..27ec962 100644
--- a/test/tint/buffer/storage/dynamic_index/read.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/storage/dynamic_index/read.wgsl.expected.ir.dxc.hlsl
@@ -32,57 +32,39 @@
}
float4x4 v_4(uint offset) {
- float4 v_5 = asfloat(sb.Load4((offset + 0u)));
- float4 v_6 = asfloat(sb.Load4((offset + 16u)));
- float4 v_7 = asfloat(sb.Load4((offset + 32u)));
- return float4x4(v_5, v_6, v_7, asfloat(sb.Load4((offset + 48u))));
+ return float4x4(asfloat(sb.Load4((offset + 0u))), asfloat(sb.Load4((offset + 16u))), asfloat(sb.Load4((offset + 32u))), asfloat(sb.Load4((offset + 48u))));
}
-float4x3 v_8(uint offset) {
- float3 v_9 = asfloat(sb.Load3((offset + 0u)));
- float3 v_10 = asfloat(sb.Load3((offset + 16u)));
- float3 v_11 = asfloat(sb.Load3((offset + 32u)));
- return float4x3(v_9, v_10, v_11, asfloat(sb.Load3((offset + 48u))));
+float4x3 v_5(uint offset) {
+ return float4x3(asfloat(sb.Load3((offset + 0u))), asfloat(sb.Load3((offset + 16u))), asfloat(sb.Load3((offset + 32u))), asfloat(sb.Load3((offset + 48u))));
}
-float4x2 v_12(uint offset) {
- float2 v_13 = asfloat(sb.Load2((offset + 0u)));
- float2 v_14 = asfloat(sb.Load2((offset + 8u)));
- float2 v_15 = asfloat(sb.Load2((offset + 16u)));
- return float4x2(v_13, v_14, v_15, asfloat(sb.Load2((offset + 24u))));
+float4x2 v_6(uint offset) {
+ return float4x2(asfloat(sb.Load2((offset + 0u))), asfloat(sb.Load2((offset + 8u))), asfloat(sb.Load2((offset + 16u))), asfloat(sb.Load2((offset + 24u))));
}
-float3x4 v_16(uint offset) {
- float4 v_17 = asfloat(sb.Load4((offset + 0u)));
- float4 v_18 = asfloat(sb.Load4((offset + 16u)));
- return float3x4(v_17, v_18, asfloat(sb.Load4((offset + 32u))));
+float3x4 v_7(uint offset) {
+ return float3x4(asfloat(sb.Load4((offset + 0u))), asfloat(sb.Load4((offset + 16u))), asfloat(sb.Load4((offset + 32u))));
}
-float3x3 v_19(uint offset) {
- float3 v_20 = asfloat(sb.Load3((offset + 0u)));
- float3 v_21 = asfloat(sb.Load3((offset + 16u)));
- return float3x3(v_20, v_21, asfloat(sb.Load3((offset + 32u))));
+float3x3 v_8(uint offset) {
+ return float3x3(asfloat(sb.Load3((offset + 0u))), asfloat(sb.Load3((offset + 16u))), asfloat(sb.Load3((offset + 32u))));
}
-float3x2 v_22(uint offset) {
- float2 v_23 = asfloat(sb.Load2((offset + 0u)));
- float2 v_24 = asfloat(sb.Load2((offset + 8u)));
- return float3x2(v_23, v_24, asfloat(sb.Load2((offset + 16u))));
+float3x2 v_9(uint offset) {
+ return float3x2(asfloat(sb.Load2((offset + 0u))), asfloat(sb.Load2((offset + 8u))), asfloat(sb.Load2((offset + 16u))));
}
-float2x4 v_25(uint offset) {
- float4 v_26 = asfloat(sb.Load4((offset + 0u)));
- return float2x4(v_26, asfloat(sb.Load4((offset + 16u))));
+float2x4 v_10(uint offset) {
+ return float2x4(asfloat(sb.Load4((offset + 0u))), asfloat(sb.Load4((offset + 16u))));
}
-float2x3 v_27(uint offset) {
- float3 v_28 = asfloat(sb.Load3((offset + 0u)));
- return float2x3(v_28, asfloat(sb.Load3((offset + 16u))));
+float2x3 v_11(uint offset) {
+ return float2x3(asfloat(sb.Load3((offset + 0u))), asfloat(sb.Load3((offset + 16u))));
}
-float2x2 v_29(uint offset) {
- float2 v_30 = asfloat(sb.Load2((offset + 0u)));
- return float2x2(v_30, asfloat(sb.Load2((offset + 8u))));
+float2x2 v_12(uint offset) {
+ return float2x2(asfloat(sb.Load2((offset + 0u))), asfloat(sb.Load2((offset + 8u))));
}
void main_inner(uint idx) {
@@ -98,34 +80,34 @@
float4 vec4_f32 = asfloat(sb.Load4((96u + (uint(idx) * 544u))));
int4 vec4_i32 = asint(sb.Load4((112u + (uint(idx) * 544u))));
uint4 vec4_u32 = sb.Load4((128u + (uint(idx) * 544u)));
- float2x2 mat2x2_f32 = v_29((144u + (uint(idx) * 544u)));
- float2x3 mat2x3_f32 = v_27((160u + (uint(idx) * 544u)));
- float2x4 mat2x4_f32 = v_25((192u + (uint(idx) * 544u)));
- float3x2 mat3x2_f32 = v_22((224u + (uint(idx) * 544u)));
- float3x3 mat3x3_f32 = v_19((256u + (uint(idx) * 544u)));
- float3x4 mat3x4_f32 = v_16((304u + (uint(idx) * 544u)));
- float4x2 mat4x2_f32 = v_12((352u + (uint(idx) * 544u)));
- float4x3 mat4x3_f32 = v_8((384u + (uint(idx) * 544u)));
+ float2x2 mat2x2_f32 = v_12((144u + (uint(idx) * 544u)));
+ float2x3 mat2x3_f32 = v_11((160u + (uint(idx) * 544u)));
+ float2x4 mat2x4_f32 = v_10((192u + (uint(idx) * 544u)));
+ float3x2 mat3x2_f32 = v_9((224u + (uint(idx) * 544u)));
+ float3x3 mat3x3_f32 = v_8((256u + (uint(idx) * 544u)));
+ float3x4 mat3x4_f32 = v_7((304u + (uint(idx) * 544u)));
+ float4x2 mat4x2_f32 = v_6((352u + (uint(idx) * 544u)));
+ float4x3 mat4x3_f32 = v_5((384u + (uint(idx) * 544u)));
float4x4 mat4x4_f32 = v_4((448u + (uint(idx) * 544u)));
float3 arr2_vec3_f32[2] = v((512u + (uint(idx) * 544u)));
- int v_31 = (tint_f32_to_i32(scalar_f32) + scalar_i32);
- int v_32 = (v_31 + int(scalar_u32));
- int v_33 = ((v_32 + tint_f32_to_i32(vec2_f32.x)) + vec2_i32.x);
- int v_34 = (v_33 + int(vec2_u32.x));
- int v_35 = ((v_34 + tint_f32_to_i32(vec3_f32.y)) + vec3_i32.y);
- int v_36 = (v_35 + int(vec3_u32.y));
- int v_37 = ((v_36 + tint_f32_to_i32(vec4_f32.z)) + vec4_i32.z);
- int v_38 = (v_37 + int(vec4_u32.z));
- int v_39 = (v_38 + tint_f32_to_i32(mat2x2_f32[int(0)].x));
- int v_40 = (v_39 + tint_f32_to_i32(mat2x3_f32[int(0)].x));
- int v_41 = (v_40 + tint_f32_to_i32(mat2x4_f32[int(0)].x));
- int v_42 = (v_41 + tint_f32_to_i32(mat3x2_f32[int(0)].x));
- int v_43 = (v_42 + tint_f32_to_i32(mat3x3_f32[int(0)].x));
- int v_44 = (v_43 + tint_f32_to_i32(mat3x4_f32[int(0)].x));
- int v_45 = (v_44 + tint_f32_to_i32(mat4x2_f32[int(0)].x));
- int v_46 = (v_45 + tint_f32_to_i32(mat4x3_f32[int(0)].x));
- int v_47 = (v_46 + tint_f32_to_i32(mat4x4_f32[int(0)].x));
- s.Store(0u, asuint((v_47 + tint_f32_to_i32(arr2_vec3_f32[int(0)].x))));
+ int v_13 = (tint_f32_to_i32(scalar_f32) + scalar_i32);
+ int v_14 = (v_13 + int(scalar_u32));
+ int v_15 = ((v_14 + tint_f32_to_i32(vec2_f32.x)) + vec2_i32.x);
+ int v_16 = (v_15 + int(vec2_u32.x));
+ int v_17 = ((v_16 + tint_f32_to_i32(vec3_f32.y)) + vec3_i32.y);
+ int v_18 = (v_17 + int(vec3_u32.y));
+ int v_19 = ((v_18 + tint_f32_to_i32(vec4_f32.z)) + vec4_i32.z);
+ int v_20 = (v_19 + int(vec4_u32.z));
+ int v_21 = (v_20 + tint_f32_to_i32(mat2x2_f32[int(0)].x));
+ int v_22 = (v_21 + tint_f32_to_i32(mat2x3_f32[int(0)].x));
+ int v_23 = (v_22 + tint_f32_to_i32(mat2x4_f32[int(0)].x));
+ int v_24 = (v_23 + tint_f32_to_i32(mat3x2_f32[int(0)].x));
+ int v_25 = (v_24 + tint_f32_to_i32(mat3x3_f32[int(0)].x));
+ int v_26 = (v_25 + tint_f32_to_i32(mat3x4_f32[int(0)].x));
+ int v_27 = (v_26 + tint_f32_to_i32(mat4x2_f32[int(0)].x));
+ int v_28 = (v_27 + tint_f32_to_i32(mat4x3_f32[int(0)].x));
+ int v_29 = (v_28 + tint_f32_to_i32(mat4x4_f32[int(0)].x));
+ s.Store(0u, asuint((v_29 + tint_f32_to_i32(arr2_vec3_f32[int(0)].x))));
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/buffer/storage/dynamic_index/read.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/storage/dynamic_index/read.wgsl.expected.ir.fxc.hlsl
index 7e250e5..27ec962 100644
--- a/test/tint/buffer/storage/dynamic_index/read.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/storage/dynamic_index/read.wgsl.expected.ir.fxc.hlsl
@@ -32,57 +32,39 @@
}
float4x4 v_4(uint offset) {
- float4 v_5 = asfloat(sb.Load4((offset + 0u)));
- float4 v_6 = asfloat(sb.Load4((offset + 16u)));
- float4 v_7 = asfloat(sb.Load4((offset + 32u)));
- return float4x4(v_5, v_6, v_7, asfloat(sb.Load4((offset + 48u))));
+ return float4x4(asfloat(sb.Load4((offset + 0u))), asfloat(sb.Load4((offset + 16u))), asfloat(sb.Load4((offset + 32u))), asfloat(sb.Load4((offset + 48u))));
}
-float4x3 v_8(uint offset) {
- float3 v_9 = asfloat(sb.Load3((offset + 0u)));
- float3 v_10 = asfloat(sb.Load3((offset + 16u)));
- float3 v_11 = asfloat(sb.Load3((offset + 32u)));
- return float4x3(v_9, v_10, v_11, asfloat(sb.Load3((offset + 48u))));
+float4x3 v_5(uint offset) {
+ return float4x3(asfloat(sb.Load3((offset + 0u))), asfloat(sb.Load3((offset + 16u))), asfloat(sb.Load3((offset + 32u))), asfloat(sb.Load3((offset + 48u))));
}
-float4x2 v_12(uint offset) {
- float2 v_13 = asfloat(sb.Load2((offset + 0u)));
- float2 v_14 = asfloat(sb.Load2((offset + 8u)));
- float2 v_15 = asfloat(sb.Load2((offset + 16u)));
- return float4x2(v_13, v_14, v_15, asfloat(sb.Load2((offset + 24u))));
+float4x2 v_6(uint offset) {
+ return float4x2(asfloat(sb.Load2((offset + 0u))), asfloat(sb.Load2((offset + 8u))), asfloat(sb.Load2((offset + 16u))), asfloat(sb.Load2((offset + 24u))));
}
-float3x4 v_16(uint offset) {
- float4 v_17 = asfloat(sb.Load4((offset + 0u)));
- float4 v_18 = asfloat(sb.Load4((offset + 16u)));
- return float3x4(v_17, v_18, asfloat(sb.Load4((offset + 32u))));
+float3x4 v_7(uint offset) {
+ return float3x4(asfloat(sb.Load4((offset + 0u))), asfloat(sb.Load4((offset + 16u))), asfloat(sb.Load4((offset + 32u))));
}
-float3x3 v_19(uint offset) {
- float3 v_20 = asfloat(sb.Load3((offset + 0u)));
- float3 v_21 = asfloat(sb.Load3((offset + 16u)));
- return float3x3(v_20, v_21, asfloat(sb.Load3((offset + 32u))));
+float3x3 v_8(uint offset) {
+ return float3x3(asfloat(sb.Load3((offset + 0u))), asfloat(sb.Load3((offset + 16u))), asfloat(sb.Load3((offset + 32u))));
}
-float3x2 v_22(uint offset) {
- float2 v_23 = asfloat(sb.Load2((offset + 0u)));
- float2 v_24 = asfloat(sb.Load2((offset + 8u)));
- return float3x2(v_23, v_24, asfloat(sb.Load2((offset + 16u))));
+float3x2 v_9(uint offset) {
+ return float3x2(asfloat(sb.Load2((offset + 0u))), asfloat(sb.Load2((offset + 8u))), asfloat(sb.Load2((offset + 16u))));
}
-float2x4 v_25(uint offset) {
- float4 v_26 = asfloat(sb.Load4((offset + 0u)));
- return float2x4(v_26, asfloat(sb.Load4((offset + 16u))));
+float2x4 v_10(uint offset) {
+ return float2x4(asfloat(sb.Load4((offset + 0u))), asfloat(sb.Load4((offset + 16u))));
}
-float2x3 v_27(uint offset) {
- float3 v_28 = asfloat(sb.Load3((offset + 0u)));
- return float2x3(v_28, asfloat(sb.Load3((offset + 16u))));
+float2x3 v_11(uint offset) {
+ return float2x3(asfloat(sb.Load3((offset + 0u))), asfloat(sb.Load3((offset + 16u))));
}
-float2x2 v_29(uint offset) {
- float2 v_30 = asfloat(sb.Load2((offset + 0u)));
- return float2x2(v_30, asfloat(sb.Load2((offset + 8u))));
+float2x2 v_12(uint offset) {
+ return float2x2(asfloat(sb.Load2((offset + 0u))), asfloat(sb.Load2((offset + 8u))));
}
void main_inner(uint idx) {
@@ -98,34 +80,34 @@
float4 vec4_f32 = asfloat(sb.Load4((96u + (uint(idx) * 544u))));
int4 vec4_i32 = asint(sb.Load4((112u + (uint(idx) * 544u))));
uint4 vec4_u32 = sb.Load4((128u + (uint(idx) * 544u)));
- float2x2 mat2x2_f32 = v_29((144u + (uint(idx) * 544u)));
- float2x3 mat2x3_f32 = v_27((160u + (uint(idx) * 544u)));
- float2x4 mat2x4_f32 = v_25((192u + (uint(idx) * 544u)));
- float3x2 mat3x2_f32 = v_22((224u + (uint(idx) * 544u)));
- float3x3 mat3x3_f32 = v_19((256u + (uint(idx) * 544u)));
- float3x4 mat3x4_f32 = v_16((304u + (uint(idx) * 544u)));
- float4x2 mat4x2_f32 = v_12((352u + (uint(idx) * 544u)));
- float4x3 mat4x3_f32 = v_8((384u + (uint(idx) * 544u)));
+ float2x2 mat2x2_f32 = v_12((144u + (uint(idx) * 544u)));
+ float2x3 mat2x3_f32 = v_11((160u + (uint(idx) * 544u)));
+ float2x4 mat2x4_f32 = v_10((192u + (uint(idx) * 544u)));
+ float3x2 mat3x2_f32 = v_9((224u + (uint(idx) * 544u)));
+ float3x3 mat3x3_f32 = v_8((256u + (uint(idx) * 544u)));
+ float3x4 mat3x4_f32 = v_7((304u + (uint(idx) * 544u)));
+ float4x2 mat4x2_f32 = v_6((352u + (uint(idx) * 544u)));
+ float4x3 mat4x3_f32 = v_5((384u + (uint(idx) * 544u)));
float4x4 mat4x4_f32 = v_4((448u + (uint(idx) * 544u)));
float3 arr2_vec3_f32[2] = v((512u + (uint(idx) * 544u)));
- int v_31 = (tint_f32_to_i32(scalar_f32) + scalar_i32);
- int v_32 = (v_31 + int(scalar_u32));
- int v_33 = ((v_32 + tint_f32_to_i32(vec2_f32.x)) + vec2_i32.x);
- int v_34 = (v_33 + int(vec2_u32.x));
- int v_35 = ((v_34 + tint_f32_to_i32(vec3_f32.y)) + vec3_i32.y);
- int v_36 = (v_35 + int(vec3_u32.y));
- int v_37 = ((v_36 + tint_f32_to_i32(vec4_f32.z)) + vec4_i32.z);
- int v_38 = (v_37 + int(vec4_u32.z));
- int v_39 = (v_38 + tint_f32_to_i32(mat2x2_f32[int(0)].x));
- int v_40 = (v_39 + tint_f32_to_i32(mat2x3_f32[int(0)].x));
- int v_41 = (v_40 + tint_f32_to_i32(mat2x4_f32[int(0)].x));
- int v_42 = (v_41 + tint_f32_to_i32(mat3x2_f32[int(0)].x));
- int v_43 = (v_42 + tint_f32_to_i32(mat3x3_f32[int(0)].x));
- int v_44 = (v_43 + tint_f32_to_i32(mat3x4_f32[int(0)].x));
- int v_45 = (v_44 + tint_f32_to_i32(mat4x2_f32[int(0)].x));
- int v_46 = (v_45 + tint_f32_to_i32(mat4x3_f32[int(0)].x));
- int v_47 = (v_46 + tint_f32_to_i32(mat4x4_f32[int(0)].x));
- s.Store(0u, asuint((v_47 + tint_f32_to_i32(arr2_vec3_f32[int(0)].x))));
+ int v_13 = (tint_f32_to_i32(scalar_f32) + scalar_i32);
+ int v_14 = (v_13 + int(scalar_u32));
+ int v_15 = ((v_14 + tint_f32_to_i32(vec2_f32.x)) + vec2_i32.x);
+ int v_16 = (v_15 + int(vec2_u32.x));
+ int v_17 = ((v_16 + tint_f32_to_i32(vec3_f32.y)) + vec3_i32.y);
+ int v_18 = (v_17 + int(vec3_u32.y));
+ int v_19 = ((v_18 + tint_f32_to_i32(vec4_f32.z)) + vec4_i32.z);
+ int v_20 = (v_19 + int(vec4_u32.z));
+ int v_21 = (v_20 + tint_f32_to_i32(mat2x2_f32[int(0)].x));
+ int v_22 = (v_21 + tint_f32_to_i32(mat2x3_f32[int(0)].x));
+ int v_23 = (v_22 + tint_f32_to_i32(mat2x4_f32[int(0)].x));
+ int v_24 = (v_23 + tint_f32_to_i32(mat3x2_f32[int(0)].x));
+ int v_25 = (v_24 + tint_f32_to_i32(mat3x3_f32[int(0)].x));
+ int v_26 = (v_25 + tint_f32_to_i32(mat3x4_f32[int(0)].x));
+ int v_27 = (v_26 + tint_f32_to_i32(mat4x2_f32[int(0)].x));
+ int v_28 = (v_27 + tint_f32_to_i32(mat4x3_f32[int(0)].x));
+ int v_29 = (v_28 + tint_f32_to_i32(mat4x4_f32[int(0)].x));
+ s.Store(0u, asuint((v_29 + tint_f32_to_i32(arr2_vec3_f32[int(0)].x))));
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/buffer/storage/dynamic_index/read_f16.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/storage/dynamic_index/read_f16.wgsl.expected.ir.dxc.hlsl
index 88ef707..16ce66f 100644
--- a/test/tint/buffer/storage/dynamic_index/read_f16.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/storage/dynamic_index/read_f16.wgsl.expected.ir.dxc.hlsl
@@ -14,155 +14,119 @@
}
matrix<float16_t, 4, 2> v(uint offset) {
- vector<float16_t, 2> v_1 = sb.Load<vector<float16_t, 2> >((offset + 0u));
- vector<float16_t, 2> v_2 = sb.Load<vector<float16_t, 2> >((offset + 4u));
- vector<float16_t, 2> v_3 = sb.Load<vector<float16_t, 2> >((offset + 8u));
- return matrix<float16_t, 4, 2>(v_1, v_2, v_3, sb.Load<vector<float16_t, 2> >((offset + 12u)));
+ return matrix<float16_t, 4, 2>(sb.Load<vector<float16_t, 2> >((offset + 0u)), sb.Load<vector<float16_t, 2> >((offset + 4u)), sb.Load<vector<float16_t, 2> >((offset + 8u)), sb.Load<vector<float16_t, 2> >((offset + 12u)));
}
typedef matrix<float16_t, 4, 2> ary_ret[2];
-ary_ret v_4(uint offset) {
+ary_ret v_1(uint offset) {
matrix<float16_t, 4, 2> a[2] = (matrix<float16_t, 4, 2>[2])0;
{
- uint v_5 = 0u;
- v_5 = 0u;
+ uint v_2 = 0u;
+ v_2 = 0u;
while(true) {
- uint v_6 = v_5;
- if ((v_6 >= 2u)) {
+ uint v_3 = v_2;
+ if ((v_3 >= 2u)) {
break;
}
- a[v_6] = v((offset + (v_6 * 16u)));
+ a[v_3] = v((offset + (v_3 * 16u)));
{
- v_5 = (v_6 + 1u);
+ v_2 = (v_3 + 1u);
}
continue;
}
}
- matrix<float16_t, 4, 2> v_7[2] = a;
- return v_7;
+ matrix<float16_t, 4, 2> v_4[2] = a;
+ return v_4;
}
typedef float3 ary_ret_1[2];
-ary_ret_1 v_8(uint offset) {
+ary_ret_1 v_5(uint offset) {
float3 a[2] = (float3[2])0;
{
- uint v_9 = 0u;
- v_9 = 0u;
+ uint v_6 = 0u;
+ v_6 = 0u;
while(true) {
- uint v_10 = v_9;
- if ((v_10 >= 2u)) {
+ uint v_7 = v_6;
+ if ((v_7 >= 2u)) {
break;
}
- a[v_10] = asfloat(sb.Load3((offset + (v_10 * 16u))));
+ a[v_7] = asfloat(sb.Load3((offset + (v_7 * 16u))));
{
- v_9 = (v_10 + 1u);
+ v_6 = (v_7 + 1u);
}
continue;
}
}
- float3 v_11[2] = a;
- return v_11;
+ float3 v_8[2] = a;
+ return v_8;
}
-matrix<float16_t, 4, 4> v_12(uint offset) {
- vector<float16_t, 4> v_13 = sb.Load<vector<float16_t, 4> >((offset + 0u));
- vector<float16_t, 4> v_14 = sb.Load<vector<float16_t, 4> >((offset + 8u));
- vector<float16_t, 4> v_15 = sb.Load<vector<float16_t, 4> >((offset + 16u));
- return matrix<float16_t, 4, 4>(v_13, v_14, v_15, sb.Load<vector<float16_t, 4> >((offset + 24u)));
+matrix<float16_t, 4, 4> v_9(uint offset) {
+ return matrix<float16_t, 4, 4>(sb.Load<vector<float16_t, 4> >((offset + 0u)), sb.Load<vector<float16_t, 4> >((offset + 8u)), sb.Load<vector<float16_t, 4> >((offset + 16u)), sb.Load<vector<float16_t, 4> >((offset + 24u)));
}
-matrix<float16_t, 4, 3> v_16(uint offset) {
- vector<float16_t, 3> v_17 = sb.Load<vector<float16_t, 3> >((offset + 0u));
- vector<float16_t, 3> v_18 = sb.Load<vector<float16_t, 3> >((offset + 8u));
- vector<float16_t, 3> v_19 = sb.Load<vector<float16_t, 3> >((offset + 16u));
- return matrix<float16_t, 4, 3>(v_17, v_18, v_19, sb.Load<vector<float16_t, 3> >((offset + 24u)));
+matrix<float16_t, 4, 3> v_10(uint offset) {
+ return matrix<float16_t, 4, 3>(sb.Load<vector<float16_t, 3> >((offset + 0u)), sb.Load<vector<float16_t, 3> >((offset + 8u)), sb.Load<vector<float16_t, 3> >((offset + 16u)), sb.Load<vector<float16_t, 3> >((offset + 24u)));
}
-matrix<float16_t, 3, 4> v_20(uint offset) {
- vector<float16_t, 4> v_21 = sb.Load<vector<float16_t, 4> >((offset + 0u));
- vector<float16_t, 4> v_22 = sb.Load<vector<float16_t, 4> >((offset + 8u));
- return matrix<float16_t, 3, 4>(v_21, v_22, sb.Load<vector<float16_t, 4> >((offset + 16u)));
+matrix<float16_t, 3, 4> v_11(uint offset) {
+ return matrix<float16_t, 3, 4>(sb.Load<vector<float16_t, 4> >((offset + 0u)), sb.Load<vector<float16_t, 4> >((offset + 8u)), sb.Load<vector<float16_t, 4> >((offset + 16u)));
}
-matrix<float16_t, 3, 3> v_23(uint offset) {
- vector<float16_t, 3> v_24 = sb.Load<vector<float16_t, 3> >((offset + 0u));
- vector<float16_t, 3> v_25 = sb.Load<vector<float16_t, 3> >((offset + 8u));
- return matrix<float16_t, 3, 3>(v_24, v_25, sb.Load<vector<float16_t, 3> >((offset + 16u)));
+matrix<float16_t, 3, 3> v_12(uint offset) {
+ return matrix<float16_t, 3, 3>(sb.Load<vector<float16_t, 3> >((offset + 0u)), sb.Load<vector<float16_t, 3> >((offset + 8u)), sb.Load<vector<float16_t, 3> >((offset + 16u)));
}
-matrix<float16_t, 3, 2> v_26(uint offset) {
- vector<float16_t, 2> v_27 = sb.Load<vector<float16_t, 2> >((offset + 0u));
- vector<float16_t, 2> v_28 = sb.Load<vector<float16_t, 2> >((offset + 4u));
- return matrix<float16_t, 3, 2>(v_27, v_28, sb.Load<vector<float16_t, 2> >((offset + 8u)));
+matrix<float16_t, 3, 2> v_13(uint offset) {
+ return matrix<float16_t, 3, 2>(sb.Load<vector<float16_t, 2> >((offset + 0u)), sb.Load<vector<float16_t, 2> >((offset + 4u)), sb.Load<vector<float16_t, 2> >((offset + 8u)));
}
-matrix<float16_t, 2, 4> v_29(uint offset) {
- vector<float16_t, 4> v_30 = sb.Load<vector<float16_t, 4> >((offset + 0u));
- return matrix<float16_t, 2, 4>(v_30, sb.Load<vector<float16_t, 4> >((offset + 8u)));
+matrix<float16_t, 2, 4> v_14(uint offset) {
+ return matrix<float16_t, 2, 4>(sb.Load<vector<float16_t, 4> >((offset + 0u)), sb.Load<vector<float16_t, 4> >((offset + 8u)));
}
-matrix<float16_t, 2, 3> v_31(uint offset) {
- vector<float16_t, 3> v_32 = sb.Load<vector<float16_t, 3> >((offset + 0u));
- return matrix<float16_t, 2, 3>(v_32, sb.Load<vector<float16_t, 3> >((offset + 8u)));
+matrix<float16_t, 2, 3> v_15(uint offset) {
+ return matrix<float16_t, 2, 3>(sb.Load<vector<float16_t, 3> >((offset + 0u)), sb.Load<vector<float16_t, 3> >((offset + 8u)));
}
-matrix<float16_t, 2, 2> v_33(uint offset) {
- vector<float16_t, 2> v_34 = sb.Load<vector<float16_t, 2> >((offset + 0u));
- return matrix<float16_t, 2, 2>(v_34, sb.Load<vector<float16_t, 2> >((offset + 4u)));
+matrix<float16_t, 2, 2> v_16(uint offset) {
+ return matrix<float16_t, 2, 2>(sb.Load<vector<float16_t, 2> >((offset + 0u)), sb.Load<vector<float16_t, 2> >((offset + 4u)));
}
-float4x4 v_35(uint offset) {
- float4 v_36 = asfloat(sb.Load4((offset + 0u)));
- float4 v_37 = asfloat(sb.Load4((offset + 16u)));
- float4 v_38 = asfloat(sb.Load4((offset + 32u)));
- return float4x4(v_36, v_37, v_38, asfloat(sb.Load4((offset + 48u))));
+float4x4 v_17(uint offset) {
+ return float4x4(asfloat(sb.Load4((offset + 0u))), asfloat(sb.Load4((offset + 16u))), asfloat(sb.Load4((offset + 32u))), asfloat(sb.Load4((offset + 48u))));
}
-float4x3 v_39(uint offset) {
- float3 v_40 = asfloat(sb.Load3((offset + 0u)));
- float3 v_41 = asfloat(sb.Load3((offset + 16u)));
- float3 v_42 = asfloat(sb.Load3((offset + 32u)));
- return float4x3(v_40, v_41, v_42, asfloat(sb.Load3((offset + 48u))));
+float4x3 v_18(uint offset) {
+ return float4x3(asfloat(sb.Load3((offset + 0u))), asfloat(sb.Load3((offset + 16u))), asfloat(sb.Load3((offset + 32u))), asfloat(sb.Load3((offset + 48u))));
}
-float4x2 v_43(uint offset) {
- float2 v_44 = asfloat(sb.Load2((offset + 0u)));
- float2 v_45 = asfloat(sb.Load2((offset + 8u)));
- float2 v_46 = asfloat(sb.Load2((offset + 16u)));
- return float4x2(v_44, v_45, v_46, asfloat(sb.Load2((offset + 24u))));
+float4x2 v_19(uint offset) {
+ return float4x2(asfloat(sb.Load2((offset + 0u))), asfloat(sb.Load2((offset + 8u))), asfloat(sb.Load2((offset + 16u))), asfloat(sb.Load2((offset + 24u))));
}
-float3x4 v_47(uint offset) {
- float4 v_48 = asfloat(sb.Load4((offset + 0u)));
- float4 v_49 = asfloat(sb.Load4((offset + 16u)));
- return float3x4(v_48, v_49, asfloat(sb.Load4((offset + 32u))));
+float3x4 v_20(uint offset) {
+ return float3x4(asfloat(sb.Load4((offset + 0u))), asfloat(sb.Load4((offset + 16u))), asfloat(sb.Load4((offset + 32u))));
}
-float3x3 v_50(uint offset) {
- float3 v_51 = asfloat(sb.Load3((offset + 0u)));
- float3 v_52 = asfloat(sb.Load3((offset + 16u)));
- return float3x3(v_51, v_52, asfloat(sb.Load3((offset + 32u))));
+float3x3 v_21(uint offset) {
+ return float3x3(asfloat(sb.Load3((offset + 0u))), asfloat(sb.Load3((offset + 16u))), asfloat(sb.Load3((offset + 32u))));
}
-float3x2 v_53(uint offset) {
- float2 v_54 = asfloat(sb.Load2((offset + 0u)));
- float2 v_55 = asfloat(sb.Load2((offset + 8u)));
- return float3x2(v_54, v_55, asfloat(sb.Load2((offset + 16u))));
+float3x2 v_22(uint offset) {
+ return float3x2(asfloat(sb.Load2((offset + 0u))), asfloat(sb.Load2((offset + 8u))), asfloat(sb.Load2((offset + 16u))));
}
-float2x4 v_56(uint offset) {
- float4 v_57 = asfloat(sb.Load4((offset + 0u)));
- return float2x4(v_57, asfloat(sb.Load4((offset + 16u))));
+float2x4 v_23(uint offset) {
+ return float2x4(asfloat(sb.Load4((offset + 0u))), asfloat(sb.Load4((offset + 16u))));
}
-float2x3 v_58(uint offset) {
- float3 v_59 = asfloat(sb.Load3((offset + 0u)));
- return float2x3(v_59, asfloat(sb.Load3((offset + 16u))));
+float2x3 v_24(uint offset) {
+ return float2x3(asfloat(sb.Load3((offset + 0u))), asfloat(sb.Load3((offset + 16u))));
}
-float2x2 v_60(uint offset) {
- float2 v_61 = asfloat(sb.Load2((offset + 0u)));
- return float2x2(v_61, asfloat(sb.Load2((offset + 8u))));
+float2x2 v_25(uint offset) {
+ return float2x2(asfloat(sb.Load2((offset + 0u))), asfloat(sb.Load2((offset + 8u))));
}
void main_inner(uint idx) {
@@ -182,58 +146,58 @@
int4 vec4_i32 = asint(sb.Load4((128u + (uint(idx) * 800u))));
uint4 vec4_u32 = sb.Load4((144u + (uint(idx) * 800u)));
vector<float16_t, 4> vec4_f16 = sb.Load<vector<float16_t, 4> >((160u + (uint(idx) * 800u)));
- float2x2 mat2x2_f32 = v_60((168u + (uint(idx) * 800u)));
- float2x3 mat2x3_f32 = v_58((192u + (uint(idx) * 800u)));
- float2x4 mat2x4_f32 = v_56((224u + (uint(idx) * 800u)));
- float3x2 mat3x2_f32 = v_53((256u + (uint(idx) * 800u)));
- float3x3 mat3x3_f32 = v_50((288u + (uint(idx) * 800u)));
- float3x4 mat3x4_f32 = v_47((336u + (uint(idx) * 800u)));
- float4x2 mat4x2_f32 = v_43((384u + (uint(idx) * 800u)));
- float4x3 mat4x3_f32 = v_39((416u + (uint(idx) * 800u)));
- float4x4 mat4x4_f32 = v_35((480u + (uint(idx) * 800u)));
- matrix<float16_t, 2, 2> mat2x2_f16 = v_33((544u + (uint(idx) * 800u)));
- matrix<float16_t, 2, 3> mat2x3_f16 = v_31((552u + (uint(idx) * 800u)));
- matrix<float16_t, 2, 4> mat2x4_f16 = v_29((568u + (uint(idx) * 800u)));
- matrix<float16_t, 3, 2> mat3x2_f16 = v_26((584u + (uint(idx) * 800u)));
- matrix<float16_t, 3, 3> mat3x3_f16 = v_23((600u + (uint(idx) * 800u)));
- matrix<float16_t, 3, 4> mat3x4_f16 = v_20((624u + (uint(idx) * 800u)));
+ float2x2 mat2x2_f32 = v_25((168u + (uint(idx) * 800u)));
+ float2x3 mat2x3_f32 = v_24((192u + (uint(idx) * 800u)));
+ float2x4 mat2x4_f32 = v_23((224u + (uint(idx) * 800u)));
+ float3x2 mat3x2_f32 = v_22((256u + (uint(idx) * 800u)));
+ float3x3 mat3x3_f32 = v_21((288u + (uint(idx) * 800u)));
+ float3x4 mat3x4_f32 = v_20((336u + (uint(idx) * 800u)));
+ float4x2 mat4x2_f32 = v_19((384u + (uint(idx) * 800u)));
+ float4x3 mat4x3_f32 = v_18((416u + (uint(idx) * 800u)));
+ float4x4 mat4x4_f32 = v_17((480u + (uint(idx) * 800u)));
+ matrix<float16_t, 2, 2> mat2x2_f16 = v_16((544u + (uint(idx) * 800u)));
+ matrix<float16_t, 2, 3> mat2x3_f16 = v_15((552u + (uint(idx) * 800u)));
+ matrix<float16_t, 2, 4> mat2x4_f16 = v_14((568u + (uint(idx) * 800u)));
+ matrix<float16_t, 3, 2> mat3x2_f16 = v_13((584u + (uint(idx) * 800u)));
+ matrix<float16_t, 3, 3> mat3x3_f16 = v_12((600u + (uint(idx) * 800u)));
+ matrix<float16_t, 3, 4> mat3x4_f16 = v_11((624u + (uint(idx) * 800u)));
matrix<float16_t, 4, 2> mat4x2_f16 = v((648u + (uint(idx) * 800u)));
- matrix<float16_t, 4, 3> mat4x3_f16 = v_16((664u + (uint(idx) * 800u)));
- matrix<float16_t, 4, 4> mat4x4_f16 = v_12((696u + (uint(idx) * 800u)));
- float3 arr2_vec3_f32[2] = v_8((736u + (uint(idx) * 800u)));
- matrix<float16_t, 4, 2> arr2_mat4x2_f16[2] = v_4((768u + (uint(idx) * 800u)));
- int v_62 = (tint_f32_to_i32(scalar_f32) + scalar_i32);
- int v_63 = (v_62 + int(scalar_u32));
- int v_64 = (v_63 + tint_f16_to_i32(scalar_f16));
- int v_65 = ((v_64 + tint_f32_to_i32(vec2_f32.x)) + vec2_i32.x);
- int v_66 = (v_65 + int(vec2_u32.x));
- int v_67 = (v_66 + tint_f16_to_i32(vec2_f16.x));
- int v_68 = ((v_67 + tint_f32_to_i32(vec3_f32.y)) + vec3_i32.y);
- int v_69 = (v_68 + int(vec3_u32.y));
- int v_70 = (v_69 + tint_f16_to_i32(vec3_f16.y));
- int v_71 = ((v_70 + tint_f32_to_i32(vec4_f32.z)) + vec4_i32.z);
- int v_72 = (v_71 + int(vec4_u32.z));
- int v_73 = (v_72 + tint_f16_to_i32(vec4_f16.z));
- int v_74 = (v_73 + tint_f32_to_i32(mat2x2_f32[int(0)].x));
- int v_75 = (v_74 + tint_f32_to_i32(mat2x3_f32[int(0)].x));
- int v_76 = (v_75 + tint_f32_to_i32(mat2x4_f32[int(0)].x));
- int v_77 = (v_76 + tint_f32_to_i32(mat3x2_f32[int(0)].x));
- int v_78 = (v_77 + tint_f32_to_i32(mat3x3_f32[int(0)].x));
- int v_79 = (v_78 + tint_f32_to_i32(mat3x4_f32[int(0)].x));
- int v_80 = (v_79 + tint_f32_to_i32(mat4x2_f32[int(0)].x));
- int v_81 = (v_80 + tint_f32_to_i32(mat4x3_f32[int(0)].x));
- int v_82 = (v_81 + tint_f32_to_i32(mat4x4_f32[int(0)].x));
- int v_83 = (v_82 + tint_f16_to_i32(mat2x2_f16[int(0)].x));
- int v_84 = (v_83 + tint_f16_to_i32(mat2x3_f16[int(0)].x));
- int v_85 = (v_84 + tint_f16_to_i32(mat2x4_f16[int(0)].x));
- int v_86 = (v_85 + tint_f16_to_i32(mat3x2_f16[int(0)].x));
- int v_87 = (v_86 + tint_f16_to_i32(mat3x3_f16[int(0)].x));
- int v_88 = (v_87 + tint_f16_to_i32(mat3x4_f16[int(0)].x));
- int v_89 = (v_88 + tint_f16_to_i32(mat4x2_f16[int(0)].x));
- int v_90 = (v_89 + tint_f16_to_i32(mat4x3_f16[int(0)].x));
- int v_91 = (v_90 + tint_f16_to_i32(mat4x4_f16[int(0)].x));
- int v_92 = (v_91 + tint_f16_to_i32(arr2_mat4x2_f16[int(0)][int(0)].x));
- s.Store(0u, asuint((v_92 + tint_f32_to_i32(arr2_vec3_f32[int(0)].x))));
+ matrix<float16_t, 4, 3> mat4x3_f16 = v_10((664u + (uint(idx) * 800u)));
+ matrix<float16_t, 4, 4> mat4x4_f16 = v_9((696u + (uint(idx) * 800u)));
+ float3 arr2_vec3_f32[2] = v_5((736u + (uint(idx) * 800u)));
+ matrix<float16_t, 4, 2> arr2_mat4x2_f16[2] = v_1((768u + (uint(idx) * 800u)));
+ int v_26 = (tint_f32_to_i32(scalar_f32) + scalar_i32);
+ int v_27 = (v_26 + int(scalar_u32));
+ int v_28 = (v_27 + tint_f16_to_i32(scalar_f16));
+ int v_29 = ((v_28 + tint_f32_to_i32(vec2_f32.x)) + vec2_i32.x);
+ int v_30 = (v_29 + int(vec2_u32.x));
+ int v_31 = (v_30 + tint_f16_to_i32(vec2_f16.x));
+ int v_32 = ((v_31 + tint_f32_to_i32(vec3_f32.y)) + vec3_i32.y);
+ int v_33 = (v_32 + int(vec3_u32.y));
+ int v_34 = (v_33 + tint_f16_to_i32(vec3_f16.y));
+ int v_35 = ((v_34 + tint_f32_to_i32(vec4_f32.z)) + vec4_i32.z);
+ int v_36 = (v_35 + int(vec4_u32.z));
+ int v_37 = (v_36 + tint_f16_to_i32(vec4_f16.z));
+ int v_38 = (v_37 + tint_f32_to_i32(mat2x2_f32[int(0)].x));
+ int v_39 = (v_38 + tint_f32_to_i32(mat2x3_f32[int(0)].x));
+ int v_40 = (v_39 + tint_f32_to_i32(mat2x4_f32[int(0)].x));
+ int v_41 = (v_40 + tint_f32_to_i32(mat3x2_f32[int(0)].x));
+ int v_42 = (v_41 + tint_f32_to_i32(mat3x3_f32[int(0)].x));
+ int v_43 = (v_42 + tint_f32_to_i32(mat3x4_f32[int(0)].x));
+ int v_44 = (v_43 + tint_f32_to_i32(mat4x2_f32[int(0)].x));
+ int v_45 = (v_44 + tint_f32_to_i32(mat4x3_f32[int(0)].x));
+ int v_46 = (v_45 + tint_f32_to_i32(mat4x4_f32[int(0)].x));
+ int v_47 = (v_46 + tint_f16_to_i32(mat2x2_f16[int(0)].x));
+ int v_48 = (v_47 + tint_f16_to_i32(mat2x3_f16[int(0)].x));
+ int v_49 = (v_48 + tint_f16_to_i32(mat2x4_f16[int(0)].x));
+ int v_50 = (v_49 + tint_f16_to_i32(mat3x2_f16[int(0)].x));
+ int v_51 = (v_50 + tint_f16_to_i32(mat3x3_f16[int(0)].x));
+ int v_52 = (v_51 + tint_f16_to_i32(mat3x4_f16[int(0)].x));
+ int v_53 = (v_52 + tint_f16_to_i32(mat4x2_f16[int(0)].x));
+ int v_54 = (v_53 + tint_f16_to_i32(mat4x3_f16[int(0)].x));
+ int v_55 = (v_54 + tint_f16_to_i32(mat4x4_f16[int(0)].x));
+ int v_56 = (v_55 + tint_f16_to_i32(arr2_mat4x2_f16[int(0)][int(0)].x));
+ s.Store(0u, asuint((v_56 + tint_f32_to_i32(arr2_vec3_f32[int(0)].x))));
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/buffer/storage/dynamic_index/write.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/storage/dynamic_index/write.wgsl.expected.ir.dxc.hlsl
index 4aab683..8781737 100644
--- a/test/tint/buffer/storage/dynamic_index/write.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/storage/dynamic_index/write.wgsl.expected.ir.dxc.hlsl
@@ -77,25 +77,20 @@
}
void main_inner(uint idx) {
- uint v_12 = (0u + (uint(idx) * 544u));
- sb.Store(v_12, asuint(0.0f));
- uint v_13 = (4u + (uint(idx) * 544u));
- sb.Store(v_13, asuint(int(0)));
+ sb.Store((0u + (uint(idx) * 544u)), asuint(0.0f));
+ sb.Store((4u + (uint(idx) * 544u)), asuint(int(0)));
sb.Store((8u + (uint(idx) * 544u)), 0u);
- uint v_14 = (16u + (uint(idx) * 544u));
- sb.Store2(v_14, asuint((0.0f).xx));
- uint v_15 = (24u + (uint(idx) * 544u));
- sb.Store2(v_15, asuint(int2((int(0)).xx)));
+ sb.Store2((16u + (uint(idx) * 544u)), asuint((0.0f).xx));
+ uint v_12 = (24u + (uint(idx) * 544u));
+ sb.Store2(v_12, asuint(int2((int(0)).xx)));
sb.Store2((32u + (uint(idx) * 544u)), (0u).xx);
- uint v_16 = (48u + (uint(idx) * 544u));
- sb.Store3(v_16, asuint((0.0f).xxx));
- uint v_17 = (64u + (uint(idx) * 544u));
- sb.Store3(v_17, asuint(int3((int(0)).xxx)));
+ sb.Store3((48u + (uint(idx) * 544u)), asuint((0.0f).xxx));
+ uint v_13 = (64u + (uint(idx) * 544u));
+ sb.Store3(v_13, asuint(int3((int(0)).xxx)));
sb.Store3((80u + (uint(idx) * 544u)), (0u).xxx);
- uint v_18 = (96u + (uint(idx) * 544u));
- sb.Store4(v_18, asuint((0.0f).xxxx));
- uint v_19 = (112u + (uint(idx) * 544u));
- sb.Store4(v_19, asuint(int4((int(0)).xxxx)));
+ sb.Store4((96u + (uint(idx) * 544u)), asuint((0.0f).xxxx));
+ uint v_14 = (112u + (uint(idx) * 544u));
+ sb.Store4(v_14, asuint(int4((int(0)).xxxx)));
sb.Store4((128u + (uint(idx) * 544u)), (0u).xxxx);
v_11((144u + (uint(idx) * 544u)), float2x2((0.0f).xx, (0.0f).xx));
v_10((160u + (uint(idx) * 544u)), float2x3((0.0f).xxx, (0.0f).xxx));
@@ -106,8 +101,8 @@
v_5((352u + (uint(idx) * 544u)), float4x2((0.0f).xx, (0.0f).xx, (0.0f).xx, (0.0f).xx));
v_4((384u + (uint(idx) * 544u)), float4x3((0.0f).xxx, (0.0f).xxx, (0.0f).xxx, (0.0f).xxx));
v_3((448u + (uint(idx) * 544u)), float4x4((0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx));
- float3 v_20[2] = (float3[2])0;
- v((512u + (uint(idx) * 544u)), v_20);
+ float3 v_15[2] = (float3[2])0;
+ v((512u + (uint(idx) * 544u)), v_15);
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/buffer/storage/dynamic_index/write.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/storage/dynamic_index/write.wgsl.expected.ir.fxc.hlsl
index 4aab683..8781737 100644
--- a/test/tint/buffer/storage/dynamic_index/write.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/storage/dynamic_index/write.wgsl.expected.ir.fxc.hlsl
@@ -77,25 +77,20 @@
}
void main_inner(uint idx) {
- uint v_12 = (0u + (uint(idx) * 544u));
- sb.Store(v_12, asuint(0.0f));
- uint v_13 = (4u + (uint(idx) * 544u));
- sb.Store(v_13, asuint(int(0)));
+ sb.Store((0u + (uint(idx) * 544u)), asuint(0.0f));
+ sb.Store((4u + (uint(idx) * 544u)), asuint(int(0)));
sb.Store((8u + (uint(idx) * 544u)), 0u);
- uint v_14 = (16u + (uint(idx) * 544u));
- sb.Store2(v_14, asuint((0.0f).xx));
- uint v_15 = (24u + (uint(idx) * 544u));
- sb.Store2(v_15, asuint(int2((int(0)).xx)));
+ sb.Store2((16u + (uint(idx) * 544u)), asuint((0.0f).xx));
+ uint v_12 = (24u + (uint(idx) * 544u));
+ sb.Store2(v_12, asuint(int2((int(0)).xx)));
sb.Store2((32u + (uint(idx) * 544u)), (0u).xx);
- uint v_16 = (48u + (uint(idx) * 544u));
- sb.Store3(v_16, asuint((0.0f).xxx));
- uint v_17 = (64u + (uint(idx) * 544u));
- sb.Store3(v_17, asuint(int3((int(0)).xxx)));
+ sb.Store3((48u + (uint(idx) * 544u)), asuint((0.0f).xxx));
+ uint v_13 = (64u + (uint(idx) * 544u));
+ sb.Store3(v_13, asuint(int3((int(0)).xxx)));
sb.Store3((80u + (uint(idx) * 544u)), (0u).xxx);
- uint v_18 = (96u + (uint(idx) * 544u));
- sb.Store4(v_18, asuint((0.0f).xxxx));
- uint v_19 = (112u + (uint(idx) * 544u));
- sb.Store4(v_19, asuint(int4((int(0)).xxxx)));
+ sb.Store4((96u + (uint(idx) * 544u)), asuint((0.0f).xxxx));
+ uint v_14 = (112u + (uint(idx) * 544u));
+ sb.Store4(v_14, asuint(int4((int(0)).xxxx)));
sb.Store4((128u + (uint(idx) * 544u)), (0u).xxxx);
v_11((144u + (uint(idx) * 544u)), float2x2((0.0f).xx, (0.0f).xx));
v_10((160u + (uint(idx) * 544u)), float2x3((0.0f).xxx, (0.0f).xxx));
@@ -106,8 +101,8 @@
v_5((352u + (uint(idx) * 544u)), float4x2((0.0f).xx, (0.0f).xx, (0.0f).xx, (0.0f).xx));
v_4((384u + (uint(idx) * 544u)), float4x3((0.0f).xxx, (0.0f).xxx, (0.0f).xxx, (0.0f).xxx));
v_3((448u + (uint(idx) * 544u)), float4x4((0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx));
- float3 v_20[2] = (float3[2])0;
- v((512u + (uint(idx) * 544u)), v_20);
+ float3 v_15[2] = (float3[2])0;
+ v((512u + (uint(idx) * 544u)), v_15);
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/buffer/storage/dynamic_index/write_f16.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/storage/dynamic_index/write_f16.wgsl.expected.ir.dxc.hlsl
index 3c76c57..1e2a82a 100644
--- a/test/tint/buffer/storage/dynamic_index/write_f16.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/storage/dynamic_index/write_f16.wgsl.expected.ir.dxc.hlsl
@@ -149,28 +149,23 @@
}
void main_inner(uint idx) {
- uint v_24 = (0u + (uint(idx) * 800u));
- sb.Store(v_24, asuint(0.0f));
- uint v_25 = (4u + (uint(idx) * 800u));
- sb.Store(v_25, asuint(int(0)));
+ sb.Store((0u + (uint(idx) * 800u)), asuint(0.0f));
+ sb.Store((4u + (uint(idx) * 800u)), asuint(int(0)));
sb.Store((8u + (uint(idx) * 800u)), 0u);
sb.Store<float16_t>((12u + (uint(idx) * 800u)), float16_t(0.0h));
- uint v_26 = (16u + (uint(idx) * 800u));
- sb.Store2(v_26, asuint((0.0f).xx));
- uint v_27 = (24u + (uint(idx) * 800u));
- sb.Store2(v_27, asuint(int2((int(0)).xx)));
+ sb.Store2((16u + (uint(idx) * 800u)), asuint((0.0f).xx));
+ uint v_24 = (24u + (uint(idx) * 800u));
+ sb.Store2(v_24, asuint(int2((int(0)).xx)));
sb.Store2((32u + (uint(idx) * 800u)), (0u).xx);
sb.Store<vector<float16_t, 2> >((40u + (uint(idx) * 800u)), (float16_t(0.0h)).xx);
- uint v_28 = (48u + (uint(idx) * 800u));
- sb.Store3(v_28, asuint((0.0f).xxx));
- uint v_29 = (64u + (uint(idx) * 800u));
- sb.Store3(v_29, asuint(int3((int(0)).xxx)));
+ sb.Store3((48u + (uint(idx) * 800u)), asuint((0.0f).xxx));
+ uint v_25 = (64u + (uint(idx) * 800u));
+ sb.Store3(v_25, asuint(int3((int(0)).xxx)));
sb.Store3((80u + (uint(idx) * 800u)), (0u).xxx);
sb.Store<vector<float16_t, 3> >((96u + (uint(idx) * 800u)), (float16_t(0.0h)).xxx);
- uint v_30 = (112u + (uint(idx) * 800u));
- sb.Store4(v_30, asuint((0.0f).xxxx));
- uint v_31 = (128u + (uint(idx) * 800u));
- sb.Store4(v_31, asuint(int4((int(0)).xxxx)));
+ sb.Store4((112u + (uint(idx) * 800u)), asuint((0.0f).xxxx));
+ uint v_26 = (128u + (uint(idx) * 800u));
+ sb.Store4(v_26, asuint(int4((int(0)).xxxx)));
sb.Store4((144u + (uint(idx) * 800u)), (0u).xxxx);
sb.Store<vector<float16_t, 4> >((160u + (uint(idx) * 800u)), (float16_t(0.0h)).xxxx);
v_23((168u + (uint(idx) * 800u)), float2x2((0.0f).xx, (0.0f).xx));
@@ -191,10 +186,10 @@
v((648u + (uint(idx) * 800u)), matrix<float16_t, 4, 2>((float16_t(0.0h)).xx, (float16_t(0.0h)).xx, (float16_t(0.0h)).xx, (float16_t(0.0h)).xx));
v_8((664u + (uint(idx) * 800u)), matrix<float16_t, 4, 3>((float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx));
v_7((696u + (uint(idx) * 800u)), matrix<float16_t, 4, 4>((float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx));
- float3 v_32[2] = (float3[2])0;
- v_4((736u + (uint(idx) * 800u)), v_32);
- matrix<float16_t, 4, 2> v_33[2] = (matrix<float16_t, 4, 2>[2])0;
- v_1((768u + (uint(idx) * 800u)), v_33);
+ float3 v_27[2] = (float3[2])0;
+ v_4((736u + (uint(idx) * 800u)), v_27);
+ matrix<float16_t, 4, 2> v_28[2] = (matrix<float16_t, 4, 2>[2])0;
+ v_1((768u + (uint(idx) * 800u)), v_28);
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/buffer/storage/static_index/read.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/storage/static_index/read.wgsl.expected.ir.dxc.hlsl
index 5bbedf5..0def477 100644
--- a/test/tint/buffer/storage/static_index/read.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/storage/static_index/read.wgsl.expected.ir.dxc.hlsl
@@ -11,108 +11,89 @@
}
Inner v(uint offset) {
- int v_1 = asint(sb.Load((offset + 0u)));
- Inner v_2 = {v_1, asfloat(sb.Load((offset + 4u)))};
- return v_2;
+ Inner v_1 = {asint(sb.Load((offset + 0u))), asfloat(sb.Load((offset + 4u)))};
+ return v_1;
}
typedef Inner ary_ret[4];
-ary_ret v_3(uint offset) {
+ary_ret v_2(uint offset) {
Inner a[4] = (Inner[4])0;
{
- uint v_4 = 0u;
- v_4 = 0u;
+ uint v_3 = 0u;
+ v_3 = 0u;
while(true) {
- uint v_5 = v_4;
- if ((v_5 >= 4u)) {
+ uint v_4 = v_3;
+ if ((v_4 >= 4u)) {
break;
}
- Inner v_6 = v((offset + (v_5 * 8u)));
- a[v_5] = v_6;
+ Inner v_5 = v((offset + (v_4 * 8u)));
+ a[v_4] = v_5;
{
- v_4 = (v_5 + 1u);
+ v_3 = (v_4 + 1u);
}
continue;
}
}
- Inner v_7[4] = a;
- return v_7;
+ Inner v_6[4] = a;
+ return v_6;
}
typedef float3 ary_ret_1[2];
-ary_ret_1 v_8(uint offset) {
+ary_ret_1 v_7(uint offset) {
float3 a[2] = (float3[2])0;
{
- uint v_9 = 0u;
- v_9 = 0u;
+ uint v_8 = 0u;
+ v_8 = 0u;
while(true) {
- uint v_10 = v_9;
- if ((v_10 >= 2u)) {
+ uint v_9 = v_8;
+ if ((v_9 >= 2u)) {
break;
}
- a[v_10] = asfloat(sb.Load3((offset + (v_10 * 16u))));
+ a[v_9] = asfloat(sb.Load3((offset + (v_9 * 16u))));
{
- v_9 = (v_10 + 1u);
+ v_8 = (v_9 + 1u);
}
continue;
}
}
- float3 v_11[2] = a;
- return v_11;
+ float3 v_10[2] = a;
+ return v_10;
}
-float4x4 v_12(uint offset) {
- float4 v_13 = asfloat(sb.Load4((offset + 0u)));
- float4 v_14 = asfloat(sb.Load4((offset + 16u)));
- float4 v_15 = asfloat(sb.Load4((offset + 32u)));
- return float4x4(v_13, v_14, v_15, asfloat(sb.Load4((offset + 48u))));
+float4x4 v_11(uint offset) {
+ return float4x4(asfloat(sb.Load4((offset + 0u))), asfloat(sb.Load4((offset + 16u))), asfloat(sb.Load4((offset + 32u))), asfloat(sb.Load4((offset + 48u))));
}
-float4x3 v_16(uint offset) {
- float3 v_17 = asfloat(sb.Load3((offset + 0u)));
- float3 v_18 = asfloat(sb.Load3((offset + 16u)));
- float3 v_19 = asfloat(sb.Load3((offset + 32u)));
- return float4x3(v_17, v_18, v_19, asfloat(sb.Load3((offset + 48u))));
+float4x3 v_12(uint offset) {
+ return float4x3(asfloat(sb.Load3((offset + 0u))), asfloat(sb.Load3((offset + 16u))), asfloat(sb.Load3((offset + 32u))), asfloat(sb.Load3((offset + 48u))));
}
-float4x2 v_20(uint offset) {
- float2 v_21 = asfloat(sb.Load2((offset + 0u)));
- float2 v_22 = asfloat(sb.Load2((offset + 8u)));
- float2 v_23 = asfloat(sb.Load2((offset + 16u)));
- return float4x2(v_21, v_22, v_23, asfloat(sb.Load2((offset + 24u))));
+float4x2 v_13(uint offset) {
+ return float4x2(asfloat(sb.Load2((offset + 0u))), asfloat(sb.Load2((offset + 8u))), asfloat(sb.Load2((offset + 16u))), asfloat(sb.Load2((offset + 24u))));
}
-float3x4 v_24(uint offset) {
- float4 v_25 = asfloat(sb.Load4((offset + 0u)));
- float4 v_26 = asfloat(sb.Load4((offset + 16u)));
- return float3x4(v_25, v_26, asfloat(sb.Load4((offset + 32u))));
+float3x4 v_14(uint offset) {
+ return float3x4(asfloat(sb.Load4((offset + 0u))), asfloat(sb.Load4((offset + 16u))), asfloat(sb.Load4((offset + 32u))));
}
-float3x3 v_27(uint offset) {
- float3 v_28 = asfloat(sb.Load3((offset + 0u)));
- float3 v_29 = asfloat(sb.Load3((offset + 16u)));
- return float3x3(v_28, v_29, asfloat(sb.Load3((offset + 32u))));
+float3x3 v_15(uint offset) {
+ return float3x3(asfloat(sb.Load3((offset + 0u))), asfloat(sb.Load3((offset + 16u))), asfloat(sb.Load3((offset + 32u))));
}
-float3x2 v_30(uint offset) {
- float2 v_31 = asfloat(sb.Load2((offset + 0u)));
- float2 v_32 = asfloat(sb.Load2((offset + 8u)));
- return float3x2(v_31, v_32, asfloat(sb.Load2((offset + 16u))));
+float3x2 v_16(uint offset) {
+ return float3x2(asfloat(sb.Load2((offset + 0u))), asfloat(sb.Load2((offset + 8u))), asfloat(sb.Load2((offset + 16u))));
}
-float2x4 v_33(uint offset) {
- float4 v_34 = asfloat(sb.Load4((offset + 0u)));
- return float2x4(v_34, asfloat(sb.Load4((offset + 16u))));
+float2x4 v_17(uint offset) {
+ return float2x4(asfloat(sb.Load4((offset + 0u))), asfloat(sb.Load4((offset + 16u))));
}
-float2x3 v_35(uint offset) {
- float3 v_36 = asfloat(sb.Load3((offset + 0u)));
- return float2x3(v_36, asfloat(sb.Load3((offset + 16u))));
+float2x3 v_18(uint offset) {
+ return float2x3(asfloat(sb.Load3((offset + 0u))), asfloat(sb.Load3((offset + 16u))));
}
-float2x2 v_37(uint offset) {
- float2 v_38 = asfloat(sb.Load2((offset + 0u)));
- return float2x2(v_38, asfloat(sb.Load2((offset + 8u))));
+float2x2 v_19(uint offset) {
+ return float2x2(asfloat(sb.Load2((offset + 0u))), asfloat(sb.Load2((offset + 8u))));
}
[numthreads(1, 1, 1)]
@@ -129,35 +110,35 @@
float4 vec4_f32 = asfloat(sb.Load4(96u));
int4 vec4_i32 = asint(sb.Load4(112u));
uint4 vec4_u32 = sb.Load4(128u);
- float2x2 mat2x2_f32 = v_37(144u);
- float2x3 mat2x3_f32 = v_35(160u);
- float2x4 mat2x4_f32 = v_33(192u);
- float3x2 mat3x2_f32 = v_30(224u);
- float3x3 mat3x3_f32 = v_27(256u);
- float3x4 mat3x4_f32 = v_24(304u);
- float4x2 mat4x2_f32 = v_20(352u);
- float4x3 mat4x3_f32 = v_16(384u);
- float4x4 mat4x4_f32 = v_12(448u);
- float3 arr2_vec3_f32[2] = v_8(512u);
+ float2x2 mat2x2_f32 = v_19(144u);
+ float2x3 mat2x3_f32 = v_18(160u);
+ float2x4 mat2x4_f32 = v_17(192u);
+ float3x2 mat3x2_f32 = v_16(224u);
+ float3x3 mat3x3_f32 = v_15(256u);
+ float3x4 mat3x4_f32 = v_14(304u);
+ float4x2 mat4x2_f32 = v_13(352u);
+ float4x3 mat4x3_f32 = v_12(384u);
+ float4x4 mat4x4_f32 = v_11(448u);
+ float3 arr2_vec3_f32[2] = v_7(512u);
Inner struct_inner = v(544u);
- Inner array_struct_inner[4] = v_3(552u);
- int v_39 = (tint_f32_to_i32(scalar_f32) + scalar_i32);
- int v_40 = (v_39 + int(scalar_u32));
- int v_41 = ((v_40 + tint_f32_to_i32(vec2_f32.x)) + vec2_i32.x);
- int v_42 = (v_41 + int(vec2_u32.x));
- int v_43 = ((v_42 + tint_f32_to_i32(vec3_f32.y)) + vec3_i32.y);
- int v_44 = (v_43 + int(vec3_u32.y));
- int v_45 = ((v_44 + tint_f32_to_i32(vec4_f32.z)) + vec4_i32.z);
- int v_46 = (v_45 + int(vec4_u32.z));
- int v_47 = (v_46 + tint_f32_to_i32(mat2x2_f32[int(0)].x));
- int v_48 = (v_47 + tint_f32_to_i32(mat2x3_f32[int(0)].x));
- int v_49 = (v_48 + tint_f32_to_i32(mat2x4_f32[int(0)].x));
- int v_50 = (v_49 + tint_f32_to_i32(mat3x2_f32[int(0)].x));
- int v_51 = (v_50 + tint_f32_to_i32(mat3x3_f32[int(0)].x));
- int v_52 = (v_51 + tint_f32_to_i32(mat3x4_f32[int(0)].x));
- int v_53 = (v_52 + tint_f32_to_i32(mat4x2_f32[int(0)].x));
- int v_54 = (v_53 + tint_f32_to_i32(mat4x3_f32[int(0)].x));
- int v_55 = (v_54 + tint_f32_to_i32(mat4x4_f32[int(0)].x));
- s.Store(0u, asuint((((v_55 + tint_f32_to_i32(arr2_vec3_f32[int(0)].x)) + struct_inner.scalar_i32) + array_struct_inner[int(0)].scalar_i32)));
+ Inner array_struct_inner[4] = v_2(552u);
+ int v_20 = (tint_f32_to_i32(scalar_f32) + scalar_i32);
+ int v_21 = (v_20 + int(scalar_u32));
+ int v_22 = ((v_21 + tint_f32_to_i32(vec2_f32.x)) + vec2_i32.x);
+ int v_23 = (v_22 + int(vec2_u32.x));
+ int v_24 = ((v_23 + tint_f32_to_i32(vec3_f32.y)) + vec3_i32.y);
+ int v_25 = (v_24 + int(vec3_u32.y));
+ int v_26 = ((v_25 + tint_f32_to_i32(vec4_f32.z)) + vec4_i32.z);
+ int v_27 = (v_26 + int(vec4_u32.z));
+ int v_28 = (v_27 + tint_f32_to_i32(mat2x2_f32[int(0)].x));
+ int v_29 = (v_28 + tint_f32_to_i32(mat2x3_f32[int(0)].x));
+ int v_30 = (v_29 + tint_f32_to_i32(mat2x4_f32[int(0)].x));
+ int v_31 = (v_30 + tint_f32_to_i32(mat3x2_f32[int(0)].x));
+ int v_32 = (v_31 + tint_f32_to_i32(mat3x3_f32[int(0)].x));
+ int v_33 = (v_32 + tint_f32_to_i32(mat3x4_f32[int(0)].x));
+ int v_34 = (v_33 + tint_f32_to_i32(mat4x2_f32[int(0)].x));
+ int v_35 = (v_34 + tint_f32_to_i32(mat4x3_f32[int(0)].x));
+ int v_36 = (v_35 + tint_f32_to_i32(mat4x4_f32[int(0)].x));
+ s.Store(0u, asuint((((v_36 + tint_f32_to_i32(arr2_vec3_f32[int(0)].x)) + struct_inner.scalar_i32) + array_struct_inner[int(0)].scalar_i32)));
}
diff --git a/test/tint/buffer/storage/static_index/read.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/storage/static_index/read.wgsl.expected.ir.fxc.hlsl
index 5bbedf5..0def477 100644
--- a/test/tint/buffer/storage/static_index/read.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/storage/static_index/read.wgsl.expected.ir.fxc.hlsl
@@ -11,108 +11,89 @@
}
Inner v(uint offset) {
- int v_1 = asint(sb.Load((offset + 0u)));
- Inner v_2 = {v_1, asfloat(sb.Load((offset + 4u)))};
- return v_2;
+ Inner v_1 = {asint(sb.Load((offset + 0u))), asfloat(sb.Load((offset + 4u)))};
+ return v_1;
}
typedef Inner ary_ret[4];
-ary_ret v_3(uint offset) {
+ary_ret v_2(uint offset) {
Inner a[4] = (Inner[4])0;
{
- uint v_4 = 0u;
- v_4 = 0u;
+ uint v_3 = 0u;
+ v_3 = 0u;
while(true) {
- uint v_5 = v_4;
- if ((v_5 >= 4u)) {
+ uint v_4 = v_3;
+ if ((v_4 >= 4u)) {
break;
}
- Inner v_6 = v((offset + (v_5 * 8u)));
- a[v_5] = v_6;
+ Inner v_5 = v((offset + (v_4 * 8u)));
+ a[v_4] = v_5;
{
- v_4 = (v_5 + 1u);
+ v_3 = (v_4 + 1u);
}
continue;
}
}
- Inner v_7[4] = a;
- return v_7;
+ Inner v_6[4] = a;
+ return v_6;
}
typedef float3 ary_ret_1[2];
-ary_ret_1 v_8(uint offset) {
+ary_ret_1 v_7(uint offset) {
float3 a[2] = (float3[2])0;
{
- uint v_9 = 0u;
- v_9 = 0u;
+ uint v_8 = 0u;
+ v_8 = 0u;
while(true) {
- uint v_10 = v_9;
- if ((v_10 >= 2u)) {
+ uint v_9 = v_8;
+ if ((v_9 >= 2u)) {
break;
}
- a[v_10] = asfloat(sb.Load3((offset + (v_10 * 16u))));
+ a[v_9] = asfloat(sb.Load3((offset + (v_9 * 16u))));
{
- v_9 = (v_10 + 1u);
+ v_8 = (v_9 + 1u);
}
continue;
}
}
- float3 v_11[2] = a;
- return v_11;
+ float3 v_10[2] = a;
+ return v_10;
}
-float4x4 v_12(uint offset) {
- float4 v_13 = asfloat(sb.Load4((offset + 0u)));
- float4 v_14 = asfloat(sb.Load4((offset + 16u)));
- float4 v_15 = asfloat(sb.Load4((offset + 32u)));
- return float4x4(v_13, v_14, v_15, asfloat(sb.Load4((offset + 48u))));
+float4x4 v_11(uint offset) {
+ return float4x4(asfloat(sb.Load4((offset + 0u))), asfloat(sb.Load4((offset + 16u))), asfloat(sb.Load4((offset + 32u))), asfloat(sb.Load4((offset + 48u))));
}
-float4x3 v_16(uint offset) {
- float3 v_17 = asfloat(sb.Load3((offset + 0u)));
- float3 v_18 = asfloat(sb.Load3((offset + 16u)));
- float3 v_19 = asfloat(sb.Load3((offset + 32u)));
- return float4x3(v_17, v_18, v_19, asfloat(sb.Load3((offset + 48u))));
+float4x3 v_12(uint offset) {
+ return float4x3(asfloat(sb.Load3((offset + 0u))), asfloat(sb.Load3((offset + 16u))), asfloat(sb.Load3((offset + 32u))), asfloat(sb.Load3((offset + 48u))));
}
-float4x2 v_20(uint offset) {
- float2 v_21 = asfloat(sb.Load2((offset + 0u)));
- float2 v_22 = asfloat(sb.Load2((offset + 8u)));
- float2 v_23 = asfloat(sb.Load2((offset + 16u)));
- return float4x2(v_21, v_22, v_23, asfloat(sb.Load2((offset + 24u))));
+float4x2 v_13(uint offset) {
+ return float4x2(asfloat(sb.Load2((offset + 0u))), asfloat(sb.Load2((offset + 8u))), asfloat(sb.Load2((offset + 16u))), asfloat(sb.Load2((offset + 24u))));
}
-float3x4 v_24(uint offset) {
- float4 v_25 = asfloat(sb.Load4((offset + 0u)));
- float4 v_26 = asfloat(sb.Load4((offset + 16u)));
- return float3x4(v_25, v_26, asfloat(sb.Load4((offset + 32u))));
+float3x4 v_14(uint offset) {
+ return float3x4(asfloat(sb.Load4((offset + 0u))), asfloat(sb.Load4((offset + 16u))), asfloat(sb.Load4((offset + 32u))));
}
-float3x3 v_27(uint offset) {
- float3 v_28 = asfloat(sb.Load3((offset + 0u)));
- float3 v_29 = asfloat(sb.Load3((offset + 16u)));
- return float3x3(v_28, v_29, asfloat(sb.Load3((offset + 32u))));
+float3x3 v_15(uint offset) {
+ return float3x3(asfloat(sb.Load3((offset + 0u))), asfloat(sb.Load3((offset + 16u))), asfloat(sb.Load3((offset + 32u))));
}
-float3x2 v_30(uint offset) {
- float2 v_31 = asfloat(sb.Load2((offset + 0u)));
- float2 v_32 = asfloat(sb.Load2((offset + 8u)));
- return float3x2(v_31, v_32, asfloat(sb.Load2((offset + 16u))));
+float3x2 v_16(uint offset) {
+ return float3x2(asfloat(sb.Load2((offset + 0u))), asfloat(sb.Load2((offset + 8u))), asfloat(sb.Load2((offset + 16u))));
}
-float2x4 v_33(uint offset) {
- float4 v_34 = asfloat(sb.Load4((offset + 0u)));
- return float2x4(v_34, asfloat(sb.Load4((offset + 16u))));
+float2x4 v_17(uint offset) {
+ return float2x4(asfloat(sb.Load4((offset + 0u))), asfloat(sb.Load4((offset + 16u))));
}
-float2x3 v_35(uint offset) {
- float3 v_36 = asfloat(sb.Load3((offset + 0u)));
- return float2x3(v_36, asfloat(sb.Load3((offset + 16u))));
+float2x3 v_18(uint offset) {
+ return float2x3(asfloat(sb.Load3((offset + 0u))), asfloat(sb.Load3((offset + 16u))));
}
-float2x2 v_37(uint offset) {
- float2 v_38 = asfloat(sb.Load2((offset + 0u)));
- return float2x2(v_38, asfloat(sb.Load2((offset + 8u))));
+float2x2 v_19(uint offset) {
+ return float2x2(asfloat(sb.Load2((offset + 0u))), asfloat(sb.Load2((offset + 8u))));
}
[numthreads(1, 1, 1)]
@@ -129,35 +110,35 @@
float4 vec4_f32 = asfloat(sb.Load4(96u));
int4 vec4_i32 = asint(sb.Load4(112u));
uint4 vec4_u32 = sb.Load4(128u);
- float2x2 mat2x2_f32 = v_37(144u);
- float2x3 mat2x3_f32 = v_35(160u);
- float2x4 mat2x4_f32 = v_33(192u);
- float3x2 mat3x2_f32 = v_30(224u);
- float3x3 mat3x3_f32 = v_27(256u);
- float3x4 mat3x4_f32 = v_24(304u);
- float4x2 mat4x2_f32 = v_20(352u);
- float4x3 mat4x3_f32 = v_16(384u);
- float4x4 mat4x4_f32 = v_12(448u);
- float3 arr2_vec3_f32[2] = v_8(512u);
+ float2x2 mat2x2_f32 = v_19(144u);
+ float2x3 mat2x3_f32 = v_18(160u);
+ float2x4 mat2x4_f32 = v_17(192u);
+ float3x2 mat3x2_f32 = v_16(224u);
+ float3x3 mat3x3_f32 = v_15(256u);
+ float3x4 mat3x4_f32 = v_14(304u);
+ float4x2 mat4x2_f32 = v_13(352u);
+ float4x3 mat4x3_f32 = v_12(384u);
+ float4x4 mat4x4_f32 = v_11(448u);
+ float3 arr2_vec3_f32[2] = v_7(512u);
Inner struct_inner = v(544u);
- Inner array_struct_inner[4] = v_3(552u);
- int v_39 = (tint_f32_to_i32(scalar_f32) + scalar_i32);
- int v_40 = (v_39 + int(scalar_u32));
- int v_41 = ((v_40 + tint_f32_to_i32(vec2_f32.x)) + vec2_i32.x);
- int v_42 = (v_41 + int(vec2_u32.x));
- int v_43 = ((v_42 + tint_f32_to_i32(vec3_f32.y)) + vec3_i32.y);
- int v_44 = (v_43 + int(vec3_u32.y));
- int v_45 = ((v_44 + tint_f32_to_i32(vec4_f32.z)) + vec4_i32.z);
- int v_46 = (v_45 + int(vec4_u32.z));
- int v_47 = (v_46 + tint_f32_to_i32(mat2x2_f32[int(0)].x));
- int v_48 = (v_47 + tint_f32_to_i32(mat2x3_f32[int(0)].x));
- int v_49 = (v_48 + tint_f32_to_i32(mat2x4_f32[int(0)].x));
- int v_50 = (v_49 + tint_f32_to_i32(mat3x2_f32[int(0)].x));
- int v_51 = (v_50 + tint_f32_to_i32(mat3x3_f32[int(0)].x));
- int v_52 = (v_51 + tint_f32_to_i32(mat3x4_f32[int(0)].x));
- int v_53 = (v_52 + tint_f32_to_i32(mat4x2_f32[int(0)].x));
- int v_54 = (v_53 + tint_f32_to_i32(mat4x3_f32[int(0)].x));
- int v_55 = (v_54 + tint_f32_to_i32(mat4x4_f32[int(0)].x));
- s.Store(0u, asuint((((v_55 + tint_f32_to_i32(arr2_vec3_f32[int(0)].x)) + struct_inner.scalar_i32) + array_struct_inner[int(0)].scalar_i32)));
+ Inner array_struct_inner[4] = v_2(552u);
+ int v_20 = (tint_f32_to_i32(scalar_f32) + scalar_i32);
+ int v_21 = (v_20 + int(scalar_u32));
+ int v_22 = ((v_21 + tint_f32_to_i32(vec2_f32.x)) + vec2_i32.x);
+ int v_23 = (v_22 + int(vec2_u32.x));
+ int v_24 = ((v_23 + tint_f32_to_i32(vec3_f32.y)) + vec3_i32.y);
+ int v_25 = (v_24 + int(vec3_u32.y));
+ int v_26 = ((v_25 + tint_f32_to_i32(vec4_f32.z)) + vec4_i32.z);
+ int v_27 = (v_26 + int(vec4_u32.z));
+ int v_28 = (v_27 + tint_f32_to_i32(mat2x2_f32[int(0)].x));
+ int v_29 = (v_28 + tint_f32_to_i32(mat2x3_f32[int(0)].x));
+ int v_30 = (v_29 + tint_f32_to_i32(mat2x4_f32[int(0)].x));
+ int v_31 = (v_30 + tint_f32_to_i32(mat3x2_f32[int(0)].x));
+ int v_32 = (v_31 + tint_f32_to_i32(mat3x3_f32[int(0)].x));
+ int v_33 = (v_32 + tint_f32_to_i32(mat3x4_f32[int(0)].x));
+ int v_34 = (v_33 + tint_f32_to_i32(mat4x2_f32[int(0)].x));
+ int v_35 = (v_34 + tint_f32_to_i32(mat4x3_f32[int(0)].x));
+ int v_36 = (v_35 + tint_f32_to_i32(mat4x4_f32[int(0)].x));
+ s.Store(0u, asuint((((v_36 + tint_f32_to_i32(arr2_vec3_f32[int(0)].x)) + struct_inner.scalar_i32) + array_struct_inner[int(0)].scalar_i32)));
}
diff --git a/test/tint/buffer/storage/static_index/read_f16.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/storage/static_index/read_f16.wgsl.expected.ir.dxc.hlsl
index ce44a81..4e81581 100644
--- a/test/tint/buffer/storage/static_index/read_f16.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/storage/static_index/read_f16.wgsl.expected.ir.dxc.hlsl
@@ -16,185 +16,147 @@
}
Inner v(uint offset) {
- int v_1 = asint(sb.Load((offset + 0u)));
- float v_2 = asfloat(sb.Load((offset + 4u)));
- Inner v_3 = {v_1, v_2, sb.Load<float16_t>((offset + 8u))};
- return v_3;
+ Inner v_1 = {asint(sb.Load((offset + 0u))), asfloat(sb.Load((offset + 4u))), sb.Load<float16_t>((offset + 8u))};
+ return v_1;
}
typedef Inner ary_ret[4];
-ary_ret v_4(uint offset) {
+ary_ret v_2(uint offset) {
Inner a[4] = (Inner[4])0;
{
- uint v_5 = 0u;
- v_5 = 0u;
+ uint v_3 = 0u;
+ v_3 = 0u;
while(true) {
- uint v_6 = v_5;
- if ((v_6 >= 4u)) {
+ uint v_4 = v_3;
+ if ((v_4 >= 4u)) {
break;
}
- Inner v_7 = v((offset + (v_6 * 12u)));
- a[v_6] = v_7;
+ Inner v_5 = v((offset + (v_4 * 12u)));
+ a[v_4] = v_5;
{
- v_5 = (v_6 + 1u);
+ v_3 = (v_4 + 1u);
}
continue;
}
}
- Inner v_8[4] = a;
- return v_8;
+ Inner v_6[4] = a;
+ return v_6;
}
-matrix<float16_t, 4, 2> v_9(uint offset) {
- vector<float16_t, 2> v_10 = sb.Load<vector<float16_t, 2> >((offset + 0u));
- vector<float16_t, 2> v_11 = sb.Load<vector<float16_t, 2> >((offset + 4u));
- vector<float16_t, 2> v_12 = sb.Load<vector<float16_t, 2> >((offset + 8u));
- return matrix<float16_t, 4, 2>(v_10, v_11, v_12, sb.Load<vector<float16_t, 2> >((offset + 12u)));
+matrix<float16_t, 4, 2> v_7(uint offset) {
+ return matrix<float16_t, 4, 2>(sb.Load<vector<float16_t, 2> >((offset + 0u)), sb.Load<vector<float16_t, 2> >((offset + 4u)), sb.Load<vector<float16_t, 2> >((offset + 8u)), sb.Load<vector<float16_t, 2> >((offset + 12u)));
}
typedef matrix<float16_t, 4, 2> ary_ret_1[2];
-ary_ret_1 v_13(uint offset) {
+ary_ret_1 v_8(uint offset) {
matrix<float16_t, 4, 2> a[2] = (matrix<float16_t, 4, 2>[2])0;
{
- uint v_14 = 0u;
- v_14 = 0u;
+ uint v_9 = 0u;
+ v_9 = 0u;
while(true) {
- uint v_15 = v_14;
- if ((v_15 >= 2u)) {
+ uint v_10 = v_9;
+ if ((v_10 >= 2u)) {
break;
}
- a[v_15] = v_9((offset + (v_15 * 16u)));
+ a[v_10] = v_7((offset + (v_10 * 16u)));
{
- v_14 = (v_15 + 1u);
+ v_9 = (v_10 + 1u);
}
continue;
}
}
- matrix<float16_t, 4, 2> v_16[2] = a;
- return v_16;
+ matrix<float16_t, 4, 2> v_11[2] = a;
+ return v_11;
}
typedef float3 ary_ret_2[2];
-ary_ret_2 v_17(uint offset) {
+ary_ret_2 v_12(uint offset) {
float3 a[2] = (float3[2])0;
{
- uint v_18 = 0u;
- v_18 = 0u;
+ uint v_13 = 0u;
+ v_13 = 0u;
while(true) {
- uint v_19 = v_18;
- if ((v_19 >= 2u)) {
+ uint v_14 = v_13;
+ if ((v_14 >= 2u)) {
break;
}
- a[v_19] = asfloat(sb.Load3((offset + (v_19 * 16u))));
+ a[v_14] = asfloat(sb.Load3((offset + (v_14 * 16u))));
{
- v_18 = (v_19 + 1u);
+ v_13 = (v_14 + 1u);
}
continue;
}
}
- float3 v_20[2] = a;
- return v_20;
+ float3 v_15[2] = a;
+ return v_15;
}
-matrix<float16_t, 4, 4> v_21(uint offset) {
- vector<float16_t, 4> v_22 = sb.Load<vector<float16_t, 4> >((offset + 0u));
- vector<float16_t, 4> v_23 = sb.Load<vector<float16_t, 4> >((offset + 8u));
- vector<float16_t, 4> v_24 = sb.Load<vector<float16_t, 4> >((offset + 16u));
- return matrix<float16_t, 4, 4>(v_22, v_23, v_24, sb.Load<vector<float16_t, 4> >((offset + 24u)));
+matrix<float16_t, 4, 4> v_16(uint offset) {
+ return matrix<float16_t, 4, 4>(sb.Load<vector<float16_t, 4> >((offset + 0u)), sb.Load<vector<float16_t, 4> >((offset + 8u)), sb.Load<vector<float16_t, 4> >((offset + 16u)), sb.Load<vector<float16_t, 4> >((offset + 24u)));
}
-matrix<float16_t, 4, 3> v_25(uint offset) {
- vector<float16_t, 3> v_26 = sb.Load<vector<float16_t, 3> >((offset + 0u));
- vector<float16_t, 3> v_27 = sb.Load<vector<float16_t, 3> >((offset + 8u));
- vector<float16_t, 3> v_28 = sb.Load<vector<float16_t, 3> >((offset + 16u));
- return matrix<float16_t, 4, 3>(v_26, v_27, v_28, sb.Load<vector<float16_t, 3> >((offset + 24u)));
+matrix<float16_t, 4, 3> v_17(uint offset) {
+ return matrix<float16_t, 4, 3>(sb.Load<vector<float16_t, 3> >((offset + 0u)), sb.Load<vector<float16_t, 3> >((offset + 8u)), sb.Load<vector<float16_t, 3> >((offset + 16u)), sb.Load<vector<float16_t, 3> >((offset + 24u)));
}
-matrix<float16_t, 3, 4> v_29(uint offset) {
- vector<float16_t, 4> v_30 = sb.Load<vector<float16_t, 4> >((offset + 0u));
- vector<float16_t, 4> v_31 = sb.Load<vector<float16_t, 4> >((offset + 8u));
- return matrix<float16_t, 3, 4>(v_30, v_31, sb.Load<vector<float16_t, 4> >((offset + 16u)));
+matrix<float16_t, 3, 4> v_18(uint offset) {
+ return matrix<float16_t, 3, 4>(sb.Load<vector<float16_t, 4> >((offset + 0u)), sb.Load<vector<float16_t, 4> >((offset + 8u)), sb.Load<vector<float16_t, 4> >((offset + 16u)));
}
-matrix<float16_t, 3, 3> v_32(uint offset) {
- vector<float16_t, 3> v_33 = sb.Load<vector<float16_t, 3> >((offset + 0u));
- vector<float16_t, 3> v_34 = sb.Load<vector<float16_t, 3> >((offset + 8u));
- return matrix<float16_t, 3, 3>(v_33, v_34, sb.Load<vector<float16_t, 3> >((offset + 16u)));
+matrix<float16_t, 3, 3> v_19(uint offset) {
+ return matrix<float16_t, 3, 3>(sb.Load<vector<float16_t, 3> >((offset + 0u)), sb.Load<vector<float16_t, 3> >((offset + 8u)), sb.Load<vector<float16_t, 3> >((offset + 16u)));
}
-matrix<float16_t, 3, 2> v_35(uint offset) {
- vector<float16_t, 2> v_36 = sb.Load<vector<float16_t, 2> >((offset + 0u));
- vector<float16_t, 2> v_37 = sb.Load<vector<float16_t, 2> >((offset + 4u));
- return matrix<float16_t, 3, 2>(v_36, v_37, sb.Load<vector<float16_t, 2> >((offset + 8u)));
+matrix<float16_t, 3, 2> v_20(uint offset) {
+ return matrix<float16_t, 3, 2>(sb.Load<vector<float16_t, 2> >((offset + 0u)), sb.Load<vector<float16_t, 2> >((offset + 4u)), sb.Load<vector<float16_t, 2> >((offset + 8u)));
}
-matrix<float16_t, 2, 4> v_38(uint offset) {
- vector<float16_t, 4> v_39 = sb.Load<vector<float16_t, 4> >((offset + 0u));
- return matrix<float16_t, 2, 4>(v_39, sb.Load<vector<float16_t, 4> >((offset + 8u)));
+matrix<float16_t, 2, 4> v_21(uint offset) {
+ return matrix<float16_t, 2, 4>(sb.Load<vector<float16_t, 4> >((offset + 0u)), sb.Load<vector<float16_t, 4> >((offset + 8u)));
}
-matrix<float16_t, 2, 3> v_40(uint offset) {
- vector<float16_t, 3> v_41 = sb.Load<vector<float16_t, 3> >((offset + 0u));
- return matrix<float16_t, 2, 3>(v_41, sb.Load<vector<float16_t, 3> >((offset + 8u)));
+matrix<float16_t, 2, 3> v_22(uint offset) {
+ return matrix<float16_t, 2, 3>(sb.Load<vector<float16_t, 3> >((offset + 0u)), sb.Load<vector<float16_t, 3> >((offset + 8u)));
}
-matrix<float16_t, 2, 2> v_42(uint offset) {
- vector<float16_t, 2> v_43 = sb.Load<vector<float16_t, 2> >((offset + 0u));
- return matrix<float16_t, 2, 2>(v_43, sb.Load<vector<float16_t, 2> >((offset + 4u)));
+matrix<float16_t, 2, 2> v_23(uint offset) {
+ return matrix<float16_t, 2, 2>(sb.Load<vector<float16_t, 2> >((offset + 0u)), sb.Load<vector<float16_t, 2> >((offset + 4u)));
}
-float4x4 v_44(uint offset) {
- float4 v_45 = asfloat(sb.Load4((offset + 0u)));
- float4 v_46 = asfloat(sb.Load4((offset + 16u)));
- float4 v_47 = asfloat(sb.Load4((offset + 32u)));
- return float4x4(v_45, v_46, v_47, asfloat(sb.Load4((offset + 48u))));
+float4x4 v_24(uint offset) {
+ return float4x4(asfloat(sb.Load4((offset + 0u))), asfloat(sb.Load4((offset + 16u))), asfloat(sb.Load4((offset + 32u))), asfloat(sb.Load4((offset + 48u))));
}
-float4x3 v_48(uint offset) {
- float3 v_49 = asfloat(sb.Load3((offset + 0u)));
- float3 v_50 = asfloat(sb.Load3((offset + 16u)));
- float3 v_51 = asfloat(sb.Load3((offset + 32u)));
- return float4x3(v_49, v_50, v_51, asfloat(sb.Load3((offset + 48u))));
+float4x3 v_25(uint offset) {
+ return float4x3(asfloat(sb.Load3((offset + 0u))), asfloat(sb.Load3((offset + 16u))), asfloat(sb.Load3((offset + 32u))), asfloat(sb.Load3((offset + 48u))));
}
-float4x2 v_52(uint offset) {
- float2 v_53 = asfloat(sb.Load2((offset + 0u)));
- float2 v_54 = asfloat(sb.Load2((offset + 8u)));
- float2 v_55 = asfloat(sb.Load2((offset + 16u)));
- return float4x2(v_53, v_54, v_55, asfloat(sb.Load2((offset + 24u))));
+float4x2 v_26(uint offset) {
+ return float4x2(asfloat(sb.Load2((offset + 0u))), asfloat(sb.Load2((offset + 8u))), asfloat(sb.Load2((offset + 16u))), asfloat(sb.Load2((offset + 24u))));
}
-float3x4 v_56(uint offset) {
- float4 v_57 = asfloat(sb.Load4((offset + 0u)));
- float4 v_58 = asfloat(sb.Load4((offset + 16u)));
- return float3x4(v_57, v_58, asfloat(sb.Load4((offset + 32u))));
+float3x4 v_27(uint offset) {
+ return float3x4(asfloat(sb.Load4((offset + 0u))), asfloat(sb.Load4((offset + 16u))), asfloat(sb.Load4((offset + 32u))));
}
-float3x3 v_59(uint offset) {
- float3 v_60 = asfloat(sb.Load3((offset + 0u)));
- float3 v_61 = asfloat(sb.Load3((offset + 16u)));
- return float3x3(v_60, v_61, asfloat(sb.Load3((offset + 32u))));
+float3x3 v_28(uint offset) {
+ return float3x3(asfloat(sb.Load3((offset + 0u))), asfloat(sb.Load3((offset + 16u))), asfloat(sb.Load3((offset + 32u))));
}
-float3x2 v_62(uint offset) {
- float2 v_63 = asfloat(sb.Load2((offset + 0u)));
- float2 v_64 = asfloat(sb.Load2((offset + 8u)));
- return float3x2(v_63, v_64, asfloat(sb.Load2((offset + 16u))));
+float3x2 v_29(uint offset) {
+ return float3x2(asfloat(sb.Load2((offset + 0u))), asfloat(sb.Load2((offset + 8u))), asfloat(sb.Load2((offset + 16u))));
}
-float2x4 v_65(uint offset) {
- float4 v_66 = asfloat(sb.Load4((offset + 0u)));
- return float2x4(v_66, asfloat(sb.Load4((offset + 16u))));
+float2x4 v_30(uint offset) {
+ return float2x4(asfloat(sb.Load4((offset + 0u))), asfloat(sb.Load4((offset + 16u))));
}
-float2x3 v_67(uint offset) {
- float3 v_68 = asfloat(sb.Load3((offset + 0u)));
- return float2x3(v_68, asfloat(sb.Load3((offset + 16u))));
+float2x3 v_31(uint offset) {
+ return float2x3(asfloat(sb.Load3((offset + 0u))), asfloat(sb.Load3((offset + 16u))));
}
-float2x2 v_69(uint offset) {
- float2 v_70 = asfloat(sb.Load2((offset + 0u)));
- return float2x2(v_70, asfloat(sb.Load2((offset + 8u))));
+float2x2 v_32(uint offset) {
+ return float2x2(asfloat(sb.Load2((offset + 0u))), asfloat(sb.Load2((offset + 8u))));
}
[numthreads(1, 1, 1)]
@@ -215,59 +177,59 @@
int4 vec4_i32 = asint(sb.Load4(128u));
uint4 vec4_u32 = sb.Load4(144u);
vector<float16_t, 4> vec4_f16 = sb.Load<vector<float16_t, 4> >(160u);
- float2x2 mat2x2_f32 = v_69(168u);
- float2x3 mat2x3_f32 = v_67(192u);
- float2x4 mat2x4_f32 = v_65(224u);
- float3x2 mat3x2_f32 = v_62(256u);
- float3x3 mat3x3_f32 = v_59(288u);
- float3x4 mat3x4_f32 = v_56(336u);
- float4x2 mat4x2_f32 = v_52(384u);
- float4x3 mat4x3_f32 = v_48(416u);
- float4x4 mat4x4_f32 = v_44(480u);
- matrix<float16_t, 2, 2> mat2x2_f16 = v_42(544u);
- matrix<float16_t, 2, 3> mat2x3_f16 = v_40(552u);
- matrix<float16_t, 2, 4> mat2x4_f16 = v_38(568u);
- matrix<float16_t, 3, 2> mat3x2_f16 = v_35(584u);
- matrix<float16_t, 3, 3> mat3x3_f16 = v_32(600u);
- matrix<float16_t, 3, 4> mat3x4_f16 = v_29(624u);
- matrix<float16_t, 4, 2> mat4x2_f16 = v_9(648u);
- matrix<float16_t, 4, 3> mat4x3_f16 = v_25(664u);
- matrix<float16_t, 4, 4> mat4x4_f16 = v_21(696u);
- float3 arr2_vec3_f32[2] = v_17(736u);
- matrix<float16_t, 4, 2> arr2_mat4x2_f16[2] = v_13(768u);
+ float2x2 mat2x2_f32 = v_32(168u);
+ float2x3 mat2x3_f32 = v_31(192u);
+ float2x4 mat2x4_f32 = v_30(224u);
+ float3x2 mat3x2_f32 = v_29(256u);
+ float3x3 mat3x3_f32 = v_28(288u);
+ float3x4 mat3x4_f32 = v_27(336u);
+ float4x2 mat4x2_f32 = v_26(384u);
+ float4x3 mat4x3_f32 = v_25(416u);
+ float4x4 mat4x4_f32 = v_24(480u);
+ matrix<float16_t, 2, 2> mat2x2_f16 = v_23(544u);
+ matrix<float16_t, 2, 3> mat2x3_f16 = v_22(552u);
+ matrix<float16_t, 2, 4> mat2x4_f16 = v_21(568u);
+ matrix<float16_t, 3, 2> mat3x2_f16 = v_20(584u);
+ matrix<float16_t, 3, 3> mat3x3_f16 = v_19(600u);
+ matrix<float16_t, 3, 4> mat3x4_f16 = v_18(624u);
+ matrix<float16_t, 4, 2> mat4x2_f16 = v_7(648u);
+ matrix<float16_t, 4, 3> mat4x3_f16 = v_17(664u);
+ matrix<float16_t, 4, 4> mat4x4_f16 = v_16(696u);
+ float3 arr2_vec3_f32[2] = v_12(736u);
+ matrix<float16_t, 4, 2> arr2_mat4x2_f16[2] = v_8(768u);
Inner struct_inner = v(800u);
- Inner array_struct_inner[4] = v_4(812u);
- int v_71 = (tint_f32_to_i32(scalar_f32) + scalar_i32);
- int v_72 = (v_71 + int(scalar_u32));
- int v_73 = (v_72 + tint_f16_to_i32(scalar_f16));
- int v_74 = ((v_73 + tint_f32_to_i32(vec2_f32.x)) + vec2_i32.x);
- int v_75 = (v_74 + int(vec2_u32.x));
- int v_76 = (v_75 + tint_f16_to_i32(vec2_f16.x));
- int v_77 = ((v_76 + tint_f32_to_i32(vec3_f32.y)) + vec3_i32.y);
- int v_78 = (v_77 + int(vec3_u32.y));
- int v_79 = (v_78 + tint_f16_to_i32(vec3_f16.y));
- int v_80 = ((v_79 + tint_f32_to_i32(vec4_f32.z)) + vec4_i32.z);
- int v_81 = (v_80 + int(vec4_u32.z));
- int v_82 = (v_81 + tint_f16_to_i32(vec4_f16.z));
- int v_83 = (v_82 + tint_f32_to_i32(mat2x2_f32[int(0)].x));
- int v_84 = (v_83 + tint_f32_to_i32(mat2x3_f32[int(0)].x));
- int v_85 = (v_84 + tint_f32_to_i32(mat2x4_f32[int(0)].x));
- int v_86 = (v_85 + tint_f32_to_i32(mat3x2_f32[int(0)].x));
- int v_87 = (v_86 + tint_f32_to_i32(mat3x3_f32[int(0)].x));
- int v_88 = (v_87 + tint_f32_to_i32(mat3x4_f32[int(0)].x));
- int v_89 = (v_88 + tint_f32_to_i32(mat4x2_f32[int(0)].x));
- int v_90 = (v_89 + tint_f32_to_i32(mat4x3_f32[int(0)].x));
- int v_91 = (v_90 + tint_f32_to_i32(mat4x4_f32[int(0)].x));
- int v_92 = (v_91 + tint_f16_to_i32(mat2x2_f16[int(0)].x));
- int v_93 = (v_92 + tint_f16_to_i32(mat2x3_f16[int(0)].x));
- int v_94 = (v_93 + tint_f16_to_i32(mat2x4_f16[int(0)].x));
- int v_95 = (v_94 + tint_f16_to_i32(mat3x2_f16[int(0)].x));
- int v_96 = (v_95 + tint_f16_to_i32(mat3x3_f16[int(0)].x));
- int v_97 = (v_96 + tint_f16_to_i32(mat3x4_f16[int(0)].x));
- int v_98 = (v_97 + tint_f16_to_i32(mat4x2_f16[int(0)].x));
- int v_99 = (v_98 + tint_f16_to_i32(mat4x3_f16[int(0)].x));
- int v_100 = (v_99 + tint_f16_to_i32(mat4x4_f16[int(0)].x));
- int v_101 = (v_100 + tint_f32_to_i32(arr2_vec3_f32[int(0)].x));
- s.Store(0u, asuint((((v_101 + tint_f16_to_i32(arr2_mat4x2_f16[int(0)][int(0)].x)) + struct_inner.scalar_i32) + array_struct_inner[int(0)].scalar_i32)));
+ Inner array_struct_inner[4] = v_2(812u);
+ int v_33 = (tint_f32_to_i32(scalar_f32) + scalar_i32);
+ int v_34 = (v_33 + int(scalar_u32));
+ int v_35 = (v_34 + tint_f16_to_i32(scalar_f16));
+ int v_36 = ((v_35 + tint_f32_to_i32(vec2_f32.x)) + vec2_i32.x);
+ int v_37 = (v_36 + int(vec2_u32.x));
+ int v_38 = (v_37 + tint_f16_to_i32(vec2_f16.x));
+ int v_39 = ((v_38 + tint_f32_to_i32(vec3_f32.y)) + vec3_i32.y);
+ int v_40 = (v_39 + int(vec3_u32.y));
+ int v_41 = (v_40 + tint_f16_to_i32(vec3_f16.y));
+ int v_42 = ((v_41 + tint_f32_to_i32(vec4_f32.z)) + vec4_i32.z);
+ int v_43 = (v_42 + int(vec4_u32.z));
+ int v_44 = (v_43 + tint_f16_to_i32(vec4_f16.z));
+ int v_45 = (v_44 + tint_f32_to_i32(mat2x2_f32[int(0)].x));
+ int v_46 = (v_45 + tint_f32_to_i32(mat2x3_f32[int(0)].x));
+ int v_47 = (v_46 + tint_f32_to_i32(mat2x4_f32[int(0)].x));
+ int v_48 = (v_47 + tint_f32_to_i32(mat3x2_f32[int(0)].x));
+ int v_49 = (v_48 + tint_f32_to_i32(mat3x3_f32[int(0)].x));
+ int v_50 = (v_49 + tint_f32_to_i32(mat3x4_f32[int(0)].x));
+ int v_51 = (v_50 + tint_f32_to_i32(mat4x2_f32[int(0)].x));
+ int v_52 = (v_51 + tint_f32_to_i32(mat4x3_f32[int(0)].x));
+ int v_53 = (v_52 + tint_f32_to_i32(mat4x4_f32[int(0)].x));
+ int v_54 = (v_53 + tint_f16_to_i32(mat2x2_f16[int(0)].x));
+ int v_55 = (v_54 + tint_f16_to_i32(mat2x3_f16[int(0)].x));
+ int v_56 = (v_55 + tint_f16_to_i32(mat2x4_f16[int(0)].x));
+ int v_57 = (v_56 + tint_f16_to_i32(mat3x2_f16[int(0)].x));
+ int v_58 = (v_57 + tint_f16_to_i32(mat3x3_f16[int(0)].x));
+ int v_59 = (v_58 + tint_f16_to_i32(mat3x4_f16[int(0)].x));
+ int v_60 = (v_59 + tint_f16_to_i32(mat4x2_f16[int(0)].x));
+ int v_61 = (v_60 + tint_f16_to_i32(mat4x3_f16[int(0)].x));
+ int v_62 = (v_61 + tint_f16_to_i32(mat4x4_f16[int(0)].x));
+ int v_63 = (v_62 + tint_f32_to_i32(arr2_vec3_f32[int(0)].x));
+ s.Store(0u, asuint((((v_63 + tint_f16_to_i32(arr2_mat4x2_f16[int(0)][int(0)].x)) + struct_inner.scalar_i32) + array_struct_inner[int(0)].scalar_i32)));
}
diff --git a/test/tint/buffer/storage/types/mat2x2_f16.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/storage/types/mat2x2_f16.wgsl.expected.ir.dxc.hlsl
index ab183c0..4128695 100644
--- a/test/tint/buffer/storage/types/mat2x2_f16.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/storage/types/mat2x2_f16.wgsl.expected.ir.dxc.hlsl
@@ -7,8 +7,7 @@
}
matrix<float16_t, 2, 2> v_1(uint offset) {
- vector<float16_t, 2> v_2 = tint_symbol.Load<vector<float16_t, 2> >((offset + 0u));
- return matrix<float16_t, 2, 2>(v_2, tint_symbol.Load<vector<float16_t, 2> >((offset + 4u)));
+ return matrix<float16_t, 2, 2>(tint_symbol.Load<vector<float16_t, 2> >((offset + 0u)), tint_symbol.Load<vector<float16_t, 2> >((offset + 4u)));
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/buffer/storage/types/mat2x2_f32.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/storage/types/mat2x2_f32.wgsl.expected.ir.dxc.hlsl
index 28936e3..4d89edb 100644
--- a/test/tint/buffer/storage/types/mat2x2_f32.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/storage/types/mat2x2_f32.wgsl.expected.ir.dxc.hlsl
@@ -7,8 +7,7 @@
}
float2x2 v_1(uint offset) {
- float2 v_2 = asfloat(tint_symbol.Load2((offset + 0u)));
- return float2x2(v_2, asfloat(tint_symbol.Load2((offset + 8u))));
+ return float2x2(asfloat(tint_symbol.Load2((offset + 0u))), asfloat(tint_symbol.Load2((offset + 8u))));
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/buffer/storage/types/mat2x2_f32.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/storage/types/mat2x2_f32.wgsl.expected.ir.fxc.hlsl
index 28936e3..4d89edb 100644
--- a/test/tint/buffer/storage/types/mat2x2_f32.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/storage/types/mat2x2_f32.wgsl.expected.ir.fxc.hlsl
@@ -7,8 +7,7 @@
}
float2x2 v_1(uint offset) {
- float2 v_2 = asfloat(tint_symbol.Load2((offset + 0u)));
- return float2x2(v_2, asfloat(tint_symbol.Load2((offset + 8u))));
+ return float2x2(asfloat(tint_symbol.Load2((offset + 0u))), asfloat(tint_symbol.Load2((offset + 8u))));
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/buffer/storage/types/mat2x3_f16.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/storage/types/mat2x3_f16.wgsl.expected.ir.dxc.hlsl
index 0da6bf5..76801f8 100644
--- a/test/tint/buffer/storage/types/mat2x3_f16.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/storage/types/mat2x3_f16.wgsl.expected.ir.dxc.hlsl
@@ -7,8 +7,7 @@
}
matrix<float16_t, 2, 3> v_1(uint offset) {
- vector<float16_t, 3> v_2 = tint_symbol.Load<vector<float16_t, 3> >((offset + 0u));
- return matrix<float16_t, 2, 3>(v_2, tint_symbol.Load<vector<float16_t, 3> >((offset + 8u)));
+ return matrix<float16_t, 2, 3>(tint_symbol.Load<vector<float16_t, 3> >((offset + 0u)), tint_symbol.Load<vector<float16_t, 3> >((offset + 8u)));
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/buffer/storage/types/mat2x3_f32.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/storage/types/mat2x3_f32.wgsl.expected.ir.dxc.hlsl
index 4b72eff..c242e1a 100644
--- a/test/tint/buffer/storage/types/mat2x3_f32.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/storage/types/mat2x3_f32.wgsl.expected.ir.dxc.hlsl
@@ -7,8 +7,7 @@
}
float2x3 v_1(uint offset) {
- float3 v_2 = asfloat(tint_symbol.Load3((offset + 0u)));
- return float2x3(v_2, asfloat(tint_symbol.Load3((offset + 16u))));
+ return float2x3(asfloat(tint_symbol.Load3((offset + 0u))), asfloat(tint_symbol.Load3((offset + 16u))));
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/buffer/storage/types/mat2x3_f32.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/storage/types/mat2x3_f32.wgsl.expected.ir.fxc.hlsl
index 4b72eff..c242e1a 100644
--- a/test/tint/buffer/storage/types/mat2x3_f32.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/storage/types/mat2x3_f32.wgsl.expected.ir.fxc.hlsl
@@ -7,8 +7,7 @@
}
float2x3 v_1(uint offset) {
- float3 v_2 = asfloat(tint_symbol.Load3((offset + 0u)));
- return float2x3(v_2, asfloat(tint_symbol.Load3((offset + 16u))));
+ return float2x3(asfloat(tint_symbol.Load3((offset + 0u))), asfloat(tint_symbol.Load3((offset + 16u))));
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/buffer/storage/types/mat2x4_f16.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/storage/types/mat2x4_f16.wgsl.expected.ir.dxc.hlsl
index a813553..bf9c1da 100644
--- a/test/tint/buffer/storage/types/mat2x4_f16.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/storage/types/mat2x4_f16.wgsl.expected.ir.dxc.hlsl
@@ -7,8 +7,7 @@
}
matrix<float16_t, 2, 4> v_1(uint offset) {
- vector<float16_t, 4> v_2 = tint_symbol.Load<vector<float16_t, 4> >((offset + 0u));
- return matrix<float16_t, 2, 4>(v_2, tint_symbol.Load<vector<float16_t, 4> >((offset + 8u)));
+ return matrix<float16_t, 2, 4>(tint_symbol.Load<vector<float16_t, 4> >((offset + 0u)), tint_symbol.Load<vector<float16_t, 4> >((offset + 8u)));
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/buffer/storage/types/mat2x4_f32.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/storage/types/mat2x4_f32.wgsl.expected.ir.dxc.hlsl
index 5c409be..cfd2f60 100644
--- a/test/tint/buffer/storage/types/mat2x4_f32.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/storage/types/mat2x4_f32.wgsl.expected.ir.dxc.hlsl
@@ -7,8 +7,7 @@
}
float2x4 v_1(uint offset) {
- float4 v_2 = asfloat(tint_symbol.Load4((offset + 0u)));
- return float2x4(v_2, asfloat(tint_symbol.Load4((offset + 16u))));
+ return float2x4(asfloat(tint_symbol.Load4((offset + 0u))), asfloat(tint_symbol.Load4((offset + 16u))));
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/buffer/storage/types/mat2x4_f32.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/storage/types/mat2x4_f32.wgsl.expected.ir.fxc.hlsl
index 5c409be..cfd2f60 100644
--- a/test/tint/buffer/storage/types/mat2x4_f32.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/storage/types/mat2x4_f32.wgsl.expected.ir.fxc.hlsl
@@ -7,8 +7,7 @@
}
float2x4 v_1(uint offset) {
- float4 v_2 = asfloat(tint_symbol.Load4((offset + 0u)));
- return float2x4(v_2, asfloat(tint_symbol.Load4((offset + 16u))));
+ return float2x4(asfloat(tint_symbol.Load4((offset + 0u))), asfloat(tint_symbol.Load4((offset + 16u))));
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/buffer/storage/types/mat3x2_f16.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/storage/types/mat3x2_f16.wgsl.expected.ir.dxc.hlsl
index a219be33..fa2d7a6 100644
--- a/test/tint/buffer/storage/types/mat3x2_f16.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/storage/types/mat3x2_f16.wgsl.expected.ir.dxc.hlsl
@@ -8,9 +8,7 @@
}
matrix<float16_t, 3, 2> v_1(uint offset) {
- vector<float16_t, 2> v_2 = tint_symbol.Load<vector<float16_t, 2> >((offset + 0u));
- vector<float16_t, 2> v_3 = tint_symbol.Load<vector<float16_t, 2> >((offset + 4u));
- return matrix<float16_t, 3, 2>(v_2, v_3, tint_symbol.Load<vector<float16_t, 2> >((offset + 8u)));
+ return matrix<float16_t, 3, 2>(tint_symbol.Load<vector<float16_t, 2> >((offset + 0u)), tint_symbol.Load<vector<float16_t, 2> >((offset + 4u)), tint_symbol.Load<vector<float16_t, 2> >((offset + 8u)));
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/buffer/storage/types/mat3x2_f32.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/storage/types/mat3x2_f32.wgsl.expected.ir.dxc.hlsl
index 4342c3a..eae27bd 100644
--- a/test/tint/buffer/storage/types/mat3x2_f32.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/storage/types/mat3x2_f32.wgsl.expected.ir.dxc.hlsl
@@ -8,9 +8,7 @@
}
float3x2 v_1(uint offset) {
- float2 v_2 = asfloat(tint_symbol.Load2((offset + 0u)));
- float2 v_3 = asfloat(tint_symbol.Load2((offset + 8u)));
- return float3x2(v_2, v_3, asfloat(tint_symbol.Load2((offset + 16u))));
+ return float3x2(asfloat(tint_symbol.Load2((offset + 0u))), asfloat(tint_symbol.Load2((offset + 8u))), asfloat(tint_symbol.Load2((offset + 16u))));
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/buffer/storage/types/mat3x2_f32.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/storage/types/mat3x2_f32.wgsl.expected.ir.fxc.hlsl
index 4342c3a..eae27bd 100644
--- a/test/tint/buffer/storage/types/mat3x2_f32.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/storage/types/mat3x2_f32.wgsl.expected.ir.fxc.hlsl
@@ -8,9 +8,7 @@
}
float3x2 v_1(uint offset) {
- float2 v_2 = asfloat(tint_symbol.Load2((offset + 0u)));
- float2 v_3 = asfloat(tint_symbol.Load2((offset + 8u)));
- return float3x2(v_2, v_3, asfloat(tint_symbol.Load2((offset + 16u))));
+ return float3x2(asfloat(tint_symbol.Load2((offset + 0u))), asfloat(tint_symbol.Load2((offset + 8u))), asfloat(tint_symbol.Load2((offset + 16u))));
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/buffer/storage/types/mat3x3_f16.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/storage/types/mat3x3_f16.wgsl.expected.ir.dxc.hlsl
index 7fb84f9..8e4e664 100644
--- a/test/tint/buffer/storage/types/mat3x3_f16.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/storage/types/mat3x3_f16.wgsl.expected.ir.dxc.hlsl
@@ -8,9 +8,7 @@
}
matrix<float16_t, 3, 3> v_1(uint offset) {
- vector<float16_t, 3> v_2 = tint_symbol.Load<vector<float16_t, 3> >((offset + 0u));
- vector<float16_t, 3> v_3 = tint_symbol.Load<vector<float16_t, 3> >((offset + 8u));
- return matrix<float16_t, 3, 3>(v_2, v_3, tint_symbol.Load<vector<float16_t, 3> >((offset + 16u)));
+ return matrix<float16_t, 3, 3>(tint_symbol.Load<vector<float16_t, 3> >((offset + 0u)), tint_symbol.Load<vector<float16_t, 3> >((offset + 8u)), tint_symbol.Load<vector<float16_t, 3> >((offset + 16u)));
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/buffer/storage/types/mat3x3_f32.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/storage/types/mat3x3_f32.wgsl.expected.ir.dxc.hlsl
index 997edce..8d776f3 100644
--- a/test/tint/buffer/storage/types/mat3x3_f32.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/storage/types/mat3x3_f32.wgsl.expected.ir.dxc.hlsl
@@ -8,9 +8,7 @@
}
float3x3 v_1(uint offset) {
- float3 v_2 = asfloat(tint_symbol.Load3((offset + 0u)));
- float3 v_3 = asfloat(tint_symbol.Load3((offset + 16u)));
- return float3x3(v_2, v_3, asfloat(tint_symbol.Load3((offset + 32u))));
+ return float3x3(asfloat(tint_symbol.Load3((offset + 0u))), asfloat(tint_symbol.Load3((offset + 16u))), asfloat(tint_symbol.Load3((offset + 32u))));
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/buffer/storage/types/mat3x3_f32.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/storage/types/mat3x3_f32.wgsl.expected.ir.fxc.hlsl
index 997edce..8d776f3 100644
--- a/test/tint/buffer/storage/types/mat3x3_f32.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/storage/types/mat3x3_f32.wgsl.expected.ir.fxc.hlsl
@@ -8,9 +8,7 @@
}
float3x3 v_1(uint offset) {
- float3 v_2 = asfloat(tint_symbol.Load3((offset + 0u)));
- float3 v_3 = asfloat(tint_symbol.Load3((offset + 16u)));
- return float3x3(v_2, v_3, asfloat(tint_symbol.Load3((offset + 32u))));
+ return float3x3(asfloat(tint_symbol.Load3((offset + 0u))), asfloat(tint_symbol.Load3((offset + 16u))), asfloat(tint_symbol.Load3((offset + 32u))));
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/buffer/storage/types/mat3x4_f16.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/storage/types/mat3x4_f16.wgsl.expected.ir.dxc.hlsl
index 722c7e1..9db569c 100644
--- a/test/tint/buffer/storage/types/mat3x4_f16.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/storage/types/mat3x4_f16.wgsl.expected.ir.dxc.hlsl
@@ -8,9 +8,7 @@
}
matrix<float16_t, 3, 4> v_1(uint offset) {
- vector<float16_t, 4> v_2 = tint_symbol.Load<vector<float16_t, 4> >((offset + 0u));
- vector<float16_t, 4> v_3 = tint_symbol.Load<vector<float16_t, 4> >((offset + 8u));
- return matrix<float16_t, 3, 4>(v_2, v_3, tint_symbol.Load<vector<float16_t, 4> >((offset + 16u)));
+ return matrix<float16_t, 3, 4>(tint_symbol.Load<vector<float16_t, 4> >((offset + 0u)), tint_symbol.Load<vector<float16_t, 4> >((offset + 8u)), tint_symbol.Load<vector<float16_t, 4> >((offset + 16u)));
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/buffer/storage/types/mat3x4_f32.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/storage/types/mat3x4_f32.wgsl.expected.ir.dxc.hlsl
index 5fc4800..2db87f2 100644
--- a/test/tint/buffer/storage/types/mat3x4_f32.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/storage/types/mat3x4_f32.wgsl.expected.ir.dxc.hlsl
@@ -8,9 +8,7 @@
}
float3x4 v_1(uint offset) {
- float4 v_2 = asfloat(tint_symbol.Load4((offset + 0u)));
- float4 v_3 = asfloat(tint_symbol.Load4((offset + 16u)));
- return float3x4(v_2, v_3, asfloat(tint_symbol.Load4((offset + 32u))));
+ return float3x4(asfloat(tint_symbol.Load4((offset + 0u))), asfloat(tint_symbol.Load4((offset + 16u))), asfloat(tint_symbol.Load4((offset + 32u))));
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/buffer/storage/types/mat3x4_f32.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/storage/types/mat3x4_f32.wgsl.expected.ir.fxc.hlsl
index 5fc4800..2db87f2 100644
--- a/test/tint/buffer/storage/types/mat3x4_f32.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/storage/types/mat3x4_f32.wgsl.expected.ir.fxc.hlsl
@@ -8,9 +8,7 @@
}
float3x4 v_1(uint offset) {
- float4 v_2 = asfloat(tint_symbol.Load4((offset + 0u)));
- float4 v_3 = asfloat(tint_symbol.Load4((offset + 16u)));
- return float3x4(v_2, v_3, asfloat(tint_symbol.Load4((offset + 32u))));
+ return float3x4(asfloat(tint_symbol.Load4((offset + 0u))), asfloat(tint_symbol.Load4((offset + 16u))), asfloat(tint_symbol.Load4((offset + 32u))));
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/buffer/storage/types/mat4x2_f16.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/storage/types/mat4x2_f16.wgsl.expected.ir.dxc.hlsl
index 39fa6b6..224310a 100644
--- a/test/tint/buffer/storage/types/mat4x2_f16.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/storage/types/mat4x2_f16.wgsl.expected.ir.dxc.hlsl
@@ -9,10 +9,7 @@
}
matrix<float16_t, 4, 2> v_1(uint offset) {
- vector<float16_t, 2> v_2 = tint_symbol.Load<vector<float16_t, 2> >((offset + 0u));
- vector<float16_t, 2> v_3 = tint_symbol.Load<vector<float16_t, 2> >((offset + 4u));
- vector<float16_t, 2> v_4 = tint_symbol.Load<vector<float16_t, 2> >((offset + 8u));
- return matrix<float16_t, 4, 2>(v_2, v_3, v_4, tint_symbol.Load<vector<float16_t, 2> >((offset + 12u)));
+ return matrix<float16_t, 4, 2>(tint_symbol.Load<vector<float16_t, 2> >((offset + 0u)), tint_symbol.Load<vector<float16_t, 2> >((offset + 4u)), tint_symbol.Load<vector<float16_t, 2> >((offset + 8u)), tint_symbol.Load<vector<float16_t, 2> >((offset + 12u)));
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/buffer/storage/types/mat4x2_f32.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/storage/types/mat4x2_f32.wgsl.expected.ir.dxc.hlsl
index d6b4b8d..6b287b6 100644
--- a/test/tint/buffer/storage/types/mat4x2_f32.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/storage/types/mat4x2_f32.wgsl.expected.ir.dxc.hlsl
@@ -9,10 +9,7 @@
}
float4x2 v_1(uint offset) {
- float2 v_2 = asfloat(tint_symbol.Load2((offset + 0u)));
- float2 v_3 = asfloat(tint_symbol.Load2((offset + 8u)));
- float2 v_4 = asfloat(tint_symbol.Load2((offset + 16u)));
- return float4x2(v_2, v_3, v_4, asfloat(tint_symbol.Load2((offset + 24u))));
+ return float4x2(asfloat(tint_symbol.Load2((offset + 0u))), asfloat(tint_symbol.Load2((offset + 8u))), asfloat(tint_symbol.Load2((offset + 16u))), asfloat(tint_symbol.Load2((offset + 24u))));
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/buffer/storage/types/mat4x2_f32.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/storage/types/mat4x2_f32.wgsl.expected.ir.fxc.hlsl
index d6b4b8d..6b287b6 100644
--- a/test/tint/buffer/storage/types/mat4x2_f32.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/storage/types/mat4x2_f32.wgsl.expected.ir.fxc.hlsl
@@ -9,10 +9,7 @@
}
float4x2 v_1(uint offset) {
- float2 v_2 = asfloat(tint_symbol.Load2((offset + 0u)));
- float2 v_3 = asfloat(tint_symbol.Load2((offset + 8u)));
- float2 v_4 = asfloat(tint_symbol.Load2((offset + 16u)));
- return float4x2(v_2, v_3, v_4, asfloat(tint_symbol.Load2((offset + 24u))));
+ return float4x2(asfloat(tint_symbol.Load2((offset + 0u))), asfloat(tint_symbol.Load2((offset + 8u))), asfloat(tint_symbol.Load2((offset + 16u))), asfloat(tint_symbol.Load2((offset + 24u))));
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/buffer/storage/types/mat4x3_f16.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/storage/types/mat4x3_f16.wgsl.expected.ir.dxc.hlsl
index 0f2b3b0..af15e1a 100644
--- a/test/tint/buffer/storage/types/mat4x3_f16.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/storage/types/mat4x3_f16.wgsl.expected.ir.dxc.hlsl
@@ -9,10 +9,7 @@
}
matrix<float16_t, 4, 3> v_1(uint offset) {
- vector<float16_t, 3> v_2 = tint_symbol.Load<vector<float16_t, 3> >((offset + 0u));
- vector<float16_t, 3> v_3 = tint_symbol.Load<vector<float16_t, 3> >((offset + 8u));
- vector<float16_t, 3> v_4 = tint_symbol.Load<vector<float16_t, 3> >((offset + 16u));
- return matrix<float16_t, 4, 3>(v_2, v_3, v_4, tint_symbol.Load<vector<float16_t, 3> >((offset + 24u)));
+ return matrix<float16_t, 4, 3>(tint_symbol.Load<vector<float16_t, 3> >((offset + 0u)), tint_symbol.Load<vector<float16_t, 3> >((offset + 8u)), tint_symbol.Load<vector<float16_t, 3> >((offset + 16u)), tint_symbol.Load<vector<float16_t, 3> >((offset + 24u)));
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/buffer/storage/types/mat4x3_f32.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/storage/types/mat4x3_f32.wgsl.expected.ir.dxc.hlsl
index 4c18cac..f8500f6 100644
--- a/test/tint/buffer/storage/types/mat4x3_f32.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/storage/types/mat4x3_f32.wgsl.expected.ir.dxc.hlsl
@@ -9,10 +9,7 @@
}
float4x3 v_1(uint offset) {
- float3 v_2 = asfloat(tint_symbol.Load3((offset + 0u)));
- float3 v_3 = asfloat(tint_symbol.Load3((offset + 16u)));
- float3 v_4 = asfloat(tint_symbol.Load3((offset + 32u)));
- return float4x3(v_2, v_3, v_4, asfloat(tint_symbol.Load3((offset + 48u))));
+ return float4x3(asfloat(tint_symbol.Load3((offset + 0u))), asfloat(tint_symbol.Load3((offset + 16u))), asfloat(tint_symbol.Load3((offset + 32u))), asfloat(tint_symbol.Load3((offset + 48u))));
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/buffer/storage/types/mat4x3_f32.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/storage/types/mat4x3_f32.wgsl.expected.ir.fxc.hlsl
index 4c18cac..f8500f6 100644
--- a/test/tint/buffer/storage/types/mat4x3_f32.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/storage/types/mat4x3_f32.wgsl.expected.ir.fxc.hlsl
@@ -9,10 +9,7 @@
}
float4x3 v_1(uint offset) {
- float3 v_2 = asfloat(tint_symbol.Load3((offset + 0u)));
- float3 v_3 = asfloat(tint_symbol.Load3((offset + 16u)));
- float3 v_4 = asfloat(tint_symbol.Load3((offset + 32u)));
- return float4x3(v_2, v_3, v_4, asfloat(tint_symbol.Load3((offset + 48u))));
+ return float4x3(asfloat(tint_symbol.Load3((offset + 0u))), asfloat(tint_symbol.Load3((offset + 16u))), asfloat(tint_symbol.Load3((offset + 32u))), asfloat(tint_symbol.Load3((offset + 48u))));
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/buffer/storage/types/mat4x4_f16.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/storage/types/mat4x4_f16.wgsl.expected.ir.dxc.hlsl
index e405c07..9da60e8 100644
--- a/test/tint/buffer/storage/types/mat4x4_f16.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/storage/types/mat4x4_f16.wgsl.expected.ir.dxc.hlsl
@@ -9,10 +9,7 @@
}
matrix<float16_t, 4, 4> v_1(uint offset) {
- vector<float16_t, 4> v_2 = tint_symbol.Load<vector<float16_t, 4> >((offset + 0u));
- vector<float16_t, 4> v_3 = tint_symbol.Load<vector<float16_t, 4> >((offset + 8u));
- vector<float16_t, 4> v_4 = tint_symbol.Load<vector<float16_t, 4> >((offset + 16u));
- return matrix<float16_t, 4, 4>(v_2, v_3, v_4, tint_symbol.Load<vector<float16_t, 4> >((offset + 24u)));
+ return matrix<float16_t, 4, 4>(tint_symbol.Load<vector<float16_t, 4> >((offset + 0u)), tint_symbol.Load<vector<float16_t, 4> >((offset + 8u)), tint_symbol.Load<vector<float16_t, 4> >((offset + 16u)), tint_symbol.Load<vector<float16_t, 4> >((offset + 24u)));
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/buffer/storage/types/mat4x4_f32.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/storage/types/mat4x4_f32.wgsl.expected.ir.dxc.hlsl
index 44368b3..d49fe00 100644
--- a/test/tint/buffer/storage/types/mat4x4_f32.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/storage/types/mat4x4_f32.wgsl.expected.ir.dxc.hlsl
@@ -9,10 +9,7 @@
}
float4x4 v_1(uint offset) {
- float4 v_2 = asfloat(tint_symbol.Load4((offset + 0u)));
- float4 v_3 = asfloat(tint_symbol.Load4((offset + 16u)));
- float4 v_4 = asfloat(tint_symbol.Load4((offset + 32u)));
- return float4x4(v_2, v_3, v_4, asfloat(tint_symbol.Load4((offset + 48u))));
+ return float4x4(asfloat(tint_symbol.Load4((offset + 0u))), asfloat(tint_symbol.Load4((offset + 16u))), asfloat(tint_symbol.Load4((offset + 32u))), asfloat(tint_symbol.Load4((offset + 48u))));
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/buffer/storage/types/mat4x4_f32.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/storage/types/mat4x4_f32.wgsl.expected.ir.fxc.hlsl
index 44368b3..d49fe00 100644
--- a/test/tint/buffer/storage/types/mat4x4_f32.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/storage/types/mat4x4_f32.wgsl.expected.ir.fxc.hlsl
@@ -9,10 +9,7 @@
}
float4x4 v_1(uint offset) {
- float4 v_2 = asfloat(tint_symbol.Load4((offset + 0u)));
- float4 v_3 = asfloat(tint_symbol.Load4((offset + 16u)));
- float4 v_4 = asfloat(tint_symbol.Load4((offset + 32u)));
- return float4x4(v_2, v_3, v_4, asfloat(tint_symbol.Load4((offset + 48u))));
+ return float4x4(asfloat(tint_symbol.Load4((offset + 0u))), asfloat(tint_symbol.Load4((offset + 16u))), asfloat(tint_symbol.Load4((offset + 32u))), asfloat(tint_symbol.Load4((offset + 48u))));
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/buffer/storage/types/struct_f16.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/storage/types/struct_f16.wgsl.expected.ir.dxc.hlsl
index 3838fe6..5491901 100644
--- a/test/tint/buffer/storage/types/struct_f16.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/storage/types/struct_f16.wgsl.expected.ir.dxc.hlsl
@@ -28,26 +28,25 @@
}
matrix<float16_t, 2, 4> v_4(uint offset) {
- vector<float16_t, 4> v_5 = tint_symbol.Load<vector<float16_t, 4> >((offset + 0u));
- return matrix<float16_t, 2, 4>(v_5, tint_symbol.Load<vector<float16_t, 4> >((offset + 8u)));
+ return matrix<float16_t, 2, 4>(tint_symbol.Load<vector<float16_t, 4> >((offset + 0u)), tint_symbol.Load<vector<float16_t, 4> >((offset + 8u)));
}
-Inner v_6(uint offset) {
- float16_t v_7 = tint_symbol.Load<float16_t>((offset + 0u));
- vector<float16_t, 3> v_8 = tint_symbol.Load<vector<float16_t, 3> >((offset + 8u));
- Inner v_9 = {v_7, v_8, v_4((offset + 16u))};
- return v_9;
+Inner v_5(uint offset) {
+ float16_t v_6 = tint_symbol.Load<float16_t>((offset + 0u));
+ vector<float16_t, 3> v_7 = tint_symbol.Load<vector<float16_t, 3> >((offset + 8u));
+ Inner v_8 = {v_6, v_7, v_4((offset + 16u))};
+ return v_8;
}
-S v_10(uint offset) {
- Inner v_11 = v_6((offset + 0u));
- S v_12 = {v_11};
- return v_12;
+S v_9(uint offset) {
+ Inner v_10 = v_5((offset + 0u));
+ S v_11 = {v_10};
+ return v_11;
}
[numthreads(1, 1, 1)]
void main() {
- S t = v_10(0u);
+ S t = v_9(0u);
v_2(0u, t);
}
diff --git a/test/tint/buffer/storage/types/struct_f32.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/storage/types/struct_f32.wgsl.expected.ir.dxc.hlsl
index b2b0546..1570d67 100644
--- a/test/tint/buffer/storage/types/struct_f32.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/storage/types/struct_f32.wgsl.expected.ir.dxc.hlsl
@@ -28,26 +28,25 @@
}
float2x4 v_4(uint offset) {
- float4 v_5 = asfloat(tint_symbol.Load4((offset + 0u)));
- return float2x4(v_5, asfloat(tint_symbol.Load4((offset + 16u))));
+ return float2x4(asfloat(tint_symbol.Load4((offset + 0u))), asfloat(tint_symbol.Load4((offset + 16u))));
}
-Inner v_6(uint offset) {
- float v_7 = asfloat(tint_symbol.Load((offset + 0u)));
- float3 v_8 = asfloat(tint_symbol.Load3((offset + 16u)));
- Inner v_9 = {v_7, v_8, v_4((offset + 32u))};
- return v_9;
+Inner v_5(uint offset) {
+ float v_6 = asfloat(tint_symbol.Load((offset + 0u)));
+ float3 v_7 = asfloat(tint_symbol.Load3((offset + 16u)));
+ Inner v_8 = {v_6, v_7, v_4((offset + 32u))};
+ return v_8;
}
-S v_10(uint offset) {
- Inner v_11 = v_6((offset + 0u));
- S v_12 = {v_11};
- return v_12;
+S v_9(uint offset) {
+ Inner v_10 = v_5((offset + 0u));
+ S v_11 = {v_10};
+ return v_11;
}
[numthreads(1, 1, 1)]
void main() {
- S t = v_10(0u);
+ S t = v_9(0u);
v_2(0u, t);
}
diff --git a/test/tint/buffer/storage/types/struct_f32.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/storage/types/struct_f32.wgsl.expected.ir.fxc.hlsl
index b2b0546..1570d67 100644
--- a/test/tint/buffer/storage/types/struct_f32.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/storage/types/struct_f32.wgsl.expected.ir.fxc.hlsl
@@ -28,26 +28,25 @@
}
float2x4 v_4(uint offset) {
- float4 v_5 = asfloat(tint_symbol.Load4((offset + 0u)));
- return float2x4(v_5, asfloat(tint_symbol.Load4((offset + 16u))));
+ return float2x4(asfloat(tint_symbol.Load4((offset + 0u))), asfloat(tint_symbol.Load4((offset + 16u))));
}
-Inner v_6(uint offset) {
- float v_7 = asfloat(tint_symbol.Load((offset + 0u)));
- float3 v_8 = asfloat(tint_symbol.Load3((offset + 16u)));
- Inner v_9 = {v_7, v_8, v_4((offset + 32u))};
- return v_9;
+Inner v_5(uint offset) {
+ float v_6 = asfloat(tint_symbol.Load((offset + 0u)));
+ float3 v_7 = asfloat(tint_symbol.Load3((offset + 16u)));
+ Inner v_8 = {v_6, v_7, v_4((offset + 32u))};
+ return v_8;
}
-S v_10(uint offset) {
- Inner v_11 = v_6((offset + 0u));
- S v_12 = {v_11};
- return v_12;
+S v_9(uint offset) {
+ Inner v_10 = v_5((offset + 0u));
+ S v_11 = {v_10};
+ return v_11;
}
[numthreads(1, 1, 1)]
void main() {
- S t = v_10(0u);
+ S t = v_9(0u);
v_2(0u, t);
}
diff --git a/test/tint/buffer/uniform/dynamic_index/read.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/uniform/dynamic_index/read.wgsl.expected.ir.dxc.hlsl
index 36a4766..f4360e4 100644
--- a/test/tint/buffer/uniform/dynamic_index/read.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/uniform/dynamic_index/read.wgsl.expected.ir.dxc.hlsl
@@ -34,124 +34,112 @@
}
float4x4 v_4(uint start_byte_offset) {
- float4 v_5 = asfloat(ub[(start_byte_offset / 16u)]);
- float4 v_6 = asfloat(ub[((16u + start_byte_offset) / 16u)]);
- float4 v_7 = asfloat(ub[((32u + start_byte_offset) / 16u)]);
- return float4x4(v_5, v_6, v_7, asfloat(ub[((48u + start_byte_offset) / 16u)]));
+ return float4x4(asfloat(ub[(start_byte_offset / 16u)]), asfloat(ub[((16u + start_byte_offset) / 16u)]), asfloat(ub[((32u + start_byte_offset) / 16u)]), asfloat(ub[((48u + start_byte_offset) / 16u)]));
}
-float4x3 v_8(uint start_byte_offset) {
- float3 v_9 = asfloat(ub[(start_byte_offset / 16u)].xyz);
- float3 v_10 = asfloat(ub[((16u + start_byte_offset) / 16u)].xyz);
- float3 v_11 = asfloat(ub[((32u + start_byte_offset) / 16u)].xyz);
- return float4x3(v_9, v_10, v_11, asfloat(ub[((48u + start_byte_offset) / 16u)].xyz));
+float4x3 v_5(uint start_byte_offset) {
+ return float4x3(asfloat(ub[(start_byte_offset / 16u)].xyz), asfloat(ub[((16u + start_byte_offset) / 16u)].xyz), asfloat(ub[((32u + start_byte_offset) / 16u)].xyz), asfloat(ub[((48u + start_byte_offset) / 16u)].xyz));
}
-float4x2 v_12(uint start_byte_offset) {
- uint4 v_13 = ub[(start_byte_offset / 16u)];
- float2 v_14 = asfloat((((((start_byte_offset % 16u) / 4u) == 2u)) ? (v_13.zw) : (v_13.xy)));
- uint4 v_15 = ub[((8u + start_byte_offset) / 16u)];
- float2 v_16 = asfloat(((((((8u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_15.zw) : (v_15.xy)));
- uint4 v_17 = ub[((16u + start_byte_offset) / 16u)];
- float2 v_18 = asfloat(((((((16u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_17.zw) : (v_17.xy)));
- uint4 v_19 = ub[((24u + start_byte_offset) / 16u)];
- return float4x2(v_14, v_16, v_18, asfloat(((((((24u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_19.zw) : (v_19.xy))));
+float4x2 v_6(uint start_byte_offset) {
+ uint4 v_7 = ub[(start_byte_offset / 16u)];
+ float2 v_8 = asfloat((((((start_byte_offset % 16u) / 4u) == 2u)) ? (v_7.zw) : (v_7.xy)));
+ uint4 v_9 = ub[((8u + start_byte_offset) / 16u)];
+ float2 v_10 = asfloat(((((((8u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_9.zw) : (v_9.xy)));
+ uint4 v_11 = ub[((16u + start_byte_offset) / 16u)];
+ float2 v_12 = asfloat(((((((16u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_11.zw) : (v_11.xy)));
+ uint4 v_13 = ub[((24u + start_byte_offset) / 16u)];
+ return float4x2(v_8, v_10, v_12, asfloat(((((((24u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_13.zw) : (v_13.xy))));
}
-float3x4 v_20(uint start_byte_offset) {
- float4 v_21 = asfloat(ub[(start_byte_offset / 16u)]);
- float4 v_22 = asfloat(ub[((16u + start_byte_offset) / 16u)]);
- return float3x4(v_21, v_22, asfloat(ub[((32u + start_byte_offset) / 16u)]));
+float3x4 v_14(uint start_byte_offset) {
+ return float3x4(asfloat(ub[(start_byte_offset / 16u)]), asfloat(ub[((16u + start_byte_offset) / 16u)]), asfloat(ub[((32u + start_byte_offset) / 16u)]));
}
-float3x3 v_23(uint start_byte_offset) {
- float3 v_24 = asfloat(ub[(start_byte_offset / 16u)].xyz);
- float3 v_25 = asfloat(ub[((16u + start_byte_offset) / 16u)].xyz);
- return float3x3(v_24, v_25, asfloat(ub[((32u + start_byte_offset) / 16u)].xyz));
+float3x3 v_15(uint start_byte_offset) {
+ return float3x3(asfloat(ub[(start_byte_offset / 16u)].xyz), asfloat(ub[((16u + start_byte_offset) / 16u)].xyz), asfloat(ub[((32u + start_byte_offset) / 16u)].xyz));
}
-float3x2 v_26(uint start_byte_offset) {
- uint4 v_27 = ub[(start_byte_offset / 16u)];
- float2 v_28 = asfloat((((((start_byte_offset % 16u) / 4u) == 2u)) ? (v_27.zw) : (v_27.xy)));
- uint4 v_29 = ub[((8u + start_byte_offset) / 16u)];
- float2 v_30 = asfloat(((((((8u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_29.zw) : (v_29.xy)));
- uint4 v_31 = ub[((16u + start_byte_offset) / 16u)];
- return float3x2(v_28, v_30, asfloat(((((((16u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_31.zw) : (v_31.xy))));
+float3x2 v_16(uint start_byte_offset) {
+ uint4 v_17 = ub[(start_byte_offset / 16u)];
+ float2 v_18 = asfloat((((((start_byte_offset % 16u) / 4u) == 2u)) ? (v_17.zw) : (v_17.xy)));
+ uint4 v_19 = ub[((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 = ub[((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))));
}
-float2x4 v_32(uint start_byte_offset) {
- float4 v_33 = asfloat(ub[(start_byte_offset / 16u)]);
- return float2x4(v_33, asfloat(ub[((16u + start_byte_offset) / 16u)]));
+float2x4 v_22(uint start_byte_offset) {
+ return float2x4(asfloat(ub[(start_byte_offset / 16u)]), asfloat(ub[((16u + start_byte_offset) / 16u)]));
}
-float2x3 v_34(uint start_byte_offset) {
- float3 v_35 = asfloat(ub[(start_byte_offset / 16u)].xyz);
- return float2x3(v_35, asfloat(ub[((16u + start_byte_offset) / 16u)].xyz));
+float2x3 v_23(uint start_byte_offset) {
+ return float2x3(asfloat(ub[(start_byte_offset / 16u)].xyz), asfloat(ub[((16u + start_byte_offset) / 16u)].xyz));
}
-float2x2 v_36(uint start_byte_offset) {
- uint4 v_37 = ub[(start_byte_offset / 16u)];
- float2 v_38 = asfloat((((((start_byte_offset % 16u) / 4u) == 2u)) ? (v_37.zw) : (v_37.xy)));
- uint4 v_39 = ub[((8u + start_byte_offset) / 16u)];
- return float2x2(v_38, asfloat(((((((8u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_39.zw) : (v_39.xy))));
+float2x2 v_24(uint start_byte_offset) {
+ uint4 v_25 = ub[(start_byte_offset / 16u)];
+ float2 v_26 = asfloat((((((start_byte_offset % 16u) / 4u) == 2u)) ? (v_25.zw) : (v_25.xy)));
+ uint4 v_27 = ub[((8u + start_byte_offset) / 16u)];
+ return float2x2(v_26, asfloat(((((((8u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_27.zw) : (v_27.xy))));
}
void main_inner(uint idx) {
- uint v_40 = (544u * uint(idx));
- float scalar_f32 = asfloat(ub[(v_40 / 16u)][((v_40 % 16u) / 4u)]);
- uint v_41 = (4u + (544u * uint(idx)));
- int scalar_i32 = asint(ub[(v_41 / 16u)][((v_41 % 16u) / 4u)]);
- uint v_42 = (8u + (544u * uint(idx)));
- uint scalar_u32 = ub[(v_42 / 16u)][((v_42 % 16u) / 4u)];
- uint v_43 = (16u + (544u * uint(idx)));
- uint4 v_44 = ub[(v_43 / 16u)];
- float2 vec2_f32 = asfloat((((((v_43 % 16u) / 4u) == 2u)) ? (v_44.zw) : (v_44.xy)));
- uint v_45 = (24u + (544u * uint(idx)));
- uint4 v_46 = ub[(v_45 / 16u)];
- int2 vec2_i32 = asint((((((v_45 % 16u) / 4u) == 2u)) ? (v_46.zw) : (v_46.xy)));
- uint v_47 = (32u + (544u * uint(idx)));
- uint4 v_48 = ub[(v_47 / 16u)];
- uint2 vec2_u32 = (((((v_47 % 16u) / 4u) == 2u)) ? (v_48.zw) : (v_48.xy));
- uint v_49 = ((48u + (544u * uint(idx))) / 16u);
- float3 vec3_f32 = asfloat(ub[v_49].xyz);
- uint v_50 = ((64u + (544u * uint(idx))) / 16u);
- int3 vec3_i32 = asint(ub[v_50].xyz);
- uint v_51 = ((80u + (544u * uint(idx))) / 16u);
- uint3 vec3_u32 = ub[v_51].xyz;
- uint v_52 = ((96u + (544u * uint(idx))) / 16u);
- float4 vec4_f32 = asfloat(ub[v_52]);
- uint v_53 = ((112u + (544u * uint(idx))) / 16u);
- int4 vec4_i32 = asint(ub[v_53]);
- uint v_54 = ((128u + (544u * uint(idx))) / 16u);
- uint4 vec4_u32 = ub[v_54];
- float2x2 mat2x2_f32 = v_36((144u + (544u * uint(idx))));
- float2x3 mat2x3_f32 = v_34((160u + (544u * uint(idx))));
- float2x4 mat2x4_f32 = v_32((192u + (544u * uint(idx))));
- float3x2 mat3x2_f32 = v_26((224u + (544u * uint(idx))));
- float3x3 mat3x3_f32 = v_23((256u + (544u * uint(idx))));
- float3x4 mat3x4_f32 = v_20((304u + (544u * uint(idx))));
- float4x2 mat4x2_f32 = v_12((352u + (544u * uint(idx))));
- float4x3 mat4x3_f32 = v_8((384u + (544u * uint(idx))));
+ uint v_28 = (544u * uint(idx));
+ float scalar_f32 = asfloat(ub[(v_28 / 16u)][((v_28 % 16u) / 4u)]);
+ uint v_29 = (4u + (544u * uint(idx)));
+ int scalar_i32 = asint(ub[(v_29 / 16u)][((v_29 % 16u) / 4u)]);
+ uint v_30 = (8u + (544u * uint(idx)));
+ uint scalar_u32 = ub[(v_30 / 16u)][((v_30 % 16u) / 4u)];
+ uint v_31 = (16u + (544u * uint(idx)));
+ uint4 v_32 = ub[(v_31 / 16u)];
+ float2 vec2_f32 = asfloat((((((v_31 % 16u) / 4u) == 2u)) ? (v_32.zw) : (v_32.xy)));
+ uint v_33 = (24u + (544u * uint(idx)));
+ uint4 v_34 = ub[(v_33 / 16u)];
+ int2 vec2_i32 = asint((((((v_33 % 16u) / 4u) == 2u)) ? (v_34.zw) : (v_34.xy)));
+ uint v_35 = (32u + (544u * uint(idx)));
+ uint4 v_36 = ub[(v_35 / 16u)];
+ uint2 vec2_u32 = (((((v_35 % 16u) / 4u) == 2u)) ? (v_36.zw) : (v_36.xy));
+ uint v_37 = ((48u + (544u * uint(idx))) / 16u);
+ float3 vec3_f32 = asfloat(ub[v_37].xyz);
+ uint v_38 = ((64u + (544u * uint(idx))) / 16u);
+ int3 vec3_i32 = asint(ub[v_38].xyz);
+ uint v_39 = ((80u + (544u * uint(idx))) / 16u);
+ uint3 vec3_u32 = ub[v_39].xyz;
+ uint v_40 = ((96u + (544u * uint(idx))) / 16u);
+ float4 vec4_f32 = asfloat(ub[v_40]);
+ uint v_41 = ((112u + (544u * uint(idx))) / 16u);
+ int4 vec4_i32 = asint(ub[v_41]);
+ uint v_42 = ((128u + (544u * uint(idx))) / 16u);
+ uint4 vec4_u32 = ub[v_42];
+ float2x2 mat2x2_f32 = v_24((144u + (544u * uint(idx))));
+ float2x3 mat2x3_f32 = v_23((160u + (544u * uint(idx))));
+ float2x4 mat2x4_f32 = v_22((192u + (544u * uint(idx))));
+ float3x2 mat3x2_f32 = v_16((224u + (544u * uint(idx))));
+ float3x3 mat3x3_f32 = v_15((256u + (544u * uint(idx))));
+ float3x4 mat3x4_f32 = v_14((304u + (544u * uint(idx))));
+ float4x2 mat4x2_f32 = v_6((352u + (544u * uint(idx))));
+ float4x3 mat4x3_f32 = v_5((384u + (544u * uint(idx))));
float4x4 mat4x4_f32 = v_4((448u + (544u * uint(idx))));
float3 arr2_vec3_f32[2] = v((512u + (544u * uint(idx))));
- int v_55 = (tint_f32_to_i32(scalar_f32) + scalar_i32);
- int v_56 = (v_55 + int(scalar_u32));
- int v_57 = ((v_56 + tint_f32_to_i32(vec2_f32.x)) + vec2_i32.x);
- int v_58 = (v_57 + int(vec2_u32.x));
- int v_59 = ((v_58 + tint_f32_to_i32(vec3_f32.y)) + vec3_i32.y);
- int v_60 = (v_59 + int(vec3_u32.y));
- int v_61 = ((v_60 + tint_f32_to_i32(vec4_f32.z)) + vec4_i32.z);
- int v_62 = (v_61 + int(vec4_u32.z));
- int v_63 = (v_62 + tint_f32_to_i32(mat2x2_f32[int(0)].x));
- int v_64 = (v_63 + tint_f32_to_i32(mat2x3_f32[int(0)].x));
- int v_65 = (v_64 + tint_f32_to_i32(mat2x4_f32[int(0)].x));
- int v_66 = (v_65 + tint_f32_to_i32(mat3x2_f32[int(0)].x));
- int v_67 = (v_66 + tint_f32_to_i32(mat3x3_f32[int(0)].x));
- int v_68 = (v_67 + tint_f32_to_i32(mat3x4_f32[int(0)].x));
- int v_69 = (v_68 + tint_f32_to_i32(mat4x2_f32[int(0)].x));
- int v_70 = (v_69 + tint_f32_to_i32(mat4x3_f32[int(0)].x));
- int v_71 = (v_70 + tint_f32_to_i32(mat4x4_f32[int(0)].x));
- s.Store(0u, asuint((v_71 + tint_f32_to_i32(arr2_vec3_f32[int(0)].x))));
+ int v_43 = (tint_f32_to_i32(scalar_f32) + scalar_i32);
+ int v_44 = (v_43 + int(scalar_u32));
+ int v_45 = ((v_44 + tint_f32_to_i32(vec2_f32.x)) + vec2_i32.x);
+ int v_46 = (v_45 + int(vec2_u32.x));
+ int v_47 = ((v_46 + tint_f32_to_i32(vec3_f32.y)) + vec3_i32.y);
+ int v_48 = (v_47 + int(vec3_u32.y));
+ int v_49 = ((v_48 + tint_f32_to_i32(vec4_f32.z)) + vec4_i32.z);
+ int v_50 = (v_49 + int(vec4_u32.z));
+ int v_51 = (v_50 + tint_f32_to_i32(mat2x2_f32[int(0)].x));
+ int v_52 = (v_51 + tint_f32_to_i32(mat2x3_f32[int(0)].x));
+ int v_53 = (v_52 + tint_f32_to_i32(mat2x4_f32[int(0)].x));
+ int v_54 = (v_53 + tint_f32_to_i32(mat3x2_f32[int(0)].x));
+ int v_55 = (v_54 + tint_f32_to_i32(mat3x3_f32[int(0)].x));
+ int v_56 = (v_55 + tint_f32_to_i32(mat3x4_f32[int(0)].x));
+ int v_57 = (v_56 + tint_f32_to_i32(mat4x2_f32[int(0)].x));
+ int v_58 = (v_57 + tint_f32_to_i32(mat4x3_f32[int(0)].x));
+ int v_59 = (v_58 + tint_f32_to_i32(mat4x4_f32[int(0)].x));
+ s.Store(0u, asuint((v_59 + tint_f32_to_i32(arr2_vec3_f32[int(0)].x))));
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/buffer/uniform/dynamic_index/read.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/uniform/dynamic_index/read.wgsl.expected.ir.fxc.hlsl
index 36a4766..f4360e4 100644
--- a/test/tint/buffer/uniform/dynamic_index/read.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/uniform/dynamic_index/read.wgsl.expected.ir.fxc.hlsl
@@ -34,124 +34,112 @@
}
float4x4 v_4(uint start_byte_offset) {
- float4 v_5 = asfloat(ub[(start_byte_offset / 16u)]);
- float4 v_6 = asfloat(ub[((16u + start_byte_offset) / 16u)]);
- float4 v_7 = asfloat(ub[((32u + start_byte_offset) / 16u)]);
- return float4x4(v_5, v_6, v_7, asfloat(ub[((48u + start_byte_offset) / 16u)]));
+ return float4x4(asfloat(ub[(start_byte_offset / 16u)]), asfloat(ub[((16u + start_byte_offset) / 16u)]), asfloat(ub[((32u + start_byte_offset) / 16u)]), asfloat(ub[((48u + start_byte_offset) / 16u)]));
}
-float4x3 v_8(uint start_byte_offset) {
- float3 v_9 = asfloat(ub[(start_byte_offset / 16u)].xyz);
- float3 v_10 = asfloat(ub[((16u + start_byte_offset) / 16u)].xyz);
- float3 v_11 = asfloat(ub[((32u + start_byte_offset) / 16u)].xyz);
- return float4x3(v_9, v_10, v_11, asfloat(ub[((48u + start_byte_offset) / 16u)].xyz));
+float4x3 v_5(uint start_byte_offset) {
+ return float4x3(asfloat(ub[(start_byte_offset / 16u)].xyz), asfloat(ub[((16u + start_byte_offset) / 16u)].xyz), asfloat(ub[((32u + start_byte_offset) / 16u)].xyz), asfloat(ub[((48u + start_byte_offset) / 16u)].xyz));
}
-float4x2 v_12(uint start_byte_offset) {
- uint4 v_13 = ub[(start_byte_offset / 16u)];
- float2 v_14 = asfloat((((((start_byte_offset % 16u) / 4u) == 2u)) ? (v_13.zw) : (v_13.xy)));
- uint4 v_15 = ub[((8u + start_byte_offset) / 16u)];
- float2 v_16 = asfloat(((((((8u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_15.zw) : (v_15.xy)));
- uint4 v_17 = ub[((16u + start_byte_offset) / 16u)];
- float2 v_18 = asfloat(((((((16u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_17.zw) : (v_17.xy)));
- uint4 v_19 = ub[((24u + start_byte_offset) / 16u)];
- return float4x2(v_14, v_16, v_18, asfloat(((((((24u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_19.zw) : (v_19.xy))));
+float4x2 v_6(uint start_byte_offset) {
+ uint4 v_7 = ub[(start_byte_offset / 16u)];
+ float2 v_8 = asfloat((((((start_byte_offset % 16u) / 4u) == 2u)) ? (v_7.zw) : (v_7.xy)));
+ uint4 v_9 = ub[((8u + start_byte_offset) / 16u)];
+ float2 v_10 = asfloat(((((((8u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_9.zw) : (v_9.xy)));
+ uint4 v_11 = ub[((16u + start_byte_offset) / 16u)];
+ float2 v_12 = asfloat(((((((16u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_11.zw) : (v_11.xy)));
+ uint4 v_13 = ub[((24u + start_byte_offset) / 16u)];
+ return float4x2(v_8, v_10, v_12, asfloat(((((((24u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_13.zw) : (v_13.xy))));
}
-float3x4 v_20(uint start_byte_offset) {
- float4 v_21 = asfloat(ub[(start_byte_offset / 16u)]);
- float4 v_22 = asfloat(ub[((16u + start_byte_offset) / 16u)]);
- return float3x4(v_21, v_22, asfloat(ub[((32u + start_byte_offset) / 16u)]));
+float3x4 v_14(uint start_byte_offset) {
+ return float3x4(asfloat(ub[(start_byte_offset / 16u)]), asfloat(ub[((16u + start_byte_offset) / 16u)]), asfloat(ub[((32u + start_byte_offset) / 16u)]));
}
-float3x3 v_23(uint start_byte_offset) {
- float3 v_24 = asfloat(ub[(start_byte_offset / 16u)].xyz);
- float3 v_25 = asfloat(ub[((16u + start_byte_offset) / 16u)].xyz);
- return float3x3(v_24, v_25, asfloat(ub[((32u + start_byte_offset) / 16u)].xyz));
+float3x3 v_15(uint start_byte_offset) {
+ return float3x3(asfloat(ub[(start_byte_offset / 16u)].xyz), asfloat(ub[((16u + start_byte_offset) / 16u)].xyz), asfloat(ub[((32u + start_byte_offset) / 16u)].xyz));
}
-float3x2 v_26(uint start_byte_offset) {
- uint4 v_27 = ub[(start_byte_offset / 16u)];
- float2 v_28 = asfloat((((((start_byte_offset % 16u) / 4u) == 2u)) ? (v_27.zw) : (v_27.xy)));
- uint4 v_29 = ub[((8u + start_byte_offset) / 16u)];
- float2 v_30 = asfloat(((((((8u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_29.zw) : (v_29.xy)));
- uint4 v_31 = ub[((16u + start_byte_offset) / 16u)];
- return float3x2(v_28, v_30, asfloat(((((((16u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_31.zw) : (v_31.xy))));
+float3x2 v_16(uint start_byte_offset) {
+ uint4 v_17 = ub[(start_byte_offset / 16u)];
+ float2 v_18 = asfloat((((((start_byte_offset % 16u) / 4u) == 2u)) ? (v_17.zw) : (v_17.xy)));
+ uint4 v_19 = ub[((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 = ub[((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))));
}
-float2x4 v_32(uint start_byte_offset) {
- float4 v_33 = asfloat(ub[(start_byte_offset / 16u)]);
- return float2x4(v_33, asfloat(ub[((16u + start_byte_offset) / 16u)]));
+float2x4 v_22(uint start_byte_offset) {
+ return float2x4(asfloat(ub[(start_byte_offset / 16u)]), asfloat(ub[((16u + start_byte_offset) / 16u)]));
}
-float2x3 v_34(uint start_byte_offset) {
- float3 v_35 = asfloat(ub[(start_byte_offset / 16u)].xyz);
- return float2x3(v_35, asfloat(ub[((16u + start_byte_offset) / 16u)].xyz));
+float2x3 v_23(uint start_byte_offset) {
+ return float2x3(asfloat(ub[(start_byte_offset / 16u)].xyz), asfloat(ub[((16u + start_byte_offset) / 16u)].xyz));
}
-float2x2 v_36(uint start_byte_offset) {
- uint4 v_37 = ub[(start_byte_offset / 16u)];
- float2 v_38 = asfloat((((((start_byte_offset % 16u) / 4u) == 2u)) ? (v_37.zw) : (v_37.xy)));
- uint4 v_39 = ub[((8u + start_byte_offset) / 16u)];
- return float2x2(v_38, asfloat(((((((8u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_39.zw) : (v_39.xy))));
+float2x2 v_24(uint start_byte_offset) {
+ uint4 v_25 = ub[(start_byte_offset / 16u)];
+ float2 v_26 = asfloat((((((start_byte_offset % 16u) / 4u) == 2u)) ? (v_25.zw) : (v_25.xy)));
+ uint4 v_27 = ub[((8u + start_byte_offset) / 16u)];
+ return float2x2(v_26, asfloat(((((((8u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_27.zw) : (v_27.xy))));
}
void main_inner(uint idx) {
- uint v_40 = (544u * uint(idx));
- float scalar_f32 = asfloat(ub[(v_40 / 16u)][((v_40 % 16u) / 4u)]);
- uint v_41 = (4u + (544u * uint(idx)));
- int scalar_i32 = asint(ub[(v_41 / 16u)][((v_41 % 16u) / 4u)]);
- uint v_42 = (8u + (544u * uint(idx)));
- uint scalar_u32 = ub[(v_42 / 16u)][((v_42 % 16u) / 4u)];
- uint v_43 = (16u + (544u * uint(idx)));
- uint4 v_44 = ub[(v_43 / 16u)];
- float2 vec2_f32 = asfloat((((((v_43 % 16u) / 4u) == 2u)) ? (v_44.zw) : (v_44.xy)));
- uint v_45 = (24u + (544u * uint(idx)));
- uint4 v_46 = ub[(v_45 / 16u)];
- int2 vec2_i32 = asint((((((v_45 % 16u) / 4u) == 2u)) ? (v_46.zw) : (v_46.xy)));
- uint v_47 = (32u + (544u * uint(idx)));
- uint4 v_48 = ub[(v_47 / 16u)];
- uint2 vec2_u32 = (((((v_47 % 16u) / 4u) == 2u)) ? (v_48.zw) : (v_48.xy));
- uint v_49 = ((48u + (544u * uint(idx))) / 16u);
- float3 vec3_f32 = asfloat(ub[v_49].xyz);
- uint v_50 = ((64u + (544u * uint(idx))) / 16u);
- int3 vec3_i32 = asint(ub[v_50].xyz);
- uint v_51 = ((80u + (544u * uint(idx))) / 16u);
- uint3 vec3_u32 = ub[v_51].xyz;
- uint v_52 = ((96u + (544u * uint(idx))) / 16u);
- float4 vec4_f32 = asfloat(ub[v_52]);
- uint v_53 = ((112u + (544u * uint(idx))) / 16u);
- int4 vec4_i32 = asint(ub[v_53]);
- uint v_54 = ((128u + (544u * uint(idx))) / 16u);
- uint4 vec4_u32 = ub[v_54];
- float2x2 mat2x2_f32 = v_36((144u + (544u * uint(idx))));
- float2x3 mat2x3_f32 = v_34((160u + (544u * uint(idx))));
- float2x4 mat2x4_f32 = v_32((192u + (544u * uint(idx))));
- float3x2 mat3x2_f32 = v_26((224u + (544u * uint(idx))));
- float3x3 mat3x3_f32 = v_23((256u + (544u * uint(idx))));
- float3x4 mat3x4_f32 = v_20((304u + (544u * uint(idx))));
- float4x2 mat4x2_f32 = v_12((352u + (544u * uint(idx))));
- float4x3 mat4x3_f32 = v_8((384u + (544u * uint(idx))));
+ uint v_28 = (544u * uint(idx));
+ float scalar_f32 = asfloat(ub[(v_28 / 16u)][((v_28 % 16u) / 4u)]);
+ uint v_29 = (4u + (544u * uint(idx)));
+ int scalar_i32 = asint(ub[(v_29 / 16u)][((v_29 % 16u) / 4u)]);
+ uint v_30 = (8u + (544u * uint(idx)));
+ uint scalar_u32 = ub[(v_30 / 16u)][((v_30 % 16u) / 4u)];
+ uint v_31 = (16u + (544u * uint(idx)));
+ uint4 v_32 = ub[(v_31 / 16u)];
+ float2 vec2_f32 = asfloat((((((v_31 % 16u) / 4u) == 2u)) ? (v_32.zw) : (v_32.xy)));
+ uint v_33 = (24u + (544u * uint(idx)));
+ uint4 v_34 = ub[(v_33 / 16u)];
+ int2 vec2_i32 = asint((((((v_33 % 16u) / 4u) == 2u)) ? (v_34.zw) : (v_34.xy)));
+ uint v_35 = (32u + (544u * uint(idx)));
+ uint4 v_36 = ub[(v_35 / 16u)];
+ uint2 vec2_u32 = (((((v_35 % 16u) / 4u) == 2u)) ? (v_36.zw) : (v_36.xy));
+ uint v_37 = ((48u + (544u * uint(idx))) / 16u);
+ float3 vec3_f32 = asfloat(ub[v_37].xyz);
+ uint v_38 = ((64u + (544u * uint(idx))) / 16u);
+ int3 vec3_i32 = asint(ub[v_38].xyz);
+ uint v_39 = ((80u + (544u * uint(idx))) / 16u);
+ uint3 vec3_u32 = ub[v_39].xyz;
+ uint v_40 = ((96u + (544u * uint(idx))) / 16u);
+ float4 vec4_f32 = asfloat(ub[v_40]);
+ uint v_41 = ((112u + (544u * uint(idx))) / 16u);
+ int4 vec4_i32 = asint(ub[v_41]);
+ uint v_42 = ((128u + (544u * uint(idx))) / 16u);
+ uint4 vec4_u32 = ub[v_42];
+ float2x2 mat2x2_f32 = v_24((144u + (544u * uint(idx))));
+ float2x3 mat2x3_f32 = v_23((160u + (544u * uint(idx))));
+ float2x4 mat2x4_f32 = v_22((192u + (544u * uint(idx))));
+ float3x2 mat3x2_f32 = v_16((224u + (544u * uint(idx))));
+ float3x3 mat3x3_f32 = v_15((256u + (544u * uint(idx))));
+ float3x4 mat3x4_f32 = v_14((304u + (544u * uint(idx))));
+ float4x2 mat4x2_f32 = v_6((352u + (544u * uint(idx))));
+ float4x3 mat4x3_f32 = v_5((384u + (544u * uint(idx))));
float4x4 mat4x4_f32 = v_4((448u + (544u * uint(idx))));
float3 arr2_vec3_f32[2] = v((512u + (544u * uint(idx))));
- int v_55 = (tint_f32_to_i32(scalar_f32) + scalar_i32);
- int v_56 = (v_55 + int(scalar_u32));
- int v_57 = ((v_56 + tint_f32_to_i32(vec2_f32.x)) + vec2_i32.x);
- int v_58 = (v_57 + int(vec2_u32.x));
- int v_59 = ((v_58 + tint_f32_to_i32(vec3_f32.y)) + vec3_i32.y);
- int v_60 = (v_59 + int(vec3_u32.y));
- int v_61 = ((v_60 + tint_f32_to_i32(vec4_f32.z)) + vec4_i32.z);
- int v_62 = (v_61 + int(vec4_u32.z));
- int v_63 = (v_62 + tint_f32_to_i32(mat2x2_f32[int(0)].x));
- int v_64 = (v_63 + tint_f32_to_i32(mat2x3_f32[int(0)].x));
- int v_65 = (v_64 + tint_f32_to_i32(mat2x4_f32[int(0)].x));
- int v_66 = (v_65 + tint_f32_to_i32(mat3x2_f32[int(0)].x));
- int v_67 = (v_66 + tint_f32_to_i32(mat3x3_f32[int(0)].x));
- int v_68 = (v_67 + tint_f32_to_i32(mat3x4_f32[int(0)].x));
- int v_69 = (v_68 + tint_f32_to_i32(mat4x2_f32[int(0)].x));
- int v_70 = (v_69 + tint_f32_to_i32(mat4x3_f32[int(0)].x));
- int v_71 = (v_70 + tint_f32_to_i32(mat4x4_f32[int(0)].x));
- s.Store(0u, asuint((v_71 + tint_f32_to_i32(arr2_vec3_f32[int(0)].x))));
+ int v_43 = (tint_f32_to_i32(scalar_f32) + scalar_i32);
+ int v_44 = (v_43 + int(scalar_u32));
+ int v_45 = ((v_44 + tint_f32_to_i32(vec2_f32.x)) + vec2_i32.x);
+ int v_46 = (v_45 + int(vec2_u32.x));
+ int v_47 = ((v_46 + tint_f32_to_i32(vec3_f32.y)) + vec3_i32.y);
+ int v_48 = (v_47 + int(vec3_u32.y));
+ int v_49 = ((v_48 + tint_f32_to_i32(vec4_f32.z)) + vec4_i32.z);
+ int v_50 = (v_49 + int(vec4_u32.z));
+ int v_51 = (v_50 + tint_f32_to_i32(mat2x2_f32[int(0)].x));
+ int v_52 = (v_51 + tint_f32_to_i32(mat2x3_f32[int(0)].x));
+ int v_53 = (v_52 + tint_f32_to_i32(mat2x4_f32[int(0)].x));
+ int v_54 = (v_53 + tint_f32_to_i32(mat3x2_f32[int(0)].x));
+ int v_55 = (v_54 + tint_f32_to_i32(mat3x3_f32[int(0)].x));
+ int v_56 = (v_55 + tint_f32_to_i32(mat3x4_f32[int(0)].x));
+ int v_57 = (v_56 + tint_f32_to_i32(mat4x2_f32[int(0)].x));
+ int v_58 = (v_57 + tint_f32_to_i32(mat4x3_f32[int(0)].x));
+ int v_59 = (v_58 + tint_f32_to_i32(mat4x4_f32[int(0)].x));
+ s.Store(0u, asuint((v_59 + tint_f32_to_i32(arr2_vec3_f32[int(0)].x))));
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/buffer/uniform/dynamic_index/read_f16.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/uniform/dynamic_index/read_f16.wgsl.expected.ir.dxc.hlsl
index df414e7..8e4bcf0 100644
--- a/test/tint/buffer/uniform/dynamic_index/read_f16.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/uniform/dynamic_index/read_f16.wgsl.expected.ir.dxc.hlsl
@@ -152,115 +152,103 @@
}
float4x4 v_58(uint start_byte_offset) {
- float4 v_59 = asfloat(ub[(start_byte_offset / 16u)]);
- float4 v_60 = asfloat(ub[((16u + start_byte_offset) / 16u)]);
- float4 v_61 = asfloat(ub[((32u + start_byte_offset) / 16u)]);
- return float4x4(v_59, v_60, v_61, asfloat(ub[((48u + start_byte_offset) / 16u)]));
+ return float4x4(asfloat(ub[(start_byte_offset / 16u)]), asfloat(ub[((16u + start_byte_offset) / 16u)]), asfloat(ub[((32u + start_byte_offset) / 16u)]), asfloat(ub[((48u + start_byte_offset) / 16u)]));
}
-float4x3 v_62(uint start_byte_offset) {
- float3 v_63 = asfloat(ub[(start_byte_offset / 16u)].xyz);
- float3 v_64 = asfloat(ub[((16u + start_byte_offset) / 16u)].xyz);
- float3 v_65 = asfloat(ub[((32u + start_byte_offset) / 16u)].xyz);
- return float4x3(v_63, v_64, v_65, asfloat(ub[((48u + start_byte_offset) / 16u)].xyz));
+float4x3 v_59(uint start_byte_offset) {
+ return float4x3(asfloat(ub[(start_byte_offset / 16u)].xyz), asfloat(ub[((16u + start_byte_offset) / 16u)].xyz), asfloat(ub[((32u + start_byte_offset) / 16u)].xyz), asfloat(ub[((48u + start_byte_offset) / 16u)].xyz));
}
-float4x2 v_66(uint start_byte_offset) {
- uint4 v_67 = ub[(start_byte_offset / 16u)];
- float2 v_68 = asfloat((((((start_byte_offset % 16u) / 4u) == 2u)) ? (v_67.zw) : (v_67.xy)));
- uint4 v_69 = ub[((8u + start_byte_offset) / 16u)];
- float2 v_70 = asfloat(((((((8u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_69.zw) : (v_69.xy)));
- uint4 v_71 = ub[((16u + start_byte_offset) / 16u)];
- float2 v_72 = asfloat(((((((16u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_71.zw) : (v_71.xy)));
- uint4 v_73 = ub[((24u + start_byte_offset) / 16u)];
- return float4x2(v_68, v_70, v_72, asfloat(((((((24u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_73.zw) : (v_73.xy))));
+float4x2 v_60(uint start_byte_offset) {
+ uint4 v_61 = ub[(start_byte_offset / 16u)];
+ float2 v_62 = asfloat((((((start_byte_offset % 16u) / 4u) == 2u)) ? (v_61.zw) : (v_61.xy)));
+ uint4 v_63 = ub[((8u + start_byte_offset) / 16u)];
+ float2 v_64 = asfloat(((((((8u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_63.zw) : (v_63.xy)));
+ uint4 v_65 = ub[((16u + start_byte_offset) / 16u)];
+ float2 v_66 = asfloat(((((((16u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_65.zw) : (v_65.xy)));
+ uint4 v_67 = ub[((24u + start_byte_offset) / 16u)];
+ return float4x2(v_62, v_64, v_66, asfloat(((((((24u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_67.zw) : (v_67.xy))));
}
-float3x4 v_74(uint start_byte_offset) {
- float4 v_75 = asfloat(ub[(start_byte_offset / 16u)]);
- float4 v_76 = asfloat(ub[((16u + start_byte_offset) / 16u)]);
- return float3x4(v_75, v_76, asfloat(ub[((32u + start_byte_offset) / 16u)]));
+float3x4 v_68(uint start_byte_offset) {
+ return float3x4(asfloat(ub[(start_byte_offset / 16u)]), asfloat(ub[((16u + start_byte_offset) / 16u)]), asfloat(ub[((32u + start_byte_offset) / 16u)]));
}
-float3x3 v_77(uint start_byte_offset) {
- float3 v_78 = asfloat(ub[(start_byte_offset / 16u)].xyz);
- float3 v_79 = asfloat(ub[((16u + start_byte_offset) / 16u)].xyz);
- return float3x3(v_78, v_79, asfloat(ub[((32u + start_byte_offset) / 16u)].xyz));
+float3x3 v_69(uint start_byte_offset) {
+ return float3x3(asfloat(ub[(start_byte_offset / 16u)].xyz), asfloat(ub[((16u + start_byte_offset) / 16u)].xyz), asfloat(ub[((32u + start_byte_offset) / 16u)].xyz));
}
-float3x2 v_80(uint start_byte_offset) {
- uint4 v_81 = ub[(start_byte_offset / 16u)];
- float2 v_82 = asfloat((((((start_byte_offset % 16u) / 4u) == 2u)) ? (v_81.zw) : (v_81.xy)));
- uint4 v_83 = ub[((8u + start_byte_offset) / 16u)];
- float2 v_84 = asfloat(((((((8u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_83.zw) : (v_83.xy)));
- uint4 v_85 = ub[((16u + start_byte_offset) / 16u)];
- return float3x2(v_82, v_84, asfloat(((((((16u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_85.zw) : (v_85.xy))));
+float3x2 v_70(uint start_byte_offset) {
+ uint4 v_71 = ub[(start_byte_offset / 16u)];
+ float2 v_72 = asfloat((((((start_byte_offset % 16u) / 4u) == 2u)) ? (v_71.zw) : (v_71.xy)));
+ uint4 v_73 = ub[((8u + start_byte_offset) / 16u)];
+ float2 v_74 = asfloat(((((((8u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_73.zw) : (v_73.xy)));
+ uint4 v_75 = ub[((16u + start_byte_offset) / 16u)];
+ return float3x2(v_72, v_74, asfloat(((((((16u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_75.zw) : (v_75.xy))));
}
-float2x4 v_86(uint start_byte_offset) {
- float4 v_87 = asfloat(ub[(start_byte_offset / 16u)]);
- return float2x4(v_87, asfloat(ub[((16u + start_byte_offset) / 16u)]));
+float2x4 v_76(uint start_byte_offset) {
+ return float2x4(asfloat(ub[(start_byte_offset / 16u)]), asfloat(ub[((16u + start_byte_offset) / 16u)]));
}
-float2x3 v_88(uint start_byte_offset) {
- float3 v_89 = asfloat(ub[(start_byte_offset / 16u)].xyz);
- return float2x3(v_89, asfloat(ub[((16u + start_byte_offset) / 16u)].xyz));
+float2x3 v_77(uint start_byte_offset) {
+ return float2x3(asfloat(ub[(start_byte_offset / 16u)].xyz), asfloat(ub[((16u + start_byte_offset) / 16u)].xyz));
}
-float2x2 v_90(uint start_byte_offset) {
- uint4 v_91 = ub[(start_byte_offset / 16u)];
- float2 v_92 = asfloat((((((start_byte_offset % 16u) / 4u) == 2u)) ? (v_91.zw) : (v_91.xy)));
- uint4 v_93 = ub[((8u + start_byte_offset) / 16u)];
- return float2x2(v_92, asfloat(((((((8u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_93.zw) : (v_93.xy))));
+float2x2 v_78(uint start_byte_offset) {
+ uint4 v_79 = ub[(start_byte_offset / 16u)];
+ float2 v_80 = asfloat((((((start_byte_offset % 16u) / 4u) == 2u)) ? (v_79.zw) : (v_79.xy)));
+ uint4 v_81 = ub[((8u + start_byte_offset) / 16u)];
+ return float2x2(v_80, asfloat(((((((8u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_81.zw) : (v_81.xy))));
}
void main_inner(uint idx) {
- uint v_94 = (800u * uint(idx));
- float scalar_f32 = asfloat(ub[(v_94 / 16u)][((v_94 % 16u) / 4u)]);
- uint v_95 = (4u + (800u * uint(idx)));
- int scalar_i32 = asint(ub[(v_95 / 16u)][((v_95 % 16u) / 4u)]);
- uint v_96 = (8u + (800u * uint(idx)));
- uint scalar_u32 = ub[(v_96 / 16u)][((v_96 % 16u) / 4u)];
- uint v_97 = (12u + (800u * uint(idx)));
- uint v_98 = ub[(v_97 / 16u)][((v_97 % 16u) / 4u)];
- float16_t scalar_f16 = float16_t(f16tof32((v_98 >> ((((v_97 % 4u) == 0u)) ? (0u) : (16u)))));
- uint v_99 = (16u + (800u * uint(idx)));
- uint4 v_100 = ub[(v_99 / 16u)];
- float2 vec2_f32 = asfloat((((((v_99 % 16u) / 4u) == 2u)) ? (v_100.zw) : (v_100.xy)));
- uint v_101 = (24u + (800u * uint(idx)));
- uint4 v_102 = ub[(v_101 / 16u)];
- int2 vec2_i32 = asint((((((v_101 % 16u) / 4u) == 2u)) ? (v_102.zw) : (v_102.xy)));
- uint v_103 = (32u + (800u * uint(idx)));
- uint4 v_104 = ub[(v_103 / 16u)];
- uint2 vec2_u32 = (((((v_103 % 16u) / 4u) == 2u)) ? (v_104.zw) : (v_104.xy));
- uint v_105 = (40u + (800u * uint(idx)));
- vector<float16_t, 2> vec2_f16 = tint_bitcast_to_f16(ub[(v_105 / 16u)][((v_105 % 16u) / 4u)]);
- uint v_106 = ((48u + (800u * uint(idx))) / 16u);
- float3 vec3_f32 = asfloat(ub[v_106].xyz);
- uint v_107 = ((64u + (800u * uint(idx))) / 16u);
- int3 vec3_i32 = asint(ub[v_107].xyz);
- uint v_108 = ((80u + (800u * uint(idx))) / 16u);
- uint3 vec3_u32 = ub[v_108].xyz;
- uint v_109 = (96u + (800u * uint(idx)));
- uint4 v_110 = ub[(v_109 / 16u)];
- vector<float16_t, 3> vec3_f16 = tint_bitcast_to_f16_1((((((v_109 % 16u) / 4u) == 2u)) ? (v_110.zw) : (v_110.xy))).xyz;
- uint v_111 = ((112u + (800u * uint(idx))) / 16u);
- float4 vec4_f32 = asfloat(ub[v_111]);
- uint v_112 = ((128u + (800u * uint(idx))) / 16u);
- int4 vec4_i32 = asint(ub[v_112]);
- uint v_113 = ((144u + (800u * uint(idx))) / 16u);
- uint4 vec4_u32 = ub[v_113];
- uint v_114 = (160u + (800u * uint(idx)));
- uint4 v_115 = ub[(v_114 / 16u)];
- vector<float16_t, 4> vec4_f16 = tint_bitcast_to_f16_1((((((v_114 % 16u) / 4u) == 2u)) ? (v_115.zw) : (v_115.xy)));
- float2x2 mat2x2_f32 = v_90((168u + (800u * uint(idx))));
- float2x3 mat2x3_f32 = v_88((192u + (800u * uint(idx))));
- float2x4 mat2x4_f32 = v_86((224u + (800u * uint(idx))));
- float3x2 mat3x2_f32 = v_80((256u + (800u * uint(idx))));
- float3x3 mat3x3_f32 = v_77((288u + (800u * uint(idx))));
- float3x4 mat3x4_f32 = v_74((336u + (800u * uint(idx))));
- float4x2 mat4x2_f32 = v_66((384u + (800u * uint(idx))));
- float4x3 mat4x3_f32 = v_62((416u + (800u * uint(idx))));
+ uint v_82 = (800u * uint(idx));
+ float scalar_f32 = asfloat(ub[(v_82 / 16u)][((v_82 % 16u) / 4u)]);
+ uint v_83 = (4u + (800u * uint(idx)));
+ int scalar_i32 = asint(ub[(v_83 / 16u)][((v_83 % 16u) / 4u)]);
+ uint v_84 = (8u + (800u * uint(idx)));
+ uint scalar_u32 = ub[(v_84 / 16u)][((v_84 % 16u) / 4u)];
+ uint v_85 = (12u + (800u * uint(idx)));
+ uint v_86 = ub[(v_85 / 16u)][((v_85 % 16u) / 4u)];
+ float16_t scalar_f16 = float16_t(f16tof32((v_86 >> ((((v_85 % 4u) == 0u)) ? (0u) : (16u)))));
+ uint v_87 = (16u + (800u * uint(idx)));
+ uint4 v_88 = ub[(v_87 / 16u)];
+ float2 vec2_f32 = asfloat((((((v_87 % 16u) / 4u) == 2u)) ? (v_88.zw) : (v_88.xy)));
+ uint v_89 = (24u + (800u * uint(idx)));
+ uint4 v_90 = ub[(v_89 / 16u)];
+ int2 vec2_i32 = asint((((((v_89 % 16u) / 4u) == 2u)) ? (v_90.zw) : (v_90.xy)));
+ uint v_91 = (32u + (800u * uint(idx)));
+ uint4 v_92 = ub[(v_91 / 16u)];
+ uint2 vec2_u32 = (((((v_91 % 16u) / 4u) == 2u)) ? (v_92.zw) : (v_92.xy));
+ uint v_93 = (40u + (800u * uint(idx)));
+ vector<float16_t, 2> vec2_f16 = tint_bitcast_to_f16(ub[(v_93 / 16u)][((v_93 % 16u) / 4u)]);
+ uint v_94 = ((48u + (800u * uint(idx))) / 16u);
+ float3 vec3_f32 = asfloat(ub[v_94].xyz);
+ uint v_95 = ((64u + (800u * uint(idx))) / 16u);
+ int3 vec3_i32 = asint(ub[v_95].xyz);
+ uint v_96 = ((80u + (800u * uint(idx))) / 16u);
+ uint3 vec3_u32 = ub[v_96].xyz;
+ uint v_97 = (96u + (800u * uint(idx)));
+ uint4 v_98 = ub[(v_97 / 16u)];
+ vector<float16_t, 3> vec3_f16 = tint_bitcast_to_f16_1((((((v_97 % 16u) / 4u) == 2u)) ? (v_98.zw) : (v_98.xy))).xyz;
+ uint v_99 = ((112u + (800u * uint(idx))) / 16u);
+ float4 vec4_f32 = asfloat(ub[v_99]);
+ uint v_100 = ((128u + (800u * uint(idx))) / 16u);
+ int4 vec4_i32 = asint(ub[v_100]);
+ uint v_101 = ((144u + (800u * uint(idx))) / 16u);
+ uint4 vec4_u32 = ub[v_101];
+ uint v_102 = (160u + (800u * uint(idx)));
+ uint4 v_103 = ub[(v_102 / 16u)];
+ vector<float16_t, 4> vec4_f16 = tint_bitcast_to_f16_1((((((v_102 % 16u) / 4u) == 2u)) ? (v_103.zw) : (v_103.xy)));
+ float2x2 mat2x2_f32 = v_78((168u + (800u * uint(idx))));
+ float2x3 mat2x3_f32 = v_77((192u + (800u * uint(idx))));
+ float2x4 mat2x4_f32 = v_76((224u + (800u * uint(idx))));
+ float3x2 mat3x2_f32 = v_70((256u + (800u * uint(idx))));
+ float3x3 mat3x3_f32 = v_69((288u + (800u * uint(idx))));
+ float3x4 mat3x4_f32 = v_68((336u + (800u * uint(idx))));
+ float4x2 mat4x2_f32 = v_60((384u + (800u * uint(idx))));
+ float4x3 mat4x3_f32 = v_59((416u + (800u * uint(idx))));
float4x4 mat4x4_f32 = v_58((480u + (800u * uint(idx))));
matrix<float16_t, 2, 2> mat2x2_f16 = v_56((544u + (800u * uint(idx))));
matrix<float16_t, 2, 3> mat2x3_f16 = v_52((552u + (800u * uint(idx))));
@@ -273,38 +261,38 @@
matrix<float16_t, 4, 4> mat4x4_f16 = v_17((696u + (800u * uint(idx))));
float3 arr2_vec3_f32[2] = v_10((736u + (800u * uint(idx))));
matrix<float16_t, 4, 2> arr2_mat4x2_f16[2] = v_6((768u + (800u * uint(idx))));
- int v_116 = (tint_f32_to_i32(scalar_f32) + scalar_i32);
- int v_117 = (v_116 + int(scalar_u32));
- int v_118 = (v_117 + tint_f16_to_i32(scalar_f16));
- int v_119 = ((v_118 + tint_f32_to_i32(vec2_f32.x)) + vec2_i32.x);
- int v_120 = (v_119 + int(vec2_u32.x));
- int v_121 = (v_120 + tint_f16_to_i32(vec2_f16.x));
- int v_122 = ((v_121 + tint_f32_to_i32(vec3_f32.y)) + vec3_i32.y);
- int v_123 = (v_122 + int(vec3_u32.y));
- int v_124 = (v_123 + tint_f16_to_i32(vec3_f16.y));
- int v_125 = ((v_124 + tint_f32_to_i32(vec4_f32.z)) + vec4_i32.z);
- int v_126 = (v_125 + int(vec4_u32.z));
- int v_127 = (v_126 + tint_f16_to_i32(vec4_f16.z));
- int v_128 = (v_127 + tint_f32_to_i32(mat2x2_f32[int(0)].x));
- int v_129 = (v_128 + tint_f32_to_i32(mat2x3_f32[int(0)].x));
- int v_130 = (v_129 + tint_f32_to_i32(mat2x4_f32[int(0)].x));
- int v_131 = (v_130 + tint_f32_to_i32(mat3x2_f32[int(0)].x));
- int v_132 = (v_131 + tint_f32_to_i32(mat3x3_f32[int(0)].x));
- int v_133 = (v_132 + tint_f32_to_i32(mat3x4_f32[int(0)].x));
- int v_134 = (v_133 + tint_f32_to_i32(mat4x2_f32[int(0)].x));
- int v_135 = (v_134 + tint_f32_to_i32(mat4x3_f32[int(0)].x));
- int v_136 = (v_135 + tint_f32_to_i32(mat4x4_f32[int(0)].x));
- int v_137 = (v_136 + tint_f16_to_i32(mat2x2_f16[int(0)].x));
- int v_138 = (v_137 + tint_f16_to_i32(mat2x3_f16[int(0)].x));
- int v_139 = (v_138 + tint_f16_to_i32(mat2x4_f16[int(0)].x));
- int v_140 = (v_139 + tint_f16_to_i32(mat3x2_f16[int(0)].x));
- int v_141 = (v_140 + tint_f16_to_i32(mat3x3_f16[int(0)].x));
- int v_142 = (v_141 + tint_f16_to_i32(mat3x4_f16[int(0)].x));
- int v_143 = (v_142 + tint_f16_to_i32(mat4x2_f16[int(0)].x));
- int v_144 = (v_143 + tint_f16_to_i32(mat4x3_f16[int(0)].x));
- int v_145 = (v_144 + tint_f16_to_i32(mat4x4_f16[int(0)].x));
- int v_146 = (v_145 + tint_f32_to_i32(arr2_vec3_f32[int(0)].x));
- s.Store(0u, asuint((v_146 + tint_f16_to_i32(arr2_mat4x2_f16[int(0)][int(0)].x))));
+ int v_104 = (tint_f32_to_i32(scalar_f32) + scalar_i32);
+ int v_105 = (v_104 + int(scalar_u32));
+ int v_106 = (v_105 + tint_f16_to_i32(scalar_f16));
+ int v_107 = ((v_106 + tint_f32_to_i32(vec2_f32.x)) + vec2_i32.x);
+ int v_108 = (v_107 + int(vec2_u32.x));
+ int v_109 = (v_108 + tint_f16_to_i32(vec2_f16.x));
+ int v_110 = ((v_109 + tint_f32_to_i32(vec3_f32.y)) + vec3_i32.y);
+ int v_111 = (v_110 + int(vec3_u32.y));
+ int v_112 = (v_111 + tint_f16_to_i32(vec3_f16.y));
+ int v_113 = ((v_112 + tint_f32_to_i32(vec4_f32.z)) + vec4_i32.z);
+ int v_114 = (v_113 + int(vec4_u32.z));
+ int v_115 = (v_114 + tint_f16_to_i32(vec4_f16.z));
+ int v_116 = (v_115 + tint_f32_to_i32(mat2x2_f32[int(0)].x));
+ int v_117 = (v_116 + tint_f32_to_i32(mat2x3_f32[int(0)].x));
+ int v_118 = (v_117 + tint_f32_to_i32(mat2x4_f32[int(0)].x));
+ int v_119 = (v_118 + tint_f32_to_i32(mat3x2_f32[int(0)].x));
+ int v_120 = (v_119 + tint_f32_to_i32(mat3x3_f32[int(0)].x));
+ int v_121 = (v_120 + tint_f32_to_i32(mat3x4_f32[int(0)].x));
+ int v_122 = (v_121 + tint_f32_to_i32(mat4x2_f32[int(0)].x));
+ int v_123 = (v_122 + tint_f32_to_i32(mat4x3_f32[int(0)].x));
+ int v_124 = (v_123 + tint_f32_to_i32(mat4x4_f32[int(0)].x));
+ int v_125 = (v_124 + tint_f16_to_i32(mat2x2_f16[int(0)].x));
+ int v_126 = (v_125 + tint_f16_to_i32(mat2x3_f16[int(0)].x));
+ int v_127 = (v_126 + tint_f16_to_i32(mat2x4_f16[int(0)].x));
+ int v_128 = (v_127 + tint_f16_to_i32(mat3x2_f16[int(0)].x));
+ int v_129 = (v_128 + tint_f16_to_i32(mat3x3_f16[int(0)].x));
+ int v_130 = (v_129 + tint_f16_to_i32(mat3x4_f16[int(0)].x));
+ int v_131 = (v_130 + tint_f16_to_i32(mat4x2_f16[int(0)].x));
+ int v_132 = (v_131 + tint_f16_to_i32(mat4x3_f16[int(0)].x));
+ int v_133 = (v_132 + tint_f16_to_i32(mat4x4_f16[int(0)].x));
+ int v_134 = (v_133 + tint_f32_to_i32(arr2_vec3_f32[int(0)].x));
+ s.Store(0u, asuint((v_134 + tint_f16_to_i32(arr2_mat4x2_f16[int(0)][int(0)].x))));
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/buffer/uniform/static_index/read.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/uniform/static_index/read.wgsl.expected.ir.dxc.hlsl
index 14922fb..5649640 100644
--- a/test/tint/buffer/uniform/static_index/read.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/uniform/static_index/read.wgsl.expected.ir.dxc.hlsl
@@ -13,117 +13,104 @@
}
Inner v(uint start_byte_offset) {
- int v_1 = asint(ub[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]);
- Inner v_2 = {v_1, asfloat(ub[((16u + start_byte_offset) / 16u)][(((16u + start_byte_offset) % 16u) / 4u)])};
- return v_2;
+ Inner v_1 = {asint(ub[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]), asfloat(ub[((16u + start_byte_offset) / 16u)][(((16u + start_byte_offset) % 16u) / 4u)])};
+ return v_1;
}
typedef Inner ary_ret[4];
-ary_ret v_3(uint start_byte_offset) {
+ary_ret v_2(uint start_byte_offset) {
Inner a[4] = (Inner[4])0;
{
- uint v_4 = 0u;
- v_4 = 0u;
+ uint v_3 = 0u;
+ v_3 = 0u;
while(true) {
- uint v_5 = v_4;
- if ((v_5 >= 4u)) {
+ uint v_4 = v_3;
+ if ((v_4 >= 4u)) {
break;
}
- Inner v_6 = v((start_byte_offset + (v_5 * 32u)));
- a[v_5] = v_6;
+ Inner v_5 = v((start_byte_offset + (v_4 * 32u)));
+ a[v_4] = v_5;
{
- v_4 = (v_5 + 1u);
+ v_3 = (v_4 + 1u);
}
continue;
}
}
- Inner v_7[4] = a;
- return v_7;
+ Inner v_6[4] = a;
+ return v_6;
}
typedef float3 ary_ret_1[2];
-ary_ret_1 v_8(uint start_byte_offset) {
+ary_ret_1 v_7(uint start_byte_offset) {
float3 a[2] = (float3[2])0;
{
- uint v_9 = 0u;
- v_9 = 0u;
+ uint v_8 = 0u;
+ v_8 = 0u;
while(true) {
- uint v_10 = v_9;
- if ((v_10 >= 2u)) {
+ uint v_9 = v_8;
+ if ((v_9 >= 2u)) {
break;
}
- a[v_10] = asfloat(ub[((start_byte_offset + (v_10 * 16u)) / 16u)].xyz);
+ a[v_9] = asfloat(ub[((start_byte_offset + (v_9 * 16u)) / 16u)].xyz);
{
- v_9 = (v_10 + 1u);
+ v_8 = (v_9 + 1u);
}
continue;
}
}
- float3 v_11[2] = a;
- return v_11;
+ float3 v_10[2] = a;
+ return v_10;
}
-float4x4 v_12(uint start_byte_offset) {
- float4 v_13 = asfloat(ub[(start_byte_offset / 16u)]);
- float4 v_14 = asfloat(ub[((16u + start_byte_offset) / 16u)]);
- float4 v_15 = asfloat(ub[((32u + start_byte_offset) / 16u)]);
- return float4x4(v_13, v_14, v_15, asfloat(ub[((48u + start_byte_offset) / 16u)]));
+float4x4 v_11(uint start_byte_offset) {
+ return float4x4(asfloat(ub[(start_byte_offset / 16u)]), asfloat(ub[((16u + start_byte_offset) / 16u)]), asfloat(ub[((32u + start_byte_offset) / 16u)]), asfloat(ub[((48u + start_byte_offset) / 16u)]));
}
-float4x3 v_16(uint start_byte_offset) {
- float3 v_17 = asfloat(ub[(start_byte_offset / 16u)].xyz);
- float3 v_18 = asfloat(ub[((16u + start_byte_offset) / 16u)].xyz);
- float3 v_19 = asfloat(ub[((32u + start_byte_offset) / 16u)].xyz);
- return float4x3(v_17, v_18, v_19, asfloat(ub[((48u + start_byte_offset) / 16u)].xyz));
+float4x3 v_12(uint start_byte_offset) {
+ return float4x3(asfloat(ub[(start_byte_offset / 16u)].xyz), asfloat(ub[((16u + start_byte_offset) / 16u)].xyz), asfloat(ub[((32u + start_byte_offset) / 16u)].xyz), asfloat(ub[((48u + start_byte_offset) / 16u)].xyz));
}
-float4x2 v_20(uint start_byte_offset) {
- uint4 v_21 = ub[(start_byte_offset / 16u)];
- float2 v_22 = asfloat((((((start_byte_offset % 16u) / 4u) == 2u)) ? (v_21.zw) : (v_21.xy)));
- uint4 v_23 = ub[((8u + start_byte_offset) / 16u)];
- float2 v_24 = asfloat(((((((8u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_23.zw) : (v_23.xy)));
- uint4 v_25 = ub[((16u + start_byte_offset) / 16u)];
- float2 v_26 = asfloat(((((((16u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_25.zw) : (v_25.xy)));
- uint4 v_27 = ub[((24u + start_byte_offset) / 16u)];
- return float4x2(v_22, v_24, v_26, asfloat(((((((24u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_27.zw) : (v_27.xy))));
+float4x2 v_13(uint start_byte_offset) {
+ uint4 v_14 = ub[(start_byte_offset / 16u)];
+ float2 v_15 = asfloat((((((start_byte_offset % 16u) / 4u) == 2u)) ? (v_14.zw) : (v_14.xy)));
+ uint4 v_16 = ub[((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 = ub[((16u + start_byte_offset) / 16u)];
+ float2 v_19 = asfloat(((((((16u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_18.zw) : (v_18.xy)));
+ uint4 v_20 = ub[((24u + start_byte_offset) / 16u)];
+ return float4x2(v_15, v_17, v_19, asfloat(((((((24u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_20.zw) : (v_20.xy))));
}
-float3x4 v_28(uint start_byte_offset) {
- float4 v_29 = asfloat(ub[(start_byte_offset / 16u)]);
- float4 v_30 = asfloat(ub[((16u + start_byte_offset) / 16u)]);
- return float3x4(v_29, v_30, asfloat(ub[((32u + start_byte_offset) / 16u)]));
+float3x4 v_21(uint start_byte_offset) {
+ return float3x4(asfloat(ub[(start_byte_offset / 16u)]), asfloat(ub[((16u + start_byte_offset) / 16u)]), asfloat(ub[((32u + start_byte_offset) / 16u)]));
}
-float3x3 v_31(uint start_byte_offset) {
- float3 v_32 = asfloat(ub[(start_byte_offset / 16u)].xyz);
- float3 v_33 = asfloat(ub[((16u + start_byte_offset) / 16u)].xyz);
- return float3x3(v_32, v_33, asfloat(ub[((32u + start_byte_offset) / 16u)].xyz));
+float3x3 v_22(uint start_byte_offset) {
+ return float3x3(asfloat(ub[(start_byte_offset / 16u)].xyz), asfloat(ub[((16u + start_byte_offset) / 16u)].xyz), asfloat(ub[((32u + start_byte_offset) / 16u)].xyz));
}
-float3x2 v_34(uint start_byte_offset) {
- uint4 v_35 = ub[(start_byte_offset / 16u)];
- float2 v_36 = asfloat((((((start_byte_offset % 16u) / 4u) == 2u)) ? (v_35.zw) : (v_35.xy)));
- uint4 v_37 = ub[((8u + start_byte_offset) / 16u)];
- float2 v_38 = asfloat(((((((8u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_37.zw) : (v_37.xy)));
- uint4 v_39 = ub[((16u + start_byte_offset) / 16u)];
- return float3x2(v_36, v_38, asfloat(((((((16u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_39.zw) : (v_39.xy))));
+float3x2 v_23(uint start_byte_offset) {
+ uint4 v_24 = ub[(start_byte_offset / 16u)];
+ float2 v_25 = asfloat((((((start_byte_offset % 16u) / 4u) == 2u)) ? (v_24.zw) : (v_24.xy)));
+ uint4 v_26 = ub[((8u + start_byte_offset) / 16u)];
+ float2 v_27 = asfloat(((((((8u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_26.zw) : (v_26.xy)));
+ uint4 v_28 = ub[((16u + start_byte_offset) / 16u)];
+ return float3x2(v_25, v_27, asfloat(((((((16u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_28.zw) : (v_28.xy))));
}
-float2x4 v_40(uint start_byte_offset) {
- float4 v_41 = asfloat(ub[(start_byte_offset / 16u)]);
- return float2x4(v_41, asfloat(ub[((16u + start_byte_offset) / 16u)]));
+float2x4 v_29(uint start_byte_offset) {
+ return float2x4(asfloat(ub[(start_byte_offset / 16u)]), asfloat(ub[((16u + start_byte_offset) / 16u)]));
}
-float2x3 v_42(uint start_byte_offset) {
- float3 v_43 = asfloat(ub[(start_byte_offset / 16u)].xyz);
- return float2x3(v_43, asfloat(ub[((16u + start_byte_offset) / 16u)].xyz));
+float2x3 v_30(uint start_byte_offset) {
+ return float2x3(asfloat(ub[(start_byte_offset / 16u)].xyz), asfloat(ub[((16u + start_byte_offset) / 16u)].xyz));
}
-float2x2 v_44(uint start_byte_offset) {
- uint4 v_45 = ub[(start_byte_offset / 16u)];
- float2 v_46 = asfloat((((((start_byte_offset % 16u) / 4u) == 2u)) ? (v_45.zw) : (v_45.xy)));
- uint4 v_47 = ub[((8u + start_byte_offset) / 16u)];
- return float2x2(v_46, asfloat(((((((8u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_47.zw) : (v_47.xy))));
+float2x2 v_31(uint start_byte_offset) {
+ uint4 v_32 = ub[(start_byte_offset / 16u)];
+ float2 v_33 = asfloat((((((start_byte_offset % 16u) / 4u) == 2u)) ? (v_32.zw) : (v_32.xy)));
+ uint4 v_34 = ub[((8u + start_byte_offset) / 16u)];
+ return float2x2(v_33, asfloat(((((((8u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_34.zw) : (v_34.xy))));
}
[numthreads(1, 1, 1)]
@@ -140,35 +127,35 @@
float4 vec4_f32 = asfloat(ub[6u]);
int4 vec4_i32 = asint(ub[7u]);
uint4 vec4_u32 = ub[8u];
- float2x2 mat2x2_f32 = v_44(144u);
- float2x3 mat2x3_f32 = v_42(160u);
- float2x4 mat2x4_f32 = v_40(192u);
- float3x2 mat3x2_f32 = v_34(224u);
- float3x3 mat3x3_f32 = v_31(256u);
- float3x4 mat3x4_f32 = v_28(304u);
- float4x2 mat4x2_f32 = v_20(352u);
- float4x3 mat4x3_f32 = v_16(384u);
- float4x4 mat4x4_f32 = v_12(448u);
- float3 arr2_vec3_f32[2] = v_8(512u);
+ float2x2 mat2x2_f32 = v_31(144u);
+ float2x3 mat2x3_f32 = v_30(160u);
+ float2x4 mat2x4_f32 = v_29(192u);
+ float3x2 mat3x2_f32 = v_23(224u);
+ float3x3 mat3x3_f32 = v_22(256u);
+ float3x4 mat3x4_f32 = v_21(304u);
+ float4x2 mat4x2_f32 = v_13(352u);
+ float4x3 mat4x3_f32 = v_12(384u);
+ float4x4 mat4x4_f32 = v_11(448u);
+ float3 arr2_vec3_f32[2] = v_7(512u);
Inner struct_inner = v(544u);
- Inner array_struct_inner[4] = v_3(576u);
- int v_48 = (tint_f32_to_i32(scalar_f32) + scalar_i32);
- int v_49 = (v_48 + int(scalar_u32));
- int v_50 = ((v_49 + tint_f32_to_i32(vec2_f32.x)) + vec2_i32.x);
- int v_51 = (v_50 + int(vec2_u32.x));
- int v_52 = ((v_51 + tint_f32_to_i32(vec3_f32.y)) + vec3_i32.y);
- int v_53 = (v_52 + int(vec3_u32.y));
- int v_54 = ((v_53 + tint_f32_to_i32(vec4_f32.z)) + vec4_i32.z);
- int v_55 = (v_54 + int(vec4_u32.z));
- int v_56 = (v_55 + tint_f32_to_i32(mat2x2_f32[int(0)].x));
- int v_57 = (v_56 + tint_f32_to_i32(mat2x3_f32[int(0)].x));
- int v_58 = (v_57 + tint_f32_to_i32(mat2x4_f32[int(0)].x));
- int v_59 = (v_58 + tint_f32_to_i32(mat3x2_f32[int(0)].x));
- int v_60 = (v_59 + tint_f32_to_i32(mat3x3_f32[int(0)].x));
- int v_61 = (v_60 + tint_f32_to_i32(mat3x4_f32[int(0)].x));
- int v_62 = (v_61 + tint_f32_to_i32(mat4x2_f32[int(0)].x));
- int v_63 = (v_62 + tint_f32_to_i32(mat4x3_f32[int(0)].x));
- int v_64 = (v_63 + tint_f32_to_i32(mat4x4_f32[int(0)].x));
- s.Store(0u, asuint((((v_64 + tint_f32_to_i32(arr2_vec3_f32[int(0)].x)) + struct_inner.scalar_i32) + array_struct_inner[int(0)].scalar_i32)));
+ Inner array_struct_inner[4] = v_2(576u);
+ int v_35 = (tint_f32_to_i32(scalar_f32) + scalar_i32);
+ int v_36 = (v_35 + int(scalar_u32));
+ int v_37 = ((v_36 + tint_f32_to_i32(vec2_f32.x)) + vec2_i32.x);
+ int v_38 = (v_37 + int(vec2_u32.x));
+ int v_39 = ((v_38 + tint_f32_to_i32(vec3_f32.y)) + vec3_i32.y);
+ int v_40 = (v_39 + int(vec3_u32.y));
+ int v_41 = ((v_40 + tint_f32_to_i32(vec4_f32.z)) + vec4_i32.z);
+ int v_42 = (v_41 + int(vec4_u32.z));
+ int v_43 = (v_42 + tint_f32_to_i32(mat2x2_f32[int(0)].x));
+ int v_44 = (v_43 + tint_f32_to_i32(mat2x3_f32[int(0)].x));
+ int v_45 = (v_44 + tint_f32_to_i32(mat2x4_f32[int(0)].x));
+ int v_46 = (v_45 + tint_f32_to_i32(mat3x2_f32[int(0)].x));
+ int v_47 = (v_46 + tint_f32_to_i32(mat3x3_f32[int(0)].x));
+ int v_48 = (v_47 + tint_f32_to_i32(mat3x4_f32[int(0)].x));
+ int v_49 = (v_48 + tint_f32_to_i32(mat4x2_f32[int(0)].x));
+ int v_50 = (v_49 + tint_f32_to_i32(mat4x3_f32[int(0)].x));
+ int v_51 = (v_50 + tint_f32_to_i32(mat4x4_f32[int(0)].x));
+ s.Store(0u, asuint((((v_51 + tint_f32_to_i32(arr2_vec3_f32[int(0)].x)) + struct_inner.scalar_i32) + array_struct_inner[int(0)].scalar_i32)));
}
diff --git a/test/tint/buffer/uniform/static_index/read.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/uniform/static_index/read.wgsl.expected.ir.fxc.hlsl
index 14922fb..5649640 100644
--- a/test/tint/buffer/uniform/static_index/read.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/uniform/static_index/read.wgsl.expected.ir.fxc.hlsl
@@ -13,117 +13,104 @@
}
Inner v(uint start_byte_offset) {
- int v_1 = asint(ub[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]);
- Inner v_2 = {v_1, asfloat(ub[((16u + start_byte_offset) / 16u)][(((16u + start_byte_offset) % 16u) / 4u)])};
- return v_2;
+ Inner v_1 = {asint(ub[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]), asfloat(ub[((16u + start_byte_offset) / 16u)][(((16u + start_byte_offset) % 16u) / 4u)])};
+ return v_1;
}
typedef Inner ary_ret[4];
-ary_ret v_3(uint start_byte_offset) {
+ary_ret v_2(uint start_byte_offset) {
Inner a[4] = (Inner[4])0;
{
- uint v_4 = 0u;
- v_4 = 0u;
+ uint v_3 = 0u;
+ v_3 = 0u;
while(true) {
- uint v_5 = v_4;
- if ((v_5 >= 4u)) {
+ uint v_4 = v_3;
+ if ((v_4 >= 4u)) {
break;
}
- Inner v_6 = v((start_byte_offset + (v_5 * 32u)));
- a[v_5] = v_6;
+ Inner v_5 = v((start_byte_offset + (v_4 * 32u)));
+ a[v_4] = v_5;
{
- v_4 = (v_5 + 1u);
+ v_3 = (v_4 + 1u);
}
continue;
}
}
- Inner v_7[4] = a;
- return v_7;
+ Inner v_6[4] = a;
+ return v_6;
}
typedef float3 ary_ret_1[2];
-ary_ret_1 v_8(uint start_byte_offset) {
+ary_ret_1 v_7(uint start_byte_offset) {
float3 a[2] = (float3[2])0;
{
- uint v_9 = 0u;
- v_9 = 0u;
+ uint v_8 = 0u;
+ v_8 = 0u;
while(true) {
- uint v_10 = v_9;
- if ((v_10 >= 2u)) {
+ uint v_9 = v_8;
+ if ((v_9 >= 2u)) {
break;
}
- a[v_10] = asfloat(ub[((start_byte_offset + (v_10 * 16u)) / 16u)].xyz);
+ a[v_9] = asfloat(ub[((start_byte_offset + (v_9 * 16u)) / 16u)].xyz);
{
- v_9 = (v_10 + 1u);
+ v_8 = (v_9 + 1u);
}
continue;
}
}
- float3 v_11[2] = a;
- return v_11;
+ float3 v_10[2] = a;
+ return v_10;
}
-float4x4 v_12(uint start_byte_offset) {
- float4 v_13 = asfloat(ub[(start_byte_offset / 16u)]);
- float4 v_14 = asfloat(ub[((16u + start_byte_offset) / 16u)]);
- float4 v_15 = asfloat(ub[((32u + start_byte_offset) / 16u)]);
- return float4x4(v_13, v_14, v_15, asfloat(ub[((48u + start_byte_offset) / 16u)]));
+float4x4 v_11(uint start_byte_offset) {
+ return float4x4(asfloat(ub[(start_byte_offset / 16u)]), asfloat(ub[((16u + start_byte_offset) / 16u)]), asfloat(ub[((32u + start_byte_offset) / 16u)]), asfloat(ub[((48u + start_byte_offset) / 16u)]));
}
-float4x3 v_16(uint start_byte_offset) {
- float3 v_17 = asfloat(ub[(start_byte_offset / 16u)].xyz);
- float3 v_18 = asfloat(ub[((16u + start_byte_offset) / 16u)].xyz);
- float3 v_19 = asfloat(ub[((32u + start_byte_offset) / 16u)].xyz);
- return float4x3(v_17, v_18, v_19, asfloat(ub[((48u + start_byte_offset) / 16u)].xyz));
+float4x3 v_12(uint start_byte_offset) {
+ return float4x3(asfloat(ub[(start_byte_offset / 16u)].xyz), asfloat(ub[((16u + start_byte_offset) / 16u)].xyz), asfloat(ub[((32u + start_byte_offset) / 16u)].xyz), asfloat(ub[((48u + start_byte_offset) / 16u)].xyz));
}
-float4x2 v_20(uint start_byte_offset) {
- uint4 v_21 = ub[(start_byte_offset / 16u)];
- float2 v_22 = asfloat((((((start_byte_offset % 16u) / 4u) == 2u)) ? (v_21.zw) : (v_21.xy)));
- uint4 v_23 = ub[((8u + start_byte_offset) / 16u)];
- float2 v_24 = asfloat(((((((8u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_23.zw) : (v_23.xy)));
- uint4 v_25 = ub[((16u + start_byte_offset) / 16u)];
- float2 v_26 = asfloat(((((((16u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_25.zw) : (v_25.xy)));
- uint4 v_27 = ub[((24u + start_byte_offset) / 16u)];
- return float4x2(v_22, v_24, v_26, asfloat(((((((24u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_27.zw) : (v_27.xy))));
+float4x2 v_13(uint start_byte_offset) {
+ uint4 v_14 = ub[(start_byte_offset / 16u)];
+ float2 v_15 = asfloat((((((start_byte_offset % 16u) / 4u) == 2u)) ? (v_14.zw) : (v_14.xy)));
+ uint4 v_16 = ub[((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 = ub[((16u + start_byte_offset) / 16u)];
+ float2 v_19 = asfloat(((((((16u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_18.zw) : (v_18.xy)));
+ uint4 v_20 = ub[((24u + start_byte_offset) / 16u)];
+ return float4x2(v_15, v_17, v_19, asfloat(((((((24u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_20.zw) : (v_20.xy))));
}
-float3x4 v_28(uint start_byte_offset) {
- float4 v_29 = asfloat(ub[(start_byte_offset / 16u)]);
- float4 v_30 = asfloat(ub[((16u + start_byte_offset) / 16u)]);
- return float3x4(v_29, v_30, asfloat(ub[((32u + start_byte_offset) / 16u)]));
+float3x4 v_21(uint start_byte_offset) {
+ return float3x4(asfloat(ub[(start_byte_offset / 16u)]), asfloat(ub[((16u + start_byte_offset) / 16u)]), asfloat(ub[((32u + start_byte_offset) / 16u)]));
}
-float3x3 v_31(uint start_byte_offset) {
- float3 v_32 = asfloat(ub[(start_byte_offset / 16u)].xyz);
- float3 v_33 = asfloat(ub[((16u + start_byte_offset) / 16u)].xyz);
- return float3x3(v_32, v_33, asfloat(ub[((32u + start_byte_offset) / 16u)].xyz));
+float3x3 v_22(uint start_byte_offset) {
+ return float3x3(asfloat(ub[(start_byte_offset / 16u)].xyz), asfloat(ub[((16u + start_byte_offset) / 16u)].xyz), asfloat(ub[((32u + start_byte_offset) / 16u)].xyz));
}
-float3x2 v_34(uint start_byte_offset) {
- uint4 v_35 = ub[(start_byte_offset / 16u)];
- float2 v_36 = asfloat((((((start_byte_offset % 16u) / 4u) == 2u)) ? (v_35.zw) : (v_35.xy)));
- uint4 v_37 = ub[((8u + start_byte_offset) / 16u)];
- float2 v_38 = asfloat(((((((8u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_37.zw) : (v_37.xy)));
- uint4 v_39 = ub[((16u + start_byte_offset) / 16u)];
- return float3x2(v_36, v_38, asfloat(((((((16u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_39.zw) : (v_39.xy))));
+float3x2 v_23(uint start_byte_offset) {
+ uint4 v_24 = ub[(start_byte_offset / 16u)];
+ float2 v_25 = asfloat((((((start_byte_offset % 16u) / 4u) == 2u)) ? (v_24.zw) : (v_24.xy)));
+ uint4 v_26 = ub[((8u + start_byte_offset) / 16u)];
+ float2 v_27 = asfloat(((((((8u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_26.zw) : (v_26.xy)));
+ uint4 v_28 = ub[((16u + start_byte_offset) / 16u)];
+ return float3x2(v_25, v_27, asfloat(((((((16u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_28.zw) : (v_28.xy))));
}
-float2x4 v_40(uint start_byte_offset) {
- float4 v_41 = asfloat(ub[(start_byte_offset / 16u)]);
- return float2x4(v_41, asfloat(ub[((16u + start_byte_offset) / 16u)]));
+float2x4 v_29(uint start_byte_offset) {
+ return float2x4(asfloat(ub[(start_byte_offset / 16u)]), asfloat(ub[((16u + start_byte_offset) / 16u)]));
}
-float2x3 v_42(uint start_byte_offset) {
- float3 v_43 = asfloat(ub[(start_byte_offset / 16u)].xyz);
- return float2x3(v_43, asfloat(ub[((16u + start_byte_offset) / 16u)].xyz));
+float2x3 v_30(uint start_byte_offset) {
+ return float2x3(asfloat(ub[(start_byte_offset / 16u)].xyz), asfloat(ub[((16u + start_byte_offset) / 16u)].xyz));
}
-float2x2 v_44(uint start_byte_offset) {
- uint4 v_45 = ub[(start_byte_offset / 16u)];
- float2 v_46 = asfloat((((((start_byte_offset % 16u) / 4u) == 2u)) ? (v_45.zw) : (v_45.xy)));
- uint4 v_47 = ub[((8u + start_byte_offset) / 16u)];
- return float2x2(v_46, asfloat(((((((8u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_47.zw) : (v_47.xy))));
+float2x2 v_31(uint start_byte_offset) {
+ uint4 v_32 = ub[(start_byte_offset / 16u)];
+ float2 v_33 = asfloat((((((start_byte_offset % 16u) / 4u) == 2u)) ? (v_32.zw) : (v_32.xy)));
+ uint4 v_34 = ub[((8u + start_byte_offset) / 16u)];
+ return float2x2(v_33, asfloat(((((((8u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_34.zw) : (v_34.xy))));
}
[numthreads(1, 1, 1)]
@@ -140,35 +127,35 @@
float4 vec4_f32 = asfloat(ub[6u]);
int4 vec4_i32 = asint(ub[7u]);
uint4 vec4_u32 = ub[8u];
- float2x2 mat2x2_f32 = v_44(144u);
- float2x3 mat2x3_f32 = v_42(160u);
- float2x4 mat2x4_f32 = v_40(192u);
- float3x2 mat3x2_f32 = v_34(224u);
- float3x3 mat3x3_f32 = v_31(256u);
- float3x4 mat3x4_f32 = v_28(304u);
- float4x2 mat4x2_f32 = v_20(352u);
- float4x3 mat4x3_f32 = v_16(384u);
- float4x4 mat4x4_f32 = v_12(448u);
- float3 arr2_vec3_f32[2] = v_8(512u);
+ float2x2 mat2x2_f32 = v_31(144u);
+ float2x3 mat2x3_f32 = v_30(160u);
+ float2x4 mat2x4_f32 = v_29(192u);
+ float3x2 mat3x2_f32 = v_23(224u);
+ float3x3 mat3x3_f32 = v_22(256u);
+ float3x4 mat3x4_f32 = v_21(304u);
+ float4x2 mat4x2_f32 = v_13(352u);
+ float4x3 mat4x3_f32 = v_12(384u);
+ float4x4 mat4x4_f32 = v_11(448u);
+ float3 arr2_vec3_f32[2] = v_7(512u);
Inner struct_inner = v(544u);
- Inner array_struct_inner[4] = v_3(576u);
- int v_48 = (tint_f32_to_i32(scalar_f32) + scalar_i32);
- int v_49 = (v_48 + int(scalar_u32));
- int v_50 = ((v_49 + tint_f32_to_i32(vec2_f32.x)) + vec2_i32.x);
- int v_51 = (v_50 + int(vec2_u32.x));
- int v_52 = ((v_51 + tint_f32_to_i32(vec3_f32.y)) + vec3_i32.y);
- int v_53 = (v_52 + int(vec3_u32.y));
- int v_54 = ((v_53 + tint_f32_to_i32(vec4_f32.z)) + vec4_i32.z);
- int v_55 = (v_54 + int(vec4_u32.z));
- int v_56 = (v_55 + tint_f32_to_i32(mat2x2_f32[int(0)].x));
- int v_57 = (v_56 + tint_f32_to_i32(mat2x3_f32[int(0)].x));
- int v_58 = (v_57 + tint_f32_to_i32(mat2x4_f32[int(0)].x));
- int v_59 = (v_58 + tint_f32_to_i32(mat3x2_f32[int(0)].x));
- int v_60 = (v_59 + tint_f32_to_i32(mat3x3_f32[int(0)].x));
- int v_61 = (v_60 + tint_f32_to_i32(mat3x4_f32[int(0)].x));
- int v_62 = (v_61 + tint_f32_to_i32(mat4x2_f32[int(0)].x));
- int v_63 = (v_62 + tint_f32_to_i32(mat4x3_f32[int(0)].x));
- int v_64 = (v_63 + tint_f32_to_i32(mat4x4_f32[int(0)].x));
- s.Store(0u, asuint((((v_64 + tint_f32_to_i32(arr2_vec3_f32[int(0)].x)) + struct_inner.scalar_i32) + array_struct_inner[int(0)].scalar_i32)));
+ Inner array_struct_inner[4] = v_2(576u);
+ int v_35 = (tint_f32_to_i32(scalar_f32) + scalar_i32);
+ int v_36 = (v_35 + int(scalar_u32));
+ int v_37 = ((v_36 + tint_f32_to_i32(vec2_f32.x)) + vec2_i32.x);
+ int v_38 = (v_37 + int(vec2_u32.x));
+ int v_39 = ((v_38 + tint_f32_to_i32(vec3_f32.y)) + vec3_i32.y);
+ int v_40 = (v_39 + int(vec3_u32.y));
+ int v_41 = ((v_40 + tint_f32_to_i32(vec4_f32.z)) + vec4_i32.z);
+ int v_42 = (v_41 + int(vec4_u32.z));
+ int v_43 = (v_42 + tint_f32_to_i32(mat2x2_f32[int(0)].x));
+ int v_44 = (v_43 + tint_f32_to_i32(mat2x3_f32[int(0)].x));
+ int v_45 = (v_44 + tint_f32_to_i32(mat2x4_f32[int(0)].x));
+ int v_46 = (v_45 + tint_f32_to_i32(mat3x2_f32[int(0)].x));
+ int v_47 = (v_46 + tint_f32_to_i32(mat3x3_f32[int(0)].x));
+ int v_48 = (v_47 + tint_f32_to_i32(mat3x4_f32[int(0)].x));
+ int v_49 = (v_48 + tint_f32_to_i32(mat4x2_f32[int(0)].x));
+ int v_50 = (v_49 + tint_f32_to_i32(mat4x3_f32[int(0)].x));
+ int v_51 = (v_50 + tint_f32_to_i32(mat4x4_f32[int(0)].x));
+ s.Store(0u, asuint((((v_51 + tint_f32_to_i32(arr2_vec3_f32[int(0)].x)) + struct_inner.scalar_i32) + array_struct_inner[int(0)].scalar_i32)));
}
diff --git a/test/tint/buffer/uniform/static_index/read_f16.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/uniform/static_index/read_f16.wgsl.expected.ir.dxc.hlsl
index e930308..9f2e34e 100644
--- a/test/tint/buffer/uniform/static_index/read_f16.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/uniform/static_index/read_f16.wgsl.expected.ir.dxc.hlsl
@@ -185,66 +185,54 @@
}
float4x4 v_68(uint start_byte_offset) {
- float4 v_69 = asfloat(ub[(start_byte_offset / 16u)]);
- float4 v_70 = asfloat(ub[((16u + start_byte_offset) / 16u)]);
- float4 v_71 = asfloat(ub[((32u + start_byte_offset) / 16u)]);
- return float4x4(v_69, v_70, v_71, asfloat(ub[((48u + start_byte_offset) / 16u)]));
+ return float4x4(asfloat(ub[(start_byte_offset / 16u)]), asfloat(ub[((16u + start_byte_offset) / 16u)]), asfloat(ub[((32u + start_byte_offset) / 16u)]), asfloat(ub[((48u + start_byte_offset) / 16u)]));
}
-float4x3 v_72(uint start_byte_offset) {
- float3 v_73 = asfloat(ub[(start_byte_offset / 16u)].xyz);
- float3 v_74 = asfloat(ub[((16u + start_byte_offset) / 16u)].xyz);
- float3 v_75 = asfloat(ub[((32u + start_byte_offset) / 16u)].xyz);
- return float4x3(v_73, v_74, v_75, asfloat(ub[((48u + start_byte_offset) / 16u)].xyz));
+float4x3 v_69(uint start_byte_offset) {
+ return float4x3(asfloat(ub[(start_byte_offset / 16u)].xyz), asfloat(ub[((16u + start_byte_offset) / 16u)].xyz), asfloat(ub[((32u + start_byte_offset) / 16u)].xyz), asfloat(ub[((48u + start_byte_offset) / 16u)].xyz));
}
-float4x2 v_76(uint start_byte_offset) {
- uint4 v_77 = ub[(start_byte_offset / 16u)];
- float2 v_78 = asfloat((((((start_byte_offset % 16u) / 4u) == 2u)) ? (v_77.zw) : (v_77.xy)));
- uint4 v_79 = ub[((8u + start_byte_offset) / 16u)];
- float2 v_80 = asfloat(((((((8u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_79.zw) : (v_79.xy)));
- uint4 v_81 = ub[((16u + start_byte_offset) / 16u)];
- float2 v_82 = asfloat(((((((16u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_81.zw) : (v_81.xy)));
- uint4 v_83 = ub[((24u + start_byte_offset) / 16u)];
- return float4x2(v_78, v_80, v_82, asfloat(((((((24u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_83.zw) : (v_83.xy))));
+float4x2 v_70(uint start_byte_offset) {
+ uint4 v_71 = ub[(start_byte_offset / 16u)];
+ float2 v_72 = asfloat((((((start_byte_offset % 16u) / 4u) == 2u)) ? (v_71.zw) : (v_71.xy)));
+ uint4 v_73 = ub[((8u + start_byte_offset) / 16u)];
+ float2 v_74 = asfloat(((((((8u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_73.zw) : (v_73.xy)));
+ uint4 v_75 = ub[((16u + start_byte_offset) / 16u)];
+ float2 v_76 = asfloat(((((((16u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_75.zw) : (v_75.xy)));
+ uint4 v_77 = ub[((24u + start_byte_offset) / 16u)];
+ return float4x2(v_72, v_74, v_76, asfloat(((((((24u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_77.zw) : (v_77.xy))));
}
-float3x4 v_84(uint start_byte_offset) {
- float4 v_85 = asfloat(ub[(start_byte_offset / 16u)]);
- float4 v_86 = asfloat(ub[((16u + start_byte_offset) / 16u)]);
- return float3x4(v_85, v_86, asfloat(ub[((32u + start_byte_offset) / 16u)]));
+float3x4 v_78(uint start_byte_offset) {
+ return float3x4(asfloat(ub[(start_byte_offset / 16u)]), asfloat(ub[((16u + start_byte_offset) / 16u)]), asfloat(ub[((32u + start_byte_offset) / 16u)]));
}
-float3x3 v_87(uint start_byte_offset) {
- float3 v_88 = asfloat(ub[(start_byte_offset / 16u)].xyz);
- float3 v_89 = asfloat(ub[((16u + start_byte_offset) / 16u)].xyz);
- return float3x3(v_88, v_89, asfloat(ub[((32u + start_byte_offset) / 16u)].xyz));
+float3x3 v_79(uint start_byte_offset) {
+ return float3x3(asfloat(ub[(start_byte_offset / 16u)].xyz), asfloat(ub[((16u + start_byte_offset) / 16u)].xyz), asfloat(ub[((32u + start_byte_offset) / 16u)].xyz));
}
-float3x2 v_90(uint start_byte_offset) {
- uint4 v_91 = ub[(start_byte_offset / 16u)];
- float2 v_92 = asfloat((((((start_byte_offset % 16u) / 4u) == 2u)) ? (v_91.zw) : (v_91.xy)));
- uint4 v_93 = ub[((8u + start_byte_offset) / 16u)];
- float2 v_94 = asfloat(((((((8u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_93.zw) : (v_93.xy)));
- uint4 v_95 = ub[((16u + start_byte_offset) / 16u)];
- return float3x2(v_92, v_94, asfloat(((((((16u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_95.zw) : (v_95.xy))));
+float3x2 v_80(uint start_byte_offset) {
+ uint4 v_81 = ub[(start_byte_offset / 16u)];
+ float2 v_82 = asfloat((((((start_byte_offset % 16u) / 4u) == 2u)) ? (v_81.zw) : (v_81.xy)));
+ uint4 v_83 = ub[((8u + start_byte_offset) / 16u)];
+ float2 v_84 = asfloat(((((((8u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_83.zw) : (v_83.xy)));
+ uint4 v_85 = ub[((16u + start_byte_offset) / 16u)];
+ return float3x2(v_82, v_84, asfloat(((((((16u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_85.zw) : (v_85.xy))));
}
-float2x4 v_96(uint start_byte_offset) {
- float4 v_97 = asfloat(ub[(start_byte_offset / 16u)]);
- return float2x4(v_97, asfloat(ub[((16u + start_byte_offset) / 16u)]));
+float2x4 v_86(uint start_byte_offset) {
+ return float2x4(asfloat(ub[(start_byte_offset / 16u)]), asfloat(ub[((16u + start_byte_offset) / 16u)]));
}
-float2x3 v_98(uint start_byte_offset) {
- float3 v_99 = asfloat(ub[(start_byte_offset / 16u)].xyz);
- return float2x3(v_99, asfloat(ub[((16u + start_byte_offset) / 16u)].xyz));
+float2x3 v_87(uint start_byte_offset) {
+ return float2x3(asfloat(ub[(start_byte_offset / 16u)].xyz), asfloat(ub[((16u + start_byte_offset) / 16u)].xyz));
}
-float2x2 v_100(uint start_byte_offset) {
- uint4 v_101 = ub[(start_byte_offset / 16u)];
- float2 v_102 = asfloat((((((start_byte_offset % 16u) / 4u) == 2u)) ? (v_101.zw) : (v_101.xy)));
- uint4 v_103 = ub[((8u + start_byte_offset) / 16u)];
- return float2x2(v_102, asfloat(((((((8u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_103.zw) : (v_103.xy))));
+float2x2 v_88(uint start_byte_offset) {
+ uint4 v_89 = ub[(start_byte_offset / 16u)];
+ float2 v_90 = asfloat((((((start_byte_offset % 16u) / 4u) == 2u)) ? (v_89.zw) : (v_89.xy)));
+ uint4 v_91 = ub[((8u + start_byte_offset) / 16u)];
+ return float2x2(v_90, asfloat(((((((8u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_91.zw) : (v_91.xy))));
}
[numthreads(1, 1, 1)]
@@ -265,14 +253,14 @@
int4 vec4_i32 = asint(ub[8u]);
uint4 vec4_u32 = ub[9u];
vector<float16_t, 4> vec4_f16 = tint_bitcast_to_f16_1(ub[10u].xy);
- float2x2 mat2x2_f32 = v_100(168u);
- float2x3 mat2x3_f32 = v_98(192u);
- float2x4 mat2x4_f32 = v_96(224u);
- float3x2 mat3x2_f32 = v_90(256u);
- float3x3 mat3x3_f32 = v_87(288u);
- float3x4 mat3x4_f32 = v_84(336u);
- float4x2 mat4x2_f32 = v_76(384u);
- float4x3 mat4x3_f32 = v_72(416u);
+ float2x2 mat2x2_f32 = v_88(168u);
+ float2x3 mat2x3_f32 = v_87(192u);
+ float2x4 mat2x4_f32 = v_86(224u);
+ float3x2 mat3x2_f32 = v_80(256u);
+ float3x3 mat3x3_f32 = v_79(288u);
+ float3x4 mat3x4_f32 = v_78(336u);
+ float4x2 mat4x2_f32 = v_70(384u);
+ float4x3 mat4x3_f32 = v_69(416u);
float4x4 mat4x4_f32 = v_68(480u);
matrix<float16_t, 2, 2> mat2x2_f16 = v_66(544u);
matrix<float16_t, 2, 3> mat2x3_f16 = v_62(552u);
@@ -287,37 +275,37 @@
matrix<float16_t, 4, 2> arr2_mat4x2_f16[2] = v_16(768u);
Inner struct_inner = v_1(800u);
Inner array_struct_inner[4] = v_6(816u);
- int v_104 = (tint_f32_to_i32(scalar_f32) + scalar_i32);
- int v_105 = (v_104 + int(scalar_u32));
- int v_106 = (v_105 + tint_f16_to_i32(scalar_f16));
- int v_107 = ((v_106 + tint_f32_to_i32(vec2_f32.x)) + vec2_i32.x);
- int v_108 = (v_107 + int(vec2_u32.x));
- int v_109 = (v_108 + tint_f16_to_i32(vec2_f16.x));
- int v_110 = ((v_109 + tint_f32_to_i32(vec3_f32.y)) + vec3_i32.y);
- int v_111 = (v_110 + int(vec3_u32.y));
- int v_112 = (v_111 + tint_f16_to_i32(vec3_f16.y));
- int v_113 = ((v_112 + tint_f32_to_i32(vec4_f32.z)) + vec4_i32.z);
- int v_114 = (v_113 + int(vec4_u32.z));
- int v_115 = (v_114 + tint_f16_to_i32(vec4_f16.z));
- int v_116 = (v_115 + tint_f32_to_i32(mat2x2_f32[int(0)].x));
- int v_117 = (v_116 + tint_f32_to_i32(mat2x3_f32[int(0)].x));
- int v_118 = (v_117 + tint_f32_to_i32(mat2x4_f32[int(0)].x));
- int v_119 = (v_118 + tint_f32_to_i32(mat3x2_f32[int(0)].x));
- int v_120 = (v_119 + tint_f32_to_i32(mat3x3_f32[int(0)].x));
- int v_121 = (v_120 + tint_f32_to_i32(mat3x4_f32[int(0)].x));
- int v_122 = (v_121 + tint_f32_to_i32(mat4x2_f32[int(0)].x));
- int v_123 = (v_122 + tint_f32_to_i32(mat4x3_f32[int(0)].x));
- int v_124 = (v_123 + tint_f32_to_i32(mat4x4_f32[int(0)].x));
- int v_125 = (v_124 + tint_f16_to_i32(mat2x2_f16[int(0)].x));
- int v_126 = (v_125 + tint_f16_to_i32(mat2x3_f16[int(0)].x));
- int v_127 = (v_126 + tint_f16_to_i32(mat2x4_f16[int(0)].x));
- int v_128 = (v_127 + tint_f16_to_i32(mat3x2_f16[int(0)].x));
- int v_129 = (v_128 + tint_f16_to_i32(mat3x3_f16[int(0)].x));
- int v_130 = (v_129 + tint_f16_to_i32(mat3x4_f16[int(0)].x));
- int v_131 = (v_130 + tint_f16_to_i32(mat4x2_f16[int(0)].x));
- int v_132 = (v_131 + tint_f16_to_i32(mat4x3_f16[int(0)].x));
- int v_133 = (v_132 + tint_f16_to_i32(mat4x4_f16[int(0)].x));
- int v_134 = (v_133 + tint_f32_to_i32(arr2_vec3_f32[int(0)].x));
- s.Store(0u, asuint((((v_134 + tint_f16_to_i32(arr2_mat4x2_f16[int(0)][int(0)].x)) + struct_inner.scalar_i32) + array_struct_inner[int(0)].scalar_i32)));
+ int v_92 = (tint_f32_to_i32(scalar_f32) + scalar_i32);
+ int v_93 = (v_92 + int(scalar_u32));
+ int v_94 = (v_93 + tint_f16_to_i32(scalar_f16));
+ int v_95 = ((v_94 + tint_f32_to_i32(vec2_f32.x)) + vec2_i32.x);
+ int v_96 = (v_95 + int(vec2_u32.x));
+ int v_97 = (v_96 + tint_f16_to_i32(vec2_f16.x));
+ int v_98 = ((v_97 + tint_f32_to_i32(vec3_f32.y)) + vec3_i32.y);
+ int v_99 = (v_98 + int(vec3_u32.y));
+ int v_100 = (v_99 + tint_f16_to_i32(vec3_f16.y));
+ int v_101 = ((v_100 + tint_f32_to_i32(vec4_f32.z)) + vec4_i32.z);
+ int v_102 = (v_101 + int(vec4_u32.z));
+ int v_103 = (v_102 + tint_f16_to_i32(vec4_f16.z));
+ int v_104 = (v_103 + tint_f32_to_i32(mat2x2_f32[int(0)].x));
+ int v_105 = (v_104 + tint_f32_to_i32(mat2x3_f32[int(0)].x));
+ int v_106 = (v_105 + tint_f32_to_i32(mat2x4_f32[int(0)].x));
+ int v_107 = (v_106 + tint_f32_to_i32(mat3x2_f32[int(0)].x));
+ int v_108 = (v_107 + tint_f32_to_i32(mat3x3_f32[int(0)].x));
+ int v_109 = (v_108 + tint_f32_to_i32(mat3x4_f32[int(0)].x));
+ int v_110 = (v_109 + tint_f32_to_i32(mat4x2_f32[int(0)].x));
+ int v_111 = (v_110 + tint_f32_to_i32(mat4x3_f32[int(0)].x));
+ int v_112 = (v_111 + tint_f32_to_i32(mat4x4_f32[int(0)].x));
+ int v_113 = (v_112 + tint_f16_to_i32(mat2x2_f16[int(0)].x));
+ int v_114 = (v_113 + tint_f16_to_i32(mat2x3_f16[int(0)].x));
+ int v_115 = (v_114 + tint_f16_to_i32(mat2x4_f16[int(0)].x));
+ int v_116 = (v_115 + tint_f16_to_i32(mat3x2_f16[int(0)].x));
+ int v_117 = (v_116 + tint_f16_to_i32(mat3x3_f16[int(0)].x));
+ int v_118 = (v_117 + tint_f16_to_i32(mat3x4_f16[int(0)].x));
+ int v_119 = (v_118 + tint_f16_to_i32(mat4x2_f16[int(0)].x));
+ int v_120 = (v_119 + tint_f16_to_i32(mat4x3_f16[int(0)].x));
+ int v_121 = (v_120 + tint_f16_to_i32(mat4x4_f16[int(0)].x));
+ int v_122 = (v_121 + tint_f32_to_i32(arr2_vec3_f32[int(0)].x));
+ s.Store(0u, asuint((((v_122 + tint_f16_to_i32(arr2_mat4x2_f16[int(0)][int(0)].x)) + struct_inner.scalar_i32) + array_struct_inner[int(0)].scalar_i32)));
}
diff --git a/test/tint/buffer/uniform/std140/array/mat2x3_f32/dynamic_index_via_ptr.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/uniform/std140/array/mat2x3_f32/dynamic_index_via_ptr.wgsl.expected.ir.dxc.hlsl
index 8bb6216..325b27c 100644
--- a/test/tint/buffer/uniform/std140/array/mat2x3_f32/dynamic_index_via_ptr.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat2x3_f32/dynamic_index_via_ptr.wgsl.expected.ir.dxc.hlsl
@@ -10,39 +10,38 @@
}
float2x3 v(uint start_byte_offset) {
- float3 v_1 = asfloat(a[(start_byte_offset / 16u)].xyz);
- return float2x3(v_1, asfloat(a[((16u + start_byte_offset) / 16u)].xyz));
+ return float2x3(asfloat(a[(start_byte_offset / 16u)].xyz), asfloat(a[((16u + start_byte_offset) / 16u)].xyz));
}
typedef float2x3 ary_ret[4];
-ary_ret v_2(uint start_byte_offset) {
+ary_ret v_1(uint start_byte_offset) {
float2x3 a_1[4] = (float2x3[4])0;
{
- uint v_3 = 0u;
- v_3 = 0u;
+ uint v_2 = 0u;
+ v_2 = 0u;
while(true) {
- uint v_4 = v_3;
- if ((v_4 >= 4u)) {
+ uint v_3 = v_2;
+ if ((v_3 >= 4u)) {
break;
}
- a_1[v_4] = v((start_byte_offset + (v_4 * 32u)));
+ a_1[v_3] = v((start_byte_offset + (v_3 * 32u)));
{
- v_3 = (v_4 + 1u);
+ v_2 = (v_3 + 1u);
}
continue;
}
}
- float2x3 v_5[4] = a_1;
- return v_5;
+ float2x3 v_4[4] = a_1;
+ return v_4;
}
[numthreads(1, 1, 1)]
void f() {
- uint v_6 = (32u * uint(i()));
- uint v_7 = (16u * uint(i()));
- float2x3 l_a[4] = v_2(0u);
- float2x3 l_a_i = v(v_6);
- float3 l_a_i_i = asfloat(a[((v_6 + v_7) / 16u)].xyz);
- s.Store(0u, asuint((((asfloat(a[((v_6 + v_7) / 16u)][(((v_6 + v_7) % 16u) / 4u)]) + l_a[int(0)][int(0)].x) + l_a_i[int(0)].x) + l_a_i_i.x)));
+ uint v_5 = (32u * uint(i()));
+ uint v_6 = (16u * uint(i()));
+ float2x3 l_a[4] = v_1(0u);
+ float2x3 l_a_i = v(v_5);
+ float3 l_a_i_i = asfloat(a[((v_5 + v_6) / 16u)].xyz);
+ s.Store(0u, asuint((((asfloat(a[((v_5 + v_6) / 16u)][(((v_5 + v_6) % 16u) / 4u)]) + l_a[int(0)][int(0)].x) + l_a_i[int(0)].x) + l_a_i_i.x)));
}
diff --git a/test/tint/buffer/uniform/std140/array/mat2x3_f32/dynamic_index_via_ptr.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/uniform/std140/array/mat2x3_f32/dynamic_index_via_ptr.wgsl.expected.ir.fxc.hlsl
index 8bb6216..325b27c 100644
--- a/test/tint/buffer/uniform/std140/array/mat2x3_f32/dynamic_index_via_ptr.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat2x3_f32/dynamic_index_via_ptr.wgsl.expected.ir.fxc.hlsl
@@ -10,39 +10,38 @@
}
float2x3 v(uint start_byte_offset) {
- float3 v_1 = asfloat(a[(start_byte_offset / 16u)].xyz);
- return float2x3(v_1, asfloat(a[((16u + start_byte_offset) / 16u)].xyz));
+ return float2x3(asfloat(a[(start_byte_offset / 16u)].xyz), asfloat(a[((16u + start_byte_offset) / 16u)].xyz));
}
typedef float2x3 ary_ret[4];
-ary_ret v_2(uint start_byte_offset) {
+ary_ret v_1(uint start_byte_offset) {
float2x3 a_1[4] = (float2x3[4])0;
{
- uint v_3 = 0u;
- v_3 = 0u;
+ uint v_2 = 0u;
+ v_2 = 0u;
while(true) {
- uint v_4 = v_3;
- if ((v_4 >= 4u)) {
+ uint v_3 = v_2;
+ if ((v_3 >= 4u)) {
break;
}
- a_1[v_4] = v((start_byte_offset + (v_4 * 32u)));
+ a_1[v_3] = v((start_byte_offset + (v_3 * 32u)));
{
- v_3 = (v_4 + 1u);
+ v_2 = (v_3 + 1u);
}
continue;
}
}
- float2x3 v_5[4] = a_1;
- return v_5;
+ float2x3 v_4[4] = a_1;
+ return v_4;
}
[numthreads(1, 1, 1)]
void f() {
- uint v_6 = (32u * uint(i()));
- uint v_7 = (16u * uint(i()));
- float2x3 l_a[4] = v_2(0u);
- float2x3 l_a_i = v(v_6);
- float3 l_a_i_i = asfloat(a[((v_6 + v_7) / 16u)].xyz);
- s.Store(0u, asuint((((asfloat(a[((v_6 + v_7) / 16u)][(((v_6 + v_7) % 16u) / 4u)]) + l_a[int(0)][int(0)].x) + l_a_i[int(0)].x) + l_a_i_i.x)));
+ uint v_5 = (32u * uint(i()));
+ uint v_6 = (16u * uint(i()));
+ float2x3 l_a[4] = v_1(0u);
+ float2x3 l_a_i = v(v_5);
+ float3 l_a_i_i = asfloat(a[((v_5 + v_6) / 16u)].xyz);
+ s.Store(0u, asuint((((asfloat(a[((v_5 + v_6) / 16u)][(((v_5 + v_6) % 16u) / 4u)]) + l_a[int(0)][int(0)].x) + l_a_i[int(0)].x) + l_a_i_i.x)));
}
diff --git a/test/tint/buffer/uniform/std140/array/mat2x3_f32/static_index_via_ptr.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/uniform/std140/array/mat2x3_f32/static_index_via_ptr.wgsl.expected.ir.dxc.hlsl
index 3ab616e..a11fbdd 100644
--- a/test/tint/buffer/uniform/std140/array/mat2x3_f32/static_index_via_ptr.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat2x3_f32/static_index_via_ptr.wgsl.expected.ir.dxc.hlsl
@@ -4,35 +4,34 @@
};
RWByteAddressBuffer s : register(u1);
float2x3 v(uint start_byte_offset) {
- float3 v_1 = asfloat(a[(start_byte_offset / 16u)].xyz);
- return float2x3(v_1, asfloat(a[((16u + start_byte_offset) / 16u)].xyz));
+ return float2x3(asfloat(a[(start_byte_offset / 16u)].xyz), asfloat(a[((16u + start_byte_offset) / 16u)].xyz));
}
typedef float2x3 ary_ret[4];
-ary_ret v_2(uint start_byte_offset) {
+ary_ret v_1(uint start_byte_offset) {
float2x3 a_1[4] = (float2x3[4])0;
{
- uint v_3 = 0u;
- v_3 = 0u;
+ uint v_2 = 0u;
+ v_2 = 0u;
while(true) {
- uint v_4 = v_3;
- if ((v_4 >= 4u)) {
+ uint v_3 = v_2;
+ if ((v_3 >= 4u)) {
break;
}
- a_1[v_4] = v((start_byte_offset + (v_4 * 32u)));
+ a_1[v_3] = v((start_byte_offset + (v_3 * 32u)));
{
- v_3 = (v_4 + 1u);
+ v_2 = (v_3 + 1u);
}
continue;
}
}
- float2x3 v_5[4] = a_1;
- return v_5;
+ float2x3 v_4[4] = a_1;
+ return v_4;
}
[numthreads(1, 1, 1)]
void f() {
- float2x3 l_a[4] = v_2(0u);
+ float2x3 l_a[4] = v_1(0u);
float2x3 l_a_i = v(64u);
float3 l_a_i_i = asfloat(a[5u].xyz);
s.Store(0u, asuint((((asfloat(a[5u].x) + l_a[int(0)][int(0)].x) + l_a_i[int(0)].x) + l_a_i_i.x)));
diff --git a/test/tint/buffer/uniform/std140/array/mat2x3_f32/static_index_via_ptr.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/uniform/std140/array/mat2x3_f32/static_index_via_ptr.wgsl.expected.ir.fxc.hlsl
index 3ab616e..a11fbdd 100644
--- a/test/tint/buffer/uniform/std140/array/mat2x3_f32/static_index_via_ptr.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat2x3_f32/static_index_via_ptr.wgsl.expected.ir.fxc.hlsl
@@ -4,35 +4,34 @@
};
RWByteAddressBuffer s : register(u1);
float2x3 v(uint start_byte_offset) {
- float3 v_1 = asfloat(a[(start_byte_offset / 16u)].xyz);
- return float2x3(v_1, asfloat(a[((16u + start_byte_offset) / 16u)].xyz));
+ return float2x3(asfloat(a[(start_byte_offset / 16u)].xyz), asfloat(a[((16u + start_byte_offset) / 16u)].xyz));
}
typedef float2x3 ary_ret[4];
-ary_ret v_2(uint start_byte_offset) {
+ary_ret v_1(uint start_byte_offset) {
float2x3 a_1[4] = (float2x3[4])0;
{
- uint v_3 = 0u;
- v_3 = 0u;
+ uint v_2 = 0u;
+ v_2 = 0u;
while(true) {
- uint v_4 = v_3;
- if ((v_4 >= 4u)) {
+ uint v_3 = v_2;
+ if ((v_3 >= 4u)) {
break;
}
- a_1[v_4] = v((start_byte_offset + (v_4 * 32u)));
+ a_1[v_3] = v((start_byte_offset + (v_3 * 32u)));
{
- v_3 = (v_4 + 1u);
+ v_2 = (v_3 + 1u);
}
continue;
}
}
- float2x3 v_5[4] = a_1;
- return v_5;
+ float2x3 v_4[4] = a_1;
+ return v_4;
}
[numthreads(1, 1, 1)]
void f() {
- float2x3 l_a[4] = v_2(0u);
+ float2x3 l_a[4] = v_1(0u);
float2x3 l_a_i = v(64u);
float3 l_a_i_i = asfloat(a[5u].xyz);
s.Store(0u, asuint((((asfloat(a[5u].x) + l_a[int(0)][int(0)].x) + l_a_i[int(0)].x) + l_a_i_i.x)));
diff --git a/test/tint/buffer/uniform/std140/array/mat2x3_f32/to_builtin.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/uniform/std140/array/mat2x3_f32/to_builtin.wgsl.expected.ir.dxc.hlsl
index 04bd6e3..01302e0 100644
--- a/test/tint/buffer/uniform/std140/array/mat2x3_f32/to_builtin.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat2x3_f32/to_builtin.wgsl.expected.ir.dxc.hlsl
@@ -4,8 +4,7 @@
};
RWByteAddressBuffer s : register(u1);
float2x3 v(uint start_byte_offset) {
- float3 v_1 = asfloat(u[(start_byte_offset / 16u)].xyz);
- return float2x3(v_1, asfloat(u[((16u + start_byte_offset) / 16u)].xyz));
+ return float2x3(asfloat(u[(start_byte_offset / 16u)].xyz), asfloat(u[((16u + start_byte_offset) / 16u)].xyz));
}
[numthreads(1, 1, 1)]
@@ -13,7 +12,7 @@
float3x2 t = transpose(v(64u));
float l = length(asfloat(u[1u].xyz).zxy);
float a = abs(asfloat(u[1u].xyz).zxy.x);
- float v_2 = (t[int(0)].x + float(l));
- s.Store(0u, asuint((v_2 + float(a))));
+ float v_1 = (t[int(0)].x + float(l));
+ s.Store(0u, asuint((v_1 + float(a))));
}
diff --git a/test/tint/buffer/uniform/std140/array/mat2x3_f32/to_builtin.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/uniform/std140/array/mat2x3_f32/to_builtin.wgsl.expected.ir.fxc.hlsl
index 04bd6e3..01302e0 100644
--- a/test/tint/buffer/uniform/std140/array/mat2x3_f32/to_builtin.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat2x3_f32/to_builtin.wgsl.expected.ir.fxc.hlsl
@@ -4,8 +4,7 @@
};
RWByteAddressBuffer s : register(u1);
float2x3 v(uint start_byte_offset) {
- float3 v_1 = asfloat(u[(start_byte_offset / 16u)].xyz);
- return float2x3(v_1, asfloat(u[((16u + start_byte_offset) / 16u)].xyz));
+ return float2x3(asfloat(u[(start_byte_offset / 16u)].xyz), asfloat(u[((16u + start_byte_offset) / 16u)].xyz));
}
[numthreads(1, 1, 1)]
@@ -13,7 +12,7 @@
float3x2 t = transpose(v(64u));
float l = length(asfloat(u[1u].xyz).zxy);
float a = abs(asfloat(u[1u].xyz).zxy.x);
- float v_2 = (t[int(0)].x + float(l));
- s.Store(0u, asuint((v_2 + float(a))));
+ float v_1 = (t[int(0)].x + float(l));
+ s.Store(0u, asuint((v_1 + float(a))));
}
diff --git a/test/tint/buffer/uniform/std140/array/mat2x3_f32/to_fn.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/uniform/std140/array/mat2x3_f32/to_fn.wgsl.expected.ir.dxc.hlsl
index ac9bb3c..872ee57 100644
--- a/test/tint/buffer/uniform/std140/array/mat2x3_f32/to_fn.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat2x3_f32/to_fn.wgsl.expected.ir.dxc.hlsl
@@ -20,38 +20,37 @@
}
float2x3 v_1(uint start_byte_offset) {
- float3 v_2 = asfloat(u[(start_byte_offset / 16u)].xyz);
- return float2x3(v_2, asfloat(u[((16u + start_byte_offset) / 16u)].xyz));
+ return float2x3(asfloat(u[(start_byte_offset / 16u)].xyz), asfloat(u[((16u + start_byte_offset) / 16u)].xyz));
}
typedef float2x3 ary_ret[4];
-ary_ret v_3(uint start_byte_offset) {
+ary_ret v_2(uint start_byte_offset) {
float2x3 a_2[4] = (float2x3[4])0;
{
- uint v_4 = 0u;
- v_4 = 0u;
+ uint v_3 = 0u;
+ v_3 = 0u;
while(true) {
- uint v_5 = v_4;
- if ((v_5 >= 4u)) {
+ uint v_4 = v_3;
+ if ((v_4 >= 4u)) {
break;
}
- a_2[v_5] = v_1((start_byte_offset + (v_5 * 32u)));
+ a_2[v_4] = v_1((start_byte_offset + (v_4 * 32u)));
{
- v_4 = (v_5 + 1u);
+ v_3 = (v_4 + 1u);
}
continue;
}
}
- float2x3 v_6[4] = a_2;
- return v_6;
+ float2x3 v_5[4] = a_2;
+ return v_5;
}
[numthreads(1, 1, 1)]
void f() {
- float2x3 v_7[4] = v_3(0u);
- float v_8 = a(v_7);
- float v_9 = (v_8 + b(v_1(32u)));
- float v_10 = (v_9 + c(asfloat(u[2u].xyz).zxy));
- s.Store(0u, asuint((v_10 + d(asfloat(u[2u].xyz).zxy.x))));
+ float2x3 v_6[4] = v_2(0u);
+ float v_7 = a(v_6);
+ float v_8 = (v_7 + b(v_1(32u)));
+ float v_9 = (v_8 + c(asfloat(u[2u].xyz).zxy));
+ s.Store(0u, asuint((v_9 + d(asfloat(u[2u].xyz).zxy.x))));
}
diff --git a/test/tint/buffer/uniform/std140/array/mat2x3_f32/to_fn.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/uniform/std140/array/mat2x3_f32/to_fn.wgsl.expected.ir.fxc.hlsl
index ac9bb3c..872ee57 100644
--- a/test/tint/buffer/uniform/std140/array/mat2x3_f32/to_fn.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat2x3_f32/to_fn.wgsl.expected.ir.fxc.hlsl
@@ -20,38 +20,37 @@
}
float2x3 v_1(uint start_byte_offset) {
- float3 v_2 = asfloat(u[(start_byte_offset / 16u)].xyz);
- return float2x3(v_2, asfloat(u[((16u + start_byte_offset) / 16u)].xyz));
+ return float2x3(asfloat(u[(start_byte_offset / 16u)].xyz), asfloat(u[((16u + start_byte_offset) / 16u)].xyz));
}
typedef float2x3 ary_ret[4];
-ary_ret v_3(uint start_byte_offset) {
+ary_ret v_2(uint start_byte_offset) {
float2x3 a_2[4] = (float2x3[4])0;
{
- uint v_4 = 0u;
- v_4 = 0u;
+ uint v_3 = 0u;
+ v_3 = 0u;
while(true) {
- uint v_5 = v_4;
- if ((v_5 >= 4u)) {
+ uint v_4 = v_3;
+ if ((v_4 >= 4u)) {
break;
}
- a_2[v_5] = v_1((start_byte_offset + (v_5 * 32u)));
+ a_2[v_4] = v_1((start_byte_offset + (v_4 * 32u)));
{
- v_4 = (v_5 + 1u);
+ v_3 = (v_4 + 1u);
}
continue;
}
}
- float2x3 v_6[4] = a_2;
- return v_6;
+ float2x3 v_5[4] = a_2;
+ return v_5;
}
[numthreads(1, 1, 1)]
void f() {
- float2x3 v_7[4] = v_3(0u);
- float v_8 = a(v_7);
- float v_9 = (v_8 + b(v_1(32u)));
- float v_10 = (v_9 + c(asfloat(u[2u].xyz).zxy));
- s.Store(0u, asuint((v_10 + d(asfloat(u[2u].xyz).zxy.x))));
+ float2x3 v_6[4] = v_2(0u);
+ float v_7 = a(v_6);
+ float v_8 = (v_7 + b(v_1(32u)));
+ float v_9 = (v_8 + c(asfloat(u[2u].xyz).zxy));
+ s.Store(0u, asuint((v_9 + d(asfloat(u[2u].xyz).zxy.x))));
}
diff --git a/test/tint/buffer/uniform/std140/array/mat2x3_f32/to_private.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/uniform/std140/array/mat2x3_f32/to_private.wgsl.expected.ir.dxc.hlsl
index 9652e47..318e079 100644
--- a/test/tint/buffer/uniform/std140/array/mat2x3_f32/to_private.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat2x3_f32/to_private.wgsl.expected.ir.dxc.hlsl
@@ -5,36 +5,35 @@
RWByteAddressBuffer s : register(u1);
static float2x3 p[4] = (float2x3[4])0;
float2x3 v(uint start_byte_offset) {
- float3 v_1 = asfloat(u[(start_byte_offset / 16u)].xyz);
- return float2x3(v_1, asfloat(u[((16u + start_byte_offset) / 16u)].xyz));
+ return float2x3(asfloat(u[(start_byte_offset / 16u)].xyz), asfloat(u[((16u + start_byte_offset) / 16u)].xyz));
}
typedef float2x3 ary_ret[4];
-ary_ret v_2(uint start_byte_offset) {
+ary_ret v_1(uint start_byte_offset) {
float2x3 a[4] = (float2x3[4])0;
{
- uint v_3 = 0u;
- v_3 = 0u;
+ uint v_2 = 0u;
+ v_2 = 0u;
while(true) {
- uint v_4 = v_3;
- if ((v_4 >= 4u)) {
+ uint v_3 = v_2;
+ if ((v_3 >= 4u)) {
break;
}
- a[v_4] = v((start_byte_offset + (v_4 * 32u)));
+ a[v_3] = v((start_byte_offset + (v_3 * 32u)));
{
- v_3 = (v_4 + 1u);
+ v_2 = (v_3 + 1u);
}
continue;
}
}
- float2x3 v_5[4] = a;
- return v_5;
+ float2x3 v_4[4] = a;
+ return v_4;
}
[numthreads(1, 1, 1)]
void f() {
- float2x3 v_6[4] = v_2(0u);
- p = v_6;
+ float2x3 v_5[4] = v_1(0u);
+ p = v_5;
p[int(1)] = v(64u);
p[int(1)][int(0)] = asfloat(u[1u].xyz).zxy;
p[int(1)][int(0)].x = asfloat(u[1u].x);
diff --git a/test/tint/buffer/uniform/std140/array/mat2x3_f32/to_private.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/uniform/std140/array/mat2x3_f32/to_private.wgsl.expected.ir.fxc.hlsl
index 9652e47..318e079 100644
--- a/test/tint/buffer/uniform/std140/array/mat2x3_f32/to_private.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat2x3_f32/to_private.wgsl.expected.ir.fxc.hlsl
@@ -5,36 +5,35 @@
RWByteAddressBuffer s : register(u1);
static float2x3 p[4] = (float2x3[4])0;
float2x3 v(uint start_byte_offset) {
- float3 v_1 = asfloat(u[(start_byte_offset / 16u)].xyz);
- return float2x3(v_1, asfloat(u[((16u + start_byte_offset) / 16u)].xyz));
+ return float2x3(asfloat(u[(start_byte_offset / 16u)].xyz), asfloat(u[((16u + start_byte_offset) / 16u)].xyz));
}
typedef float2x3 ary_ret[4];
-ary_ret v_2(uint start_byte_offset) {
+ary_ret v_1(uint start_byte_offset) {
float2x3 a[4] = (float2x3[4])0;
{
- uint v_3 = 0u;
- v_3 = 0u;
+ uint v_2 = 0u;
+ v_2 = 0u;
while(true) {
- uint v_4 = v_3;
- if ((v_4 >= 4u)) {
+ uint v_3 = v_2;
+ if ((v_3 >= 4u)) {
break;
}
- a[v_4] = v((start_byte_offset + (v_4 * 32u)));
+ a[v_3] = v((start_byte_offset + (v_3 * 32u)));
{
- v_3 = (v_4 + 1u);
+ v_2 = (v_3 + 1u);
}
continue;
}
}
- float2x3 v_5[4] = a;
- return v_5;
+ float2x3 v_4[4] = a;
+ return v_4;
}
[numthreads(1, 1, 1)]
void f() {
- float2x3 v_6[4] = v_2(0u);
- p = v_6;
+ float2x3 v_5[4] = v_1(0u);
+ p = v_5;
p[int(1)] = v(64u);
p[int(1)][int(0)] = asfloat(u[1u].xyz).zxy;
p[int(1)][int(0)].x = asfloat(u[1u].x);
diff --git a/test/tint/buffer/uniform/std140/array/mat2x3_f32/to_storage.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/uniform/std140/array/mat2x3_f32/to_storage.wgsl.expected.ir.dxc.hlsl
index dcf2ece..b985ba1 100644
--- a/test/tint/buffer/uniform/std140/array/mat2x3_f32/to_storage.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat2x3_f32/to_storage.wgsl.expected.ir.dxc.hlsl
@@ -9,22 +9,21 @@
}
float2x3 v_1(uint start_byte_offset) {
- float3 v_2 = asfloat(u[(start_byte_offset / 16u)].xyz);
- return float2x3(v_2, asfloat(u[((16u + start_byte_offset) / 16u)].xyz));
+ return float2x3(asfloat(u[(start_byte_offset / 16u)].xyz), asfloat(u[((16u + start_byte_offset) / 16u)].xyz));
}
-void v_3(uint offset, float2x3 obj[4]) {
+void v_2(uint offset, float2x3 obj[4]) {
{
- uint v_4 = 0u;
- v_4 = 0u;
+ uint v_3 = 0u;
+ v_3 = 0u;
while(true) {
- uint v_5 = v_4;
- if ((v_5 >= 4u)) {
+ uint v_4 = v_3;
+ if ((v_4 >= 4u)) {
break;
}
- v((offset + (v_5 * 32u)), obj[v_5]);
+ v((offset + (v_4 * 32u)), obj[v_4]);
{
- v_4 = (v_5 + 1u);
+ v_3 = (v_4 + 1u);
}
continue;
}
@@ -32,31 +31,31 @@
}
typedef float2x3 ary_ret[4];
-ary_ret v_6(uint start_byte_offset) {
+ary_ret v_5(uint start_byte_offset) {
float2x3 a[4] = (float2x3[4])0;
{
- uint v_7 = 0u;
- v_7 = 0u;
+ uint v_6 = 0u;
+ v_6 = 0u;
while(true) {
- uint v_8 = v_7;
- if ((v_8 >= 4u)) {
+ uint v_7 = v_6;
+ if ((v_7 >= 4u)) {
break;
}
- a[v_8] = v_1((start_byte_offset + (v_8 * 32u)));
+ a[v_7] = v_1((start_byte_offset + (v_7 * 32u)));
{
- v_7 = (v_8 + 1u);
+ v_6 = (v_7 + 1u);
}
continue;
}
}
- float2x3 v_9[4] = a;
- return v_9;
+ float2x3 v_8[4] = a;
+ return v_8;
}
[numthreads(1, 1, 1)]
void f() {
- float2x3 v_10[4] = v_6(0u);
- v_3(0u, v_10);
+ float2x3 v_9[4] = v_5(0u);
+ v_2(0u, v_9);
v(32u, v_1(64u));
s.Store3(32u, asuint(asfloat(u[1u].xyz).zxy));
s.Store(32u, asuint(asfloat(u[1u].x)));
diff --git a/test/tint/buffer/uniform/std140/array/mat2x3_f32/to_storage.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/uniform/std140/array/mat2x3_f32/to_storage.wgsl.expected.ir.fxc.hlsl
index dcf2ece..b985ba1 100644
--- a/test/tint/buffer/uniform/std140/array/mat2x3_f32/to_storage.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat2x3_f32/to_storage.wgsl.expected.ir.fxc.hlsl
@@ -9,22 +9,21 @@
}
float2x3 v_1(uint start_byte_offset) {
- float3 v_2 = asfloat(u[(start_byte_offset / 16u)].xyz);
- return float2x3(v_2, asfloat(u[((16u + start_byte_offset) / 16u)].xyz));
+ return float2x3(asfloat(u[(start_byte_offset / 16u)].xyz), asfloat(u[((16u + start_byte_offset) / 16u)].xyz));
}
-void v_3(uint offset, float2x3 obj[4]) {
+void v_2(uint offset, float2x3 obj[4]) {
{
- uint v_4 = 0u;
- v_4 = 0u;
+ uint v_3 = 0u;
+ v_3 = 0u;
while(true) {
- uint v_5 = v_4;
- if ((v_5 >= 4u)) {
+ uint v_4 = v_3;
+ if ((v_4 >= 4u)) {
break;
}
- v((offset + (v_5 * 32u)), obj[v_5]);
+ v((offset + (v_4 * 32u)), obj[v_4]);
{
- v_4 = (v_5 + 1u);
+ v_3 = (v_4 + 1u);
}
continue;
}
@@ -32,31 +31,31 @@
}
typedef float2x3 ary_ret[4];
-ary_ret v_6(uint start_byte_offset) {
+ary_ret v_5(uint start_byte_offset) {
float2x3 a[4] = (float2x3[4])0;
{
- uint v_7 = 0u;
- v_7 = 0u;
+ uint v_6 = 0u;
+ v_6 = 0u;
while(true) {
- uint v_8 = v_7;
- if ((v_8 >= 4u)) {
+ uint v_7 = v_6;
+ if ((v_7 >= 4u)) {
break;
}
- a[v_8] = v_1((start_byte_offset + (v_8 * 32u)));
+ a[v_7] = v_1((start_byte_offset + (v_7 * 32u)));
{
- v_7 = (v_8 + 1u);
+ v_6 = (v_7 + 1u);
}
continue;
}
}
- float2x3 v_9[4] = a;
- return v_9;
+ float2x3 v_8[4] = a;
+ return v_8;
}
[numthreads(1, 1, 1)]
void f() {
- float2x3 v_10[4] = v_6(0u);
- v_3(0u, v_10);
+ float2x3 v_9[4] = v_5(0u);
+ v_2(0u, v_9);
v(32u, v_1(64u));
s.Store3(32u, asuint(asfloat(u[1u].xyz).zxy));
s.Store(32u, asuint(asfloat(u[1u].x)));
diff --git a/test/tint/buffer/uniform/std140/array/mat2x3_f32/to_workgroup.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/uniform/std140/array/mat2x3_f32/to_workgroup.wgsl.expected.ir.dxc.hlsl
index a84bd9e..4292b8b 100644
--- a/test/tint/buffer/uniform/std140/array/mat2x3_f32/to_workgroup.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat2x3_f32/to_workgroup.wgsl.expected.ir.dxc.hlsl
@@ -8,51 +8,50 @@
};
groupshared float2x3 w[4];
float2x3 v(uint start_byte_offset) {
- float3 v_1 = asfloat(u[(start_byte_offset / 16u)].xyz);
- return float2x3(v_1, asfloat(u[((16u + start_byte_offset) / 16u)].xyz));
+ return float2x3(asfloat(u[(start_byte_offset / 16u)].xyz), asfloat(u[((16u + start_byte_offset) / 16u)].xyz));
}
typedef float2x3 ary_ret[4];
-ary_ret v_2(uint start_byte_offset) {
+ary_ret v_1(uint start_byte_offset) {
float2x3 a[4] = (float2x3[4])0;
{
- uint v_3 = 0u;
- v_3 = 0u;
+ uint v_2 = 0u;
+ v_2 = 0u;
while(true) {
- uint v_4 = v_3;
- if ((v_4 >= 4u)) {
+ uint v_3 = v_2;
+ if ((v_3 >= 4u)) {
break;
}
- a[v_4] = v((start_byte_offset + (v_4 * 32u)));
+ a[v_3] = v((start_byte_offset + (v_3 * 32u)));
{
- v_3 = (v_4 + 1u);
+ v_2 = (v_3 + 1u);
}
continue;
}
}
- float2x3 v_5[4] = a;
- return v_5;
+ float2x3 v_4[4] = a;
+ return v_4;
}
void f_inner(uint tint_local_index) {
{
- uint v_6 = 0u;
- v_6 = tint_local_index;
+ uint v_5 = 0u;
+ v_5 = tint_local_index;
while(true) {
- uint v_7 = v_6;
- if ((v_7 >= 4u)) {
+ uint v_6 = v_5;
+ if ((v_6 >= 4u)) {
break;
}
- w[v_7] = float2x3((0.0f).xxx, (0.0f).xxx);
+ w[v_6] = float2x3((0.0f).xxx, (0.0f).xxx);
{
- v_6 = (v_7 + 1u);
+ v_5 = (v_6 + 1u);
}
continue;
}
}
GroupMemoryBarrierWithGroupSync();
- float2x3 v_8[4] = v_2(0u);
- w = v_8;
+ float2x3 v_7[4] = v_1(0u);
+ w = v_7;
w[int(1)] = v(64u);
w[int(1)][int(0)] = asfloat(u[1u].xyz).zxy;
w[int(1)][int(0)].x = asfloat(u[1u].x);
diff --git a/test/tint/buffer/uniform/std140/array/mat2x3_f32/to_workgroup.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/uniform/std140/array/mat2x3_f32/to_workgroup.wgsl.expected.ir.fxc.hlsl
index a84bd9e..4292b8b 100644
--- a/test/tint/buffer/uniform/std140/array/mat2x3_f32/to_workgroup.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat2x3_f32/to_workgroup.wgsl.expected.ir.fxc.hlsl
@@ -8,51 +8,50 @@
};
groupshared float2x3 w[4];
float2x3 v(uint start_byte_offset) {
- float3 v_1 = asfloat(u[(start_byte_offset / 16u)].xyz);
- return float2x3(v_1, asfloat(u[((16u + start_byte_offset) / 16u)].xyz));
+ return float2x3(asfloat(u[(start_byte_offset / 16u)].xyz), asfloat(u[((16u + start_byte_offset) / 16u)].xyz));
}
typedef float2x3 ary_ret[4];
-ary_ret v_2(uint start_byte_offset) {
+ary_ret v_1(uint start_byte_offset) {
float2x3 a[4] = (float2x3[4])0;
{
- uint v_3 = 0u;
- v_3 = 0u;
+ uint v_2 = 0u;
+ v_2 = 0u;
while(true) {
- uint v_4 = v_3;
- if ((v_4 >= 4u)) {
+ uint v_3 = v_2;
+ if ((v_3 >= 4u)) {
break;
}
- a[v_4] = v((start_byte_offset + (v_4 * 32u)));
+ a[v_3] = v((start_byte_offset + (v_3 * 32u)));
{
- v_3 = (v_4 + 1u);
+ v_2 = (v_3 + 1u);
}
continue;
}
}
- float2x3 v_5[4] = a;
- return v_5;
+ float2x3 v_4[4] = a;
+ return v_4;
}
void f_inner(uint tint_local_index) {
{
- uint v_6 = 0u;
- v_6 = tint_local_index;
+ uint v_5 = 0u;
+ v_5 = tint_local_index;
while(true) {
- uint v_7 = v_6;
- if ((v_7 >= 4u)) {
+ uint v_6 = v_5;
+ if ((v_6 >= 4u)) {
break;
}
- w[v_7] = float2x3((0.0f).xxx, (0.0f).xxx);
+ w[v_6] = float2x3((0.0f).xxx, (0.0f).xxx);
{
- v_6 = (v_7 + 1u);
+ v_5 = (v_6 + 1u);
}
continue;
}
}
GroupMemoryBarrierWithGroupSync();
- float2x3 v_8[4] = v_2(0u);
- w = v_8;
+ float2x3 v_7[4] = v_1(0u);
+ w = v_7;
w[int(1)] = v(64u);
w[int(1)][int(0)] = asfloat(u[1u].xyz).zxy;
w[int(1)][int(0)].x = asfloat(u[1u].x);
diff --git a/test/tint/buffer/uniform/std140/array/mat2x4_f32/dynamic_index_via_ptr.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/uniform/std140/array/mat2x4_f32/dynamic_index_via_ptr.wgsl.expected.ir.dxc.hlsl
index bad0dd2..ce9262d 100644
--- a/test/tint/buffer/uniform/std140/array/mat2x4_f32/dynamic_index_via_ptr.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat2x4_f32/dynamic_index_via_ptr.wgsl.expected.ir.dxc.hlsl
@@ -10,39 +10,38 @@
}
float2x4 v(uint start_byte_offset) {
- float4 v_1 = asfloat(a[(start_byte_offset / 16u)]);
- return float2x4(v_1, asfloat(a[((16u + start_byte_offset) / 16u)]));
+ return float2x4(asfloat(a[(start_byte_offset / 16u)]), asfloat(a[((16u + start_byte_offset) / 16u)]));
}
typedef float2x4 ary_ret[4];
-ary_ret v_2(uint start_byte_offset) {
+ary_ret v_1(uint start_byte_offset) {
float2x4 a_1[4] = (float2x4[4])0;
{
- uint v_3 = 0u;
- v_3 = 0u;
+ uint v_2 = 0u;
+ v_2 = 0u;
while(true) {
- uint v_4 = v_3;
- if ((v_4 >= 4u)) {
+ uint v_3 = v_2;
+ if ((v_3 >= 4u)) {
break;
}
- a_1[v_4] = v((start_byte_offset + (v_4 * 32u)));
+ a_1[v_3] = v((start_byte_offset + (v_3 * 32u)));
{
- v_3 = (v_4 + 1u);
+ v_2 = (v_3 + 1u);
}
continue;
}
}
- float2x4 v_5[4] = a_1;
- return v_5;
+ float2x4 v_4[4] = a_1;
+ return v_4;
}
[numthreads(1, 1, 1)]
void f() {
- uint v_6 = (32u * uint(i()));
- uint v_7 = (16u * uint(i()));
- float2x4 l_a[4] = v_2(0u);
- float2x4 l_a_i = v(v_6);
- float4 l_a_i_i = asfloat(a[((v_6 + v_7) / 16u)]);
- s.Store(0u, asuint((((asfloat(a[((v_6 + v_7) / 16u)][(((v_6 + v_7) % 16u) / 4u)]) + l_a[int(0)][int(0)].x) + l_a_i[int(0)].x) + l_a_i_i.x)));
+ uint v_5 = (32u * uint(i()));
+ uint v_6 = (16u * uint(i()));
+ float2x4 l_a[4] = v_1(0u);
+ float2x4 l_a_i = v(v_5);
+ float4 l_a_i_i = asfloat(a[((v_5 + v_6) / 16u)]);
+ s.Store(0u, asuint((((asfloat(a[((v_5 + v_6) / 16u)][(((v_5 + v_6) % 16u) / 4u)]) + l_a[int(0)][int(0)].x) + l_a_i[int(0)].x) + l_a_i_i.x)));
}
diff --git a/test/tint/buffer/uniform/std140/array/mat2x4_f32/dynamic_index_via_ptr.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/uniform/std140/array/mat2x4_f32/dynamic_index_via_ptr.wgsl.expected.ir.fxc.hlsl
index bad0dd2..ce9262d 100644
--- a/test/tint/buffer/uniform/std140/array/mat2x4_f32/dynamic_index_via_ptr.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat2x4_f32/dynamic_index_via_ptr.wgsl.expected.ir.fxc.hlsl
@@ -10,39 +10,38 @@
}
float2x4 v(uint start_byte_offset) {
- float4 v_1 = asfloat(a[(start_byte_offset / 16u)]);
- return float2x4(v_1, asfloat(a[((16u + start_byte_offset) / 16u)]));
+ return float2x4(asfloat(a[(start_byte_offset / 16u)]), asfloat(a[((16u + start_byte_offset) / 16u)]));
}
typedef float2x4 ary_ret[4];
-ary_ret v_2(uint start_byte_offset) {
+ary_ret v_1(uint start_byte_offset) {
float2x4 a_1[4] = (float2x4[4])0;
{
- uint v_3 = 0u;
- v_3 = 0u;
+ uint v_2 = 0u;
+ v_2 = 0u;
while(true) {
- uint v_4 = v_3;
- if ((v_4 >= 4u)) {
+ uint v_3 = v_2;
+ if ((v_3 >= 4u)) {
break;
}
- a_1[v_4] = v((start_byte_offset + (v_4 * 32u)));
+ a_1[v_3] = v((start_byte_offset + (v_3 * 32u)));
{
- v_3 = (v_4 + 1u);
+ v_2 = (v_3 + 1u);
}
continue;
}
}
- float2x4 v_5[4] = a_1;
- return v_5;
+ float2x4 v_4[4] = a_1;
+ return v_4;
}
[numthreads(1, 1, 1)]
void f() {
- uint v_6 = (32u * uint(i()));
- uint v_7 = (16u * uint(i()));
- float2x4 l_a[4] = v_2(0u);
- float2x4 l_a_i = v(v_6);
- float4 l_a_i_i = asfloat(a[((v_6 + v_7) / 16u)]);
- s.Store(0u, asuint((((asfloat(a[((v_6 + v_7) / 16u)][(((v_6 + v_7) % 16u) / 4u)]) + l_a[int(0)][int(0)].x) + l_a_i[int(0)].x) + l_a_i_i.x)));
+ uint v_5 = (32u * uint(i()));
+ uint v_6 = (16u * uint(i()));
+ float2x4 l_a[4] = v_1(0u);
+ float2x4 l_a_i = v(v_5);
+ float4 l_a_i_i = asfloat(a[((v_5 + v_6) / 16u)]);
+ s.Store(0u, asuint((((asfloat(a[((v_5 + v_6) / 16u)][(((v_5 + v_6) % 16u) / 4u)]) + l_a[int(0)][int(0)].x) + l_a_i[int(0)].x) + l_a_i_i.x)));
}
diff --git a/test/tint/buffer/uniform/std140/array/mat2x4_f32/static_index_via_ptr.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/uniform/std140/array/mat2x4_f32/static_index_via_ptr.wgsl.expected.ir.dxc.hlsl
index e2dc160..a8803db 100644
--- a/test/tint/buffer/uniform/std140/array/mat2x4_f32/static_index_via_ptr.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat2x4_f32/static_index_via_ptr.wgsl.expected.ir.dxc.hlsl
@@ -4,35 +4,34 @@
};
RWByteAddressBuffer s : register(u1);
float2x4 v(uint start_byte_offset) {
- float4 v_1 = asfloat(a[(start_byte_offset / 16u)]);
- return float2x4(v_1, asfloat(a[((16u + start_byte_offset) / 16u)]));
+ return float2x4(asfloat(a[(start_byte_offset / 16u)]), asfloat(a[((16u + start_byte_offset) / 16u)]));
}
typedef float2x4 ary_ret[4];
-ary_ret v_2(uint start_byte_offset) {
+ary_ret v_1(uint start_byte_offset) {
float2x4 a_1[4] = (float2x4[4])0;
{
- uint v_3 = 0u;
- v_3 = 0u;
+ uint v_2 = 0u;
+ v_2 = 0u;
while(true) {
- uint v_4 = v_3;
- if ((v_4 >= 4u)) {
+ uint v_3 = v_2;
+ if ((v_3 >= 4u)) {
break;
}
- a_1[v_4] = v((start_byte_offset + (v_4 * 32u)));
+ a_1[v_3] = v((start_byte_offset + (v_3 * 32u)));
{
- v_3 = (v_4 + 1u);
+ v_2 = (v_3 + 1u);
}
continue;
}
}
- float2x4 v_5[4] = a_1;
- return v_5;
+ float2x4 v_4[4] = a_1;
+ return v_4;
}
[numthreads(1, 1, 1)]
void f() {
- float2x4 l_a[4] = v_2(0u);
+ float2x4 l_a[4] = v_1(0u);
float2x4 l_a_i = v(64u);
float4 l_a_i_i = asfloat(a[5u]);
s.Store(0u, asuint((((asfloat(a[5u].x) + l_a[int(0)][int(0)].x) + l_a_i[int(0)].x) + l_a_i_i.x)));
diff --git a/test/tint/buffer/uniform/std140/array/mat2x4_f32/static_index_via_ptr.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/uniform/std140/array/mat2x4_f32/static_index_via_ptr.wgsl.expected.ir.fxc.hlsl
index e2dc160..a8803db 100644
--- a/test/tint/buffer/uniform/std140/array/mat2x4_f32/static_index_via_ptr.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat2x4_f32/static_index_via_ptr.wgsl.expected.ir.fxc.hlsl
@@ -4,35 +4,34 @@
};
RWByteAddressBuffer s : register(u1);
float2x4 v(uint start_byte_offset) {
- float4 v_1 = asfloat(a[(start_byte_offset / 16u)]);
- return float2x4(v_1, asfloat(a[((16u + start_byte_offset) / 16u)]));
+ return float2x4(asfloat(a[(start_byte_offset / 16u)]), asfloat(a[((16u + start_byte_offset) / 16u)]));
}
typedef float2x4 ary_ret[4];
-ary_ret v_2(uint start_byte_offset) {
+ary_ret v_1(uint start_byte_offset) {
float2x4 a_1[4] = (float2x4[4])0;
{
- uint v_3 = 0u;
- v_3 = 0u;
+ uint v_2 = 0u;
+ v_2 = 0u;
while(true) {
- uint v_4 = v_3;
- if ((v_4 >= 4u)) {
+ uint v_3 = v_2;
+ if ((v_3 >= 4u)) {
break;
}
- a_1[v_4] = v((start_byte_offset + (v_4 * 32u)));
+ a_1[v_3] = v((start_byte_offset + (v_3 * 32u)));
{
- v_3 = (v_4 + 1u);
+ v_2 = (v_3 + 1u);
}
continue;
}
}
- float2x4 v_5[4] = a_1;
- return v_5;
+ float2x4 v_4[4] = a_1;
+ return v_4;
}
[numthreads(1, 1, 1)]
void f() {
- float2x4 l_a[4] = v_2(0u);
+ float2x4 l_a[4] = v_1(0u);
float2x4 l_a_i = v(64u);
float4 l_a_i_i = asfloat(a[5u]);
s.Store(0u, asuint((((asfloat(a[5u].x) + l_a[int(0)][int(0)].x) + l_a_i[int(0)].x) + l_a_i_i.x)));
diff --git a/test/tint/buffer/uniform/std140/array/mat2x4_f32/to_builtin.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/uniform/std140/array/mat2x4_f32/to_builtin.wgsl.expected.ir.dxc.hlsl
index 5314cca..6d46199 100644
--- a/test/tint/buffer/uniform/std140/array/mat2x4_f32/to_builtin.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat2x4_f32/to_builtin.wgsl.expected.ir.dxc.hlsl
@@ -4,8 +4,7 @@
};
RWByteAddressBuffer s : register(u1);
float2x4 v(uint start_byte_offset) {
- float4 v_1 = asfloat(u[(start_byte_offset / 16u)]);
- return float2x4(v_1, asfloat(u[((16u + start_byte_offset) / 16u)]));
+ return float2x4(asfloat(u[(start_byte_offset / 16u)]), asfloat(u[((16u + start_byte_offset) / 16u)]));
}
[numthreads(1, 1, 1)]
@@ -13,7 +12,7 @@
float4x2 t = transpose(v(64u));
float l = length(asfloat(u[1u]).ywxz);
float a = abs(asfloat(u[1u]).ywxz.x);
- float v_2 = (t[int(0)].x + float(l));
- s.Store(0u, asuint((v_2 + float(a))));
+ float v_1 = (t[int(0)].x + float(l));
+ s.Store(0u, asuint((v_1 + float(a))));
}
diff --git a/test/tint/buffer/uniform/std140/array/mat2x4_f32/to_builtin.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/uniform/std140/array/mat2x4_f32/to_builtin.wgsl.expected.ir.fxc.hlsl
index 5314cca..6d46199 100644
--- a/test/tint/buffer/uniform/std140/array/mat2x4_f32/to_builtin.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat2x4_f32/to_builtin.wgsl.expected.ir.fxc.hlsl
@@ -4,8 +4,7 @@
};
RWByteAddressBuffer s : register(u1);
float2x4 v(uint start_byte_offset) {
- float4 v_1 = asfloat(u[(start_byte_offset / 16u)]);
- return float2x4(v_1, asfloat(u[((16u + start_byte_offset) / 16u)]));
+ return float2x4(asfloat(u[(start_byte_offset / 16u)]), asfloat(u[((16u + start_byte_offset) / 16u)]));
}
[numthreads(1, 1, 1)]
@@ -13,7 +12,7 @@
float4x2 t = transpose(v(64u));
float l = length(asfloat(u[1u]).ywxz);
float a = abs(asfloat(u[1u]).ywxz.x);
- float v_2 = (t[int(0)].x + float(l));
- s.Store(0u, asuint((v_2 + float(a))));
+ float v_1 = (t[int(0)].x + float(l));
+ s.Store(0u, asuint((v_1 + float(a))));
}
diff --git a/test/tint/buffer/uniform/std140/array/mat2x4_f32/to_fn.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/uniform/std140/array/mat2x4_f32/to_fn.wgsl.expected.ir.dxc.hlsl
index b25714f..a33ecae 100644
--- a/test/tint/buffer/uniform/std140/array/mat2x4_f32/to_fn.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat2x4_f32/to_fn.wgsl.expected.ir.dxc.hlsl
@@ -20,38 +20,37 @@
}
float2x4 v_1(uint start_byte_offset) {
- float4 v_2 = asfloat(u[(start_byte_offset / 16u)]);
- return float2x4(v_2, asfloat(u[((16u + start_byte_offset) / 16u)]));
+ return float2x4(asfloat(u[(start_byte_offset / 16u)]), asfloat(u[((16u + start_byte_offset) / 16u)]));
}
typedef float2x4 ary_ret[4];
-ary_ret v_3(uint start_byte_offset) {
+ary_ret v_2(uint start_byte_offset) {
float2x4 a_2[4] = (float2x4[4])0;
{
- uint v_4 = 0u;
- v_4 = 0u;
+ uint v_3 = 0u;
+ v_3 = 0u;
while(true) {
- uint v_5 = v_4;
- if ((v_5 >= 4u)) {
+ uint v_4 = v_3;
+ if ((v_4 >= 4u)) {
break;
}
- a_2[v_5] = v_1((start_byte_offset + (v_5 * 32u)));
+ a_2[v_4] = v_1((start_byte_offset + (v_4 * 32u)));
{
- v_4 = (v_5 + 1u);
+ v_3 = (v_4 + 1u);
}
continue;
}
}
- float2x4 v_6[4] = a_2;
- return v_6;
+ float2x4 v_5[4] = a_2;
+ return v_5;
}
[numthreads(1, 1, 1)]
void f() {
- float2x4 v_7[4] = v_3(0u);
- float v_8 = a(v_7);
- float v_9 = (v_8 + b(v_1(32u)));
- float v_10 = (v_9 + c(asfloat(u[2u]).ywxz));
- s.Store(0u, asuint((v_10 + d(asfloat(u[2u]).ywxz.x))));
+ float2x4 v_6[4] = v_2(0u);
+ float v_7 = a(v_6);
+ float v_8 = (v_7 + b(v_1(32u)));
+ float v_9 = (v_8 + c(asfloat(u[2u]).ywxz));
+ s.Store(0u, asuint((v_9 + d(asfloat(u[2u]).ywxz.x))));
}
diff --git a/test/tint/buffer/uniform/std140/array/mat2x4_f32/to_fn.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/uniform/std140/array/mat2x4_f32/to_fn.wgsl.expected.ir.fxc.hlsl
index b25714f..a33ecae 100644
--- a/test/tint/buffer/uniform/std140/array/mat2x4_f32/to_fn.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat2x4_f32/to_fn.wgsl.expected.ir.fxc.hlsl
@@ -20,38 +20,37 @@
}
float2x4 v_1(uint start_byte_offset) {
- float4 v_2 = asfloat(u[(start_byte_offset / 16u)]);
- return float2x4(v_2, asfloat(u[((16u + start_byte_offset) / 16u)]));
+ return float2x4(asfloat(u[(start_byte_offset / 16u)]), asfloat(u[((16u + start_byte_offset) / 16u)]));
}
typedef float2x4 ary_ret[4];
-ary_ret v_3(uint start_byte_offset) {
+ary_ret v_2(uint start_byte_offset) {
float2x4 a_2[4] = (float2x4[4])0;
{
- uint v_4 = 0u;
- v_4 = 0u;
+ uint v_3 = 0u;
+ v_3 = 0u;
while(true) {
- uint v_5 = v_4;
- if ((v_5 >= 4u)) {
+ uint v_4 = v_3;
+ if ((v_4 >= 4u)) {
break;
}
- a_2[v_5] = v_1((start_byte_offset + (v_5 * 32u)));
+ a_2[v_4] = v_1((start_byte_offset + (v_4 * 32u)));
{
- v_4 = (v_5 + 1u);
+ v_3 = (v_4 + 1u);
}
continue;
}
}
- float2x4 v_6[4] = a_2;
- return v_6;
+ float2x4 v_5[4] = a_2;
+ return v_5;
}
[numthreads(1, 1, 1)]
void f() {
- float2x4 v_7[4] = v_3(0u);
- float v_8 = a(v_7);
- float v_9 = (v_8 + b(v_1(32u)));
- float v_10 = (v_9 + c(asfloat(u[2u]).ywxz));
- s.Store(0u, asuint((v_10 + d(asfloat(u[2u]).ywxz.x))));
+ float2x4 v_6[4] = v_2(0u);
+ float v_7 = a(v_6);
+ float v_8 = (v_7 + b(v_1(32u)));
+ float v_9 = (v_8 + c(asfloat(u[2u]).ywxz));
+ s.Store(0u, asuint((v_9 + d(asfloat(u[2u]).ywxz.x))));
}
diff --git a/test/tint/buffer/uniform/std140/array/mat2x4_f32/to_private.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/uniform/std140/array/mat2x4_f32/to_private.wgsl.expected.ir.dxc.hlsl
index 5270b9b..38f12e0 100644
--- a/test/tint/buffer/uniform/std140/array/mat2x4_f32/to_private.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat2x4_f32/to_private.wgsl.expected.ir.dxc.hlsl
@@ -5,36 +5,35 @@
RWByteAddressBuffer s : register(u1);
static float2x4 p[4] = (float2x4[4])0;
float2x4 v(uint start_byte_offset) {
- float4 v_1 = asfloat(u[(start_byte_offset / 16u)]);
- return float2x4(v_1, asfloat(u[((16u + start_byte_offset) / 16u)]));
+ return float2x4(asfloat(u[(start_byte_offset / 16u)]), asfloat(u[((16u + start_byte_offset) / 16u)]));
}
typedef float2x4 ary_ret[4];
-ary_ret v_2(uint start_byte_offset) {
+ary_ret v_1(uint start_byte_offset) {
float2x4 a[4] = (float2x4[4])0;
{
- uint v_3 = 0u;
- v_3 = 0u;
+ uint v_2 = 0u;
+ v_2 = 0u;
while(true) {
- uint v_4 = v_3;
- if ((v_4 >= 4u)) {
+ uint v_3 = v_2;
+ if ((v_3 >= 4u)) {
break;
}
- a[v_4] = v((start_byte_offset + (v_4 * 32u)));
+ a[v_3] = v((start_byte_offset + (v_3 * 32u)));
{
- v_3 = (v_4 + 1u);
+ v_2 = (v_3 + 1u);
}
continue;
}
}
- float2x4 v_5[4] = a;
- return v_5;
+ float2x4 v_4[4] = a;
+ return v_4;
}
[numthreads(1, 1, 1)]
void f() {
- float2x4 v_6[4] = v_2(0u);
- p = v_6;
+ float2x4 v_5[4] = v_1(0u);
+ p = v_5;
p[int(1)] = v(64u);
p[int(1)][int(0)] = asfloat(u[1u]).ywxz;
p[int(1)][int(0)].x = asfloat(u[1u].x);
diff --git a/test/tint/buffer/uniform/std140/array/mat2x4_f32/to_private.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/uniform/std140/array/mat2x4_f32/to_private.wgsl.expected.ir.fxc.hlsl
index 5270b9b..38f12e0 100644
--- a/test/tint/buffer/uniform/std140/array/mat2x4_f32/to_private.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat2x4_f32/to_private.wgsl.expected.ir.fxc.hlsl
@@ -5,36 +5,35 @@
RWByteAddressBuffer s : register(u1);
static float2x4 p[4] = (float2x4[4])0;
float2x4 v(uint start_byte_offset) {
- float4 v_1 = asfloat(u[(start_byte_offset / 16u)]);
- return float2x4(v_1, asfloat(u[((16u + start_byte_offset) / 16u)]));
+ return float2x4(asfloat(u[(start_byte_offset / 16u)]), asfloat(u[((16u + start_byte_offset) / 16u)]));
}
typedef float2x4 ary_ret[4];
-ary_ret v_2(uint start_byte_offset) {
+ary_ret v_1(uint start_byte_offset) {
float2x4 a[4] = (float2x4[4])0;
{
- uint v_3 = 0u;
- v_3 = 0u;
+ uint v_2 = 0u;
+ v_2 = 0u;
while(true) {
- uint v_4 = v_3;
- if ((v_4 >= 4u)) {
+ uint v_3 = v_2;
+ if ((v_3 >= 4u)) {
break;
}
- a[v_4] = v((start_byte_offset + (v_4 * 32u)));
+ a[v_3] = v((start_byte_offset + (v_3 * 32u)));
{
- v_3 = (v_4 + 1u);
+ v_2 = (v_3 + 1u);
}
continue;
}
}
- float2x4 v_5[4] = a;
- return v_5;
+ float2x4 v_4[4] = a;
+ return v_4;
}
[numthreads(1, 1, 1)]
void f() {
- float2x4 v_6[4] = v_2(0u);
- p = v_6;
+ float2x4 v_5[4] = v_1(0u);
+ p = v_5;
p[int(1)] = v(64u);
p[int(1)][int(0)] = asfloat(u[1u]).ywxz;
p[int(1)][int(0)].x = asfloat(u[1u].x);
diff --git a/test/tint/buffer/uniform/std140/array/mat2x4_f32/to_storage.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/uniform/std140/array/mat2x4_f32/to_storage.wgsl.expected.ir.dxc.hlsl
index 4793a98..e907698 100644
--- a/test/tint/buffer/uniform/std140/array/mat2x4_f32/to_storage.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat2x4_f32/to_storage.wgsl.expected.ir.dxc.hlsl
@@ -9,22 +9,21 @@
}
float2x4 v_1(uint start_byte_offset) {
- float4 v_2 = asfloat(u[(start_byte_offset / 16u)]);
- return float2x4(v_2, asfloat(u[((16u + start_byte_offset) / 16u)]));
+ return float2x4(asfloat(u[(start_byte_offset / 16u)]), asfloat(u[((16u + start_byte_offset) / 16u)]));
}
-void v_3(uint offset, float2x4 obj[4]) {
+void v_2(uint offset, float2x4 obj[4]) {
{
- uint v_4 = 0u;
- v_4 = 0u;
+ uint v_3 = 0u;
+ v_3 = 0u;
while(true) {
- uint v_5 = v_4;
- if ((v_5 >= 4u)) {
+ uint v_4 = v_3;
+ if ((v_4 >= 4u)) {
break;
}
- v((offset + (v_5 * 32u)), obj[v_5]);
+ v((offset + (v_4 * 32u)), obj[v_4]);
{
- v_4 = (v_5 + 1u);
+ v_3 = (v_4 + 1u);
}
continue;
}
@@ -32,31 +31,31 @@
}
typedef float2x4 ary_ret[4];
-ary_ret v_6(uint start_byte_offset) {
+ary_ret v_5(uint start_byte_offset) {
float2x4 a[4] = (float2x4[4])0;
{
- uint v_7 = 0u;
- v_7 = 0u;
+ uint v_6 = 0u;
+ v_6 = 0u;
while(true) {
- uint v_8 = v_7;
- if ((v_8 >= 4u)) {
+ uint v_7 = v_6;
+ if ((v_7 >= 4u)) {
break;
}
- a[v_8] = v_1((start_byte_offset + (v_8 * 32u)));
+ a[v_7] = v_1((start_byte_offset + (v_7 * 32u)));
{
- v_7 = (v_8 + 1u);
+ v_6 = (v_7 + 1u);
}
continue;
}
}
- float2x4 v_9[4] = a;
- return v_9;
+ float2x4 v_8[4] = a;
+ return v_8;
}
[numthreads(1, 1, 1)]
void f() {
- float2x4 v_10[4] = v_6(0u);
- v_3(0u, v_10);
+ float2x4 v_9[4] = v_5(0u);
+ v_2(0u, v_9);
v(32u, v_1(64u));
s.Store4(32u, asuint(asfloat(u[1u]).ywxz));
s.Store(32u, asuint(asfloat(u[1u].x)));
diff --git a/test/tint/buffer/uniform/std140/array/mat2x4_f32/to_storage.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/uniform/std140/array/mat2x4_f32/to_storage.wgsl.expected.ir.fxc.hlsl
index 4793a98..e907698 100644
--- a/test/tint/buffer/uniform/std140/array/mat2x4_f32/to_storage.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat2x4_f32/to_storage.wgsl.expected.ir.fxc.hlsl
@@ -9,22 +9,21 @@
}
float2x4 v_1(uint start_byte_offset) {
- float4 v_2 = asfloat(u[(start_byte_offset / 16u)]);
- return float2x4(v_2, asfloat(u[((16u + start_byte_offset) / 16u)]));
+ return float2x4(asfloat(u[(start_byte_offset / 16u)]), asfloat(u[((16u + start_byte_offset) / 16u)]));
}
-void v_3(uint offset, float2x4 obj[4]) {
+void v_2(uint offset, float2x4 obj[4]) {
{
- uint v_4 = 0u;
- v_4 = 0u;
+ uint v_3 = 0u;
+ v_3 = 0u;
while(true) {
- uint v_5 = v_4;
- if ((v_5 >= 4u)) {
+ uint v_4 = v_3;
+ if ((v_4 >= 4u)) {
break;
}
- v((offset + (v_5 * 32u)), obj[v_5]);
+ v((offset + (v_4 * 32u)), obj[v_4]);
{
- v_4 = (v_5 + 1u);
+ v_3 = (v_4 + 1u);
}
continue;
}
@@ -32,31 +31,31 @@
}
typedef float2x4 ary_ret[4];
-ary_ret v_6(uint start_byte_offset) {
+ary_ret v_5(uint start_byte_offset) {
float2x4 a[4] = (float2x4[4])0;
{
- uint v_7 = 0u;
- v_7 = 0u;
+ uint v_6 = 0u;
+ v_6 = 0u;
while(true) {
- uint v_8 = v_7;
- if ((v_8 >= 4u)) {
+ uint v_7 = v_6;
+ if ((v_7 >= 4u)) {
break;
}
- a[v_8] = v_1((start_byte_offset + (v_8 * 32u)));
+ a[v_7] = v_1((start_byte_offset + (v_7 * 32u)));
{
- v_7 = (v_8 + 1u);
+ v_6 = (v_7 + 1u);
}
continue;
}
}
- float2x4 v_9[4] = a;
- return v_9;
+ float2x4 v_8[4] = a;
+ return v_8;
}
[numthreads(1, 1, 1)]
void f() {
- float2x4 v_10[4] = v_6(0u);
- v_3(0u, v_10);
+ float2x4 v_9[4] = v_5(0u);
+ v_2(0u, v_9);
v(32u, v_1(64u));
s.Store4(32u, asuint(asfloat(u[1u]).ywxz));
s.Store(32u, asuint(asfloat(u[1u].x)));
diff --git a/test/tint/buffer/uniform/std140/array/mat2x4_f32/to_workgroup.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/uniform/std140/array/mat2x4_f32/to_workgroup.wgsl.expected.ir.dxc.hlsl
index e71288f..f9897d1 100644
--- a/test/tint/buffer/uniform/std140/array/mat2x4_f32/to_workgroup.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat2x4_f32/to_workgroup.wgsl.expected.ir.dxc.hlsl
@@ -8,51 +8,50 @@
};
groupshared float2x4 w[4];
float2x4 v(uint start_byte_offset) {
- float4 v_1 = asfloat(u[(start_byte_offset / 16u)]);
- return float2x4(v_1, asfloat(u[((16u + start_byte_offset) / 16u)]));
+ return float2x4(asfloat(u[(start_byte_offset / 16u)]), asfloat(u[((16u + start_byte_offset) / 16u)]));
}
typedef float2x4 ary_ret[4];
-ary_ret v_2(uint start_byte_offset) {
+ary_ret v_1(uint start_byte_offset) {
float2x4 a[4] = (float2x4[4])0;
{
- uint v_3 = 0u;
- v_3 = 0u;
+ uint v_2 = 0u;
+ v_2 = 0u;
while(true) {
- uint v_4 = v_3;
- if ((v_4 >= 4u)) {
+ uint v_3 = v_2;
+ if ((v_3 >= 4u)) {
break;
}
- a[v_4] = v((start_byte_offset + (v_4 * 32u)));
+ a[v_3] = v((start_byte_offset + (v_3 * 32u)));
{
- v_3 = (v_4 + 1u);
+ v_2 = (v_3 + 1u);
}
continue;
}
}
- float2x4 v_5[4] = a;
- return v_5;
+ float2x4 v_4[4] = a;
+ return v_4;
}
void f_inner(uint tint_local_index) {
{
- uint v_6 = 0u;
- v_6 = tint_local_index;
+ uint v_5 = 0u;
+ v_5 = tint_local_index;
while(true) {
- uint v_7 = v_6;
- if ((v_7 >= 4u)) {
+ uint v_6 = v_5;
+ if ((v_6 >= 4u)) {
break;
}
- w[v_7] = float2x4((0.0f).xxxx, (0.0f).xxxx);
+ w[v_6] = float2x4((0.0f).xxxx, (0.0f).xxxx);
{
- v_6 = (v_7 + 1u);
+ v_5 = (v_6 + 1u);
}
continue;
}
}
GroupMemoryBarrierWithGroupSync();
- float2x4 v_8[4] = v_2(0u);
- w = v_8;
+ float2x4 v_7[4] = v_1(0u);
+ w = v_7;
w[int(1)] = v(64u);
w[int(1)][int(0)] = asfloat(u[1u]).ywxz;
w[int(1)][int(0)].x = asfloat(u[1u].x);
diff --git a/test/tint/buffer/uniform/std140/array/mat2x4_f32/to_workgroup.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/uniform/std140/array/mat2x4_f32/to_workgroup.wgsl.expected.ir.fxc.hlsl
index e71288f..f9897d1 100644
--- a/test/tint/buffer/uniform/std140/array/mat2x4_f32/to_workgroup.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat2x4_f32/to_workgroup.wgsl.expected.ir.fxc.hlsl
@@ -8,51 +8,50 @@
};
groupshared float2x4 w[4];
float2x4 v(uint start_byte_offset) {
- float4 v_1 = asfloat(u[(start_byte_offset / 16u)]);
- return float2x4(v_1, asfloat(u[((16u + start_byte_offset) / 16u)]));
+ return float2x4(asfloat(u[(start_byte_offset / 16u)]), asfloat(u[((16u + start_byte_offset) / 16u)]));
}
typedef float2x4 ary_ret[4];
-ary_ret v_2(uint start_byte_offset) {
+ary_ret v_1(uint start_byte_offset) {
float2x4 a[4] = (float2x4[4])0;
{
- uint v_3 = 0u;
- v_3 = 0u;
+ uint v_2 = 0u;
+ v_2 = 0u;
while(true) {
- uint v_4 = v_3;
- if ((v_4 >= 4u)) {
+ uint v_3 = v_2;
+ if ((v_3 >= 4u)) {
break;
}
- a[v_4] = v((start_byte_offset + (v_4 * 32u)));
+ a[v_3] = v((start_byte_offset + (v_3 * 32u)));
{
- v_3 = (v_4 + 1u);
+ v_2 = (v_3 + 1u);
}
continue;
}
}
- float2x4 v_5[4] = a;
- return v_5;
+ float2x4 v_4[4] = a;
+ return v_4;
}
void f_inner(uint tint_local_index) {
{
- uint v_6 = 0u;
- v_6 = tint_local_index;
+ uint v_5 = 0u;
+ v_5 = tint_local_index;
while(true) {
- uint v_7 = v_6;
- if ((v_7 >= 4u)) {
+ uint v_6 = v_5;
+ if ((v_6 >= 4u)) {
break;
}
- w[v_7] = float2x4((0.0f).xxxx, (0.0f).xxxx);
+ w[v_6] = float2x4((0.0f).xxxx, (0.0f).xxxx);
{
- v_6 = (v_7 + 1u);
+ v_5 = (v_6 + 1u);
}
continue;
}
}
GroupMemoryBarrierWithGroupSync();
- float2x4 v_8[4] = v_2(0u);
- w = v_8;
+ float2x4 v_7[4] = v_1(0u);
+ w = v_7;
w[int(1)] = v(64u);
w[int(1)][int(0)] = asfloat(u[1u]).ywxz;
w[int(1)][int(0)].x = asfloat(u[1u].x);
diff --git a/test/tint/buffer/uniform/std140/array/mat3x3_f32/dynamic_index_via_ptr.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/uniform/std140/array/mat3x3_f32/dynamic_index_via_ptr.wgsl.expected.ir.dxc.hlsl
index 34bb323..790df42 100644
--- a/test/tint/buffer/uniform/std140/array/mat3x3_f32/dynamic_index_via_ptr.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat3x3_f32/dynamic_index_via_ptr.wgsl.expected.ir.dxc.hlsl
@@ -10,40 +10,38 @@
}
float3x3 v(uint start_byte_offset) {
- float3 v_1 = asfloat(a[(start_byte_offset / 16u)].xyz);
- float3 v_2 = asfloat(a[((16u + start_byte_offset) / 16u)].xyz);
- return float3x3(v_1, v_2, asfloat(a[((32u + start_byte_offset) / 16u)].xyz));
+ return float3x3(asfloat(a[(start_byte_offset / 16u)].xyz), asfloat(a[((16u + start_byte_offset) / 16u)].xyz), asfloat(a[((32u + start_byte_offset) / 16u)].xyz));
}
typedef float3x3 ary_ret[4];
-ary_ret v_3(uint start_byte_offset) {
+ary_ret v_1(uint start_byte_offset) {
float3x3 a_1[4] = (float3x3[4])0;
{
- uint v_4 = 0u;
- v_4 = 0u;
+ uint v_2 = 0u;
+ v_2 = 0u;
while(true) {
- uint v_5 = v_4;
- if ((v_5 >= 4u)) {
+ uint v_3 = v_2;
+ if ((v_3 >= 4u)) {
break;
}
- a_1[v_5] = v((start_byte_offset + (v_5 * 48u)));
+ a_1[v_3] = v((start_byte_offset + (v_3 * 48u)));
{
- v_4 = (v_5 + 1u);
+ v_2 = (v_3 + 1u);
}
continue;
}
}
- float3x3 v_6[4] = a_1;
- return v_6;
+ float3x3 v_4[4] = a_1;
+ return v_4;
}
[numthreads(1, 1, 1)]
void f() {
- uint v_7 = (48u * uint(i()));
- uint v_8 = (16u * uint(i()));
- float3x3 l_a[4] = v_3(0u);
- float3x3 l_a_i = v(v_7);
- float3 l_a_i_i = asfloat(a[((v_7 + v_8) / 16u)].xyz);
- s.Store(0u, asuint((((asfloat(a[((v_7 + v_8) / 16u)][(((v_7 + v_8) % 16u) / 4u)]) + l_a[int(0)][int(0)].x) + l_a_i[int(0)].x) + l_a_i_i.x)));
+ uint v_5 = (48u * uint(i()));
+ uint v_6 = (16u * uint(i()));
+ float3x3 l_a[4] = v_1(0u);
+ float3x3 l_a_i = v(v_5);
+ float3 l_a_i_i = asfloat(a[((v_5 + v_6) / 16u)].xyz);
+ s.Store(0u, asuint((((asfloat(a[((v_5 + v_6) / 16u)][(((v_5 + v_6) % 16u) / 4u)]) + l_a[int(0)][int(0)].x) + l_a_i[int(0)].x) + l_a_i_i.x)));
}
diff --git a/test/tint/buffer/uniform/std140/array/mat3x3_f32/dynamic_index_via_ptr.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/uniform/std140/array/mat3x3_f32/dynamic_index_via_ptr.wgsl.expected.ir.fxc.hlsl
index 34bb323..790df42 100644
--- a/test/tint/buffer/uniform/std140/array/mat3x3_f32/dynamic_index_via_ptr.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat3x3_f32/dynamic_index_via_ptr.wgsl.expected.ir.fxc.hlsl
@@ -10,40 +10,38 @@
}
float3x3 v(uint start_byte_offset) {
- float3 v_1 = asfloat(a[(start_byte_offset / 16u)].xyz);
- float3 v_2 = asfloat(a[((16u + start_byte_offset) / 16u)].xyz);
- return float3x3(v_1, v_2, asfloat(a[((32u + start_byte_offset) / 16u)].xyz));
+ return float3x3(asfloat(a[(start_byte_offset / 16u)].xyz), asfloat(a[((16u + start_byte_offset) / 16u)].xyz), asfloat(a[((32u + start_byte_offset) / 16u)].xyz));
}
typedef float3x3 ary_ret[4];
-ary_ret v_3(uint start_byte_offset) {
+ary_ret v_1(uint start_byte_offset) {
float3x3 a_1[4] = (float3x3[4])0;
{
- uint v_4 = 0u;
- v_4 = 0u;
+ uint v_2 = 0u;
+ v_2 = 0u;
while(true) {
- uint v_5 = v_4;
- if ((v_5 >= 4u)) {
+ uint v_3 = v_2;
+ if ((v_3 >= 4u)) {
break;
}
- a_1[v_5] = v((start_byte_offset + (v_5 * 48u)));
+ a_1[v_3] = v((start_byte_offset + (v_3 * 48u)));
{
- v_4 = (v_5 + 1u);
+ v_2 = (v_3 + 1u);
}
continue;
}
}
- float3x3 v_6[4] = a_1;
- return v_6;
+ float3x3 v_4[4] = a_1;
+ return v_4;
}
[numthreads(1, 1, 1)]
void f() {
- uint v_7 = (48u * uint(i()));
- uint v_8 = (16u * uint(i()));
- float3x3 l_a[4] = v_3(0u);
- float3x3 l_a_i = v(v_7);
- float3 l_a_i_i = asfloat(a[((v_7 + v_8) / 16u)].xyz);
- s.Store(0u, asuint((((asfloat(a[((v_7 + v_8) / 16u)][(((v_7 + v_8) % 16u) / 4u)]) + l_a[int(0)][int(0)].x) + l_a_i[int(0)].x) + l_a_i_i.x)));
+ uint v_5 = (48u * uint(i()));
+ uint v_6 = (16u * uint(i()));
+ float3x3 l_a[4] = v_1(0u);
+ float3x3 l_a_i = v(v_5);
+ float3 l_a_i_i = asfloat(a[((v_5 + v_6) / 16u)].xyz);
+ s.Store(0u, asuint((((asfloat(a[((v_5 + v_6) / 16u)][(((v_5 + v_6) % 16u) / 4u)]) + l_a[int(0)][int(0)].x) + l_a_i[int(0)].x) + l_a_i_i.x)));
}
diff --git a/test/tint/buffer/uniform/std140/array/mat3x3_f32/static_index_via_ptr.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/uniform/std140/array/mat3x3_f32/static_index_via_ptr.wgsl.expected.ir.dxc.hlsl
index 93c3111..2e94a14 100644
--- a/test/tint/buffer/uniform/std140/array/mat3x3_f32/static_index_via_ptr.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat3x3_f32/static_index_via_ptr.wgsl.expected.ir.dxc.hlsl
@@ -4,36 +4,34 @@
};
RWByteAddressBuffer s : register(u1);
float3x3 v(uint start_byte_offset) {
- float3 v_1 = asfloat(a[(start_byte_offset / 16u)].xyz);
- float3 v_2 = asfloat(a[((16u + start_byte_offset) / 16u)].xyz);
- return float3x3(v_1, v_2, asfloat(a[((32u + start_byte_offset) / 16u)].xyz));
+ return float3x3(asfloat(a[(start_byte_offset / 16u)].xyz), asfloat(a[((16u + start_byte_offset) / 16u)].xyz), asfloat(a[((32u + start_byte_offset) / 16u)].xyz));
}
typedef float3x3 ary_ret[4];
-ary_ret v_3(uint start_byte_offset) {
+ary_ret v_1(uint start_byte_offset) {
float3x3 a_1[4] = (float3x3[4])0;
{
- uint v_4 = 0u;
- v_4 = 0u;
+ uint v_2 = 0u;
+ v_2 = 0u;
while(true) {
- uint v_5 = v_4;
- if ((v_5 >= 4u)) {
+ uint v_3 = v_2;
+ if ((v_3 >= 4u)) {
break;
}
- a_1[v_5] = v((start_byte_offset + (v_5 * 48u)));
+ a_1[v_3] = v((start_byte_offset + (v_3 * 48u)));
{
- v_4 = (v_5 + 1u);
+ v_2 = (v_3 + 1u);
}
continue;
}
}
- float3x3 v_6[4] = a_1;
- return v_6;
+ float3x3 v_4[4] = a_1;
+ return v_4;
}
[numthreads(1, 1, 1)]
void f() {
- float3x3 l_a[4] = v_3(0u);
+ float3x3 l_a[4] = v_1(0u);
float3x3 l_a_i = v(96u);
float3 l_a_i_i = asfloat(a[7u].xyz);
s.Store(0u, asuint((((asfloat(a[7u].x) + l_a[int(0)][int(0)].x) + l_a_i[int(0)].x) + l_a_i_i.x)));
diff --git a/test/tint/buffer/uniform/std140/array/mat3x3_f32/static_index_via_ptr.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/uniform/std140/array/mat3x3_f32/static_index_via_ptr.wgsl.expected.ir.fxc.hlsl
index 93c3111..2e94a14 100644
--- a/test/tint/buffer/uniform/std140/array/mat3x3_f32/static_index_via_ptr.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat3x3_f32/static_index_via_ptr.wgsl.expected.ir.fxc.hlsl
@@ -4,36 +4,34 @@
};
RWByteAddressBuffer s : register(u1);
float3x3 v(uint start_byte_offset) {
- float3 v_1 = asfloat(a[(start_byte_offset / 16u)].xyz);
- float3 v_2 = asfloat(a[((16u + start_byte_offset) / 16u)].xyz);
- return float3x3(v_1, v_2, asfloat(a[((32u + start_byte_offset) / 16u)].xyz));
+ return float3x3(asfloat(a[(start_byte_offset / 16u)].xyz), asfloat(a[((16u + start_byte_offset) / 16u)].xyz), asfloat(a[((32u + start_byte_offset) / 16u)].xyz));
}
typedef float3x3 ary_ret[4];
-ary_ret v_3(uint start_byte_offset) {
+ary_ret v_1(uint start_byte_offset) {
float3x3 a_1[4] = (float3x3[4])0;
{
- uint v_4 = 0u;
- v_4 = 0u;
+ uint v_2 = 0u;
+ v_2 = 0u;
while(true) {
- uint v_5 = v_4;
- if ((v_5 >= 4u)) {
+ uint v_3 = v_2;
+ if ((v_3 >= 4u)) {
break;
}
- a_1[v_5] = v((start_byte_offset + (v_5 * 48u)));
+ a_1[v_3] = v((start_byte_offset + (v_3 * 48u)));
{
- v_4 = (v_5 + 1u);
+ v_2 = (v_3 + 1u);
}
continue;
}
}
- float3x3 v_6[4] = a_1;
- return v_6;
+ float3x3 v_4[4] = a_1;
+ return v_4;
}
[numthreads(1, 1, 1)]
void f() {
- float3x3 l_a[4] = v_3(0u);
+ float3x3 l_a[4] = v_1(0u);
float3x3 l_a_i = v(96u);
float3 l_a_i_i = asfloat(a[7u].xyz);
s.Store(0u, asuint((((asfloat(a[7u].x) + l_a[int(0)][int(0)].x) + l_a_i[int(0)].x) + l_a_i_i.x)));
diff --git a/test/tint/buffer/uniform/std140/array/mat3x3_f32/to_builtin.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/uniform/std140/array/mat3x3_f32/to_builtin.wgsl.expected.ir.dxc.hlsl
index 1950270..fbd4f6d 100644
--- a/test/tint/buffer/uniform/std140/array/mat3x3_f32/to_builtin.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat3x3_f32/to_builtin.wgsl.expected.ir.dxc.hlsl
@@ -4,9 +4,7 @@
};
RWByteAddressBuffer s : register(u1);
float3x3 v(uint start_byte_offset) {
- float3 v_1 = asfloat(u[(start_byte_offset / 16u)].xyz);
- float3 v_2 = asfloat(u[((16u + start_byte_offset) / 16u)].xyz);
- return float3x3(v_1, v_2, asfloat(u[((32u + start_byte_offset) / 16u)].xyz));
+ return float3x3(asfloat(u[(start_byte_offset / 16u)].xyz), asfloat(u[((16u + start_byte_offset) / 16u)].xyz), asfloat(u[((32u + start_byte_offset) / 16u)].xyz));
}
[numthreads(1, 1, 1)]
@@ -14,7 +12,7 @@
float3x3 t = transpose(v(96u));
float l = length(asfloat(u[1u].xyz).zxy);
float a = abs(asfloat(u[1u].xyz).zxy.x);
- float v_3 = (t[int(0)].x + float(l));
- s.Store(0u, asuint((v_3 + float(a))));
+ float v_1 = (t[int(0)].x + float(l));
+ s.Store(0u, asuint((v_1 + float(a))));
}
diff --git a/test/tint/buffer/uniform/std140/array/mat3x3_f32/to_builtin.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/uniform/std140/array/mat3x3_f32/to_builtin.wgsl.expected.ir.fxc.hlsl
index 1950270..fbd4f6d 100644
--- a/test/tint/buffer/uniform/std140/array/mat3x3_f32/to_builtin.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat3x3_f32/to_builtin.wgsl.expected.ir.fxc.hlsl
@@ -4,9 +4,7 @@
};
RWByteAddressBuffer s : register(u1);
float3x3 v(uint start_byte_offset) {
- float3 v_1 = asfloat(u[(start_byte_offset / 16u)].xyz);
- float3 v_2 = asfloat(u[((16u + start_byte_offset) / 16u)].xyz);
- return float3x3(v_1, v_2, asfloat(u[((32u + start_byte_offset) / 16u)].xyz));
+ return float3x3(asfloat(u[(start_byte_offset / 16u)].xyz), asfloat(u[((16u + start_byte_offset) / 16u)].xyz), asfloat(u[((32u + start_byte_offset) / 16u)].xyz));
}
[numthreads(1, 1, 1)]
@@ -14,7 +12,7 @@
float3x3 t = transpose(v(96u));
float l = length(asfloat(u[1u].xyz).zxy);
float a = abs(asfloat(u[1u].xyz).zxy.x);
- float v_3 = (t[int(0)].x + float(l));
- s.Store(0u, asuint((v_3 + float(a))));
+ float v_1 = (t[int(0)].x + float(l));
+ s.Store(0u, asuint((v_1 + float(a))));
}
diff --git a/test/tint/buffer/uniform/std140/array/mat3x3_f32/to_fn.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/uniform/std140/array/mat3x3_f32/to_fn.wgsl.expected.ir.dxc.hlsl
index 77810ed..8998ecc 100644
--- a/test/tint/buffer/uniform/std140/array/mat3x3_f32/to_fn.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat3x3_f32/to_fn.wgsl.expected.ir.dxc.hlsl
@@ -20,39 +20,37 @@
}
float3x3 v_1(uint start_byte_offset) {
- float3 v_2 = asfloat(u[(start_byte_offset / 16u)].xyz);
- float3 v_3 = asfloat(u[((16u + start_byte_offset) / 16u)].xyz);
- return float3x3(v_2, v_3, asfloat(u[((32u + start_byte_offset) / 16u)].xyz));
+ return float3x3(asfloat(u[(start_byte_offset / 16u)].xyz), asfloat(u[((16u + start_byte_offset) / 16u)].xyz), asfloat(u[((32u + start_byte_offset) / 16u)].xyz));
}
typedef float3x3 ary_ret[4];
-ary_ret v_4(uint start_byte_offset) {
+ary_ret v_2(uint start_byte_offset) {
float3x3 a_2[4] = (float3x3[4])0;
{
- uint v_5 = 0u;
- v_5 = 0u;
+ uint v_3 = 0u;
+ v_3 = 0u;
while(true) {
- uint v_6 = v_5;
- if ((v_6 >= 4u)) {
+ uint v_4 = v_3;
+ if ((v_4 >= 4u)) {
break;
}
- a_2[v_6] = v_1((start_byte_offset + (v_6 * 48u)));
+ a_2[v_4] = v_1((start_byte_offset + (v_4 * 48u)));
{
- v_5 = (v_6 + 1u);
+ v_3 = (v_4 + 1u);
}
continue;
}
}
- float3x3 v_7[4] = a_2;
- return v_7;
+ float3x3 v_5[4] = a_2;
+ return v_5;
}
[numthreads(1, 1, 1)]
void f() {
- float3x3 v_8[4] = v_4(0u);
- float v_9 = a(v_8);
- float v_10 = (v_9 + b(v_1(48u)));
- float v_11 = (v_10 + c(asfloat(u[3u].xyz).zxy));
- s.Store(0u, asuint((v_11 + d(asfloat(u[3u].xyz).zxy.x))));
+ float3x3 v_6[4] = v_2(0u);
+ float v_7 = a(v_6);
+ float v_8 = (v_7 + b(v_1(48u)));
+ float v_9 = (v_8 + c(asfloat(u[3u].xyz).zxy));
+ s.Store(0u, asuint((v_9 + d(asfloat(u[3u].xyz).zxy.x))));
}
diff --git a/test/tint/buffer/uniform/std140/array/mat3x3_f32/to_fn.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/uniform/std140/array/mat3x3_f32/to_fn.wgsl.expected.ir.fxc.hlsl
index 77810ed..8998ecc 100644
--- a/test/tint/buffer/uniform/std140/array/mat3x3_f32/to_fn.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat3x3_f32/to_fn.wgsl.expected.ir.fxc.hlsl
@@ -20,39 +20,37 @@
}
float3x3 v_1(uint start_byte_offset) {
- float3 v_2 = asfloat(u[(start_byte_offset / 16u)].xyz);
- float3 v_3 = asfloat(u[((16u + start_byte_offset) / 16u)].xyz);
- return float3x3(v_2, v_3, asfloat(u[((32u + start_byte_offset) / 16u)].xyz));
+ return float3x3(asfloat(u[(start_byte_offset / 16u)].xyz), asfloat(u[((16u + start_byte_offset) / 16u)].xyz), asfloat(u[((32u + start_byte_offset) / 16u)].xyz));
}
typedef float3x3 ary_ret[4];
-ary_ret v_4(uint start_byte_offset) {
+ary_ret v_2(uint start_byte_offset) {
float3x3 a_2[4] = (float3x3[4])0;
{
- uint v_5 = 0u;
- v_5 = 0u;
+ uint v_3 = 0u;
+ v_3 = 0u;
while(true) {
- uint v_6 = v_5;
- if ((v_6 >= 4u)) {
+ uint v_4 = v_3;
+ if ((v_4 >= 4u)) {
break;
}
- a_2[v_6] = v_1((start_byte_offset + (v_6 * 48u)));
+ a_2[v_4] = v_1((start_byte_offset + (v_4 * 48u)));
{
- v_5 = (v_6 + 1u);
+ v_3 = (v_4 + 1u);
}
continue;
}
}
- float3x3 v_7[4] = a_2;
- return v_7;
+ float3x3 v_5[4] = a_2;
+ return v_5;
}
[numthreads(1, 1, 1)]
void f() {
- float3x3 v_8[4] = v_4(0u);
- float v_9 = a(v_8);
- float v_10 = (v_9 + b(v_1(48u)));
- float v_11 = (v_10 + c(asfloat(u[3u].xyz).zxy));
- s.Store(0u, asuint((v_11 + d(asfloat(u[3u].xyz).zxy.x))));
+ float3x3 v_6[4] = v_2(0u);
+ float v_7 = a(v_6);
+ float v_8 = (v_7 + b(v_1(48u)));
+ float v_9 = (v_8 + c(asfloat(u[3u].xyz).zxy));
+ s.Store(0u, asuint((v_9 + d(asfloat(u[3u].xyz).zxy.x))));
}
diff --git a/test/tint/buffer/uniform/std140/array/mat3x3_f32/to_private.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/uniform/std140/array/mat3x3_f32/to_private.wgsl.expected.ir.dxc.hlsl
index a69d774..90ed4bd3 100644
--- a/test/tint/buffer/uniform/std140/array/mat3x3_f32/to_private.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat3x3_f32/to_private.wgsl.expected.ir.dxc.hlsl
@@ -5,37 +5,35 @@
RWByteAddressBuffer s : register(u1);
static float3x3 p[4] = (float3x3[4])0;
float3x3 v(uint start_byte_offset) {
- float3 v_1 = asfloat(u[(start_byte_offset / 16u)].xyz);
- float3 v_2 = asfloat(u[((16u + start_byte_offset) / 16u)].xyz);
- return float3x3(v_1, v_2, asfloat(u[((32u + start_byte_offset) / 16u)].xyz));
+ return float3x3(asfloat(u[(start_byte_offset / 16u)].xyz), asfloat(u[((16u + start_byte_offset) / 16u)].xyz), asfloat(u[((32u + start_byte_offset) / 16u)].xyz));
}
typedef float3x3 ary_ret[4];
-ary_ret v_3(uint start_byte_offset) {
+ary_ret v_1(uint start_byte_offset) {
float3x3 a[4] = (float3x3[4])0;
{
- uint v_4 = 0u;
- v_4 = 0u;
+ uint v_2 = 0u;
+ v_2 = 0u;
while(true) {
- uint v_5 = v_4;
- if ((v_5 >= 4u)) {
+ uint v_3 = v_2;
+ if ((v_3 >= 4u)) {
break;
}
- a[v_5] = v((start_byte_offset + (v_5 * 48u)));
+ a[v_3] = v((start_byte_offset + (v_3 * 48u)));
{
- v_4 = (v_5 + 1u);
+ v_2 = (v_3 + 1u);
}
continue;
}
}
- float3x3 v_6[4] = a;
- return v_6;
+ float3x3 v_4[4] = a;
+ return v_4;
}
[numthreads(1, 1, 1)]
void f() {
- float3x3 v_7[4] = v_3(0u);
- p = v_7;
+ float3x3 v_5[4] = v_1(0u);
+ p = v_5;
p[int(1)] = v(96u);
p[int(1)][int(0)] = asfloat(u[1u].xyz).zxy;
p[int(1)][int(0)].x = asfloat(u[1u].x);
diff --git a/test/tint/buffer/uniform/std140/array/mat3x3_f32/to_private.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/uniform/std140/array/mat3x3_f32/to_private.wgsl.expected.ir.fxc.hlsl
index a69d774..90ed4bd3 100644
--- a/test/tint/buffer/uniform/std140/array/mat3x3_f32/to_private.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat3x3_f32/to_private.wgsl.expected.ir.fxc.hlsl
@@ -5,37 +5,35 @@
RWByteAddressBuffer s : register(u1);
static float3x3 p[4] = (float3x3[4])0;
float3x3 v(uint start_byte_offset) {
- float3 v_1 = asfloat(u[(start_byte_offset / 16u)].xyz);
- float3 v_2 = asfloat(u[((16u + start_byte_offset) / 16u)].xyz);
- return float3x3(v_1, v_2, asfloat(u[((32u + start_byte_offset) / 16u)].xyz));
+ return float3x3(asfloat(u[(start_byte_offset / 16u)].xyz), asfloat(u[((16u + start_byte_offset) / 16u)].xyz), asfloat(u[((32u + start_byte_offset) / 16u)].xyz));
}
typedef float3x3 ary_ret[4];
-ary_ret v_3(uint start_byte_offset) {
+ary_ret v_1(uint start_byte_offset) {
float3x3 a[4] = (float3x3[4])0;
{
- uint v_4 = 0u;
- v_4 = 0u;
+ uint v_2 = 0u;
+ v_2 = 0u;
while(true) {
- uint v_5 = v_4;
- if ((v_5 >= 4u)) {
+ uint v_3 = v_2;
+ if ((v_3 >= 4u)) {
break;
}
- a[v_5] = v((start_byte_offset + (v_5 * 48u)));
+ a[v_3] = v((start_byte_offset + (v_3 * 48u)));
{
- v_4 = (v_5 + 1u);
+ v_2 = (v_3 + 1u);
}
continue;
}
}
- float3x3 v_6[4] = a;
- return v_6;
+ float3x3 v_4[4] = a;
+ return v_4;
}
[numthreads(1, 1, 1)]
void f() {
- float3x3 v_7[4] = v_3(0u);
- p = v_7;
+ float3x3 v_5[4] = v_1(0u);
+ p = v_5;
p[int(1)] = v(96u);
p[int(1)][int(0)] = asfloat(u[1u].xyz).zxy;
p[int(1)][int(0)].x = asfloat(u[1u].x);
diff --git a/test/tint/buffer/uniform/std140/array/mat3x3_f32/to_storage.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/uniform/std140/array/mat3x3_f32/to_storage.wgsl.expected.ir.dxc.hlsl
index cf209a3..055b0bd 100644
--- a/test/tint/buffer/uniform/std140/array/mat3x3_f32/to_storage.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat3x3_f32/to_storage.wgsl.expected.ir.dxc.hlsl
@@ -10,23 +10,21 @@
}
float3x3 v_1(uint start_byte_offset) {
- float3 v_2 = asfloat(u[(start_byte_offset / 16u)].xyz);
- float3 v_3 = asfloat(u[((16u + start_byte_offset) / 16u)].xyz);
- return float3x3(v_2, v_3, asfloat(u[((32u + start_byte_offset) / 16u)].xyz));
+ return float3x3(asfloat(u[(start_byte_offset / 16u)].xyz), asfloat(u[((16u + start_byte_offset) / 16u)].xyz), asfloat(u[((32u + start_byte_offset) / 16u)].xyz));
}
-void v_4(uint offset, float3x3 obj[4]) {
+void v_2(uint offset, float3x3 obj[4]) {
{
- uint v_5 = 0u;
- v_5 = 0u;
+ uint v_3 = 0u;
+ v_3 = 0u;
while(true) {
- uint v_6 = v_5;
- if ((v_6 >= 4u)) {
+ uint v_4 = v_3;
+ if ((v_4 >= 4u)) {
break;
}
- v((offset + (v_6 * 48u)), obj[v_6]);
+ v((offset + (v_4 * 48u)), obj[v_4]);
{
- v_5 = (v_6 + 1u);
+ v_3 = (v_4 + 1u);
}
continue;
}
@@ -34,31 +32,31 @@
}
typedef float3x3 ary_ret[4];
-ary_ret v_7(uint start_byte_offset) {
+ary_ret v_5(uint start_byte_offset) {
float3x3 a[4] = (float3x3[4])0;
{
- uint v_8 = 0u;
- v_8 = 0u;
+ uint v_6 = 0u;
+ v_6 = 0u;
while(true) {
- uint v_9 = v_8;
- if ((v_9 >= 4u)) {
+ uint v_7 = v_6;
+ if ((v_7 >= 4u)) {
break;
}
- a[v_9] = v_1((start_byte_offset + (v_9 * 48u)));
+ a[v_7] = v_1((start_byte_offset + (v_7 * 48u)));
{
- v_8 = (v_9 + 1u);
+ v_6 = (v_7 + 1u);
}
continue;
}
}
- float3x3 v_10[4] = a;
- return v_10;
+ float3x3 v_8[4] = a;
+ return v_8;
}
[numthreads(1, 1, 1)]
void f() {
- float3x3 v_11[4] = v_7(0u);
- v_4(0u, v_11);
+ float3x3 v_9[4] = v_5(0u);
+ v_2(0u, v_9);
v(48u, v_1(96u));
s.Store3(48u, asuint(asfloat(u[1u].xyz).zxy));
s.Store(48u, asuint(asfloat(u[1u].x)));
diff --git a/test/tint/buffer/uniform/std140/array/mat3x3_f32/to_storage.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/uniform/std140/array/mat3x3_f32/to_storage.wgsl.expected.ir.fxc.hlsl
index cf209a3..055b0bd 100644
--- a/test/tint/buffer/uniform/std140/array/mat3x3_f32/to_storage.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat3x3_f32/to_storage.wgsl.expected.ir.fxc.hlsl
@@ -10,23 +10,21 @@
}
float3x3 v_1(uint start_byte_offset) {
- float3 v_2 = asfloat(u[(start_byte_offset / 16u)].xyz);
- float3 v_3 = asfloat(u[((16u + start_byte_offset) / 16u)].xyz);
- return float3x3(v_2, v_3, asfloat(u[((32u + start_byte_offset) / 16u)].xyz));
+ return float3x3(asfloat(u[(start_byte_offset / 16u)].xyz), asfloat(u[((16u + start_byte_offset) / 16u)].xyz), asfloat(u[((32u + start_byte_offset) / 16u)].xyz));
}
-void v_4(uint offset, float3x3 obj[4]) {
+void v_2(uint offset, float3x3 obj[4]) {
{
- uint v_5 = 0u;
- v_5 = 0u;
+ uint v_3 = 0u;
+ v_3 = 0u;
while(true) {
- uint v_6 = v_5;
- if ((v_6 >= 4u)) {
+ uint v_4 = v_3;
+ if ((v_4 >= 4u)) {
break;
}
- v((offset + (v_6 * 48u)), obj[v_6]);
+ v((offset + (v_4 * 48u)), obj[v_4]);
{
- v_5 = (v_6 + 1u);
+ v_3 = (v_4 + 1u);
}
continue;
}
@@ -34,31 +32,31 @@
}
typedef float3x3 ary_ret[4];
-ary_ret v_7(uint start_byte_offset) {
+ary_ret v_5(uint start_byte_offset) {
float3x3 a[4] = (float3x3[4])0;
{
- uint v_8 = 0u;
- v_8 = 0u;
+ uint v_6 = 0u;
+ v_6 = 0u;
while(true) {
- uint v_9 = v_8;
- if ((v_9 >= 4u)) {
+ uint v_7 = v_6;
+ if ((v_7 >= 4u)) {
break;
}
- a[v_9] = v_1((start_byte_offset + (v_9 * 48u)));
+ a[v_7] = v_1((start_byte_offset + (v_7 * 48u)));
{
- v_8 = (v_9 + 1u);
+ v_6 = (v_7 + 1u);
}
continue;
}
}
- float3x3 v_10[4] = a;
- return v_10;
+ float3x3 v_8[4] = a;
+ return v_8;
}
[numthreads(1, 1, 1)]
void f() {
- float3x3 v_11[4] = v_7(0u);
- v_4(0u, v_11);
+ float3x3 v_9[4] = v_5(0u);
+ v_2(0u, v_9);
v(48u, v_1(96u));
s.Store3(48u, asuint(asfloat(u[1u].xyz).zxy));
s.Store(48u, asuint(asfloat(u[1u].x)));
diff --git a/test/tint/buffer/uniform/std140/array/mat3x3_f32/to_workgroup.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/uniform/std140/array/mat3x3_f32/to_workgroup.wgsl.expected.ir.dxc.hlsl
index a412608..106b597 100644
--- a/test/tint/buffer/uniform/std140/array/mat3x3_f32/to_workgroup.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat3x3_f32/to_workgroup.wgsl.expected.ir.dxc.hlsl
@@ -8,52 +8,50 @@
};
groupshared float3x3 w[4];
float3x3 v(uint start_byte_offset) {
- float3 v_1 = asfloat(u[(start_byte_offset / 16u)].xyz);
- float3 v_2 = asfloat(u[((16u + start_byte_offset) / 16u)].xyz);
- return float3x3(v_1, v_2, asfloat(u[((32u + start_byte_offset) / 16u)].xyz));
+ return float3x3(asfloat(u[(start_byte_offset / 16u)].xyz), asfloat(u[((16u + start_byte_offset) / 16u)].xyz), asfloat(u[((32u + start_byte_offset) / 16u)].xyz));
}
typedef float3x3 ary_ret[4];
-ary_ret v_3(uint start_byte_offset) {
+ary_ret v_1(uint start_byte_offset) {
float3x3 a[4] = (float3x3[4])0;
{
- uint v_4 = 0u;
- v_4 = 0u;
+ uint v_2 = 0u;
+ v_2 = 0u;
while(true) {
- uint v_5 = v_4;
- if ((v_5 >= 4u)) {
+ uint v_3 = v_2;
+ if ((v_3 >= 4u)) {
break;
}
- a[v_5] = v((start_byte_offset + (v_5 * 48u)));
+ a[v_3] = v((start_byte_offset + (v_3 * 48u)));
{
- v_4 = (v_5 + 1u);
+ v_2 = (v_3 + 1u);
}
continue;
}
}
- float3x3 v_6[4] = a;
- return v_6;
+ float3x3 v_4[4] = a;
+ return v_4;
}
void f_inner(uint tint_local_index) {
{
- uint v_7 = 0u;
- v_7 = tint_local_index;
+ uint v_5 = 0u;
+ v_5 = tint_local_index;
while(true) {
- uint v_8 = v_7;
- if ((v_8 >= 4u)) {
+ uint v_6 = v_5;
+ if ((v_6 >= 4u)) {
break;
}
- w[v_8] = float3x3((0.0f).xxx, (0.0f).xxx, (0.0f).xxx);
+ w[v_6] = float3x3((0.0f).xxx, (0.0f).xxx, (0.0f).xxx);
{
- v_7 = (v_8 + 1u);
+ v_5 = (v_6 + 1u);
}
continue;
}
}
GroupMemoryBarrierWithGroupSync();
- float3x3 v_9[4] = v_3(0u);
- w = v_9;
+ float3x3 v_7[4] = v_1(0u);
+ w = v_7;
w[int(1)] = v(96u);
w[int(1)][int(0)] = asfloat(u[1u].xyz).zxy;
w[int(1)][int(0)].x = asfloat(u[1u].x);
diff --git a/test/tint/buffer/uniform/std140/array/mat3x3_f32/to_workgroup.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/uniform/std140/array/mat3x3_f32/to_workgroup.wgsl.expected.ir.fxc.hlsl
index a412608..106b597 100644
--- a/test/tint/buffer/uniform/std140/array/mat3x3_f32/to_workgroup.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat3x3_f32/to_workgroup.wgsl.expected.ir.fxc.hlsl
@@ -8,52 +8,50 @@
};
groupshared float3x3 w[4];
float3x3 v(uint start_byte_offset) {
- float3 v_1 = asfloat(u[(start_byte_offset / 16u)].xyz);
- float3 v_2 = asfloat(u[((16u + start_byte_offset) / 16u)].xyz);
- return float3x3(v_1, v_2, asfloat(u[((32u + start_byte_offset) / 16u)].xyz));
+ return float3x3(asfloat(u[(start_byte_offset / 16u)].xyz), asfloat(u[((16u + start_byte_offset) / 16u)].xyz), asfloat(u[((32u + start_byte_offset) / 16u)].xyz));
}
typedef float3x3 ary_ret[4];
-ary_ret v_3(uint start_byte_offset) {
+ary_ret v_1(uint start_byte_offset) {
float3x3 a[4] = (float3x3[4])0;
{
- uint v_4 = 0u;
- v_4 = 0u;
+ uint v_2 = 0u;
+ v_2 = 0u;
while(true) {
- uint v_5 = v_4;
- if ((v_5 >= 4u)) {
+ uint v_3 = v_2;
+ if ((v_3 >= 4u)) {
break;
}
- a[v_5] = v((start_byte_offset + (v_5 * 48u)));
+ a[v_3] = v((start_byte_offset + (v_3 * 48u)));
{
- v_4 = (v_5 + 1u);
+ v_2 = (v_3 + 1u);
}
continue;
}
}
- float3x3 v_6[4] = a;
- return v_6;
+ float3x3 v_4[4] = a;
+ return v_4;
}
void f_inner(uint tint_local_index) {
{
- uint v_7 = 0u;
- v_7 = tint_local_index;
+ uint v_5 = 0u;
+ v_5 = tint_local_index;
while(true) {
- uint v_8 = v_7;
- if ((v_8 >= 4u)) {
+ uint v_6 = v_5;
+ if ((v_6 >= 4u)) {
break;
}
- w[v_8] = float3x3((0.0f).xxx, (0.0f).xxx, (0.0f).xxx);
+ w[v_6] = float3x3((0.0f).xxx, (0.0f).xxx, (0.0f).xxx);
{
- v_7 = (v_8 + 1u);
+ v_5 = (v_6 + 1u);
}
continue;
}
}
GroupMemoryBarrierWithGroupSync();
- float3x3 v_9[4] = v_3(0u);
- w = v_9;
+ float3x3 v_7[4] = v_1(0u);
+ w = v_7;
w[int(1)] = v(96u);
w[int(1)][int(0)] = asfloat(u[1u].xyz).zxy;
w[int(1)][int(0)].x = asfloat(u[1u].x);
diff --git a/test/tint/buffer/uniform/std140/array/mat3x4_f32/dynamic_index_via_ptr.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/uniform/std140/array/mat3x4_f32/dynamic_index_via_ptr.wgsl.expected.ir.dxc.hlsl
index a420335..7d36075 100644
--- a/test/tint/buffer/uniform/std140/array/mat3x4_f32/dynamic_index_via_ptr.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat3x4_f32/dynamic_index_via_ptr.wgsl.expected.ir.dxc.hlsl
@@ -10,40 +10,38 @@
}
float3x4 v(uint start_byte_offset) {
- float4 v_1 = asfloat(a[(start_byte_offset / 16u)]);
- float4 v_2 = asfloat(a[((16u + start_byte_offset) / 16u)]);
- return float3x4(v_1, v_2, asfloat(a[((32u + start_byte_offset) / 16u)]));
+ return float3x4(asfloat(a[(start_byte_offset / 16u)]), asfloat(a[((16u + start_byte_offset) / 16u)]), asfloat(a[((32u + start_byte_offset) / 16u)]));
}
typedef float3x4 ary_ret[4];
-ary_ret v_3(uint start_byte_offset) {
+ary_ret v_1(uint start_byte_offset) {
float3x4 a_1[4] = (float3x4[4])0;
{
- uint v_4 = 0u;
- v_4 = 0u;
+ uint v_2 = 0u;
+ v_2 = 0u;
while(true) {
- uint v_5 = v_4;
- if ((v_5 >= 4u)) {
+ uint v_3 = v_2;
+ if ((v_3 >= 4u)) {
break;
}
- a_1[v_5] = v((start_byte_offset + (v_5 * 48u)));
+ a_1[v_3] = v((start_byte_offset + (v_3 * 48u)));
{
- v_4 = (v_5 + 1u);
+ v_2 = (v_3 + 1u);
}
continue;
}
}
- float3x4 v_6[4] = a_1;
- return v_6;
+ float3x4 v_4[4] = a_1;
+ return v_4;
}
[numthreads(1, 1, 1)]
void f() {
- uint v_7 = (48u * uint(i()));
- uint v_8 = (16u * uint(i()));
- float3x4 l_a[4] = v_3(0u);
- float3x4 l_a_i = v(v_7);
- float4 l_a_i_i = asfloat(a[((v_7 + v_8) / 16u)]);
- s.Store(0u, asuint((((asfloat(a[((v_7 + v_8) / 16u)][(((v_7 + v_8) % 16u) / 4u)]) + l_a[int(0)][int(0)].x) + l_a_i[int(0)].x) + l_a_i_i.x)));
+ uint v_5 = (48u * uint(i()));
+ uint v_6 = (16u * uint(i()));
+ float3x4 l_a[4] = v_1(0u);
+ float3x4 l_a_i = v(v_5);
+ float4 l_a_i_i = asfloat(a[((v_5 + v_6) / 16u)]);
+ s.Store(0u, asuint((((asfloat(a[((v_5 + v_6) / 16u)][(((v_5 + v_6) % 16u) / 4u)]) + l_a[int(0)][int(0)].x) + l_a_i[int(0)].x) + l_a_i_i.x)));
}
diff --git a/test/tint/buffer/uniform/std140/array/mat3x4_f32/dynamic_index_via_ptr.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/uniform/std140/array/mat3x4_f32/dynamic_index_via_ptr.wgsl.expected.ir.fxc.hlsl
index a420335..7d36075 100644
--- a/test/tint/buffer/uniform/std140/array/mat3x4_f32/dynamic_index_via_ptr.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat3x4_f32/dynamic_index_via_ptr.wgsl.expected.ir.fxc.hlsl
@@ -10,40 +10,38 @@
}
float3x4 v(uint start_byte_offset) {
- float4 v_1 = asfloat(a[(start_byte_offset / 16u)]);
- float4 v_2 = asfloat(a[((16u + start_byte_offset) / 16u)]);
- return float3x4(v_1, v_2, asfloat(a[((32u + start_byte_offset) / 16u)]));
+ return float3x4(asfloat(a[(start_byte_offset / 16u)]), asfloat(a[((16u + start_byte_offset) / 16u)]), asfloat(a[((32u + start_byte_offset) / 16u)]));
}
typedef float3x4 ary_ret[4];
-ary_ret v_3(uint start_byte_offset) {
+ary_ret v_1(uint start_byte_offset) {
float3x4 a_1[4] = (float3x4[4])0;
{
- uint v_4 = 0u;
- v_4 = 0u;
+ uint v_2 = 0u;
+ v_2 = 0u;
while(true) {
- uint v_5 = v_4;
- if ((v_5 >= 4u)) {
+ uint v_3 = v_2;
+ if ((v_3 >= 4u)) {
break;
}
- a_1[v_5] = v((start_byte_offset + (v_5 * 48u)));
+ a_1[v_3] = v((start_byte_offset + (v_3 * 48u)));
{
- v_4 = (v_5 + 1u);
+ v_2 = (v_3 + 1u);
}
continue;
}
}
- float3x4 v_6[4] = a_1;
- return v_6;
+ float3x4 v_4[4] = a_1;
+ return v_4;
}
[numthreads(1, 1, 1)]
void f() {
- uint v_7 = (48u * uint(i()));
- uint v_8 = (16u * uint(i()));
- float3x4 l_a[4] = v_3(0u);
- float3x4 l_a_i = v(v_7);
- float4 l_a_i_i = asfloat(a[((v_7 + v_8) / 16u)]);
- s.Store(0u, asuint((((asfloat(a[((v_7 + v_8) / 16u)][(((v_7 + v_8) % 16u) / 4u)]) + l_a[int(0)][int(0)].x) + l_a_i[int(0)].x) + l_a_i_i.x)));
+ uint v_5 = (48u * uint(i()));
+ uint v_6 = (16u * uint(i()));
+ float3x4 l_a[4] = v_1(0u);
+ float3x4 l_a_i = v(v_5);
+ float4 l_a_i_i = asfloat(a[((v_5 + v_6) / 16u)]);
+ s.Store(0u, asuint((((asfloat(a[((v_5 + v_6) / 16u)][(((v_5 + v_6) % 16u) / 4u)]) + l_a[int(0)][int(0)].x) + l_a_i[int(0)].x) + l_a_i_i.x)));
}
diff --git a/test/tint/buffer/uniform/std140/array/mat3x4_f32/static_index_via_ptr.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/uniform/std140/array/mat3x4_f32/static_index_via_ptr.wgsl.expected.ir.dxc.hlsl
index 1bc2ae5..1a3fc8c 100644
--- a/test/tint/buffer/uniform/std140/array/mat3x4_f32/static_index_via_ptr.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat3x4_f32/static_index_via_ptr.wgsl.expected.ir.dxc.hlsl
@@ -4,36 +4,34 @@
};
RWByteAddressBuffer s : register(u1);
float3x4 v(uint start_byte_offset) {
- float4 v_1 = asfloat(a[(start_byte_offset / 16u)]);
- float4 v_2 = asfloat(a[((16u + start_byte_offset) / 16u)]);
- return float3x4(v_1, v_2, asfloat(a[((32u + start_byte_offset) / 16u)]));
+ return float3x4(asfloat(a[(start_byte_offset / 16u)]), asfloat(a[((16u + start_byte_offset) / 16u)]), asfloat(a[((32u + start_byte_offset) / 16u)]));
}
typedef float3x4 ary_ret[4];
-ary_ret v_3(uint start_byte_offset) {
+ary_ret v_1(uint start_byte_offset) {
float3x4 a_1[4] = (float3x4[4])0;
{
- uint v_4 = 0u;
- v_4 = 0u;
+ uint v_2 = 0u;
+ v_2 = 0u;
while(true) {
- uint v_5 = v_4;
- if ((v_5 >= 4u)) {
+ uint v_3 = v_2;
+ if ((v_3 >= 4u)) {
break;
}
- a_1[v_5] = v((start_byte_offset + (v_5 * 48u)));
+ a_1[v_3] = v((start_byte_offset + (v_3 * 48u)));
{
- v_4 = (v_5 + 1u);
+ v_2 = (v_3 + 1u);
}
continue;
}
}
- float3x4 v_6[4] = a_1;
- return v_6;
+ float3x4 v_4[4] = a_1;
+ return v_4;
}
[numthreads(1, 1, 1)]
void f() {
- float3x4 l_a[4] = v_3(0u);
+ float3x4 l_a[4] = v_1(0u);
float3x4 l_a_i = v(96u);
float4 l_a_i_i = asfloat(a[7u]);
s.Store(0u, asuint((((asfloat(a[7u].x) + l_a[int(0)][int(0)].x) + l_a_i[int(0)].x) + l_a_i_i.x)));
diff --git a/test/tint/buffer/uniform/std140/array/mat3x4_f32/static_index_via_ptr.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/uniform/std140/array/mat3x4_f32/static_index_via_ptr.wgsl.expected.ir.fxc.hlsl
index 1bc2ae5..1a3fc8c 100644
--- a/test/tint/buffer/uniform/std140/array/mat3x4_f32/static_index_via_ptr.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat3x4_f32/static_index_via_ptr.wgsl.expected.ir.fxc.hlsl
@@ -4,36 +4,34 @@
};
RWByteAddressBuffer s : register(u1);
float3x4 v(uint start_byte_offset) {
- float4 v_1 = asfloat(a[(start_byte_offset / 16u)]);
- float4 v_2 = asfloat(a[((16u + start_byte_offset) / 16u)]);
- return float3x4(v_1, v_2, asfloat(a[((32u + start_byte_offset) / 16u)]));
+ return float3x4(asfloat(a[(start_byte_offset / 16u)]), asfloat(a[((16u + start_byte_offset) / 16u)]), asfloat(a[((32u + start_byte_offset) / 16u)]));
}
typedef float3x4 ary_ret[4];
-ary_ret v_3(uint start_byte_offset) {
+ary_ret v_1(uint start_byte_offset) {
float3x4 a_1[4] = (float3x4[4])0;
{
- uint v_4 = 0u;
- v_4 = 0u;
+ uint v_2 = 0u;
+ v_2 = 0u;
while(true) {
- uint v_5 = v_4;
- if ((v_5 >= 4u)) {
+ uint v_3 = v_2;
+ if ((v_3 >= 4u)) {
break;
}
- a_1[v_5] = v((start_byte_offset + (v_5 * 48u)));
+ a_1[v_3] = v((start_byte_offset + (v_3 * 48u)));
{
- v_4 = (v_5 + 1u);
+ v_2 = (v_3 + 1u);
}
continue;
}
}
- float3x4 v_6[4] = a_1;
- return v_6;
+ float3x4 v_4[4] = a_1;
+ return v_4;
}
[numthreads(1, 1, 1)]
void f() {
- float3x4 l_a[4] = v_3(0u);
+ float3x4 l_a[4] = v_1(0u);
float3x4 l_a_i = v(96u);
float4 l_a_i_i = asfloat(a[7u]);
s.Store(0u, asuint((((asfloat(a[7u].x) + l_a[int(0)][int(0)].x) + l_a_i[int(0)].x) + l_a_i_i.x)));
diff --git a/test/tint/buffer/uniform/std140/array/mat3x4_f32/to_builtin.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/uniform/std140/array/mat3x4_f32/to_builtin.wgsl.expected.ir.dxc.hlsl
index c1c4ba1..4a82d5f 100644
--- a/test/tint/buffer/uniform/std140/array/mat3x4_f32/to_builtin.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat3x4_f32/to_builtin.wgsl.expected.ir.dxc.hlsl
@@ -4,9 +4,7 @@
};
RWByteAddressBuffer s : register(u1);
float3x4 v(uint start_byte_offset) {
- float4 v_1 = asfloat(u[(start_byte_offset / 16u)]);
- float4 v_2 = asfloat(u[((16u + start_byte_offset) / 16u)]);
- return float3x4(v_1, v_2, asfloat(u[((32u + start_byte_offset) / 16u)]));
+ return float3x4(asfloat(u[(start_byte_offset / 16u)]), asfloat(u[((16u + start_byte_offset) / 16u)]), asfloat(u[((32u + start_byte_offset) / 16u)]));
}
[numthreads(1, 1, 1)]
@@ -14,7 +12,7 @@
float4x3 t = transpose(v(96u));
float l = length(asfloat(u[1u]).ywxz);
float a = abs(asfloat(u[1u]).ywxz.x);
- float v_3 = (t[int(0)].x + float(l));
- s.Store(0u, asuint((v_3 + float(a))));
+ float v_1 = (t[int(0)].x + float(l));
+ s.Store(0u, asuint((v_1 + float(a))));
}
diff --git a/test/tint/buffer/uniform/std140/array/mat3x4_f32/to_builtin.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/uniform/std140/array/mat3x4_f32/to_builtin.wgsl.expected.ir.fxc.hlsl
index c1c4ba1..4a82d5f 100644
--- a/test/tint/buffer/uniform/std140/array/mat3x4_f32/to_builtin.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat3x4_f32/to_builtin.wgsl.expected.ir.fxc.hlsl
@@ -4,9 +4,7 @@
};
RWByteAddressBuffer s : register(u1);
float3x4 v(uint start_byte_offset) {
- float4 v_1 = asfloat(u[(start_byte_offset / 16u)]);
- float4 v_2 = asfloat(u[((16u + start_byte_offset) / 16u)]);
- return float3x4(v_1, v_2, asfloat(u[((32u + start_byte_offset) / 16u)]));
+ return float3x4(asfloat(u[(start_byte_offset / 16u)]), asfloat(u[((16u + start_byte_offset) / 16u)]), asfloat(u[((32u + start_byte_offset) / 16u)]));
}
[numthreads(1, 1, 1)]
@@ -14,7 +12,7 @@
float4x3 t = transpose(v(96u));
float l = length(asfloat(u[1u]).ywxz);
float a = abs(asfloat(u[1u]).ywxz.x);
- float v_3 = (t[int(0)].x + float(l));
- s.Store(0u, asuint((v_3 + float(a))));
+ float v_1 = (t[int(0)].x + float(l));
+ s.Store(0u, asuint((v_1 + float(a))));
}
diff --git a/test/tint/buffer/uniform/std140/array/mat3x4_f32/to_fn.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/uniform/std140/array/mat3x4_f32/to_fn.wgsl.expected.ir.dxc.hlsl
index 6576358..36e6d94 100644
--- a/test/tint/buffer/uniform/std140/array/mat3x4_f32/to_fn.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat3x4_f32/to_fn.wgsl.expected.ir.dxc.hlsl
@@ -20,39 +20,37 @@
}
float3x4 v_1(uint start_byte_offset) {
- float4 v_2 = asfloat(u[(start_byte_offset / 16u)]);
- float4 v_3 = asfloat(u[((16u + start_byte_offset) / 16u)]);
- return float3x4(v_2, v_3, asfloat(u[((32u + start_byte_offset) / 16u)]));
+ return float3x4(asfloat(u[(start_byte_offset / 16u)]), asfloat(u[((16u + start_byte_offset) / 16u)]), asfloat(u[((32u + start_byte_offset) / 16u)]));
}
typedef float3x4 ary_ret[4];
-ary_ret v_4(uint start_byte_offset) {
+ary_ret v_2(uint start_byte_offset) {
float3x4 a_2[4] = (float3x4[4])0;
{
- uint v_5 = 0u;
- v_5 = 0u;
+ uint v_3 = 0u;
+ v_3 = 0u;
while(true) {
- uint v_6 = v_5;
- if ((v_6 >= 4u)) {
+ uint v_4 = v_3;
+ if ((v_4 >= 4u)) {
break;
}
- a_2[v_6] = v_1((start_byte_offset + (v_6 * 48u)));
+ a_2[v_4] = v_1((start_byte_offset + (v_4 * 48u)));
{
- v_5 = (v_6 + 1u);
+ v_3 = (v_4 + 1u);
}
continue;
}
}
- float3x4 v_7[4] = a_2;
- return v_7;
+ float3x4 v_5[4] = a_2;
+ return v_5;
}
[numthreads(1, 1, 1)]
void f() {
- float3x4 v_8[4] = v_4(0u);
- float v_9 = a(v_8);
- float v_10 = (v_9 + b(v_1(48u)));
- float v_11 = (v_10 + c(asfloat(u[3u]).ywxz));
- s.Store(0u, asuint((v_11 + d(asfloat(u[3u]).ywxz.x))));
+ float3x4 v_6[4] = v_2(0u);
+ float v_7 = a(v_6);
+ float v_8 = (v_7 + b(v_1(48u)));
+ float v_9 = (v_8 + c(asfloat(u[3u]).ywxz));
+ s.Store(0u, asuint((v_9 + d(asfloat(u[3u]).ywxz.x))));
}
diff --git a/test/tint/buffer/uniform/std140/array/mat3x4_f32/to_fn.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/uniform/std140/array/mat3x4_f32/to_fn.wgsl.expected.ir.fxc.hlsl
index 6576358..36e6d94 100644
--- a/test/tint/buffer/uniform/std140/array/mat3x4_f32/to_fn.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat3x4_f32/to_fn.wgsl.expected.ir.fxc.hlsl
@@ -20,39 +20,37 @@
}
float3x4 v_1(uint start_byte_offset) {
- float4 v_2 = asfloat(u[(start_byte_offset / 16u)]);
- float4 v_3 = asfloat(u[((16u + start_byte_offset) / 16u)]);
- return float3x4(v_2, v_3, asfloat(u[((32u + start_byte_offset) / 16u)]));
+ return float3x4(asfloat(u[(start_byte_offset / 16u)]), asfloat(u[((16u + start_byte_offset) / 16u)]), asfloat(u[((32u + start_byte_offset) / 16u)]));
}
typedef float3x4 ary_ret[4];
-ary_ret v_4(uint start_byte_offset) {
+ary_ret v_2(uint start_byte_offset) {
float3x4 a_2[4] = (float3x4[4])0;
{
- uint v_5 = 0u;
- v_5 = 0u;
+ uint v_3 = 0u;
+ v_3 = 0u;
while(true) {
- uint v_6 = v_5;
- if ((v_6 >= 4u)) {
+ uint v_4 = v_3;
+ if ((v_4 >= 4u)) {
break;
}
- a_2[v_6] = v_1((start_byte_offset + (v_6 * 48u)));
+ a_2[v_4] = v_1((start_byte_offset + (v_4 * 48u)));
{
- v_5 = (v_6 + 1u);
+ v_3 = (v_4 + 1u);
}
continue;
}
}
- float3x4 v_7[4] = a_2;
- return v_7;
+ float3x4 v_5[4] = a_2;
+ return v_5;
}
[numthreads(1, 1, 1)]
void f() {
- float3x4 v_8[4] = v_4(0u);
- float v_9 = a(v_8);
- float v_10 = (v_9 + b(v_1(48u)));
- float v_11 = (v_10 + c(asfloat(u[3u]).ywxz));
- s.Store(0u, asuint((v_11 + d(asfloat(u[3u]).ywxz.x))));
+ float3x4 v_6[4] = v_2(0u);
+ float v_7 = a(v_6);
+ float v_8 = (v_7 + b(v_1(48u)));
+ float v_9 = (v_8 + c(asfloat(u[3u]).ywxz));
+ s.Store(0u, asuint((v_9 + d(asfloat(u[3u]).ywxz.x))));
}
diff --git a/test/tint/buffer/uniform/std140/array/mat3x4_f32/to_private.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/uniform/std140/array/mat3x4_f32/to_private.wgsl.expected.ir.dxc.hlsl
index ecfa91c..bd09db8 100644
--- a/test/tint/buffer/uniform/std140/array/mat3x4_f32/to_private.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat3x4_f32/to_private.wgsl.expected.ir.dxc.hlsl
@@ -5,37 +5,35 @@
RWByteAddressBuffer s : register(u1);
static float3x4 p[4] = (float3x4[4])0;
float3x4 v(uint start_byte_offset) {
- float4 v_1 = asfloat(u[(start_byte_offset / 16u)]);
- float4 v_2 = asfloat(u[((16u + start_byte_offset) / 16u)]);
- return float3x4(v_1, v_2, asfloat(u[((32u + start_byte_offset) / 16u)]));
+ return float3x4(asfloat(u[(start_byte_offset / 16u)]), asfloat(u[((16u + start_byte_offset) / 16u)]), asfloat(u[((32u + start_byte_offset) / 16u)]));
}
typedef float3x4 ary_ret[4];
-ary_ret v_3(uint start_byte_offset) {
+ary_ret v_1(uint start_byte_offset) {
float3x4 a[4] = (float3x4[4])0;
{
- uint v_4 = 0u;
- v_4 = 0u;
+ uint v_2 = 0u;
+ v_2 = 0u;
while(true) {
- uint v_5 = v_4;
- if ((v_5 >= 4u)) {
+ uint v_3 = v_2;
+ if ((v_3 >= 4u)) {
break;
}
- a[v_5] = v((start_byte_offset + (v_5 * 48u)));
+ a[v_3] = v((start_byte_offset + (v_3 * 48u)));
{
- v_4 = (v_5 + 1u);
+ v_2 = (v_3 + 1u);
}
continue;
}
}
- float3x4 v_6[4] = a;
- return v_6;
+ float3x4 v_4[4] = a;
+ return v_4;
}
[numthreads(1, 1, 1)]
void f() {
- float3x4 v_7[4] = v_3(0u);
- p = v_7;
+ float3x4 v_5[4] = v_1(0u);
+ p = v_5;
p[int(1)] = v(96u);
p[int(1)][int(0)] = asfloat(u[1u]).ywxz;
p[int(1)][int(0)].x = asfloat(u[1u].x);
diff --git a/test/tint/buffer/uniform/std140/array/mat3x4_f32/to_private.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/uniform/std140/array/mat3x4_f32/to_private.wgsl.expected.ir.fxc.hlsl
index ecfa91c..bd09db8 100644
--- a/test/tint/buffer/uniform/std140/array/mat3x4_f32/to_private.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat3x4_f32/to_private.wgsl.expected.ir.fxc.hlsl
@@ -5,37 +5,35 @@
RWByteAddressBuffer s : register(u1);
static float3x4 p[4] = (float3x4[4])0;
float3x4 v(uint start_byte_offset) {
- float4 v_1 = asfloat(u[(start_byte_offset / 16u)]);
- float4 v_2 = asfloat(u[((16u + start_byte_offset) / 16u)]);
- return float3x4(v_1, v_2, asfloat(u[((32u + start_byte_offset) / 16u)]));
+ return float3x4(asfloat(u[(start_byte_offset / 16u)]), asfloat(u[((16u + start_byte_offset) / 16u)]), asfloat(u[((32u + start_byte_offset) / 16u)]));
}
typedef float3x4 ary_ret[4];
-ary_ret v_3(uint start_byte_offset) {
+ary_ret v_1(uint start_byte_offset) {
float3x4 a[4] = (float3x4[4])0;
{
- uint v_4 = 0u;
- v_4 = 0u;
+ uint v_2 = 0u;
+ v_2 = 0u;
while(true) {
- uint v_5 = v_4;
- if ((v_5 >= 4u)) {
+ uint v_3 = v_2;
+ if ((v_3 >= 4u)) {
break;
}
- a[v_5] = v((start_byte_offset + (v_5 * 48u)));
+ a[v_3] = v((start_byte_offset + (v_3 * 48u)));
{
- v_4 = (v_5 + 1u);
+ v_2 = (v_3 + 1u);
}
continue;
}
}
- float3x4 v_6[4] = a;
- return v_6;
+ float3x4 v_4[4] = a;
+ return v_4;
}
[numthreads(1, 1, 1)]
void f() {
- float3x4 v_7[4] = v_3(0u);
- p = v_7;
+ float3x4 v_5[4] = v_1(0u);
+ p = v_5;
p[int(1)] = v(96u);
p[int(1)][int(0)] = asfloat(u[1u]).ywxz;
p[int(1)][int(0)].x = asfloat(u[1u].x);
diff --git a/test/tint/buffer/uniform/std140/array/mat3x4_f32/to_storage.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/uniform/std140/array/mat3x4_f32/to_storage.wgsl.expected.ir.dxc.hlsl
index ef35724..b349470 100644
--- a/test/tint/buffer/uniform/std140/array/mat3x4_f32/to_storage.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat3x4_f32/to_storage.wgsl.expected.ir.dxc.hlsl
@@ -10,23 +10,21 @@
}
float3x4 v_1(uint start_byte_offset) {
- float4 v_2 = asfloat(u[(start_byte_offset / 16u)]);
- float4 v_3 = asfloat(u[((16u + start_byte_offset) / 16u)]);
- return float3x4(v_2, v_3, asfloat(u[((32u + start_byte_offset) / 16u)]));
+ return float3x4(asfloat(u[(start_byte_offset / 16u)]), asfloat(u[((16u + start_byte_offset) / 16u)]), asfloat(u[((32u + start_byte_offset) / 16u)]));
}
-void v_4(uint offset, float3x4 obj[4]) {
+void v_2(uint offset, float3x4 obj[4]) {
{
- uint v_5 = 0u;
- v_5 = 0u;
+ uint v_3 = 0u;
+ v_3 = 0u;
while(true) {
- uint v_6 = v_5;
- if ((v_6 >= 4u)) {
+ uint v_4 = v_3;
+ if ((v_4 >= 4u)) {
break;
}
- v((offset + (v_6 * 48u)), obj[v_6]);
+ v((offset + (v_4 * 48u)), obj[v_4]);
{
- v_5 = (v_6 + 1u);
+ v_3 = (v_4 + 1u);
}
continue;
}
@@ -34,31 +32,31 @@
}
typedef float3x4 ary_ret[4];
-ary_ret v_7(uint start_byte_offset) {
+ary_ret v_5(uint start_byte_offset) {
float3x4 a[4] = (float3x4[4])0;
{
- uint v_8 = 0u;
- v_8 = 0u;
+ uint v_6 = 0u;
+ v_6 = 0u;
while(true) {
- uint v_9 = v_8;
- if ((v_9 >= 4u)) {
+ uint v_7 = v_6;
+ if ((v_7 >= 4u)) {
break;
}
- a[v_9] = v_1((start_byte_offset + (v_9 * 48u)));
+ a[v_7] = v_1((start_byte_offset + (v_7 * 48u)));
{
- v_8 = (v_9 + 1u);
+ v_6 = (v_7 + 1u);
}
continue;
}
}
- float3x4 v_10[4] = a;
- return v_10;
+ float3x4 v_8[4] = a;
+ return v_8;
}
[numthreads(1, 1, 1)]
void f() {
- float3x4 v_11[4] = v_7(0u);
- v_4(0u, v_11);
+ float3x4 v_9[4] = v_5(0u);
+ v_2(0u, v_9);
v(48u, v_1(96u));
s.Store4(48u, asuint(asfloat(u[1u]).ywxz));
s.Store(48u, asuint(asfloat(u[1u].x)));
diff --git a/test/tint/buffer/uniform/std140/array/mat3x4_f32/to_storage.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/uniform/std140/array/mat3x4_f32/to_storage.wgsl.expected.ir.fxc.hlsl
index ef35724..b349470 100644
--- a/test/tint/buffer/uniform/std140/array/mat3x4_f32/to_storage.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat3x4_f32/to_storage.wgsl.expected.ir.fxc.hlsl
@@ -10,23 +10,21 @@
}
float3x4 v_1(uint start_byte_offset) {
- float4 v_2 = asfloat(u[(start_byte_offset / 16u)]);
- float4 v_3 = asfloat(u[((16u + start_byte_offset) / 16u)]);
- return float3x4(v_2, v_3, asfloat(u[((32u + start_byte_offset) / 16u)]));
+ return float3x4(asfloat(u[(start_byte_offset / 16u)]), asfloat(u[((16u + start_byte_offset) / 16u)]), asfloat(u[((32u + start_byte_offset) / 16u)]));
}
-void v_4(uint offset, float3x4 obj[4]) {
+void v_2(uint offset, float3x4 obj[4]) {
{
- uint v_5 = 0u;
- v_5 = 0u;
+ uint v_3 = 0u;
+ v_3 = 0u;
while(true) {
- uint v_6 = v_5;
- if ((v_6 >= 4u)) {
+ uint v_4 = v_3;
+ if ((v_4 >= 4u)) {
break;
}
- v((offset + (v_6 * 48u)), obj[v_6]);
+ v((offset + (v_4 * 48u)), obj[v_4]);
{
- v_5 = (v_6 + 1u);
+ v_3 = (v_4 + 1u);
}
continue;
}
@@ -34,31 +32,31 @@
}
typedef float3x4 ary_ret[4];
-ary_ret v_7(uint start_byte_offset) {
+ary_ret v_5(uint start_byte_offset) {
float3x4 a[4] = (float3x4[4])0;
{
- uint v_8 = 0u;
- v_8 = 0u;
+ uint v_6 = 0u;
+ v_6 = 0u;
while(true) {
- uint v_9 = v_8;
- if ((v_9 >= 4u)) {
+ uint v_7 = v_6;
+ if ((v_7 >= 4u)) {
break;
}
- a[v_9] = v_1((start_byte_offset + (v_9 * 48u)));
+ a[v_7] = v_1((start_byte_offset + (v_7 * 48u)));
{
- v_8 = (v_9 + 1u);
+ v_6 = (v_7 + 1u);
}
continue;
}
}
- float3x4 v_10[4] = a;
- return v_10;
+ float3x4 v_8[4] = a;
+ return v_8;
}
[numthreads(1, 1, 1)]
void f() {
- float3x4 v_11[4] = v_7(0u);
- v_4(0u, v_11);
+ float3x4 v_9[4] = v_5(0u);
+ v_2(0u, v_9);
v(48u, v_1(96u));
s.Store4(48u, asuint(asfloat(u[1u]).ywxz));
s.Store(48u, asuint(asfloat(u[1u].x)));
diff --git a/test/tint/buffer/uniform/std140/array/mat3x4_f32/to_workgroup.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/uniform/std140/array/mat3x4_f32/to_workgroup.wgsl.expected.ir.dxc.hlsl
index d7c91e1..a3e17e0 100644
--- a/test/tint/buffer/uniform/std140/array/mat3x4_f32/to_workgroup.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat3x4_f32/to_workgroup.wgsl.expected.ir.dxc.hlsl
@@ -8,52 +8,50 @@
};
groupshared float3x4 w[4];
float3x4 v(uint start_byte_offset) {
- float4 v_1 = asfloat(u[(start_byte_offset / 16u)]);
- float4 v_2 = asfloat(u[((16u + start_byte_offset) / 16u)]);
- return float3x4(v_1, v_2, asfloat(u[((32u + start_byte_offset) / 16u)]));
+ return float3x4(asfloat(u[(start_byte_offset / 16u)]), asfloat(u[((16u + start_byte_offset) / 16u)]), asfloat(u[((32u + start_byte_offset) / 16u)]));
}
typedef float3x4 ary_ret[4];
-ary_ret v_3(uint start_byte_offset) {
+ary_ret v_1(uint start_byte_offset) {
float3x4 a[4] = (float3x4[4])0;
{
- uint v_4 = 0u;
- v_4 = 0u;
+ uint v_2 = 0u;
+ v_2 = 0u;
while(true) {
- uint v_5 = v_4;
- if ((v_5 >= 4u)) {
+ uint v_3 = v_2;
+ if ((v_3 >= 4u)) {
break;
}
- a[v_5] = v((start_byte_offset + (v_5 * 48u)));
+ a[v_3] = v((start_byte_offset + (v_3 * 48u)));
{
- v_4 = (v_5 + 1u);
+ v_2 = (v_3 + 1u);
}
continue;
}
}
- float3x4 v_6[4] = a;
- return v_6;
+ float3x4 v_4[4] = a;
+ return v_4;
}
void f_inner(uint tint_local_index) {
{
- uint v_7 = 0u;
- v_7 = tint_local_index;
+ uint v_5 = 0u;
+ v_5 = tint_local_index;
while(true) {
- uint v_8 = v_7;
- if ((v_8 >= 4u)) {
+ uint v_6 = v_5;
+ if ((v_6 >= 4u)) {
break;
}
- w[v_8] = float3x4((0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx);
+ w[v_6] = float3x4((0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx);
{
- v_7 = (v_8 + 1u);
+ v_5 = (v_6 + 1u);
}
continue;
}
}
GroupMemoryBarrierWithGroupSync();
- float3x4 v_9[4] = v_3(0u);
- w = v_9;
+ float3x4 v_7[4] = v_1(0u);
+ w = v_7;
w[int(1)] = v(96u);
w[int(1)][int(0)] = asfloat(u[1u]).ywxz;
w[int(1)][int(0)].x = asfloat(u[1u].x);
diff --git a/test/tint/buffer/uniform/std140/array/mat3x4_f32/to_workgroup.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/uniform/std140/array/mat3x4_f32/to_workgroup.wgsl.expected.ir.fxc.hlsl
index d7c91e1..a3e17e0 100644
--- a/test/tint/buffer/uniform/std140/array/mat3x4_f32/to_workgroup.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat3x4_f32/to_workgroup.wgsl.expected.ir.fxc.hlsl
@@ -8,52 +8,50 @@
};
groupshared float3x4 w[4];
float3x4 v(uint start_byte_offset) {
- float4 v_1 = asfloat(u[(start_byte_offset / 16u)]);
- float4 v_2 = asfloat(u[((16u + start_byte_offset) / 16u)]);
- return float3x4(v_1, v_2, asfloat(u[((32u + start_byte_offset) / 16u)]));
+ return float3x4(asfloat(u[(start_byte_offset / 16u)]), asfloat(u[((16u + start_byte_offset) / 16u)]), asfloat(u[((32u + start_byte_offset) / 16u)]));
}
typedef float3x4 ary_ret[4];
-ary_ret v_3(uint start_byte_offset) {
+ary_ret v_1(uint start_byte_offset) {
float3x4 a[4] = (float3x4[4])0;
{
- uint v_4 = 0u;
- v_4 = 0u;
+ uint v_2 = 0u;
+ v_2 = 0u;
while(true) {
- uint v_5 = v_4;
- if ((v_5 >= 4u)) {
+ uint v_3 = v_2;
+ if ((v_3 >= 4u)) {
break;
}
- a[v_5] = v((start_byte_offset + (v_5 * 48u)));
+ a[v_3] = v((start_byte_offset + (v_3 * 48u)));
{
- v_4 = (v_5 + 1u);
+ v_2 = (v_3 + 1u);
}
continue;
}
}
- float3x4 v_6[4] = a;
- return v_6;
+ float3x4 v_4[4] = a;
+ return v_4;
}
void f_inner(uint tint_local_index) {
{
- uint v_7 = 0u;
- v_7 = tint_local_index;
+ uint v_5 = 0u;
+ v_5 = tint_local_index;
while(true) {
- uint v_8 = v_7;
- if ((v_8 >= 4u)) {
+ uint v_6 = v_5;
+ if ((v_6 >= 4u)) {
break;
}
- w[v_8] = float3x4((0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx);
+ w[v_6] = float3x4((0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx);
{
- v_7 = (v_8 + 1u);
+ v_5 = (v_6 + 1u);
}
continue;
}
}
GroupMemoryBarrierWithGroupSync();
- float3x4 v_9[4] = v_3(0u);
- w = v_9;
+ float3x4 v_7[4] = v_1(0u);
+ w = v_7;
w[int(1)] = v(96u);
w[int(1)][int(0)] = asfloat(u[1u]).ywxz;
w[int(1)][int(0)].x = asfloat(u[1u].x);
diff --git a/test/tint/buffer/uniform/std140/array/mat4x3_f32/dynamic_index_via_ptr.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/uniform/std140/array/mat4x3_f32/dynamic_index_via_ptr.wgsl.expected.ir.dxc.hlsl
index 6929bb3..5d50185 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x3_f32/dynamic_index_via_ptr.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat4x3_f32/dynamic_index_via_ptr.wgsl.expected.ir.dxc.hlsl
@@ -10,41 +10,38 @@
}
float4x3 v(uint start_byte_offset) {
- float3 v_1 = asfloat(a[(start_byte_offset / 16u)].xyz);
- float3 v_2 = asfloat(a[((16u + start_byte_offset) / 16u)].xyz);
- float3 v_3 = asfloat(a[((32u + start_byte_offset) / 16u)].xyz);
- return float4x3(v_1, v_2, v_3, asfloat(a[((48u + start_byte_offset) / 16u)].xyz));
+ return float4x3(asfloat(a[(start_byte_offset / 16u)].xyz), asfloat(a[((16u + start_byte_offset) / 16u)].xyz), asfloat(a[((32u + start_byte_offset) / 16u)].xyz), asfloat(a[((48u + start_byte_offset) / 16u)].xyz));
}
typedef float4x3 ary_ret[4];
-ary_ret v_4(uint start_byte_offset) {
+ary_ret v_1(uint start_byte_offset) {
float4x3 a_1[4] = (float4x3[4])0;
{
- uint v_5 = 0u;
- v_5 = 0u;
+ uint v_2 = 0u;
+ v_2 = 0u;
while(true) {
- uint v_6 = v_5;
- if ((v_6 >= 4u)) {
+ uint v_3 = v_2;
+ if ((v_3 >= 4u)) {
break;
}
- a_1[v_6] = v((start_byte_offset + (v_6 * 64u)));
+ a_1[v_3] = v((start_byte_offset + (v_3 * 64u)));
{
- v_5 = (v_6 + 1u);
+ v_2 = (v_3 + 1u);
}
continue;
}
}
- float4x3 v_7[4] = a_1;
- return v_7;
+ float4x3 v_4[4] = a_1;
+ return v_4;
}
[numthreads(1, 1, 1)]
void f() {
- uint v_8 = (64u * uint(i()));
- uint v_9 = (16u * uint(i()));
- float4x3 l_a[4] = v_4(0u);
- float4x3 l_a_i = v(v_8);
- float3 l_a_i_i = asfloat(a[((v_8 + v_9) / 16u)].xyz);
- s.Store(0u, asuint((((asfloat(a[((v_8 + v_9) / 16u)][(((v_8 + v_9) % 16u) / 4u)]) + l_a[int(0)][int(0)].x) + l_a_i[int(0)].x) + l_a_i_i.x)));
+ uint v_5 = (64u * uint(i()));
+ uint v_6 = (16u * uint(i()));
+ float4x3 l_a[4] = v_1(0u);
+ float4x3 l_a_i = v(v_5);
+ float3 l_a_i_i = asfloat(a[((v_5 + v_6) / 16u)].xyz);
+ s.Store(0u, asuint((((asfloat(a[((v_5 + v_6) / 16u)][(((v_5 + v_6) % 16u) / 4u)]) + l_a[int(0)][int(0)].x) + l_a_i[int(0)].x) + l_a_i_i.x)));
}
diff --git a/test/tint/buffer/uniform/std140/array/mat4x3_f32/dynamic_index_via_ptr.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/uniform/std140/array/mat4x3_f32/dynamic_index_via_ptr.wgsl.expected.ir.fxc.hlsl
index 6929bb3..5d50185 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x3_f32/dynamic_index_via_ptr.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat4x3_f32/dynamic_index_via_ptr.wgsl.expected.ir.fxc.hlsl
@@ -10,41 +10,38 @@
}
float4x3 v(uint start_byte_offset) {
- float3 v_1 = asfloat(a[(start_byte_offset / 16u)].xyz);
- float3 v_2 = asfloat(a[((16u + start_byte_offset) / 16u)].xyz);
- float3 v_3 = asfloat(a[((32u + start_byte_offset) / 16u)].xyz);
- return float4x3(v_1, v_2, v_3, asfloat(a[((48u + start_byte_offset) / 16u)].xyz));
+ return float4x3(asfloat(a[(start_byte_offset / 16u)].xyz), asfloat(a[((16u + start_byte_offset) / 16u)].xyz), asfloat(a[((32u + start_byte_offset) / 16u)].xyz), asfloat(a[((48u + start_byte_offset) / 16u)].xyz));
}
typedef float4x3 ary_ret[4];
-ary_ret v_4(uint start_byte_offset) {
+ary_ret v_1(uint start_byte_offset) {
float4x3 a_1[4] = (float4x3[4])0;
{
- uint v_5 = 0u;
- v_5 = 0u;
+ uint v_2 = 0u;
+ v_2 = 0u;
while(true) {
- uint v_6 = v_5;
- if ((v_6 >= 4u)) {
+ uint v_3 = v_2;
+ if ((v_3 >= 4u)) {
break;
}
- a_1[v_6] = v((start_byte_offset + (v_6 * 64u)));
+ a_1[v_3] = v((start_byte_offset + (v_3 * 64u)));
{
- v_5 = (v_6 + 1u);
+ v_2 = (v_3 + 1u);
}
continue;
}
}
- float4x3 v_7[4] = a_1;
- return v_7;
+ float4x3 v_4[4] = a_1;
+ return v_4;
}
[numthreads(1, 1, 1)]
void f() {
- uint v_8 = (64u * uint(i()));
- uint v_9 = (16u * uint(i()));
- float4x3 l_a[4] = v_4(0u);
- float4x3 l_a_i = v(v_8);
- float3 l_a_i_i = asfloat(a[((v_8 + v_9) / 16u)].xyz);
- s.Store(0u, asuint((((asfloat(a[((v_8 + v_9) / 16u)][(((v_8 + v_9) % 16u) / 4u)]) + l_a[int(0)][int(0)].x) + l_a_i[int(0)].x) + l_a_i_i.x)));
+ uint v_5 = (64u * uint(i()));
+ uint v_6 = (16u * uint(i()));
+ float4x3 l_a[4] = v_1(0u);
+ float4x3 l_a_i = v(v_5);
+ float3 l_a_i_i = asfloat(a[((v_5 + v_6) / 16u)].xyz);
+ s.Store(0u, asuint((((asfloat(a[((v_5 + v_6) / 16u)][(((v_5 + v_6) % 16u) / 4u)]) + l_a[int(0)][int(0)].x) + l_a_i[int(0)].x) + l_a_i_i.x)));
}
diff --git a/test/tint/buffer/uniform/std140/array/mat4x3_f32/static_index_via_ptr.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/uniform/std140/array/mat4x3_f32/static_index_via_ptr.wgsl.expected.ir.dxc.hlsl
index 208e962..6dd89a5 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x3_f32/static_index_via_ptr.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat4x3_f32/static_index_via_ptr.wgsl.expected.ir.dxc.hlsl
@@ -4,37 +4,34 @@
};
RWByteAddressBuffer s : register(u1);
float4x3 v(uint start_byte_offset) {
- float3 v_1 = asfloat(a[(start_byte_offset / 16u)].xyz);
- float3 v_2 = asfloat(a[((16u + start_byte_offset) / 16u)].xyz);
- float3 v_3 = asfloat(a[((32u + start_byte_offset) / 16u)].xyz);
- return float4x3(v_1, v_2, v_3, asfloat(a[((48u + start_byte_offset) / 16u)].xyz));
+ return float4x3(asfloat(a[(start_byte_offset / 16u)].xyz), asfloat(a[((16u + start_byte_offset) / 16u)].xyz), asfloat(a[((32u + start_byte_offset) / 16u)].xyz), asfloat(a[((48u + start_byte_offset) / 16u)].xyz));
}
typedef float4x3 ary_ret[4];
-ary_ret v_4(uint start_byte_offset) {
+ary_ret v_1(uint start_byte_offset) {
float4x3 a_1[4] = (float4x3[4])0;
{
- uint v_5 = 0u;
- v_5 = 0u;
+ uint v_2 = 0u;
+ v_2 = 0u;
while(true) {
- uint v_6 = v_5;
- if ((v_6 >= 4u)) {
+ uint v_3 = v_2;
+ if ((v_3 >= 4u)) {
break;
}
- a_1[v_6] = v((start_byte_offset + (v_6 * 64u)));
+ a_1[v_3] = v((start_byte_offset + (v_3 * 64u)));
{
- v_5 = (v_6 + 1u);
+ v_2 = (v_3 + 1u);
}
continue;
}
}
- float4x3 v_7[4] = a_1;
- return v_7;
+ float4x3 v_4[4] = a_1;
+ return v_4;
}
[numthreads(1, 1, 1)]
void f() {
- float4x3 l_a[4] = v_4(0u);
+ float4x3 l_a[4] = v_1(0u);
float4x3 l_a_i = v(128u);
float3 l_a_i_i = asfloat(a[9u].xyz);
s.Store(0u, asuint((((asfloat(a[9u].x) + l_a[int(0)][int(0)].x) + l_a_i[int(0)].x) + l_a_i_i.x)));
diff --git a/test/tint/buffer/uniform/std140/array/mat4x3_f32/static_index_via_ptr.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/uniform/std140/array/mat4x3_f32/static_index_via_ptr.wgsl.expected.ir.fxc.hlsl
index 208e962..6dd89a5 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x3_f32/static_index_via_ptr.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat4x3_f32/static_index_via_ptr.wgsl.expected.ir.fxc.hlsl
@@ -4,37 +4,34 @@
};
RWByteAddressBuffer s : register(u1);
float4x3 v(uint start_byte_offset) {
- float3 v_1 = asfloat(a[(start_byte_offset / 16u)].xyz);
- float3 v_2 = asfloat(a[((16u + start_byte_offset) / 16u)].xyz);
- float3 v_3 = asfloat(a[((32u + start_byte_offset) / 16u)].xyz);
- return float4x3(v_1, v_2, v_3, asfloat(a[((48u + start_byte_offset) / 16u)].xyz));
+ return float4x3(asfloat(a[(start_byte_offset / 16u)].xyz), asfloat(a[((16u + start_byte_offset) / 16u)].xyz), asfloat(a[((32u + start_byte_offset) / 16u)].xyz), asfloat(a[((48u + start_byte_offset) / 16u)].xyz));
}
typedef float4x3 ary_ret[4];
-ary_ret v_4(uint start_byte_offset) {
+ary_ret v_1(uint start_byte_offset) {
float4x3 a_1[4] = (float4x3[4])0;
{
- uint v_5 = 0u;
- v_5 = 0u;
+ uint v_2 = 0u;
+ v_2 = 0u;
while(true) {
- uint v_6 = v_5;
- if ((v_6 >= 4u)) {
+ uint v_3 = v_2;
+ if ((v_3 >= 4u)) {
break;
}
- a_1[v_6] = v((start_byte_offset + (v_6 * 64u)));
+ a_1[v_3] = v((start_byte_offset + (v_3 * 64u)));
{
- v_5 = (v_6 + 1u);
+ v_2 = (v_3 + 1u);
}
continue;
}
}
- float4x3 v_7[4] = a_1;
- return v_7;
+ float4x3 v_4[4] = a_1;
+ return v_4;
}
[numthreads(1, 1, 1)]
void f() {
- float4x3 l_a[4] = v_4(0u);
+ float4x3 l_a[4] = v_1(0u);
float4x3 l_a_i = v(128u);
float3 l_a_i_i = asfloat(a[9u].xyz);
s.Store(0u, asuint((((asfloat(a[9u].x) + l_a[int(0)][int(0)].x) + l_a_i[int(0)].x) + l_a_i_i.x)));
diff --git a/test/tint/buffer/uniform/std140/array/mat4x3_f32/to_builtin.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/uniform/std140/array/mat4x3_f32/to_builtin.wgsl.expected.ir.dxc.hlsl
index be73d12..9b2aeb1 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x3_f32/to_builtin.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat4x3_f32/to_builtin.wgsl.expected.ir.dxc.hlsl
@@ -4,10 +4,7 @@
};
RWByteAddressBuffer s : register(u1);
float4x3 v(uint start_byte_offset) {
- float3 v_1 = asfloat(u[(start_byte_offset / 16u)].xyz);
- float3 v_2 = asfloat(u[((16u + start_byte_offset) / 16u)].xyz);
- float3 v_3 = asfloat(u[((32u + start_byte_offset) / 16u)].xyz);
- return float4x3(v_1, v_2, v_3, asfloat(u[((48u + start_byte_offset) / 16u)].xyz));
+ return float4x3(asfloat(u[(start_byte_offset / 16u)].xyz), asfloat(u[((16u + start_byte_offset) / 16u)].xyz), asfloat(u[((32u + start_byte_offset) / 16u)].xyz), asfloat(u[((48u + start_byte_offset) / 16u)].xyz));
}
[numthreads(1, 1, 1)]
@@ -15,7 +12,7 @@
float3x4 t = transpose(v(128u));
float l = length(asfloat(u[1u].xyz).zxy);
float a = abs(asfloat(u[1u].xyz).zxy.x);
- float v_4 = (t[int(0)].x + float(l));
- s.Store(0u, asuint((v_4 + float(a))));
+ float v_1 = (t[int(0)].x + float(l));
+ s.Store(0u, asuint((v_1 + float(a))));
}
diff --git a/test/tint/buffer/uniform/std140/array/mat4x3_f32/to_builtin.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/uniform/std140/array/mat4x3_f32/to_builtin.wgsl.expected.ir.fxc.hlsl
index be73d12..9b2aeb1 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x3_f32/to_builtin.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat4x3_f32/to_builtin.wgsl.expected.ir.fxc.hlsl
@@ -4,10 +4,7 @@
};
RWByteAddressBuffer s : register(u1);
float4x3 v(uint start_byte_offset) {
- float3 v_1 = asfloat(u[(start_byte_offset / 16u)].xyz);
- float3 v_2 = asfloat(u[((16u + start_byte_offset) / 16u)].xyz);
- float3 v_3 = asfloat(u[((32u + start_byte_offset) / 16u)].xyz);
- return float4x3(v_1, v_2, v_3, asfloat(u[((48u + start_byte_offset) / 16u)].xyz));
+ return float4x3(asfloat(u[(start_byte_offset / 16u)].xyz), asfloat(u[((16u + start_byte_offset) / 16u)].xyz), asfloat(u[((32u + start_byte_offset) / 16u)].xyz), asfloat(u[((48u + start_byte_offset) / 16u)].xyz));
}
[numthreads(1, 1, 1)]
@@ -15,7 +12,7 @@
float3x4 t = transpose(v(128u));
float l = length(asfloat(u[1u].xyz).zxy);
float a = abs(asfloat(u[1u].xyz).zxy.x);
- float v_4 = (t[int(0)].x + float(l));
- s.Store(0u, asuint((v_4 + float(a))));
+ float v_1 = (t[int(0)].x + float(l));
+ s.Store(0u, asuint((v_1 + float(a))));
}
diff --git a/test/tint/buffer/uniform/std140/array/mat4x3_f32/to_fn.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/uniform/std140/array/mat4x3_f32/to_fn.wgsl.expected.ir.dxc.hlsl
index 55a30e4..cabb32a 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x3_f32/to_fn.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat4x3_f32/to_fn.wgsl.expected.ir.dxc.hlsl
@@ -20,40 +20,37 @@
}
float4x3 v_1(uint start_byte_offset) {
- float3 v_2 = asfloat(u[(start_byte_offset / 16u)].xyz);
- float3 v_3 = asfloat(u[((16u + start_byte_offset) / 16u)].xyz);
- float3 v_4 = asfloat(u[((32u + start_byte_offset) / 16u)].xyz);
- return float4x3(v_2, v_3, v_4, asfloat(u[((48u + start_byte_offset) / 16u)].xyz));
+ return float4x3(asfloat(u[(start_byte_offset / 16u)].xyz), asfloat(u[((16u + start_byte_offset) / 16u)].xyz), asfloat(u[((32u + start_byte_offset) / 16u)].xyz), asfloat(u[((48u + start_byte_offset) / 16u)].xyz));
}
typedef float4x3 ary_ret[4];
-ary_ret v_5(uint start_byte_offset) {
+ary_ret v_2(uint start_byte_offset) {
float4x3 a_2[4] = (float4x3[4])0;
{
- uint v_6 = 0u;
- v_6 = 0u;
+ uint v_3 = 0u;
+ v_3 = 0u;
while(true) {
- uint v_7 = v_6;
- if ((v_7 >= 4u)) {
+ uint v_4 = v_3;
+ if ((v_4 >= 4u)) {
break;
}
- a_2[v_7] = v_1((start_byte_offset + (v_7 * 64u)));
+ a_2[v_4] = v_1((start_byte_offset + (v_4 * 64u)));
{
- v_6 = (v_7 + 1u);
+ v_3 = (v_4 + 1u);
}
continue;
}
}
- float4x3 v_8[4] = a_2;
- return v_8;
+ float4x3 v_5[4] = a_2;
+ return v_5;
}
[numthreads(1, 1, 1)]
void f() {
- float4x3 v_9[4] = v_5(0u);
- float v_10 = a(v_9);
- float v_11 = (v_10 + b(v_1(64u)));
- float v_12 = (v_11 + c(asfloat(u[4u].xyz).zxy));
- s.Store(0u, asuint((v_12 + d(asfloat(u[4u].xyz).zxy.x))));
+ float4x3 v_6[4] = v_2(0u);
+ float v_7 = a(v_6);
+ float v_8 = (v_7 + b(v_1(64u)));
+ float v_9 = (v_8 + c(asfloat(u[4u].xyz).zxy));
+ s.Store(0u, asuint((v_9 + d(asfloat(u[4u].xyz).zxy.x))));
}
diff --git a/test/tint/buffer/uniform/std140/array/mat4x3_f32/to_fn.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/uniform/std140/array/mat4x3_f32/to_fn.wgsl.expected.ir.fxc.hlsl
index 55a30e4..cabb32a 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x3_f32/to_fn.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat4x3_f32/to_fn.wgsl.expected.ir.fxc.hlsl
@@ -20,40 +20,37 @@
}
float4x3 v_1(uint start_byte_offset) {
- float3 v_2 = asfloat(u[(start_byte_offset / 16u)].xyz);
- float3 v_3 = asfloat(u[((16u + start_byte_offset) / 16u)].xyz);
- float3 v_4 = asfloat(u[((32u + start_byte_offset) / 16u)].xyz);
- return float4x3(v_2, v_3, v_4, asfloat(u[((48u + start_byte_offset) / 16u)].xyz));
+ return float4x3(asfloat(u[(start_byte_offset / 16u)].xyz), asfloat(u[((16u + start_byte_offset) / 16u)].xyz), asfloat(u[((32u + start_byte_offset) / 16u)].xyz), asfloat(u[((48u + start_byte_offset) / 16u)].xyz));
}
typedef float4x3 ary_ret[4];
-ary_ret v_5(uint start_byte_offset) {
+ary_ret v_2(uint start_byte_offset) {
float4x3 a_2[4] = (float4x3[4])0;
{
- uint v_6 = 0u;
- v_6 = 0u;
+ uint v_3 = 0u;
+ v_3 = 0u;
while(true) {
- uint v_7 = v_6;
- if ((v_7 >= 4u)) {
+ uint v_4 = v_3;
+ if ((v_4 >= 4u)) {
break;
}
- a_2[v_7] = v_1((start_byte_offset + (v_7 * 64u)));
+ a_2[v_4] = v_1((start_byte_offset + (v_4 * 64u)));
{
- v_6 = (v_7 + 1u);
+ v_3 = (v_4 + 1u);
}
continue;
}
}
- float4x3 v_8[4] = a_2;
- return v_8;
+ float4x3 v_5[4] = a_2;
+ return v_5;
}
[numthreads(1, 1, 1)]
void f() {
- float4x3 v_9[4] = v_5(0u);
- float v_10 = a(v_9);
- float v_11 = (v_10 + b(v_1(64u)));
- float v_12 = (v_11 + c(asfloat(u[4u].xyz).zxy));
- s.Store(0u, asuint((v_12 + d(asfloat(u[4u].xyz).zxy.x))));
+ float4x3 v_6[4] = v_2(0u);
+ float v_7 = a(v_6);
+ float v_8 = (v_7 + b(v_1(64u)));
+ float v_9 = (v_8 + c(asfloat(u[4u].xyz).zxy));
+ s.Store(0u, asuint((v_9 + d(asfloat(u[4u].xyz).zxy.x))));
}
diff --git a/test/tint/buffer/uniform/std140/array/mat4x3_f32/to_private.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/uniform/std140/array/mat4x3_f32/to_private.wgsl.expected.ir.dxc.hlsl
index b5a4ce9..f5e71a0 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x3_f32/to_private.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat4x3_f32/to_private.wgsl.expected.ir.dxc.hlsl
@@ -5,38 +5,35 @@
RWByteAddressBuffer s : register(u1);
static float4x3 p[4] = (float4x3[4])0;
float4x3 v(uint start_byte_offset) {
- float3 v_1 = asfloat(u[(start_byte_offset / 16u)].xyz);
- float3 v_2 = asfloat(u[((16u + start_byte_offset) / 16u)].xyz);
- float3 v_3 = asfloat(u[((32u + start_byte_offset) / 16u)].xyz);
- return float4x3(v_1, v_2, v_3, asfloat(u[((48u + start_byte_offset) / 16u)].xyz));
+ return float4x3(asfloat(u[(start_byte_offset / 16u)].xyz), asfloat(u[((16u + start_byte_offset) / 16u)].xyz), asfloat(u[((32u + start_byte_offset) / 16u)].xyz), asfloat(u[((48u + start_byte_offset) / 16u)].xyz));
}
typedef float4x3 ary_ret[4];
-ary_ret v_4(uint start_byte_offset) {
+ary_ret v_1(uint start_byte_offset) {
float4x3 a[4] = (float4x3[4])0;
{
- uint v_5 = 0u;
- v_5 = 0u;
+ uint v_2 = 0u;
+ v_2 = 0u;
while(true) {
- uint v_6 = v_5;
- if ((v_6 >= 4u)) {
+ uint v_3 = v_2;
+ if ((v_3 >= 4u)) {
break;
}
- a[v_6] = v((start_byte_offset + (v_6 * 64u)));
+ a[v_3] = v((start_byte_offset + (v_3 * 64u)));
{
- v_5 = (v_6 + 1u);
+ v_2 = (v_3 + 1u);
}
continue;
}
}
- float4x3 v_7[4] = a;
- return v_7;
+ float4x3 v_4[4] = a;
+ return v_4;
}
[numthreads(1, 1, 1)]
void f() {
- float4x3 v_8[4] = v_4(0u);
- p = v_8;
+ float4x3 v_5[4] = v_1(0u);
+ p = v_5;
p[int(1)] = v(128u);
p[int(1)][int(0)] = asfloat(u[1u].xyz).zxy;
p[int(1)][int(0)].x = asfloat(u[1u].x);
diff --git a/test/tint/buffer/uniform/std140/array/mat4x3_f32/to_private.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/uniform/std140/array/mat4x3_f32/to_private.wgsl.expected.ir.fxc.hlsl
index b5a4ce9..f5e71a0 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x3_f32/to_private.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat4x3_f32/to_private.wgsl.expected.ir.fxc.hlsl
@@ -5,38 +5,35 @@
RWByteAddressBuffer s : register(u1);
static float4x3 p[4] = (float4x3[4])0;
float4x3 v(uint start_byte_offset) {
- float3 v_1 = asfloat(u[(start_byte_offset / 16u)].xyz);
- float3 v_2 = asfloat(u[((16u + start_byte_offset) / 16u)].xyz);
- float3 v_3 = asfloat(u[((32u + start_byte_offset) / 16u)].xyz);
- return float4x3(v_1, v_2, v_3, asfloat(u[((48u + start_byte_offset) / 16u)].xyz));
+ return float4x3(asfloat(u[(start_byte_offset / 16u)].xyz), asfloat(u[((16u + start_byte_offset) / 16u)].xyz), asfloat(u[((32u + start_byte_offset) / 16u)].xyz), asfloat(u[((48u + start_byte_offset) / 16u)].xyz));
}
typedef float4x3 ary_ret[4];
-ary_ret v_4(uint start_byte_offset) {
+ary_ret v_1(uint start_byte_offset) {
float4x3 a[4] = (float4x3[4])0;
{
- uint v_5 = 0u;
- v_5 = 0u;
+ uint v_2 = 0u;
+ v_2 = 0u;
while(true) {
- uint v_6 = v_5;
- if ((v_6 >= 4u)) {
+ uint v_3 = v_2;
+ if ((v_3 >= 4u)) {
break;
}
- a[v_6] = v((start_byte_offset + (v_6 * 64u)));
+ a[v_3] = v((start_byte_offset + (v_3 * 64u)));
{
- v_5 = (v_6 + 1u);
+ v_2 = (v_3 + 1u);
}
continue;
}
}
- float4x3 v_7[4] = a;
- return v_7;
+ float4x3 v_4[4] = a;
+ return v_4;
}
[numthreads(1, 1, 1)]
void f() {
- float4x3 v_8[4] = v_4(0u);
- p = v_8;
+ float4x3 v_5[4] = v_1(0u);
+ p = v_5;
p[int(1)] = v(128u);
p[int(1)][int(0)] = asfloat(u[1u].xyz).zxy;
p[int(1)][int(0)].x = asfloat(u[1u].x);
diff --git a/test/tint/buffer/uniform/std140/array/mat4x3_f32/to_storage.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/uniform/std140/array/mat4x3_f32/to_storage.wgsl.expected.ir.dxc.hlsl
index 1913d44..f24be03 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x3_f32/to_storage.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat4x3_f32/to_storage.wgsl.expected.ir.dxc.hlsl
@@ -11,13 +11,30 @@
}
float4x3 v_1(uint start_byte_offset) {
- float3 v_2 = asfloat(u[(start_byte_offset / 16u)].xyz);
- float3 v_3 = asfloat(u[((16u + start_byte_offset) / 16u)].xyz);
- float3 v_4 = asfloat(u[((32u + start_byte_offset) / 16u)].xyz);
- return float4x3(v_2, v_3, v_4, asfloat(u[((48u + start_byte_offset) / 16u)].xyz));
+ return float4x3(asfloat(u[(start_byte_offset / 16u)].xyz), asfloat(u[((16u + start_byte_offset) / 16u)].xyz), asfloat(u[((32u + start_byte_offset) / 16u)].xyz), asfloat(u[((48u + start_byte_offset) / 16u)].xyz));
}
-void v_5(uint offset, float4x3 obj[4]) {
+void v_2(uint offset, float4x3 obj[4]) {
+ {
+ uint v_3 = 0u;
+ v_3 = 0u;
+ while(true) {
+ uint v_4 = v_3;
+ if ((v_4 >= 4u)) {
+ break;
+ }
+ v((offset + (v_4 * 64u)), obj[v_4]);
+ {
+ v_3 = (v_4 + 1u);
+ }
+ continue;
+ }
+ }
+}
+
+typedef float4x3 ary_ret[4];
+ary_ret v_5(uint start_byte_offset) {
+ float4x3 a[4] = (float4x3[4])0;
{
uint v_6 = 0u;
v_6 = 0u;
@@ -26,41 +43,21 @@
if ((v_7 >= 4u)) {
break;
}
- v((offset + (v_7 * 64u)), obj[v_7]);
+ a[v_7] = v_1((start_byte_offset + (v_7 * 64u)));
{
v_6 = (v_7 + 1u);
}
continue;
}
}
-}
-
-typedef float4x3 ary_ret[4];
-ary_ret v_8(uint start_byte_offset) {
- float4x3 a[4] = (float4x3[4])0;
- {
- uint v_9 = 0u;
- v_9 = 0u;
- while(true) {
- uint v_10 = v_9;
- if ((v_10 >= 4u)) {
- break;
- }
- a[v_10] = v_1((start_byte_offset + (v_10 * 64u)));
- {
- v_9 = (v_10 + 1u);
- }
- continue;
- }
- }
- float4x3 v_11[4] = a;
- return v_11;
+ float4x3 v_8[4] = a;
+ return v_8;
}
[numthreads(1, 1, 1)]
void f() {
- float4x3 v_12[4] = v_8(0u);
- v_5(0u, v_12);
+ float4x3 v_9[4] = v_5(0u);
+ v_2(0u, v_9);
v(64u, v_1(128u));
s.Store3(64u, asuint(asfloat(u[1u].xyz).zxy));
s.Store(64u, asuint(asfloat(u[1u].x)));
diff --git a/test/tint/buffer/uniform/std140/array/mat4x3_f32/to_storage.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/uniform/std140/array/mat4x3_f32/to_storage.wgsl.expected.ir.fxc.hlsl
index 1913d44..f24be03 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x3_f32/to_storage.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat4x3_f32/to_storage.wgsl.expected.ir.fxc.hlsl
@@ -11,13 +11,30 @@
}
float4x3 v_1(uint start_byte_offset) {
- float3 v_2 = asfloat(u[(start_byte_offset / 16u)].xyz);
- float3 v_3 = asfloat(u[((16u + start_byte_offset) / 16u)].xyz);
- float3 v_4 = asfloat(u[((32u + start_byte_offset) / 16u)].xyz);
- return float4x3(v_2, v_3, v_4, asfloat(u[((48u + start_byte_offset) / 16u)].xyz));
+ return float4x3(asfloat(u[(start_byte_offset / 16u)].xyz), asfloat(u[((16u + start_byte_offset) / 16u)].xyz), asfloat(u[((32u + start_byte_offset) / 16u)].xyz), asfloat(u[((48u + start_byte_offset) / 16u)].xyz));
}
-void v_5(uint offset, float4x3 obj[4]) {
+void v_2(uint offset, float4x3 obj[4]) {
+ {
+ uint v_3 = 0u;
+ v_3 = 0u;
+ while(true) {
+ uint v_4 = v_3;
+ if ((v_4 >= 4u)) {
+ break;
+ }
+ v((offset + (v_4 * 64u)), obj[v_4]);
+ {
+ v_3 = (v_4 + 1u);
+ }
+ continue;
+ }
+ }
+}
+
+typedef float4x3 ary_ret[4];
+ary_ret v_5(uint start_byte_offset) {
+ float4x3 a[4] = (float4x3[4])0;
{
uint v_6 = 0u;
v_6 = 0u;
@@ -26,41 +43,21 @@
if ((v_7 >= 4u)) {
break;
}
- v((offset + (v_7 * 64u)), obj[v_7]);
+ a[v_7] = v_1((start_byte_offset + (v_7 * 64u)));
{
v_6 = (v_7 + 1u);
}
continue;
}
}
-}
-
-typedef float4x3 ary_ret[4];
-ary_ret v_8(uint start_byte_offset) {
- float4x3 a[4] = (float4x3[4])0;
- {
- uint v_9 = 0u;
- v_9 = 0u;
- while(true) {
- uint v_10 = v_9;
- if ((v_10 >= 4u)) {
- break;
- }
- a[v_10] = v_1((start_byte_offset + (v_10 * 64u)));
- {
- v_9 = (v_10 + 1u);
- }
- continue;
- }
- }
- float4x3 v_11[4] = a;
- return v_11;
+ float4x3 v_8[4] = a;
+ return v_8;
}
[numthreads(1, 1, 1)]
void f() {
- float4x3 v_12[4] = v_8(0u);
- v_5(0u, v_12);
+ float4x3 v_9[4] = v_5(0u);
+ v_2(0u, v_9);
v(64u, v_1(128u));
s.Store3(64u, asuint(asfloat(u[1u].xyz).zxy));
s.Store(64u, asuint(asfloat(u[1u].x)));
diff --git a/test/tint/buffer/uniform/std140/array/mat4x3_f32/to_workgroup.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/uniform/std140/array/mat4x3_f32/to_workgroup.wgsl.expected.ir.dxc.hlsl
index 705149d..18db582 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x3_f32/to_workgroup.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat4x3_f32/to_workgroup.wgsl.expected.ir.dxc.hlsl
@@ -8,53 +8,50 @@
};
groupshared float4x3 w[4];
float4x3 v(uint start_byte_offset) {
- float3 v_1 = asfloat(u[(start_byte_offset / 16u)].xyz);
- float3 v_2 = asfloat(u[((16u + start_byte_offset) / 16u)].xyz);
- float3 v_3 = asfloat(u[((32u + start_byte_offset) / 16u)].xyz);
- return float4x3(v_1, v_2, v_3, asfloat(u[((48u + start_byte_offset) / 16u)].xyz));
+ return float4x3(asfloat(u[(start_byte_offset / 16u)].xyz), asfloat(u[((16u + start_byte_offset) / 16u)].xyz), asfloat(u[((32u + start_byte_offset) / 16u)].xyz), asfloat(u[((48u + start_byte_offset) / 16u)].xyz));
}
typedef float4x3 ary_ret[4];
-ary_ret v_4(uint start_byte_offset) {
+ary_ret v_1(uint start_byte_offset) {
float4x3 a[4] = (float4x3[4])0;
{
+ uint v_2 = 0u;
+ v_2 = 0u;
+ while(true) {
+ uint v_3 = v_2;
+ if ((v_3 >= 4u)) {
+ break;
+ }
+ a[v_3] = v((start_byte_offset + (v_3 * 64u)));
+ {
+ v_2 = (v_3 + 1u);
+ }
+ continue;
+ }
+ }
+ float4x3 v_4[4] = a;
+ return v_4;
+}
+
+void f_inner(uint tint_local_index) {
+ {
uint v_5 = 0u;
- v_5 = 0u;
+ v_5 = tint_local_index;
while(true) {
uint v_6 = v_5;
if ((v_6 >= 4u)) {
break;
}
- a[v_6] = v((start_byte_offset + (v_6 * 64u)));
+ w[v_6] = float4x3((0.0f).xxx, (0.0f).xxx, (0.0f).xxx, (0.0f).xxx);
{
v_5 = (v_6 + 1u);
}
continue;
}
}
- float4x3 v_7[4] = a;
- return v_7;
-}
-
-void f_inner(uint tint_local_index) {
- {
- uint v_8 = 0u;
- v_8 = tint_local_index;
- while(true) {
- uint v_9 = v_8;
- if ((v_9 >= 4u)) {
- break;
- }
- w[v_9] = float4x3((0.0f).xxx, (0.0f).xxx, (0.0f).xxx, (0.0f).xxx);
- {
- v_8 = (v_9 + 1u);
- }
- continue;
- }
- }
GroupMemoryBarrierWithGroupSync();
- float4x3 v_10[4] = v_4(0u);
- w = v_10;
+ float4x3 v_7[4] = v_1(0u);
+ w = v_7;
w[int(1)] = v(128u);
w[int(1)][int(0)] = asfloat(u[1u].xyz).zxy;
w[int(1)][int(0)].x = asfloat(u[1u].x);
diff --git a/test/tint/buffer/uniform/std140/array/mat4x3_f32/to_workgroup.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/uniform/std140/array/mat4x3_f32/to_workgroup.wgsl.expected.ir.fxc.hlsl
index 705149d..18db582 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x3_f32/to_workgroup.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat4x3_f32/to_workgroup.wgsl.expected.ir.fxc.hlsl
@@ -8,53 +8,50 @@
};
groupshared float4x3 w[4];
float4x3 v(uint start_byte_offset) {
- float3 v_1 = asfloat(u[(start_byte_offset / 16u)].xyz);
- float3 v_2 = asfloat(u[((16u + start_byte_offset) / 16u)].xyz);
- float3 v_3 = asfloat(u[((32u + start_byte_offset) / 16u)].xyz);
- return float4x3(v_1, v_2, v_3, asfloat(u[((48u + start_byte_offset) / 16u)].xyz));
+ return float4x3(asfloat(u[(start_byte_offset / 16u)].xyz), asfloat(u[((16u + start_byte_offset) / 16u)].xyz), asfloat(u[((32u + start_byte_offset) / 16u)].xyz), asfloat(u[((48u + start_byte_offset) / 16u)].xyz));
}
typedef float4x3 ary_ret[4];
-ary_ret v_4(uint start_byte_offset) {
+ary_ret v_1(uint start_byte_offset) {
float4x3 a[4] = (float4x3[4])0;
{
+ uint v_2 = 0u;
+ v_2 = 0u;
+ while(true) {
+ uint v_3 = v_2;
+ if ((v_3 >= 4u)) {
+ break;
+ }
+ a[v_3] = v((start_byte_offset + (v_3 * 64u)));
+ {
+ v_2 = (v_3 + 1u);
+ }
+ continue;
+ }
+ }
+ float4x3 v_4[4] = a;
+ return v_4;
+}
+
+void f_inner(uint tint_local_index) {
+ {
uint v_5 = 0u;
- v_5 = 0u;
+ v_5 = tint_local_index;
while(true) {
uint v_6 = v_5;
if ((v_6 >= 4u)) {
break;
}
- a[v_6] = v((start_byte_offset + (v_6 * 64u)));
+ w[v_6] = float4x3((0.0f).xxx, (0.0f).xxx, (0.0f).xxx, (0.0f).xxx);
{
v_5 = (v_6 + 1u);
}
continue;
}
}
- float4x3 v_7[4] = a;
- return v_7;
-}
-
-void f_inner(uint tint_local_index) {
- {
- uint v_8 = 0u;
- v_8 = tint_local_index;
- while(true) {
- uint v_9 = v_8;
- if ((v_9 >= 4u)) {
- break;
- }
- w[v_9] = float4x3((0.0f).xxx, (0.0f).xxx, (0.0f).xxx, (0.0f).xxx);
- {
- v_8 = (v_9 + 1u);
- }
- continue;
- }
- }
GroupMemoryBarrierWithGroupSync();
- float4x3 v_10[4] = v_4(0u);
- w = v_10;
+ float4x3 v_7[4] = v_1(0u);
+ w = v_7;
w[int(1)] = v(128u);
w[int(1)][int(0)] = asfloat(u[1u].xyz).zxy;
w[int(1)][int(0)].x = asfloat(u[1u].x);
diff --git a/test/tint/buffer/uniform/std140/array/mat4x4_f32/dynamic_index_via_ptr.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/uniform/std140/array/mat4x4_f32/dynamic_index_via_ptr.wgsl.expected.ir.dxc.hlsl
index c048298..c0a7a5f 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x4_f32/dynamic_index_via_ptr.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat4x4_f32/dynamic_index_via_ptr.wgsl.expected.ir.dxc.hlsl
@@ -10,41 +10,38 @@
}
float4x4 v(uint start_byte_offset) {
- float4 v_1 = asfloat(a[(start_byte_offset / 16u)]);
- float4 v_2 = asfloat(a[((16u + start_byte_offset) / 16u)]);
- float4 v_3 = asfloat(a[((32u + start_byte_offset) / 16u)]);
- return float4x4(v_1, v_2, v_3, asfloat(a[((48u + start_byte_offset) / 16u)]));
+ return float4x4(asfloat(a[(start_byte_offset / 16u)]), asfloat(a[((16u + start_byte_offset) / 16u)]), asfloat(a[((32u + start_byte_offset) / 16u)]), asfloat(a[((48u + start_byte_offset) / 16u)]));
}
typedef float4x4 ary_ret[4];
-ary_ret v_4(uint start_byte_offset) {
+ary_ret v_1(uint start_byte_offset) {
float4x4 a_1[4] = (float4x4[4])0;
{
- uint v_5 = 0u;
- v_5 = 0u;
+ uint v_2 = 0u;
+ v_2 = 0u;
while(true) {
- uint v_6 = v_5;
- if ((v_6 >= 4u)) {
+ uint v_3 = v_2;
+ if ((v_3 >= 4u)) {
break;
}
- a_1[v_6] = v((start_byte_offset + (v_6 * 64u)));
+ a_1[v_3] = v((start_byte_offset + (v_3 * 64u)));
{
- v_5 = (v_6 + 1u);
+ v_2 = (v_3 + 1u);
}
continue;
}
}
- float4x4 v_7[4] = a_1;
- return v_7;
+ float4x4 v_4[4] = a_1;
+ return v_4;
}
[numthreads(1, 1, 1)]
void f() {
- uint v_8 = (64u * uint(i()));
- uint v_9 = (16u * uint(i()));
- float4x4 l_a[4] = v_4(0u);
- float4x4 l_a_i = v(v_8);
- float4 l_a_i_i = asfloat(a[((v_8 + v_9) / 16u)]);
- s.Store(0u, asuint((((asfloat(a[((v_8 + v_9) / 16u)][(((v_8 + v_9) % 16u) / 4u)]) + l_a[int(0)][int(0)].x) + l_a_i[int(0)].x) + l_a_i_i.x)));
+ uint v_5 = (64u * uint(i()));
+ uint v_6 = (16u * uint(i()));
+ float4x4 l_a[4] = v_1(0u);
+ float4x4 l_a_i = v(v_5);
+ float4 l_a_i_i = asfloat(a[((v_5 + v_6) / 16u)]);
+ s.Store(0u, asuint((((asfloat(a[((v_5 + v_6) / 16u)][(((v_5 + v_6) % 16u) / 4u)]) + l_a[int(0)][int(0)].x) + l_a_i[int(0)].x) + l_a_i_i.x)));
}
diff --git a/test/tint/buffer/uniform/std140/array/mat4x4_f32/dynamic_index_via_ptr.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/uniform/std140/array/mat4x4_f32/dynamic_index_via_ptr.wgsl.expected.ir.fxc.hlsl
index c048298..c0a7a5f 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x4_f32/dynamic_index_via_ptr.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat4x4_f32/dynamic_index_via_ptr.wgsl.expected.ir.fxc.hlsl
@@ -10,41 +10,38 @@
}
float4x4 v(uint start_byte_offset) {
- float4 v_1 = asfloat(a[(start_byte_offset / 16u)]);
- float4 v_2 = asfloat(a[((16u + start_byte_offset) / 16u)]);
- float4 v_3 = asfloat(a[((32u + start_byte_offset) / 16u)]);
- return float4x4(v_1, v_2, v_3, asfloat(a[((48u + start_byte_offset) / 16u)]));
+ return float4x4(asfloat(a[(start_byte_offset / 16u)]), asfloat(a[((16u + start_byte_offset) / 16u)]), asfloat(a[((32u + start_byte_offset) / 16u)]), asfloat(a[((48u + start_byte_offset) / 16u)]));
}
typedef float4x4 ary_ret[4];
-ary_ret v_4(uint start_byte_offset) {
+ary_ret v_1(uint start_byte_offset) {
float4x4 a_1[4] = (float4x4[4])0;
{
- uint v_5 = 0u;
- v_5 = 0u;
+ uint v_2 = 0u;
+ v_2 = 0u;
while(true) {
- uint v_6 = v_5;
- if ((v_6 >= 4u)) {
+ uint v_3 = v_2;
+ if ((v_3 >= 4u)) {
break;
}
- a_1[v_6] = v((start_byte_offset + (v_6 * 64u)));
+ a_1[v_3] = v((start_byte_offset + (v_3 * 64u)));
{
- v_5 = (v_6 + 1u);
+ v_2 = (v_3 + 1u);
}
continue;
}
}
- float4x4 v_7[4] = a_1;
- return v_7;
+ float4x4 v_4[4] = a_1;
+ return v_4;
}
[numthreads(1, 1, 1)]
void f() {
- uint v_8 = (64u * uint(i()));
- uint v_9 = (16u * uint(i()));
- float4x4 l_a[4] = v_4(0u);
- float4x4 l_a_i = v(v_8);
- float4 l_a_i_i = asfloat(a[((v_8 + v_9) / 16u)]);
- s.Store(0u, asuint((((asfloat(a[((v_8 + v_9) / 16u)][(((v_8 + v_9) % 16u) / 4u)]) + l_a[int(0)][int(0)].x) + l_a_i[int(0)].x) + l_a_i_i.x)));
+ uint v_5 = (64u * uint(i()));
+ uint v_6 = (16u * uint(i()));
+ float4x4 l_a[4] = v_1(0u);
+ float4x4 l_a_i = v(v_5);
+ float4 l_a_i_i = asfloat(a[((v_5 + v_6) / 16u)]);
+ s.Store(0u, asuint((((asfloat(a[((v_5 + v_6) / 16u)][(((v_5 + v_6) % 16u) / 4u)]) + l_a[int(0)][int(0)].x) + l_a_i[int(0)].x) + l_a_i_i.x)));
}
diff --git a/test/tint/buffer/uniform/std140/array/mat4x4_f32/static_index_via_ptr.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/uniform/std140/array/mat4x4_f32/static_index_via_ptr.wgsl.expected.ir.dxc.hlsl
index ad58e4a..aed05e2 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x4_f32/static_index_via_ptr.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat4x4_f32/static_index_via_ptr.wgsl.expected.ir.dxc.hlsl
@@ -4,37 +4,34 @@
};
RWByteAddressBuffer s : register(u1);
float4x4 v(uint start_byte_offset) {
- float4 v_1 = asfloat(a[(start_byte_offset / 16u)]);
- float4 v_2 = asfloat(a[((16u + start_byte_offset) / 16u)]);
- float4 v_3 = asfloat(a[((32u + start_byte_offset) / 16u)]);
- return float4x4(v_1, v_2, v_3, asfloat(a[((48u + start_byte_offset) / 16u)]));
+ return float4x4(asfloat(a[(start_byte_offset / 16u)]), asfloat(a[((16u + start_byte_offset) / 16u)]), asfloat(a[((32u + start_byte_offset) / 16u)]), asfloat(a[((48u + start_byte_offset) / 16u)]));
}
typedef float4x4 ary_ret[4];
-ary_ret v_4(uint start_byte_offset) {
+ary_ret v_1(uint start_byte_offset) {
float4x4 a_1[4] = (float4x4[4])0;
{
- uint v_5 = 0u;
- v_5 = 0u;
+ uint v_2 = 0u;
+ v_2 = 0u;
while(true) {
- uint v_6 = v_5;
- if ((v_6 >= 4u)) {
+ uint v_3 = v_2;
+ if ((v_3 >= 4u)) {
break;
}
- a_1[v_6] = v((start_byte_offset + (v_6 * 64u)));
+ a_1[v_3] = v((start_byte_offset + (v_3 * 64u)));
{
- v_5 = (v_6 + 1u);
+ v_2 = (v_3 + 1u);
}
continue;
}
}
- float4x4 v_7[4] = a_1;
- return v_7;
+ float4x4 v_4[4] = a_1;
+ return v_4;
}
[numthreads(1, 1, 1)]
void f() {
- float4x4 l_a[4] = v_4(0u);
+ float4x4 l_a[4] = v_1(0u);
float4x4 l_a_i = v(128u);
float4 l_a_i_i = asfloat(a[9u]);
s.Store(0u, asuint((((asfloat(a[9u].x) + l_a[int(0)][int(0)].x) + l_a_i[int(0)].x) + l_a_i_i.x)));
diff --git a/test/tint/buffer/uniform/std140/array/mat4x4_f32/static_index_via_ptr.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/uniform/std140/array/mat4x4_f32/static_index_via_ptr.wgsl.expected.ir.fxc.hlsl
index ad58e4a..aed05e2 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x4_f32/static_index_via_ptr.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat4x4_f32/static_index_via_ptr.wgsl.expected.ir.fxc.hlsl
@@ -4,37 +4,34 @@
};
RWByteAddressBuffer s : register(u1);
float4x4 v(uint start_byte_offset) {
- float4 v_1 = asfloat(a[(start_byte_offset / 16u)]);
- float4 v_2 = asfloat(a[((16u + start_byte_offset) / 16u)]);
- float4 v_3 = asfloat(a[((32u + start_byte_offset) / 16u)]);
- return float4x4(v_1, v_2, v_3, asfloat(a[((48u + start_byte_offset) / 16u)]));
+ return float4x4(asfloat(a[(start_byte_offset / 16u)]), asfloat(a[((16u + start_byte_offset) / 16u)]), asfloat(a[((32u + start_byte_offset) / 16u)]), asfloat(a[((48u + start_byte_offset) / 16u)]));
}
typedef float4x4 ary_ret[4];
-ary_ret v_4(uint start_byte_offset) {
+ary_ret v_1(uint start_byte_offset) {
float4x4 a_1[4] = (float4x4[4])0;
{
- uint v_5 = 0u;
- v_5 = 0u;
+ uint v_2 = 0u;
+ v_2 = 0u;
while(true) {
- uint v_6 = v_5;
- if ((v_6 >= 4u)) {
+ uint v_3 = v_2;
+ if ((v_3 >= 4u)) {
break;
}
- a_1[v_6] = v((start_byte_offset + (v_6 * 64u)));
+ a_1[v_3] = v((start_byte_offset + (v_3 * 64u)));
{
- v_5 = (v_6 + 1u);
+ v_2 = (v_3 + 1u);
}
continue;
}
}
- float4x4 v_7[4] = a_1;
- return v_7;
+ float4x4 v_4[4] = a_1;
+ return v_4;
}
[numthreads(1, 1, 1)]
void f() {
- float4x4 l_a[4] = v_4(0u);
+ float4x4 l_a[4] = v_1(0u);
float4x4 l_a_i = v(128u);
float4 l_a_i_i = asfloat(a[9u]);
s.Store(0u, asuint((((asfloat(a[9u].x) + l_a[int(0)][int(0)].x) + l_a_i[int(0)].x) + l_a_i_i.x)));
diff --git a/test/tint/buffer/uniform/std140/array/mat4x4_f32/to_builtin.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/uniform/std140/array/mat4x4_f32/to_builtin.wgsl.expected.ir.dxc.hlsl
index f0d1398..6bd3603 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x4_f32/to_builtin.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat4x4_f32/to_builtin.wgsl.expected.ir.dxc.hlsl
@@ -4,10 +4,7 @@
};
RWByteAddressBuffer s : register(u1);
float4x4 v(uint start_byte_offset) {
- float4 v_1 = asfloat(u[(start_byte_offset / 16u)]);
- float4 v_2 = asfloat(u[((16u + start_byte_offset) / 16u)]);
- float4 v_3 = asfloat(u[((32u + start_byte_offset) / 16u)]);
- return float4x4(v_1, v_2, v_3, asfloat(u[((48u + start_byte_offset) / 16u)]));
+ return float4x4(asfloat(u[(start_byte_offset / 16u)]), asfloat(u[((16u + start_byte_offset) / 16u)]), asfloat(u[((32u + start_byte_offset) / 16u)]), asfloat(u[((48u + start_byte_offset) / 16u)]));
}
[numthreads(1, 1, 1)]
@@ -15,7 +12,7 @@
float4x4 t = transpose(v(128u));
float l = length(asfloat(u[1u]).ywxz);
float a = abs(asfloat(u[1u]).ywxz.x);
- float v_4 = (t[int(0)].x + float(l));
- s.Store(0u, asuint((v_4 + float(a))));
+ float v_1 = (t[int(0)].x + float(l));
+ s.Store(0u, asuint((v_1 + float(a))));
}
diff --git a/test/tint/buffer/uniform/std140/array/mat4x4_f32/to_builtin.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/uniform/std140/array/mat4x4_f32/to_builtin.wgsl.expected.ir.fxc.hlsl
index f0d1398..6bd3603 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x4_f32/to_builtin.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat4x4_f32/to_builtin.wgsl.expected.ir.fxc.hlsl
@@ -4,10 +4,7 @@
};
RWByteAddressBuffer s : register(u1);
float4x4 v(uint start_byte_offset) {
- float4 v_1 = asfloat(u[(start_byte_offset / 16u)]);
- float4 v_2 = asfloat(u[((16u + start_byte_offset) / 16u)]);
- float4 v_3 = asfloat(u[((32u + start_byte_offset) / 16u)]);
- return float4x4(v_1, v_2, v_3, asfloat(u[((48u + start_byte_offset) / 16u)]));
+ return float4x4(asfloat(u[(start_byte_offset / 16u)]), asfloat(u[((16u + start_byte_offset) / 16u)]), asfloat(u[((32u + start_byte_offset) / 16u)]), asfloat(u[((48u + start_byte_offset) / 16u)]));
}
[numthreads(1, 1, 1)]
@@ -15,7 +12,7 @@
float4x4 t = transpose(v(128u));
float l = length(asfloat(u[1u]).ywxz);
float a = abs(asfloat(u[1u]).ywxz.x);
- float v_4 = (t[int(0)].x + float(l));
- s.Store(0u, asuint((v_4 + float(a))));
+ float v_1 = (t[int(0)].x + float(l));
+ s.Store(0u, asuint((v_1 + float(a))));
}
diff --git a/test/tint/buffer/uniform/std140/array/mat4x4_f32/to_fn.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/uniform/std140/array/mat4x4_f32/to_fn.wgsl.expected.ir.dxc.hlsl
index 8f74825..ea983eb 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x4_f32/to_fn.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat4x4_f32/to_fn.wgsl.expected.ir.dxc.hlsl
@@ -20,40 +20,37 @@
}
float4x4 v_1(uint start_byte_offset) {
- float4 v_2 = asfloat(u[(start_byte_offset / 16u)]);
- float4 v_3 = asfloat(u[((16u + start_byte_offset) / 16u)]);
- float4 v_4 = asfloat(u[((32u + start_byte_offset) / 16u)]);
- return float4x4(v_2, v_3, v_4, asfloat(u[((48u + start_byte_offset) / 16u)]));
+ return float4x4(asfloat(u[(start_byte_offset / 16u)]), asfloat(u[((16u + start_byte_offset) / 16u)]), asfloat(u[((32u + start_byte_offset) / 16u)]), asfloat(u[((48u + start_byte_offset) / 16u)]));
}
typedef float4x4 ary_ret[4];
-ary_ret v_5(uint start_byte_offset) {
+ary_ret v_2(uint start_byte_offset) {
float4x4 a_2[4] = (float4x4[4])0;
{
- uint v_6 = 0u;
- v_6 = 0u;
+ uint v_3 = 0u;
+ v_3 = 0u;
while(true) {
- uint v_7 = v_6;
- if ((v_7 >= 4u)) {
+ uint v_4 = v_3;
+ if ((v_4 >= 4u)) {
break;
}
- a_2[v_7] = v_1((start_byte_offset + (v_7 * 64u)));
+ a_2[v_4] = v_1((start_byte_offset + (v_4 * 64u)));
{
- v_6 = (v_7 + 1u);
+ v_3 = (v_4 + 1u);
}
continue;
}
}
- float4x4 v_8[4] = a_2;
- return v_8;
+ float4x4 v_5[4] = a_2;
+ return v_5;
}
[numthreads(1, 1, 1)]
void f() {
- float4x4 v_9[4] = v_5(0u);
- float v_10 = a(v_9);
- float v_11 = (v_10 + b(v_1(64u)));
- float v_12 = (v_11 + c(asfloat(u[4u]).ywxz));
- s.Store(0u, asuint((v_12 + d(asfloat(u[4u]).ywxz.x))));
+ float4x4 v_6[4] = v_2(0u);
+ float v_7 = a(v_6);
+ float v_8 = (v_7 + b(v_1(64u)));
+ float v_9 = (v_8 + c(asfloat(u[4u]).ywxz));
+ s.Store(0u, asuint((v_9 + d(asfloat(u[4u]).ywxz.x))));
}
diff --git a/test/tint/buffer/uniform/std140/array/mat4x4_f32/to_fn.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/uniform/std140/array/mat4x4_f32/to_fn.wgsl.expected.ir.fxc.hlsl
index 8f74825..ea983eb 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x4_f32/to_fn.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat4x4_f32/to_fn.wgsl.expected.ir.fxc.hlsl
@@ -20,40 +20,37 @@
}
float4x4 v_1(uint start_byte_offset) {
- float4 v_2 = asfloat(u[(start_byte_offset / 16u)]);
- float4 v_3 = asfloat(u[((16u + start_byte_offset) / 16u)]);
- float4 v_4 = asfloat(u[((32u + start_byte_offset) / 16u)]);
- return float4x4(v_2, v_3, v_4, asfloat(u[((48u + start_byte_offset) / 16u)]));
+ return float4x4(asfloat(u[(start_byte_offset / 16u)]), asfloat(u[((16u + start_byte_offset) / 16u)]), asfloat(u[((32u + start_byte_offset) / 16u)]), asfloat(u[((48u + start_byte_offset) / 16u)]));
}
typedef float4x4 ary_ret[4];
-ary_ret v_5(uint start_byte_offset) {
+ary_ret v_2(uint start_byte_offset) {
float4x4 a_2[4] = (float4x4[4])0;
{
- uint v_6 = 0u;
- v_6 = 0u;
+ uint v_3 = 0u;
+ v_3 = 0u;
while(true) {
- uint v_7 = v_6;
- if ((v_7 >= 4u)) {
+ uint v_4 = v_3;
+ if ((v_4 >= 4u)) {
break;
}
- a_2[v_7] = v_1((start_byte_offset + (v_7 * 64u)));
+ a_2[v_4] = v_1((start_byte_offset + (v_4 * 64u)));
{
- v_6 = (v_7 + 1u);
+ v_3 = (v_4 + 1u);
}
continue;
}
}
- float4x4 v_8[4] = a_2;
- return v_8;
+ float4x4 v_5[4] = a_2;
+ return v_5;
}
[numthreads(1, 1, 1)]
void f() {
- float4x4 v_9[4] = v_5(0u);
- float v_10 = a(v_9);
- float v_11 = (v_10 + b(v_1(64u)));
- float v_12 = (v_11 + c(asfloat(u[4u]).ywxz));
- s.Store(0u, asuint((v_12 + d(asfloat(u[4u]).ywxz.x))));
+ float4x4 v_6[4] = v_2(0u);
+ float v_7 = a(v_6);
+ float v_8 = (v_7 + b(v_1(64u)));
+ float v_9 = (v_8 + c(asfloat(u[4u]).ywxz));
+ s.Store(0u, asuint((v_9 + d(asfloat(u[4u]).ywxz.x))));
}
diff --git a/test/tint/buffer/uniform/std140/array/mat4x4_f32/to_private.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/uniform/std140/array/mat4x4_f32/to_private.wgsl.expected.ir.dxc.hlsl
index 5310d96..6af9542 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x4_f32/to_private.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat4x4_f32/to_private.wgsl.expected.ir.dxc.hlsl
@@ -5,38 +5,35 @@
RWByteAddressBuffer s : register(u1);
static float4x4 p[4] = (float4x4[4])0;
float4x4 v(uint start_byte_offset) {
- float4 v_1 = asfloat(u[(start_byte_offset / 16u)]);
- float4 v_2 = asfloat(u[((16u + start_byte_offset) / 16u)]);
- float4 v_3 = asfloat(u[((32u + start_byte_offset) / 16u)]);
- return float4x4(v_1, v_2, v_3, asfloat(u[((48u + start_byte_offset) / 16u)]));
+ return float4x4(asfloat(u[(start_byte_offset / 16u)]), asfloat(u[((16u + start_byte_offset) / 16u)]), asfloat(u[((32u + start_byte_offset) / 16u)]), asfloat(u[((48u + start_byte_offset) / 16u)]));
}
typedef float4x4 ary_ret[4];
-ary_ret v_4(uint start_byte_offset) {
+ary_ret v_1(uint start_byte_offset) {
float4x4 a[4] = (float4x4[4])0;
{
- uint v_5 = 0u;
- v_5 = 0u;
+ uint v_2 = 0u;
+ v_2 = 0u;
while(true) {
- uint v_6 = v_5;
- if ((v_6 >= 4u)) {
+ uint v_3 = v_2;
+ if ((v_3 >= 4u)) {
break;
}
- a[v_6] = v((start_byte_offset + (v_6 * 64u)));
+ a[v_3] = v((start_byte_offset + (v_3 * 64u)));
{
- v_5 = (v_6 + 1u);
+ v_2 = (v_3 + 1u);
}
continue;
}
}
- float4x4 v_7[4] = a;
- return v_7;
+ float4x4 v_4[4] = a;
+ return v_4;
}
[numthreads(1, 1, 1)]
void f() {
- float4x4 v_8[4] = v_4(0u);
- p = v_8;
+ float4x4 v_5[4] = v_1(0u);
+ p = v_5;
p[int(1)] = v(128u);
p[int(1)][int(0)] = asfloat(u[1u]).ywxz;
p[int(1)][int(0)].x = asfloat(u[1u].x);
diff --git a/test/tint/buffer/uniform/std140/array/mat4x4_f32/to_private.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/uniform/std140/array/mat4x4_f32/to_private.wgsl.expected.ir.fxc.hlsl
index 5310d96..6af9542 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x4_f32/to_private.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat4x4_f32/to_private.wgsl.expected.ir.fxc.hlsl
@@ -5,38 +5,35 @@
RWByteAddressBuffer s : register(u1);
static float4x4 p[4] = (float4x4[4])0;
float4x4 v(uint start_byte_offset) {
- float4 v_1 = asfloat(u[(start_byte_offset / 16u)]);
- float4 v_2 = asfloat(u[((16u + start_byte_offset) / 16u)]);
- float4 v_3 = asfloat(u[((32u + start_byte_offset) / 16u)]);
- return float4x4(v_1, v_2, v_3, asfloat(u[((48u + start_byte_offset) / 16u)]));
+ return float4x4(asfloat(u[(start_byte_offset / 16u)]), asfloat(u[((16u + start_byte_offset) / 16u)]), asfloat(u[((32u + start_byte_offset) / 16u)]), asfloat(u[((48u + start_byte_offset) / 16u)]));
}
typedef float4x4 ary_ret[4];
-ary_ret v_4(uint start_byte_offset) {
+ary_ret v_1(uint start_byte_offset) {
float4x4 a[4] = (float4x4[4])0;
{
- uint v_5 = 0u;
- v_5 = 0u;
+ uint v_2 = 0u;
+ v_2 = 0u;
while(true) {
- uint v_6 = v_5;
- if ((v_6 >= 4u)) {
+ uint v_3 = v_2;
+ if ((v_3 >= 4u)) {
break;
}
- a[v_6] = v((start_byte_offset + (v_6 * 64u)));
+ a[v_3] = v((start_byte_offset + (v_3 * 64u)));
{
- v_5 = (v_6 + 1u);
+ v_2 = (v_3 + 1u);
}
continue;
}
}
- float4x4 v_7[4] = a;
- return v_7;
+ float4x4 v_4[4] = a;
+ return v_4;
}
[numthreads(1, 1, 1)]
void f() {
- float4x4 v_8[4] = v_4(0u);
- p = v_8;
+ float4x4 v_5[4] = v_1(0u);
+ p = v_5;
p[int(1)] = v(128u);
p[int(1)][int(0)] = asfloat(u[1u]).ywxz;
p[int(1)][int(0)].x = asfloat(u[1u].x);
diff --git a/test/tint/buffer/uniform/std140/array/mat4x4_f32/to_storage.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/uniform/std140/array/mat4x4_f32/to_storage.wgsl.expected.ir.dxc.hlsl
index 8b94776..cf873d5 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x4_f32/to_storage.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat4x4_f32/to_storage.wgsl.expected.ir.dxc.hlsl
@@ -11,13 +11,30 @@
}
float4x4 v_1(uint start_byte_offset) {
- float4 v_2 = asfloat(u[(start_byte_offset / 16u)]);
- float4 v_3 = asfloat(u[((16u + start_byte_offset) / 16u)]);
- float4 v_4 = asfloat(u[((32u + start_byte_offset) / 16u)]);
- return float4x4(v_2, v_3, v_4, asfloat(u[((48u + start_byte_offset) / 16u)]));
+ return float4x4(asfloat(u[(start_byte_offset / 16u)]), asfloat(u[((16u + start_byte_offset) / 16u)]), asfloat(u[((32u + start_byte_offset) / 16u)]), asfloat(u[((48u + start_byte_offset) / 16u)]));
}
-void v_5(uint offset, float4x4 obj[4]) {
+void v_2(uint offset, float4x4 obj[4]) {
+ {
+ uint v_3 = 0u;
+ v_3 = 0u;
+ while(true) {
+ uint v_4 = v_3;
+ if ((v_4 >= 4u)) {
+ break;
+ }
+ v((offset + (v_4 * 64u)), obj[v_4]);
+ {
+ v_3 = (v_4 + 1u);
+ }
+ continue;
+ }
+ }
+}
+
+typedef float4x4 ary_ret[4];
+ary_ret v_5(uint start_byte_offset) {
+ float4x4 a[4] = (float4x4[4])0;
{
uint v_6 = 0u;
v_6 = 0u;
@@ -26,41 +43,21 @@
if ((v_7 >= 4u)) {
break;
}
- v((offset + (v_7 * 64u)), obj[v_7]);
+ a[v_7] = v_1((start_byte_offset + (v_7 * 64u)));
{
v_6 = (v_7 + 1u);
}
continue;
}
}
-}
-
-typedef float4x4 ary_ret[4];
-ary_ret v_8(uint start_byte_offset) {
- float4x4 a[4] = (float4x4[4])0;
- {
- uint v_9 = 0u;
- v_9 = 0u;
- while(true) {
- uint v_10 = v_9;
- if ((v_10 >= 4u)) {
- break;
- }
- a[v_10] = v_1((start_byte_offset + (v_10 * 64u)));
- {
- v_9 = (v_10 + 1u);
- }
- continue;
- }
- }
- float4x4 v_11[4] = a;
- return v_11;
+ float4x4 v_8[4] = a;
+ return v_8;
}
[numthreads(1, 1, 1)]
void f() {
- float4x4 v_12[4] = v_8(0u);
- v_5(0u, v_12);
+ float4x4 v_9[4] = v_5(0u);
+ v_2(0u, v_9);
v(64u, v_1(128u));
s.Store4(64u, asuint(asfloat(u[1u]).ywxz));
s.Store(64u, asuint(asfloat(u[1u].x)));
diff --git a/test/tint/buffer/uniform/std140/array/mat4x4_f32/to_storage.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/uniform/std140/array/mat4x4_f32/to_storage.wgsl.expected.ir.fxc.hlsl
index 8b94776..cf873d5 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x4_f32/to_storage.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat4x4_f32/to_storage.wgsl.expected.ir.fxc.hlsl
@@ -11,13 +11,30 @@
}
float4x4 v_1(uint start_byte_offset) {
- float4 v_2 = asfloat(u[(start_byte_offset / 16u)]);
- float4 v_3 = asfloat(u[((16u + start_byte_offset) / 16u)]);
- float4 v_4 = asfloat(u[((32u + start_byte_offset) / 16u)]);
- return float4x4(v_2, v_3, v_4, asfloat(u[((48u + start_byte_offset) / 16u)]));
+ return float4x4(asfloat(u[(start_byte_offset / 16u)]), asfloat(u[((16u + start_byte_offset) / 16u)]), asfloat(u[((32u + start_byte_offset) / 16u)]), asfloat(u[((48u + start_byte_offset) / 16u)]));
}
-void v_5(uint offset, float4x4 obj[4]) {
+void v_2(uint offset, float4x4 obj[4]) {
+ {
+ uint v_3 = 0u;
+ v_3 = 0u;
+ while(true) {
+ uint v_4 = v_3;
+ if ((v_4 >= 4u)) {
+ break;
+ }
+ v((offset + (v_4 * 64u)), obj[v_4]);
+ {
+ v_3 = (v_4 + 1u);
+ }
+ continue;
+ }
+ }
+}
+
+typedef float4x4 ary_ret[4];
+ary_ret v_5(uint start_byte_offset) {
+ float4x4 a[4] = (float4x4[4])0;
{
uint v_6 = 0u;
v_6 = 0u;
@@ -26,41 +43,21 @@
if ((v_7 >= 4u)) {
break;
}
- v((offset + (v_7 * 64u)), obj[v_7]);
+ a[v_7] = v_1((start_byte_offset + (v_7 * 64u)));
{
v_6 = (v_7 + 1u);
}
continue;
}
}
-}
-
-typedef float4x4 ary_ret[4];
-ary_ret v_8(uint start_byte_offset) {
- float4x4 a[4] = (float4x4[4])0;
- {
- uint v_9 = 0u;
- v_9 = 0u;
- while(true) {
- uint v_10 = v_9;
- if ((v_10 >= 4u)) {
- break;
- }
- a[v_10] = v_1((start_byte_offset + (v_10 * 64u)));
- {
- v_9 = (v_10 + 1u);
- }
- continue;
- }
- }
- float4x4 v_11[4] = a;
- return v_11;
+ float4x4 v_8[4] = a;
+ return v_8;
}
[numthreads(1, 1, 1)]
void f() {
- float4x4 v_12[4] = v_8(0u);
- v_5(0u, v_12);
+ float4x4 v_9[4] = v_5(0u);
+ v_2(0u, v_9);
v(64u, v_1(128u));
s.Store4(64u, asuint(asfloat(u[1u]).ywxz));
s.Store(64u, asuint(asfloat(u[1u].x)));
diff --git a/test/tint/buffer/uniform/std140/array/mat4x4_f32/to_workgroup.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/uniform/std140/array/mat4x4_f32/to_workgroup.wgsl.expected.ir.dxc.hlsl
index cc6a835..56c416e 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x4_f32/to_workgroup.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat4x4_f32/to_workgroup.wgsl.expected.ir.dxc.hlsl
@@ -8,53 +8,50 @@
};
groupshared float4x4 w[4];
float4x4 v(uint start_byte_offset) {
- float4 v_1 = asfloat(u[(start_byte_offset / 16u)]);
- float4 v_2 = asfloat(u[((16u + start_byte_offset) / 16u)]);
- float4 v_3 = asfloat(u[((32u + start_byte_offset) / 16u)]);
- return float4x4(v_1, v_2, v_3, asfloat(u[((48u + start_byte_offset) / 16u)]));
+ return float4x4(asfloat(u[(start_byte_offset / 16u)]), asfloat(u[((16u + start_byte_offset) / 16u)]), asfloat(u[((32u + start_byte_offset) / 16u)]), asfloat(u[((48u + start_byte_offset) / 16u)]));
}
typedef float4x4 ary_ret[4];
-ary_ret v_4(uint start_byte_offset) {
+ary_ret v_1(uint start_byte_offset) {
float4x4 a[4] = (float4x4[4])0;
{
+ uint v_2 = 0u;
+ v_2 = 0u;
+ while(true) {
+ uint v_3 = v_2;
+ if ((v_3 >= 4u)) {
+ break;
+ }
+ a[v_3] = v((start_byte_offset + (v_3 * 64u)));
+ {
+ v_2 = (v_3 + 1u);
+ }
+ continue;
+ }
+ }
+ float4x4 v_4[4] = a;
+ return v_4;
+}
+
+void f_inner(uint tint_local_index) {
+ {
uint v_5 = 0u;
- v_5 = 0u;
+ v_5 = tint_local_index;
while(true) {
uint v_6 = v_5;
if ((v_6 >= 4u)) {
break;
}
- a[v_6] = v((start_byte_offset + (v_6 * 64u)));
+ w[v_6] = float4x4((0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx);
{
v_5 = (v_6 + 1u);
}
continue;
}
}
- float4x4 v_7[4] = a;
- return v_7;
-}
-
-void f_inner(uint tint_local_index) {
- {
- uint v_8 = 0u;
- v_8 = tint_local_index;
- while(true) {
- uint v_9 = v_8;
- if ((v_9 >= 4u)) {
- break;
- }
- w[v_9] = float4x4((0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx);
- {
- v_8 = (v_9 + 1u);
- }
- continue;
- }
- }
GroupMemoryBarrierWithGroupSync();
- float4x4 v_10[4] = v_4(0u);
- w = v_10;
+ float4x4 v_7[4] = v_1(0u);
+ w = v_7;
w[int(1)] = v(128u);
w[int(1)][int(0)] = asfloat(u[1u]).ywxz;
w[int(1)][int(0)].x = asfloat(u[1u].x);
diff --git a/test/tint/buffer/uniform/std140/array/mat4x4_f32/to_workgroup.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/uniform/std140/array/mat4x4_f32/to_workgroup.wgsl.expected.ir.fxc.hlsl
index cc6a835..56c416e 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x4_f32/to_workgroup.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/array/mat4x4_f32/to_workgroup.wgsl.expected.ir.fxc.hlsl
@@ -8,53 +8,50 @@
};
groupshared float4x4 w[4];
float4x4 v(uint start_byte_offset) {
- float4 v_1 = asfloat(u[(start_byte_offset / 16u)]);
- float4 v_2 = asfloat(u[((16u + start_byte_offset) / 16u)]);
- float4 v_3 = asfloat(u[((32u + start_byte_offset) / 16u)]);
- return float4x4(v_1, v_2, v_3, asfloat(u[((48u + start_byte_offset) / 16u)]));
+ return float4x4(asfloat(u[(start_byte_offset / 16u)]), asfloat(u[((16u + start_byte_offset) / 16u)]), asfloat(u[((32u + start_byte_offset) / 16u)]), asfloat(u[((48u + start_byte_offset) / 16u)]));
}
typedef float4x4 ary_ret[4];
-ary_ret v_4(uint start_byte_offset) {
+ary_ret v_1(uint start_byte_offset) {
float4x4 a[4] = (float4x4[4])0;
{
+ uint v_2 = 0u;
+ v_2 = 0u;
+ while(true) {
+ uint v_3 = v_2;
+ if ((v_3 >= 4u)) {
+ break;
+ }
+ a[v_3] = v((start_byte_offset + (v_3 * 64u)));
+ {
+ v_2 = (v_3 + 1u);
+ }
+ continue;
+ }
+ }
+ float4x4 v_4[4] = a;
+ return v_4;
+}
+
+void f_inner(uint tint_local_index) {
+ {
uint v_5 = 0u;
- v_5 = 0u;
+ v_5 = tint_local_index;
while(true) {
uint v_6 = v_5;
if ((v_6 >= 4u)) {
break;
}
- a[v_6] = v((start_byte_offset + (v_6 * 64u)));
+ w[v_6] = float4x4((0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx);
{
v_5 = (v_6 + 1u);
}
continue;
}
}
- float4x4 v_7[4] = a;
- return v_7;
-}
-
-void f_inner(uint tint_local_index) {
- {
- uint v_8 = 0u;
- v_8 = tint_local_index;
- while(true) {
- uint v_9 = v_8;
- if ((v_9 >= 4u)) {
- break;
- }
- w[v_9] = float4x4((0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx);
- {
- v_8 = (v_9 + 1u);
- }
- continue;
- }
- }
GroupMemoryBarrierWithGroupSync();
- float4x4 v_10[4] = v_4(0u);
- w = v_10;
+ float4x4 v_7[4] = v_1(0u);
+ w = v_7;
w[int(1)] = v(128u);
w[int(1)][int(0)] = asfloat(u[1u]).ywxz;
w[int(1)][int(0)].x = asfloat(u[1u].x);
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x3_f32/dynamic_index_via_ptr.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat2x3_f32/dynamic_index_via_ptr.wgsl.expected.ir.dxc.hlsl
index 1fbbe0b..4ebb67e 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x3_f32/dynamic_index_via_ptr.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat2x3_f32/dynamic_index_via_ptr.wgsl.expected.ir.dxc.hlsl
@@ -17,79 +17,78 @@
}
float2x3 v(uint start_byte_offset) {
- float3 v_1 = asfloat(a[(start_byte_offset / 16u)].xyz);
- return float2x3(v_1, asfloat(a[((16u + start_byte_offset) / 16u)].xyz));
+ return float2x3(asfloat(a[(start_byte_offset / 16u)].xyz), asfloat(a[((16u + start_byte_offset) / 16u)].xyz));
}
-Inner v_2(uint start_byte_offset) {
- Inner v_3 = {v(start_byte_offset)};
- return v_3;
+Inner v_1(uint start_byte_offset) {
+ Inner v_2 = {v(start_byte_offset)};
+ return v_2;
}
typedef Inner ary_ret[4];
-ary_ret v_4(uint start_byte_offset) {
+ary_ret v_3(uint start_byte_offset) {
Inner a_2[4] = (Inner[4])0;
{
- uint v_5 = 0u;
- v_5 = 0u;
+ uint v_4 = 0u;
+ v_4 = 0u;
while(true) {
- uint v_6 = v_5;
- if ((v_6 >= 4u)) {
+ uint v_5 = v_4;
+ if ((v_5 >= 4u)) {
break;
}
- Inner v_7 = v_2((start_byte_offset + (v_6 * 64u)));
- a_2[v_6] = v_7;
+ Inner v_6 = v_1((start_byte_offset + (v_5 * 64u)));
+ a_2[v_5] = v_6;
{
- v_5 = (v_6 + 1u);
+ v_4 = (v_5 + 1u);
}
continue;
}
}
- Inner v_8[4] = a_2;
- return v_8;
+ Inner v_7[4] = a_2;
+ return v_7;
}
-Outer v_9(uint start_byte_offset) {
- Inner v_10[4] = v_4(start_byte_offset);
- Outer v_11 = {v_10};
- return v_11;
+Outer v_8(uint start_byte_offset) {
+ Inner v_9[4] = v_3(start_byte_offset);
+ Outer v_10 = {v_9};
+ return v_10;
}
typedef Outer ary_ret_1[4];
-ary_ret_1 v_12(uint start_byte_offset) {
+ary_ret_1 v_11(uint start_byte_offset) {
Outer a_1[4] = (Outer[4])0;
{
- uint v_13 = 0u;
- v_13 = 0u;
+ uint v_12 = 0u;
+ v_12 = 0u;
while(true) {
- uint v_14 = v_13;
- if ((v_14 >= 4u)) {
+ uint v_13 = v_12;
+ if ((v_13 >= 4u)) {
break;
}
- Outer v_15 = v_9((start_byte_offset + (v_14 * 256u)));
- a_1[v_14] = v_15;
+ Outer v_14 = v_8((start_byte_offset + (v_13 * 256u)));
+ a_1[v_13] = v_14;
{
- v_13 = (v_14 + 1u);
+ v_12 = (v_13 + 1u);
}
continue;
}
}
- Outer v_16[4] = a_1;
- return v_16;
+ Outer v_15[4] = a_1;
+ return v_15;
}
[numthreads(1, 1, 1)]
void f() {
- uint v_17 = (256u * uint(i()));
- uint v_18 = (64u * uint(i()));
- uint v_19 = (16u * uint(i()));
- Outer l_a[4] = v_12(0u);
- Outer l_a_i = v_9(v_17);
- Inner l_a_i_a[4] = v_4(v_17);
- Inner l_a_i_a_i = v_2((v_17 + v_18));
- float2x3 l_a_i_a_i_m = v((v_17 + v_18));
- float3 l_a_i_a_i_m_i = asfloat(a[(((v_17 + v_18) + v_19) / 16u)].xyz);
- uint v_20 = (((v_17 + v_18) + v_19) + (uint(i()) * 4u));
- float l_a_i_a_i_m_i_i = asfloat(a[(v_20 / 16u)][((v_20 % 16u) / 4u)]);
+ uint v_16 = (256u * uint(i()));
+ uint v_17 = (64u * uint(i()));
+ uint v_18 = (16u * uint(i()));
+ Outer l_a[4] = v_11(0u);
+ Outer l_a_i = v_8(v_16);
+ Inner l_a_i_a[4] = v_3(v_16);
+ Inner l_a_i_a_i = v_1((v_16 + v_17));
+ float2x3 l_a_i_a_i_m = v((v_16 + v_17));
+ float3 l_a_i_a_i_m_i = asfloat(a[(((v_16 + v_17) + v_18) / 16u)].xyz);
+ uint v_19 = (((v_16 + v_17) + v_18) + (uint(i()) * 4u));
+ float l_a_i_a_i_m_i_i = asfloat(a[(v_19 / 16u)][((v_19 % 16u) / 4u)]);
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x3_f32/dynamic_index_via_ptr.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat2x3_f32/dynamic_index_via_ptr.wgsl.expected.ir.fxc.hlsl
index 1fbbe0b..4ebb67e 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x3_f32/dynamic_index_via_ptr.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat2x3_f32/dynamic_index_via_ptr.wgsl.expected.ir.fxc.hlsl
@@ -17,79 +17,78 @@
}
float2x3 v(uint start_byte_offset) {
- float3 v_1 = asfloat(a[(start_byte_offset / 16u)].xyz);
- return float2x3(v_1, asfloat(a[((16u + start_byte_offset) / 16u)].xyz));
+ return float2x3(asfloat(a[(start_byte_offset / 16u)].xyz), asfloat(a[((16u + start_byte_offset) / 16u)].xyz));
}
-Inner v_2(uint start_byte_offset) {
- Inner v_3 = {v(start_byte_offset)};
- return v_3;
+Inner v_1(uint start_byte_offset) {
+ Inner v_2 = {v(start_byte_offset)};
+ return v_2;
}
typedef Inner ary_ret[4];
-ary_ret v_4(uint start_byte_offset) {
+ary_ret v_3(uint start_byte_offset) {
Inner a_2[4] = (Inner[4])0;
{
- uint v_5 = 0u;
- v_5 = 0u;
+ uint v_4 = 0u;
+ v_4 = 0u;
while(true) {
- uint v_6 = v_5;
- if ((v_6 >= 4u)) {
+ uint v_5 = v_4;
+ if ((v_5 >= 4u)) {
break;
}
- Inner v_7 = v_2((start_byte_offset + (v_6 * 64u)));
- a_2[v_6] = v_7;
+ Inner v_6 = v_1((start_byte_offset + (v_5 * 64u)));
+ a_2[v_5] = v_6;
{
- v_5 = (v_6 + 1u);
+ v_4 = (v_5 + 1u);
}
continue;
}
}
- Inner v_8[4] = a_2;
- return v_8;
+ Inner v_7[4] = a_2;
+ return v_7;
}
-Outer v_9(uint start_byte_offset) {
- Inner v_10[4] = v_4(start_byte_offset);
- Outer v_11 = {v_10};
- return v_11;
+Outer v_8(uint start_byte_offset) {
+ Inner v_9[4] = v_3(start_byte_offset);
+ Outer v_10 = {v_9};
+ return v_10;
}
typedef Outer ary_ret_1[4];
-ary_ret_1 v_12(uint start_byte_offset) {
+ary_ret_1 v_11(uint start_byte_offset) {
Outer a_1[4] = (Outer[4])0;
{
- uint v_13 = 0u;
- v_13 = 0u;
+ uint v_12 = 0u;
+ v_12 = 0u;
while(true) {
- uint v_14 = v_13;
- if ((v_14 >= 4u)) {
+ uint v_13 = v_12;
+ if ((v_13 >= 4u)) {
break;
}
- Outer v_15 = v_9((start_byte_offset + (v_14 * 256u)));
- a_1[v_14] = v_15;
+ Outer v_14 = v_8((start_byte_offset + (v_13 * 256u)));
+ a_1[v_13] = v_14;
{
- v_13 = (v_14 + 1u);
+ v_12 = (v_13 + 1u);
}
continue;
}
}
- Outer v_16[4] = a_1;
- return v_16;
+ Outer v_15[4] = a_1;
+ return v_15;
}
[numthreads(1, 1, 1)]
void f() {
- uint v_17 = (256u * uint(i()));
- uint v_18 = (64u * uint(i()));
- uint v_19 = (16u * uint(i()));
- Outer l_a[4] = v_12(0u);
- Outer l_a_i = v_9(v_17);
- Inner l_a_i_a[4] = v_4(v_17);
- Inner l_a_i_a_i = v_2((v_17 + v_18));
- float2x3 l_a_i_a_i_m = v((v_17 + v_18));
- float3 l_a_i_a_i_m_i = asfloat(a[(((v_17 + v_18) + v_19) / 16u)].xyz);
- uint v_20 = (((v_17 + v_18) + v_19) + (uint(i()) * 4u));
- float l_a_i_a_i_m_i_i = asfloat(a[(v_20 / 16u)][((v_20 % 16u) / 4u)]);
+ uint v_16 = (256u * uint(i()));
+ uint v_17 = (64u * uint(i()));
+ uint v_18 = (16u * uint(i()));
+ Outer l_a[4] = v_11(0u);
+ Outer l_a_i = v_8(v_16);
+ Inner l_a_i_a[4] = v_3(v_16);
+ Inner l_a_i_a_i = v_1((v_16 + v_17));
+ float2x3 l_a_i_a_i_m = v((v_16 + v_17));
+ float3 l_a_i_a_i_m_i = asfloat(a[(((v_16 + v_17) + v_18) / 16u)].xyz);
+ uint v_19 = (((v_16 + v_17) + v_18) + (uint(i()) * 4u));
+ float l_a_i_a_i_m_i_i = asfloat(a[(v_19 / 16u)][((v_19 % 16u) / 4u)]);
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x3_f32/static_index_via_ptr.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat2x3_f32/static_index_via_ptr.wgsl.expected.ir.dxc.hlsl
index b6765f0..f43ea68 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x3_f32/static_index_via_ptr.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat2x3_f32/static_index_via_ptr.wgsl.expected.ir.dxc.hlsl
@@ -11,73 +11,72 @@
uint4 a[64];
};
float2x3 v(uint start_byte_offset) {
- float3 v_1 = asfloat(a[(start_byte_offset / 16u)].xyz);
- return float2x3(v_1, asfloat(a[((16u + start_byte_offset) / 16u)].xyz));
+ return float2x3(asfloat(a[(start_byte_offset / 16u)].xyz), asfloat(a[((16u + start_byte_offset) / 16u)].xyz));
}
-Inner v_2(uint start_byte_offset) {
- Inner v_3 = {v(start_byte_offset)};
- return v_3;
+Inner v_1(uint start_byte_offset) {
+ Inner v_2 = {v(start_byte_offset)};
+ return v_2;
}
typedef Inner ary_ret[4];
-ary_ret v_4(uint start_byte_offset) {
+ary_ret v_3(uint start_byte_offset) {
Inner a_2[4] = (Inner[4])0;
{
- uint v_5 = 0u;
- v_5 = 0u;
+ uint v_4 = 0u;
+ v_4 = 0u;
while(true) {
- uint v_6 = v_5;
- if ((v_6 >= 4u)) {
+ uint v_5 = v_4;
+ if ((v_5 >= 4u)) {
break;
}
- Inner v_7 = v_2((start_byte_offset + (v_6 * 64u)));
- a_2[v_6] = v_7;
+ Inner v_6 = v_1((start_byte_offset + (v_5 * 64u)));
+ a_2[v_5] = v_6;
{
- v_5 = (v_6 + 1u);
+ v_4 = (v_5 + 1u);
}
continue;
}
}
- Inner v_8[4] = a_2;
- return v_8;
+ Inner v_7[4] = a_2;
+ return v_7;
}
-Outer v_9(uint start_byte_offset) {
- Inner v_10[4] = v_4(start_byte_offset);
- Outer v_11 = {v_10};
- return v_11;
+Outer v_8(uint start_byte_offset) {
+ Inner v_9[4] = v_3(start_byte_offset);
+ Outer v_10 = {v_9};
+ return v_10;
}
typedef Outer ary_ret_1[4];
-ary_ret_1 v_12(uint start_byte_offset) {
+ary_ret_1 v_11(uint start_byte_offset) {
Outer a_1[4] = (Outer[4])0;
{
- uint v_13 = 0u;
- v_13 = 0u;
+ uint v_12 = 0u;
+ v_12 = 0u;
while(true) {
- uint v_14 = v_13;
- if ((v_14 >= 4u)) {
+ uint v_13 = v_12;
+ if ((v_13 >= 4u)) {
break;
}
- Outer v_15 = v_9((start_byte_offset + (v_14 * 256u)));
- a_1[v_14] = v_15;
+ Outer v_14 = v_8((start_byte_offset + (v_13 * 256u)));
+ a_1[v_13] = v_14;
{
- v_13 = (v_14 + 1u);
+ v_12 = (v_13 + 1u);
}
continue;
}
}
- Outer v_16[4] = a_1;
- return v_16;
+ Outer v_15[4] = a_1;
+ return v_15;
}
[numthreads(1, 1, 1)]
void f() {
- Outer l_a[4] = v_12(0u);
- Outer l_a_3 = v_9(768u);
- Inner l_a_3_a[4] = v_4(768u);
- Inner l_a_3_a_2 = v_2(896u);
+ Outer l_a[4] = v_11(0u);
+ Outer l_a_3 = v_8(768u);
+ Inner l_a_3_a[4] = v_3(768u);
+ Inner l_a_3_a_2 = v_1(896u);
float2x3 l_a_3_a_2_m = v(896u);
float3 l_a_3_a_2_m_1 = asfloat(a[57u].xyz);
float l_a_3_a_2_m_1_0 = asfloat(a[57u].x);
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x3_f32/static_index_via_ptr.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat2x3_f32/static_index_via_ptr.wgsl.expected.ir.fxc.hlsl
index b6765f0..f43ea68 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x3_f32/static_index_via_ptr.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat2x3_f32/static_index_via_ptr.wgsl.expected.ir.fxc.hlsl
@@ -11,73 +11,72 @@
uint4 a[64];
};
float2x3 v(uint start_byte_offset) {
- float3 v_1 = asfloat(a[(start_byte_offset / 16u)].xyz);
- return float2x3(v_1, asfloat(a[((16u + start_byte_offset) / 16u)].xyz));
+ return float2x3(asfloat(a[(start_byte_offset / 16u)].xyz), asfloat(a[((16u + start_byte_offset) / 16u)].xyz));
}
-Inner v_2(uint start_byte_offset) {
- Inner v_3 = {v(start_byte_offset)};
- return v_3;
+Inner v_1(uint start_byte_offset) {
+ Inner v_2 = {v(start_byte_offset)};
+ return v_2;
}
typedef Inner ary_ret[4];
-ary_ret v_4(uint start_byte_offset) {
+ary_ret v_3(uint start_byte_offset) {
Inner a_2[4] = (Inner[4])0;
{
- uint v_5 = 0u;
- v_5 = 0u;
+ uint v_4 = 0u;
+ v_4 = 0u;
while(true) {
- uint v_6 = v_5;
- if ((v_6 >= 4u)) {
+ uint v_5 = v_4;
+ if ((v_5 >= 4u)) {
break;
}
- Inner v_7 = v_2((start_byte_offset + (v_6 * 64u)));
- a_2[v_6] = v_7;
+ Inner v_6 = v_1((start_byte_offset + (v_5 * 64u)));
+ a_2[v_5] = v_6;
{
- v_5 = (v_6 + 1u);
+ v_4 = (v_5 + 1u);
}
continue;
}
}
- Inner v_8[4] = a_2;
- return v_8;
+ Inner v_7[4] = a_2;
+ return v_7;
}
-Outer v_9(uint start_byte_offset) {
- Inner v_10[4] = v_4(start_byte_offset);
- Outer v_11 = {v_10};
- return v_11;
+Outer v_8(uint start_byte_offset) {
+ Inner v_9[4] = v_3(start_byte_offset);
+ Outer v_10 = {v_9};
+ return v_10;
}
typedef Outer ary_ret_1[4];
-ary_ret_1 v_12(uint start_byte_offset) {
+ary_ret_1 v_11(uint start_byte_offset) {
Outer a_1[4] = (Outer[4])0;
{
- uint v_13 = 0u;
- v_13 = 0u;
+ uint v_12 = 0u;
+ v_12 = 0u;
while(true) {
- uint v_14 = v_13;
- if ((v_14 >= 4u)) {
+ uint v_13 = v_12;
+ if ((v_13 >= 4u)) {
break;
}
- Outer v_15 = v_9((start_byte_offset + (v_14 * 256u)));
- a_1[v_14] = v_15;
+ Outer v_14 = v_8((start_byte_offset + (v_13 * 256u)));
+ a_1[v_13] = v_14;
{
- v_13 = (v_14 + 1u);
+ v_12 = (v_13 + 1u);
}
continue;
}
}
- Outer v_16[4] = a_1;
- return v_16;
+ Outer v_15[4] = a_1;
+ return v_15;
}
[numthreads(1, 1, 1)]
void f() {
- Outer l_a[4] = v_12(0u);
- Outer l_a_3 = v_9(768u);
- Inner l_a_3_a[4] = v_4(768u);
- Inner l_a_3_a_2 = v_2(896u);
+ Outer l_a[4] = v_11(0u);
+ Outer l_a_3 = v_8(768u);
+ Inner l_a_3_a[4] = v_3(768u);
+ Inner l_a_3_a_2 = v_1(896u);
float2x3 l_a_3_a_2_m = v(896u);
float3 l_a_3_a_2_m_1 = asfloat(a[57u].xyz);
float l_a_3_a_2_m_1_0 = asfloat(a[57u].x);
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x3_f32/to_builtin.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat2x3_f32/to_builtin.wgsl.expected.ir.dxc.hlsl
index 8dfbcb0..db4ec51 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x3_f32/to_builtin.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat2x3_f32/to_builtin.wgsl.expected.ir.dxc.hlsl
@@ -3,8 +3,7 @@
uint4 u[32];
};
float2x3 v(uint start_byte_offset) {
- float3 v_1 = asfloat(u[(start_byte_offset / 16u)].xyz);
- return float2x3(v_1, asfloat(u[((16u + start_byte_offset) / 16u)].xyz));
+ return float2x3(asfloat(u[(start_byte_offset / 16u)].xyz), asfloat(u[((16u + start_byte_offset) / 16u)].xyz));
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x3_f32/to_builtin.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat2x3_f32/to_builtin.wgsl.expected.ir.fxc.hlsl
index 8dfbcb0..db4ec51 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x3_f32/to_builtin.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat2x3_f32/to_builtin.wgsl.expected.ir.fxc.hlsl
@@ -3,8 +3,7 @@
uint4 u[32];
};
float2x3 v(uint start_byte_offset) {
- float3 v_1 = asfloat(u[(start_byte_offset / 16u)].xyz);
- return float2x3(v_1, asfloat(u[((16u + start_byte_offset) / 16u)].xyz));
+ return float2x3(asfloat(u[(start_byte_offset / 16u)].xyz), asfloat(u[((16u + start_byte_offset) / 16u)].xyz));
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x3_f32/to_fn.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat2x3_f32/to_fn.wgsl.expected.ir.dxc.hlsl
index 41343c3..39b1782 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x3_f32/to_fn.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat2x3_f32/to_fn.wgsl.expected.ir.dxc.hlsl
@@ -24,46 +24,45 @@
}
float2x3 v_1(uint start_byte_offset) {
- float3 v_2 = asfloat(u[(start_byte_offset / 16u)].xyz);
- return float2x3(v_2, asfloat(u[((16u + start_byte_offset) / 16u)].xyz));
+ return float2x3(asfloat(u[(start_byte_offset / 16u)].xyz), asfloat(u[((16u + start_byte_offset) / 16u)].xyz));
}
-S v_3(uint start_byte_offset) {
- int v_4 = asint(u[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]);
- float2x3 v_5 = v_1((16u + start_byte_offset));
- S v_6 = {v_4, v_5, asint(u[((64u + start_byte_offset) / 16u)][(((64u + start_byte_offset) % 16u) / 4u)])};
- return v_6;
+S v_2(uint start_byte_offset) {
+ int v_3 = asint(u[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]);
+ float2x3 v_4 = v_1((16u + start_byte_offset));
+ S v_5 = {v_3, v_4, asint(u[((64u + start_byte_offset) / 16u)][(((64u + start_byte_offset) % 16u) / 4u)])};
+ return v_5;
}
typedef S ary_ret[4];
-ary_ret v_7(uint start_byte_offset) {
+ary_ret v_6(uint start_byte_offset) {
S a_2[4] = (S[4])0;
{
- uint v_8 = 0u;
- v_8 = 0u;
+ uint v_7 = 0u;
+ v_7 = 0u;
while(true) {
- uint v_9 = v_8;
- if ((v_9 >= 4u)) {
+ uint v_8 = v_7;
+ if ((v_8 >= 4u)) {
break;
}
- S v_10 = v_3((start_byte_offset + (v_9 * 128u)));
- a_2[v_9] = v_10;
+ S v_9 = v_2((start_byte_offset + (v_8 * 128u)));
+ a_2[v_8] = v_9;
{
- v_8 = (v_9 + 1u);
+ v_7 = (v_8 + 1u);
}
continue;
}
}
- S v_11[4] = a_2;
- return v_11;
+ S v_10[4] = a_2;
+ return v_10;
}
[numthreads(1, 1, 1)]
void f() {
- S v_12[4] = v_7(0u);
- a(v_12);
- S v_13 = v_3(256u);
- b(v_13);
+ S v_11[4] = v_6(0u);
+ a(v_11);
+ S v_12 = v_2(256u);
+ b(v_12);
c(v_1(272u));
d(asfloat(u[2u].xyz).zxy);
e(asfloat(u[2u].xyz).zxy.x);
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x3_f32/to_fn.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat2x3_f32/to_fn.wgsl.expected.ir.fxc.hlsl
index 41343c3..39b1782 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x3_f32/to_fn.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat2x3_f32/to_fn.wgsl.expected.ir.fxc.hlsl
@@ -24,46 +24,45 @@
}
float2x3 v_1(uint start_byte_offset) {
- float3 v_2 = asfloat(u[(start_byte_offset / 16u)].xyz);
- return float2x3(v_2, asfloat(u[((16u + start_byte_offset) / 16u)].xyz));
+ return float2x3(asfloat(u[(start_byte_offset / 16u)].xyz), asfloat(u[((16u + start_byte_offset) / 16u)].xyz));
}
-S v_3(uint start_byte_offset) {
- int v_4 = asint(u[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]);
- float2x3 v_5 = v_1((16u + start_byte_offset));
- S v_6 = {v_4, v_5, asint(u[((64u + start_byte_offset) / 16u)][(((64u + start_byte_offset) % 16u) / 4u)])};
- return v_6;
+S v_2(uint start_byte_offset) {
+ int v_3 = asint(u[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]);
+ float2x3 v_4 = v_1((16u + start_byte_offset));
+ S v_5 = {v_3, v_4, asint(u[((64u + start_byte_offset) / 16u)][(((64u + start_byte_offset) % 16u) / 4u)])};
+ return v_5;
}
typedef S ary_ret[4];
-ary_ret v_7(uint start_byte_offset) {
+ary_ret v_6(uint start_byte_offset) {
S a_2[4] = (S[4])0;
{
- uint v_8 = 0u;
- v_8 = 0u;
+ uint v_7 = 0u;
+ v_7 = 0u;
while(true) {
- uint v_9 = v_8;
- if ((v_9 >= 4u)) {
+ uint v_8 = v_7;
+ if ((v_8 >= 4u)) {
break;
}
- S v_10 = v_3((start_byte_offset + (v_9 * 128u)));
- a_2[v_9] = v_10;
+ S v_9 = v_2((start_byte_offset + (v_8 * 128u)));
+ a_2[v_8] = v_9;
{
- v_8 = (v_9 + 1u);
+ v_7 = (v_8 + 1u);
}
continue;
}
}
- S v_11[4] = a_2;
- return v_11;
+ S v_10[4] = a_2;
+ return v_10;
}
[numthreads(1, 1, 1)]
void f() {
- S v_12[4] = v_7(0u);
- a(v_12);
- S v_13 = v_3(256u);
- b(v_13);
+ S v_11[4] = v_6(0u);
+ a(v_11);
+ S v_12 = v_2(256u);
+ b(v_12);
c(v_1(272u));
d(asfloat(u[2u].xyz).zxy);
e(asfloat(u[2u].xyz).zxy.x);
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x3_f32/to_private.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat2x3_f32/to_private.wgsl.expected.ir.dxc.hlsl
index c4ef8df..4d57e7b 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x3_f32/to_private.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat2x3_f32/to_private.wgsl.expected.ir.dxc.hlsl
@@ -10,46 +10,45 @@
};
static S p[4] = (S[4])0;
float2x3 v(uint start_byte_offset) {
- float3 v_1 = asfloat(u[(start_byte_offset / 16u)].xyz);
- return float2x3(v_1, asfloat(u[((16u + start_byte_offset) / 16u)].xyz));
+ return float2x3(asfloat(u[(start_byte_offset / 16u)].xyz), asfloat(u[((16u + start_byte_offset) / 16u)].xyz));
}
-S v_2(uint start_byte_offset) {
- int v_3 = asint(u[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]);
- float2x3 v_4 = v((16u + start_byte_offset));
- S v_5 = {v_3, v_4, asint(u[((64u + start_byte_offset) / 16u)][(((64u + start_byte_offset) % 16u) / 4u)])};
- return v_5;
+S v_1(uint start_byte_offset) {
+ int v_2 = asint(u[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]);
+ float2x3 v_3 = v((16u + start_byte_offset));
+ S v_4 = {v_2, v_3, asint(u[((64u + start_byte_offset) / 16u)][(((64u + start_byte_offset) % 16u) / 4u)])};
+ return v_4;
}
typedef S ary_ret[4];
-ary_ret v_6(uint start_byte_offset) {
+ary_ret v_5(uint start_byte_offset) {
S a[4] = (S[4])0;
{
- uint v_7 = 0u;
- v_7 = 0u;
+ uint v_6 = 0u;
+ v_6 = 0u;
while(true) {
- uint v_8 = v_7;
- if ((v_8 >= 4u)) {
+ uint v_7 = v_6;
+ if ((v_7 >= 4u)) {
break;
}
- S v_9 = v_2((start_byte_offset + (v_8 * 128u)));
- a[v_8] = v_9;
+ S v_8 = v_1((start_byte_offset + (v_7 * 128u)));
+ a[v_7] = v_8;
{
- v_7 = (v_8 + 1u);
+ v_6 = (v_7 + 1u);
}
continue;
}
}
- S v_10[4] = a;
- return v_10;
+ S v_9[4] = a;
+ return v_9;
}
[numthreads(1, 1, 1)]
void f() {
- S v_11[4] = v_6(0u);
- p = v_11;
- S v_12 = v_2(256u);
- p[int(1)] = v_12;
+ S v_10[4] = v_5(0u);
+ p = v_10;
+ S v_11 = v_1(256u);
+ p[int(1)] = v_11;
p[int(3)].m = v(272u);
p[int(1)].m[int(0)] = asfloat(u[2u].xyz).zxy;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x3_f32/to_private.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat2x3_f32/to_private.wgsl.expected.ir.fxc.hlsl
index c4ef8df..4d57e7b 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x3_f32/to_private.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat2x3_f32/to_private.wgsl.expected.ir.fxc.hlsl
@@ -10,46 +10,45 @@
};
static S p[4] = (S[4])0;
float2x3 v(uint start_byte_offset) {
- float3 v_1 = asfloat(u[(start_byte_offset / 16u)].xyz);
- return float2x3(v_1, asfloat(u[((16u + start_byte_offset) / 16u)].xyz));
+ return float2x3(asfloat(u[(start_byte_offset / 16u)].xyz), asfloat(u[((16u + start_byte_offset) / 16u)].xyz));
}
-S v_2(uint start_byte_offset) {
- int v_3 = asint(u[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]);
- float2x3 v_4 = v((16u + start_byte_offset));
- S v_5 = {v_3, v_4, asint(u[((64u + start_byte_offset) / 16u)][(((64u + start_byte_offset) % 16u) / 4u)])};
- return v_5;
+S v_1(uint start_byte_offset) {
+ int v_2 = asint(u[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]);
+ float2x3 v_3 = v((16u + start_byte_offset));
+ S v_4 = {v_2, v_3, asint(u[((64u + start_byte_offset) / 16u)][(((64u + start_byte_offset) % 16u) / 4u)])};
+ return v_4;
}
typedef S ary_ret[4];
-ary_ret v_6(uint start_byte_offset) {
+ary_ret v_5(uint start_byte_offset) {
S a[4] = (S[4])0;
{
- uint v_7 = 0u;
- v_7 = 0u;
+ uint v_6 = 0u;
+ v_6 = 0u;
while(true) {
- uint v_8 = v_7;
- if ((v_8 >= 4u)) {
+ uint v_7 = v_6;
+ if ((v_7 >= 4u)) {
break;
}
- S v_9 = v_2((start_byte_offset + (v_8 * 128u)));
- a[v_8] = v_9;
+ S v_8 = v_1((start_byte_offset + (v_7 * 128u)));
+ a[v_7] = v_8;
{
- v_7 = (v_8 + 1u);
+ v_6 = (v_7 + 1u);
}
continue;
}
}
- S v_10[4] = a;
- return v_10;
+ S v_9[4] = a;
+ return v_9;
}
[numthreads(1, 1, 1)]
void f() {
- S v_11[4] = v_6(0u);
- p = v_11;
- S v_12 = v_2(256u);
- p[int(1)] = v_12;
+ S v_10[4] = v_5(0u);
+ p = v_10;
+ S v_11 = v_1(256u);
+ p[int(1)] = v_11;
p[int(3)].m = v(272u);
p[int(1)].m[int(0)] = asfloat(u[2u].xyz).zxy;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x3_f32/to_storage.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat2x3_f32/to_storage.wgsl.expected.ir.dxc.hlsl
index 71b5de2..2df0e8a 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x3_f32/to_storage.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat2x3_f32/to_storage.wgsl.expected.ir.dxc.hlsl
@@ -15,36 +15,35 @@
}
float2x3 v_1(uint start_byte_offset) {
- float3 v_2 = asfloat(u[(start_byte_offset / 16u)].xyz);
- return float2x3(v_2, asfloat(u[((16u + start_byte_offset) / 16u)].xyz));
+ return float2x3(asfloat(u[(start_byte_offset / 16u)].xyz), asfloat(u[((16u + start_byte_offset) / 16u)].xyz));
}
-void v_3(uint offset, S obj) {
+void v_2(uint offset, S obj) {
s.Store((offset + 0u), asuint(obj.before));
v((offset + 16u), obj.m);
s.Store((offset + 64u), asuint(obj.after));
}
-S v_4(uint start_byte_offset) {
- int v_5 = asint(u[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]);
- float2x3 v_6 = v_1((16u + start_byte_offset));
- S v_7 = {v_5, v_6, asint(u[((64u + start_byte_offset) / 16u)][(((64u + start_byte_offset) % 16u) / 4u)])};
- return v_7;
+S v_3(uint start_byte_offset) {
+ int v_4 = asint(u[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]);
+ float2x3 v_5 = v_1((16u + start_byte_offset));
+ S v_6 = {v_4, v_5, asint(u[((64u + start_byte_offset) / 16u)][(((64u + start_byte_offset) % 16u) / 4u)])};
+ return v_6;
}
-void v_8(uint offset, S obj[4]) {
+void v_7(uint offset, S obj[4]) {
{
- uint v_9 = 0u;
- v_9 = 0u;
+ uint v_8 = 0u;
+ v_8 = 0u;
while(true) {
- uint v_10 = v_9;
- if ((v_10 >= 4u)) {
+ uint v_9 = v_8;
+ if ((v_9 >= 4u)) {
break;
}
- S v_11 = obj[v_10];
- v_3((offset + (v_10 * 128u)), v_11);
+ S v_10 = obj[v_9];
+ v_2((offset + (v_9 * 128u)), v_10);
{
- v_9 = (v_10 + 1u);
+ v_8 = (v_9 + 1u);
}
continue;
}
@@ -52,34 +51,34 @@
}
typedef S ary_ret[4];
-ary_ret v_12(uint start_byte_offset) {
+ary_ret v_11(uint start_byte_offset) {
S a[4] = (S[4])0;
{
- uint v_13 = 0u;
- v_13 = 0u;
+ uint v_12 = 0u;
+ v_12 = 0u;
while(true) {
- uint v_14 = v_13;
- if ((v_14 >= 4u)) {
+ uint v_13 = v_12;
+ if ((v_13 >= 4u)) {
break;
}
- S v_15 = v_4((start_byte_offset + (v_14 * 128u)));
- a[v_14] = v_15;
+ S v_14 = v_3((start_byte_offset + (v_13 * 128u)));
+ a[v_13] = v_14;
{
- v_13 = (v_14 + 1u);
+ v_12 = (v_13 + 1u);
}
continue;
}
}
- S v_16[4] = a;
- return v_16;
+ S v_15[4] = a;
+ return v_15;
}
[numthreads(1, 1, 1)]
void f() {
- S v_17[4] = v_12(0u);
- v_8(0u, v_17);
- S v_18 = v_4(256u);
- v_3(128u, v_18);
+ S v_16[4] = v_11(0u);
+ v_7(0u, v_16);
+ S v_17 = v_3(256u);
+ v_2(128u, v_17);
v(400u, v_1(272u));
s.Store3(144u, asuint(asfloat(u[2u].xyz).zxy));
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x3_f32/to_storage.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat2x3_f32/to_storage.wgsl.expected.ir.fxc.hlsl
index 71b5de2..2df0e8a 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x3_f32/to_storage.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat2x3_f32/to_storage.wgsl.expected.ir.fxc.hlsl
@@ -15,36 +15,35 @@
}
float2x3 v_1(uint start_byte_offset) {
- float3 v_2 = asfloat(u[(start_byte_offset / 16u)].xyz);
- return float2x3(v_2, asfloat(u[((16u + start_byte_offset) / 16u)].xyz));
+ return float2x3(asfloat(u[(start_byte_offset / 16u)].xyz), asfloat(u[((16u + start_byte_offset) / 16u)].xyz));
}
-void v_3(uint offset, S obj) {
+void v_2(uint offset, S obj) {
s.Store((offset + 0u), asuint(obj.before));
v((offset + 16u), obj.m);
s.Store((offset + 64u), asuint(obj.after));
}
-S v_4(uint start_byte_offset) {
- int v_5 = asint(u[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]);
- float2x3 v_6 = v_1((16u + start_byte_offset));
- S v_7 = {v_5, v_6, asint(u[((64u + start_byte_offset) / 16u)][(((64u + start_byte_offset) % 16u) / 4u)])};
- return v_7;
+S v_3(uint start_byte_offset) {
+ int v_4 = asint(u[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]);
+ float2x3 v_5 = v_1((16u + start_byte_offset));
+ S v_6 = {v_4, v_5, asint(u[((64u + start_byte_offset) / 16u)][(((64u + start_byte_offset) % 16u) / 4u)])};
+ return v_6;
}
-void v_8(uint offset, S obj[4]) {
+void v_7(uint offset, S obj[4]) {
{
- uint v_9 = 0u;
- v_9 = 0u;
+ uint v_8 = 0u;
+ v_8 = 0u;
while(true) {
- uint v_10 = v_9;
- if ((v_10 >= 4u)) {
+ uint v_9 = v_8;
+ if ((v_9 >= 4u)) {
break;
}
- S v_11 = obj[v_10];
- v_3((offset + (v_10 * 128u)), v_11);
+ S v_10 = obj[v_9];
+ v_2((offset + (v_9 * 128u)), v_10);
{
- v_9 = (v_10 + 1u);
+ v_8 = (v_9 + 1u);
}
continue;
}
@@ -52,34 +51,34 @@
}
typedef S ary_ret[4];
-ary_ret v_12(uint start_byte_offset) {
+ary_ret v_11(uint start_byte_offset) {
S a[4] = (S[4])0;
{
- uint v_13 = 0u;
- v_13 = 0u;
+ uint v_12 = 0u;
+ v_12 = 0u;
while(true) {
- uint v_14 = v_13;
- if ((v_14 >= 4u)) {
+ uint v_13 = v_12;
+ if ((v_13 >= 4u)) {
break;
}
- S v_15 = v_4((start_byte_offset + (v_14 * 128u)));
- a[v_14] = v_15;
+ S v_14 = v_3((start_byte_offset + (v_13 * 128u)));
+ a[v_13] = v_14;
{
- v_13 = (v_14 + 1u);
+ v_12 = (v_13 + 1u);
}
continue;
}
}
- S v_16[4] = a;
- return v_16;
+ S v_15[4] = a;
+ return v_15;
}
[numthreads(1, 1, 1)]
void f() {
- S v_17[4] = v_12(0u);
- v_8(0u, v_17);
- S v_18 = v_4(256u);
- v_3(128u, v_18);
+ S v_16[4] = v_11(0u);
+ v_7(0u, v_16);
+ S v_17 = v_3(256u);
+ v_2(128u, v_17);
v(400u, v_1(272u));
s.Store3(144u, asuint(asfloat(u[2u].xyz).zxy));
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x3_f32/to_workgroup.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat2x3_f32/to_workgroup.wgsl.expected.ir.dxc.hlsl
index ca9088d..d1cf9c5 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x3_f32/to_workgroup.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat2x3_f32/to_workgroup.wgsl.expected.ir.dxc.hlsl
@@ -14,62 +14,61 @@
};
groupshared S w[4];
float2x3 v(uint start_byte_offset) {
- float3 v_1 = asfloat(u[(start_byte_offset / 16u)].xyz);
- return float2x3(v_1, asfloat(u[((16u + start_byte_offset) / 16u)].xyz));
+ return float2x3(asfloat(u[(start_byte_offset / 16u)].xyz), asfloat(u[((16u + start_byte_offset) / 16u)].xyz));
}
-S v_2(uint start_byte_offset) {
- int v_3 = asint(u[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]);
- float2x3 v_4 = v((16u + start_byte_offset));
- S v_5 = {v_3, v_4, asint(u[((64u + start_byte_offset) / 16u)][(((64u + start_byte_offset) % 16u) / 4u)])};
- return v_5;
+S v_1(uint start_byte_offset) {
+ int v_2 = asint(u[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]);
+ float2x3 v_3 = v((16u + start_byte_offset));
+ S v_4 = {v_2, v_3, asint(u[((64u + start_byte_offset) / 16u)][(((64u + start_byte_offset) % 16u) / 4u)])};
+ return v_4;
}
typedef S ary_ret[4];
-ary_ret v_6(uint start_byte_offset) {
+ary_ret v_5(uint start_byte_offset) {
S a[4] = (S[4])0;
{
- uint v_7 = 0u;
- v_7 = 0u;
+ uint v_6 = 0u;
+ v_6 = 0u;
while(true) {
- uint v_8 = v_7;
- if ((v_8 >= 4u)) {
+ uint v_7 = v_6;
+ if ((v_7 >= 4u)) {
break;
}
- S v_9 = v_2((start_byte_offset + (v_8 * 128u)));
- a[v_8] = v_9;
+ S v_8 = v_1((start_byte_offset + (v_7 * 128u)));
+ a[v_7] = v_8;
{
- v_7 = (v_8 + 1u);
+ v_6 = (v_7 + 1u);
}
continue;
}
}
- S v_10[4] = a;
- return v_10;
+ S v_9[4] = a;
+ return v_9;
}
void f_inner(uint tint_local_index) {
{
- uint v_11 = 0u;
- v_11 = tint_local_index;
+ uint v_10 = 0u;
+ v_10 = tint_local_index;
while(true) {
- uint v_12 = v_11;
- if ((v_12 >= 4u)) {
+ uint v_11 = v_10;
+ if ((v_11 >= 4u)) {
break;
}
- S v_13 = (S)0;
- w[v_12] = v_13;
+ S v_12 = (S)0;
+ w[v_11] = v_12;
{
- v_11 = (v_12 + 1u);
+ v_10 = (v_11 + 1u);
}
continue;
}
}
GroupMemoryBarrierWithGroupSync();
- S v_14[4] = v_6(0u);
- w = v_14;
- S v_15 = v_2(256u);
- w[int(1)] = v_15;
+ S v_13[4] = v_5(0u);
+ w = v_13;
+ S v_14 = v_1(256u);
+ w[int(1)] = v_14;
w[int(3)].m = v(272u);
w[int(1)].m[int(0)] = asfloat(u[2u].xyz).zxy;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x3_f32/to_workgroup.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat2x3_f32/to_workgroup.wgsl.expected.ir.fxc.hlsl
index ca9088d..d1cf9c5 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x3_f32/to_workgroup.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat2x3_f32/to_workgroup.wgsl.expected.ir.fxc.hlsl
@@ -14,62 +14,61 @@
};
groupshared S w[4];
float2x3 v(uint start_byte_offset) {
- float3 v_1 = asfloat(u[(start_byte_offset / 16u)].xyz);
- return float2x3(v_1, asfloat(u[((16u + start_byte_offset) / 16u)].xyz));
+ return float2x3(asfloat(u[(start_byte_offset / 16u)].xyz), asfloat(u[((16u + start_byte_offset) / 16u)].xyz));
}
-S v_2(uint start_byte_offset) {
- int v_3 = asint(u[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]);
- float2x3 v_4 = v((16u + start_byte_offset));
- S v_5 = {v_3, v_4, asint(u[((64u + start_byte_offset) / 16u)][(((64u + start_byte_offset) % 16u) / 4u)])};
- return v_5;
+S v_1(uint start_byte_offset) {
+ int v_2 = asint(u[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]);
+ float2x3 v_3 = v((16u + start_byte_offset));
+ S v_4 = {v_2, v_3, asint(u[((64u + start_byte_offset) / 16u)][(((64u + start_byte_offset) % 16u) / 4u)])};
+ return v_4;
}
typedef S ary_ret[4];
-ary_ret v_6(uint start_byte_offset) {
+ary_ret v_5(uint start_byte_offset) {
S a[4] = (S[4])0;
{
- uint v_7 = 0u;
- v_7 = 0u;
+ uint v_6 = 0u;
+ v_6 = 0u;
while(true) {
- uint v_8 = v_7;
- if ((v_8 >= 4u)) {
+ uint v_7 = v_6;
+ if ((v_7 >= 4u)) {
break;
}
- S v_9 = v_2((start_byte_offset + (v_8 * 128u)));
- a[v_8] = v_9;
+ S v_8 = v_1((start_byte_offset + (v_7 * 128u)));
+ a[v_7] = v_8;
{
- v_7 = (v_8 + 1u);
+ v_6 = (v_7 + 1u);
}
continue;
}
}
- S v_10[4] = a;
- return v_10;
+ S v_9[4] = a;
+ return v_9;
}
void f_inner(uint tint_local_index) {
{
- uint v_11 = 0u;
- v_11 = tint_local_index;
+ uint v_10 = 0u;
+ v_10 = tint_local_index;
while(true) {
- uint v_12 = v_11;
- if ((v_12 >= 4u)) {
+ uint v_11 = v_10;
+ if ((v_11 >= 4u)) {
break;
}
- S v_13 = (S)0;
- w[v_12] = v_13;
+ S v_12 = (S)0;
+ w[v_11] = v_12;
{
- v_11 = (v_12 + 1u);
+ v_10 = (v_11 + 1u);
}
continue;
}
}
GroupMemoryBarrierWithGroupSync();
- S v_14[4] = v_6(0u);
- w = v_14;
- S v_15 = v_2(256u);
- w[int(1)] = v_15;
+ S v_13[4] = v_5(0u);
+ w = v_13;
+ S v_14 = v_1(256u);
+ w[int(1)] = v_14;
w[int(3)].m = v(272u);
w[int(1)].m[int(0)] = asfloat(u[2u].xyz).zxy;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x4_f32/dynamic_index_via_ptr.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat2x4_f32/dynamic_index_via_ptr.wgsl.expected.ir.dxc.hlsl
index f9c904a..010532c 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x4_f32/dynamic_index_via_ptr.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat2x4_f32/dynamic_index_via_ptr.wgsl.expected.ir.dxc.hlsl
@@ -17,79 +17,78 @@
}
float2x4 v(uint start_byte_offset) {
- float4 v_1 = asfloat(a[(start_byte_offset / 16u)]);
- return float2x4(v_1, asfloat(a[((16u + start_byte_offset) / 16u)]));
+ return float2x4(asfloat(a[(start_byte_offset / 16u)]), asfloat(a[((16u + start_byte_offset) / 16u)]));
}
-Inner v_2(uint start_byte_offset) {
- Inner v_3 = {v(start_byte_offset)};
- return v_3;
+Inner v_1(uint start_byte_offset) {
+ Inner v_2 = {v(start_byte_offset)};
+ return v_2;
}
typedef Inner ary_ret[4];
-ary_ret v_4(uint start_byte_offset) {
+ary_ret v_3(uint start_byte_offset) {
Inner a_2[4] = (Inner[4])0;
{
- uint v_5 = 0u;
- v_5 = 0u;
+ uint v_4 = 0u;
+ v_4 = 0u;
while(true) {
- uint v_6 = v_5;
- if ((v_6 >= 4u)) {
+ uint v_5 = v_4;
+ if ((v_5 >= 4u)) {
break;
}
- Inner v_7 = v_2((start_byte_offset + (v_6 * 64u)));
- a_2[v_6] = v_7;
+ Inner v_6 = v_1((start_byte_offset + (v_5 * 64u)));
+ a_2[v_5] = v_6;
{
- v_5 = (v_6 + 1u);
+ v_4 = (v_5 + 1u);
}
continue;
}
}
- Inner v_8[4] = a_2;
- return v_8;
+ Inner v_7[4] = a_2;
+ return v_7;
}
-Outer v_9(uint start_byte_offset) {
- Inner v_10[4] = v_4(start_byte_offset);
- Outer v_11 = {v_10};
- return v_11;
+Outer v_8(uint start_byte_offset) {
+ Inner v_9[4] = v_3(start_byte_offset);
+ Outer v_10 = {v_9};
+ return v_10;
}
typedef Outer ary_ret_1[4];
-ary_ret_1 v_12(uint start_byte_offset) {
+ary_ret_1 v_11(uint start_byte_offset) {
Outer a_1[4] = (Outer[4])0;
{
- uint v_13 = 0u;
- v_13 = 0u;
+ uint v_12 = 0u;
+ v_12 = 0u;
while(true) {
- uint v_14 = v_13;
- if ((v_14 >= 4u)) {
+ uint v_13 = v_12;
+ if ((v_13 >= 4u)) {
break;
}
- Outer v_15 = v_9((start_byte_offset + (v_14 * 256u)));
- a_1[v_14] = v_15;
+ Outer v_14 = v_8((start_byte_offset + (v_13 * 256u)));
+ a_1[v_13] = v_14;
{
- v_13 = (v_14 + 1u);
+ v_12 = (v_13 + 1u);
}
continue;
}
}
- Outer v_16[4] = a_1;
- return v_16;
+ Outer v_15[4] = a_1;
+ return v_15;
}
[numthreads(1, 1, 1)]
void f() {
- uint v_17 = (256u * uint(i()));
- uint v_18 = (64u * uint(i()));
- uint v_19 = (16u * uint(i()));
- Outer l_a[4] = v_12(0u);
- Outer l_a_i = v_9(v_17);
- Inner l_a_i_a[4] = v_4(v_17);
- Inner l_a_i_a_i = v_2((v_17 + v_18));
- float2x4 l_a_i_a_i_m = v((v_17 + v_18));
- float4 l_a_i_a_i_m_i = asfloat(a[(((v_17 + v_18) + v_19) / 16u)]);
- uint v_20 = (((v_17 + v_18) + v_19) + (uint(i()) * 4u));
- float l_a_i_a_i_m_i_i = asfloat(a[(v_20 / 16u)][((v_20 % 16u) / 4u)]);
+ uint v_16 = (256u * uint(i()));
+ uint v_17 = (64u * uint(i()));
+ uint v_18 = (16u * uint(i()));
+ Outer l_a[4] = v_11(0u);
+ Outer l_a_i = v_8(v_16);
+ Inner l_a_i_a[4] = v_3(v_16);
+ Inner l_a_i_a_i = v_1((v_16 + v_17));
+ float2x4 l_a_i_a_i_m = v((v_16 + v_17));
+ float4 l_a_i_a_i_m_i = asfloat(a[(((v_16 + v_17) + v_18) / 16u)]);
+ uint v_19 = (((v_16 + v_17) + v_18) + (uint(i()) * 4u));
+ float l_a_i_a_i_m_i_i = asfloat(a[(v_19 / 16u)][((v_19 % 16u) / 4u)]);
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x4_f32/dynamic_index_via_ptr.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat2x4_f32/dynamic_index_via_ptr.wgsl.expected.ir.fxc.hlsl
index f9c904a..010532c 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x4_f32/dynamic_index_via_ptr.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat2x4_f32/dynamic_index_via_ptr.wgsl.expected.ir.fxc.hlsl
@@ -17,79 +17,78 @@
}
float2x4 v(uint start_byte_offset) {
- float4 v_1 = asfloat(a[(start_byte_offset / 16u)]);
- return float2x4(v_1, asfloat(a[((16u + start_byte_offset) / 16u)]));
+ return float2x4(asfloat(a[(start_byte_offset / 16u)]), asfloat(a[((16u + start_byte_offset) / 16u)]));
}
-Inner v_2(uint start_byte_offset) {
- Inner v_3 = {v(start_byte_offset)};
- return v_3;
+Inner v_1(uint start_byte_offset) {
+ Inner v_2 = {v(start_byte_offset)};
+ return v_2;
}
typedef Inner ary_ret[4];
-ary_ret v_4(uint start_byte_offset) {
+ary_ret v_3(uint start_byte_offset) {
Inner a_2[4] = (Inner[4])0;
{
- uint v_5 = 0u;
- v_5 = 0u;
+ uint v_4 = 0u;
+ v_4 = 0u;
while(true) {
- uint v_6 = v_5;
- if ((v_6 >= 4u)) {
+ uint v_5 = v_4;
+ if ((v_5 >= 4u)) {
break;
}
- Inner v_7 = v_2((start_byte_offset + (v_6 * 64u)));
- a_2[v_6] = v_7;
+ Inner v_6 = v_1((start_byte_offset + (v_5 * 64u)));
+ a_2[v_5] = v_6;
{
- v_5 = (v_6 + 1u);
+ v_4 = (v_5 + 1u);
}
continue;
}
}
- Inner v_8[4] = a_2;
- return v_8;
+ Inner v_7[4] = a_2;
+ return v_7;
}
-Outer v_9(uint start_byte_offset) {
- Inner v_10[4] = v_4(start_byte_offset);
- Outer v_11 = {v_10};
- return v_11;
+Outer v_8(uint start_byte_offset) {
+ Inner v_9[4] = v_3(start_byte_offset);
+ Outer v_10 = {v_9};
+ return v_10;
}
typedef Outer ary_ret_1[4];
-ary_ret_1 v_12(uint start_byte_offset) {
+ary_ret_1 v_11(uint start_byte_offset) {
Outer a_1[4] = (Outer[4])0;
{
- uint v_13 = 0u;
- v_13 = 0u;
+ uint v_12 = 0u;
+ v_12 = 0u;
while(true) {
- uint v_14 = v_13;
- if ((v_14 >= 4u)) {
+ uint v_13 = v_12;
+ if ((v_13 >= 4u)) {
break;
}
- Outer v_15 = v_9((start_byte_offset + (v_14 * 256u)));
- a_1[v_14] = v_15;
+ Outer v_14 = v_8((start_byte_offset + (v_13 * 256u)));
+ a_1[v_13] = v_14;
{
- v_13 = (v_14 + 1u);
+ v_12 = (v_13 + 1u);
}
continue;
}
}
- Outer v_16[4] = a_1;
- return v_16;
+ Outer v_15[4] = a_1;
+ return v_15;
}
[numthreads(1, 1, 1)]
void f() {
- uint v_17 = (256u * uint(i()));
- uint v_18 = (64u * uint(i()));
- uint v_19 = (16u * uint(i()));
- Outer l_a[4] = v_12(0u);
- Outer l_a_i = v_9(v_17);
- Inner l_a_i_a[4] = v_4(v_17);
- Inner l_a_i_a_i = v_2((v_17 + v_18));
- float2x4 l_a_i_a_i_m = v((v_17 + v_18));
- float4 l_a_i_a_i_m_i = asfloat(a[(((v_17 + v_18) + v_19) / 16u)]);
- uint v_20 = (((v_17 + v_18) + v_19) + (uint(i()) * 4u));
- float l_a_i_a_i_m_i_i = asfloat(a[(v_20 / 16u)][((v_20 % 16u) / 4u)]);
+ uint v_16 = (256u * uint(i()));
+ uint v_17 = (64u * uint(i()));
+ uint v_18 = (16u * uint(i()));
+ Outer l_a[4] = v_11(0u);
+ Outer l_a_i = v_8(v_16);
+ Inner l_a_i_a[4] = v_3(v_16);
+ Inner l_a_i_a_i = v_1((v_16 + v_17));
+ float2x4 l_a_i_a_i_m = v((v_16 + v_17));
+ float4 l_a_i_a_i_m_i = asfloat(a[(((v_16 + v_17) + v_18) / 16u)]);
+ uint v_19 = (((v_16 + v_17) + v_18) + (uint(i()) * 4u));
+ float l_a_i_a_i_m_i_i = asfloat(a[(v_19 / 16u)][((v_19 % 16u) / 4u)]);
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x4_f32/static_index_via_ptr.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat2x4_f32/static_index_via_ptr.wgsl.expected.ir.dxc.hlsl
index 7de9bac..af18dd2 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x4_f32/static_index_via_ptr.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat2x4_f32/static_index_via_ptr.wgsl.expected.ir.dxc.hlsl
@@ -11,73 +11,72 @@
uint4 a[64];
};
float2x4 v(uint start_byte_offset) {
- float4 v_1 = asfloat(a[(start_byte_offset / 16u)]);
- return float2x4(v_1, asfloat(a[((16u + start_byte_offset) / 16u)]));
+ return float2x4(asfloat(a[(start_byte_offset / 16u)]), asfloat(a[((16u + start_byte_offset) / 16u)]));
}
-Inner v_2(uint start_byte_offset) {
- Inner v_3 = {v(start_byte_offset)};
- return v_3;
+Inner v_1(uint start_byte_offset) {
+ Inner v_2 = {v(start_byte_offset)};
+ return v_2;
}
typedef Inner ary_ret[4];
-ary_ret v_4(uint start_byte_offset) {
+ary_ret v_3(uint start_byte_offset) {
Inner a_2[4] = (Inner[4])0;
{
- uint v_5 = 0u;
- v_5 = 0u;
+ uint v_4 = 0u;
+ v_4 = 0u;
while(true) {
- uint v_6 = v_5;
- if ((v_6 >= 4u)) {
+ uint v_5 = v_4;
+ if ((v_5 >= 4u)) {
break;
}
- Inner v_7 = v_2((start_byte_offset + (v_6 * 64u)));
- a_2[v_6] = v_7;
+ Inner v_6 = v_1((start_byte_offset + (v_5 * 64u)));
+ a_2[v_5] = v_6;
{
- v_5 = (v_6 + 1u);
+ v_4 = (v_5 + 1u);
}
continue;
}
}
- Inner v_8[4] = a_2;
- return v_8;
+ Inner v_7[4] = a_2;
+ return v_7;
}
-Outer v_9(uint start_byte_offset) {
- Inner v_10[4] = v_4(start_byte_offset);
- Outer v_11 = {v_10};
- return v_11;
+Outer v_8(uint start_byte_offset) {
+ Inner v_9[4] = v_3(start_byte_offset);
+ Outer v_10 = {v_9};
+ return v_10;
}
typedef Outer ary_ret_1[4];
-ary_ret_1 v_12(uint start_byte_offset) {
+ary_ret_1 v_11(uint start_byte_offset) {
Outer a_1[4] = (Outer[4])0;
{
- uint v_13 = 0u;
- v_13 = 0u;
+ uint v_12 = 0u;
+ v_12 = 0u;
while(true) {
- uint v_14 = v_13;
- if ((v_14 >= 4u)) {
+ uint v_13 = v_12;
+ if ((v_13 >= 4u)) {
break;
}
- Outer v_15 = v_9((start_byte_offset + (v_14 * 256u)));
- a_1[v_14] = v_15;
+ Outer v_14 = v_8((start_byte_offset + (v_13 * 256u)));
+ a_1[v_13] = v_14;
{
- v_13 = (v_14 + 1u);
+ v_12 = (v_13 + 1u);
}
continue;
}
}
- Outer v_16[4] = a_1;
- return v_16;
+ Outer v_15[4] = a_1;
+ return v_15;
}
[numthreads(1, 1, 1)]
void f() {
- Outer l_a[4] = v_12(0u);
- Outer l_a_3 = v_9(768u);
- Inner l_a_3_a[4] = v_4(768u);
- Inner l_a_3_a_2 = v_2(896u);
+ Outer l_a[4] = v_11(0u);
+ Outer l_a_3 = v_8(768u);
+ Inner l_a_3_a[4] = v_3(768u);
+ Inner l_a_3_a_2 = v_1(896u);
float2x4 l_a_3_a_2_m = v(896u);
float4 l_a_3_a_2_m_1 = asfloat(a[57u]);
float l_a_3_a_2_m_1_0 = asfloat(a[57u].x);
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x4_f32/static_index_via_ptr.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat2x4_f32/static_index_via_ptr.wgsl.expected.ir.fxc.hlsl
index 7de9bac..af18dd2 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x4_f32/static_index_via_ptr.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat2x4_f32/static_index_via_ptr.wgsl.expected.ir.fxc.hlsl
@@ -11,73 +11,72 @@
uint4 a[64];
};
float2x4 v(uint start_byte_offset) {
- float4 v_1 = asfloat(a[(start_byte_offset / 16u)]);
- return float2x4(v_1, asfloat(a[((16u + start_byte_offset) / 16u)]));
+ return float2x4(asfloat(a[(start_byte_offset / 16u)]), asfloat(a[((16u + start_byte_offset) / 16u)]));
}
-Inner v_2(uint start_byte_offset) {
- Inner v_3 = {v(start_byte_offset)};
- return v_3;
+Inner v_1(uint start_byte_offset) {
+ Inner v_2 = {v(start_byte_offset)};
+ return v_2;
}
typedef Inner ary_ret[4];
-ary_ret v_4(uint start_byte_offset) {
+ary_ret v_3(uint start_byte_offset) {
Inner a_2[4] = (Inner[4])0;
{
- uint v_5 = 0u;
- v_5 = 0u;
+ uint v_4 = 0u;
+ v_4 = 0u;
while(true) {
- uint v_6 = v_5;
- if ((v_6 >= 4u)) {
+ uint v_5 = v_4;
+ if ((v_5 >= 4u)) {
break;
}
- Inner v_7 = v_2((start_byte_offset + (v_6 * 64u)));
- a_2[v_6] = v_7;
+ Inner v_6 = v_1((start_byte_offset + (v_5 * 64u)));
+ a_2[v_5] = v_6;
{
- v_5 = (v_6 + 1u);
+ v_4 = (v_5 + 1u);
}
continue;
}
}
- Inner v_8[4] = a_2;
- return v_8;
+ Inner v_7[4] = a_2;
+ return v_7;
}
-Outer v_9(uint start_byte_offset) {
- Inner v_10[4] = v_4(start_byte_offset);
- Outer v_11 = {v_10};
- return v_11;
+Outer v_8(uint start_byte_offset) {
+ Inner v_9[4] = v_3(start_byte_offset);
+ Outer v_10 = {v_9};
+ return v_10;
}
typedef Outer ary_ret_1[4];
-ary_ret_1 v_12(uint start_byte_offset) {
+ary_ret_1 v_11(uint start_byte_offset) {
Outer a_1[4] = (Outer[4])0;
{
- uint v_13 = 0u;
- v_13 = 0u;
+ uint v_12 = 0u;
+ v_12 = 0u;
while(true) {
- uint v_14 = v_13;
- if ((v_14 >= 4u)) {
+ uint v_13 = v_12;
+ if ((v_13 >= 4u)) {
break;
}
- Outer v_15 = v_9((start_byte_offset + (v_14 * 256u)));
- a_1[v_14] = v_15;
+ Outer v_14 = v_8((start_byte_offset + (v_13 * 256u)));
+ a_1[v_13] = v_14;
{
- v_13 = (v_14 + 1u);
+ v_12 = (v_13 + 1u);
}
continue;
}
}
- Outer v_16[4] = a_1;
- return v_16;
+ Outer v_15[4] = a_1;
+ return v_15;
}
[numthreads(1, 1, 1)]
void f() {
- Outer l_a[4] = v_12(0u);
- Outer l_a_3 = v_9(768u);
- Inner l_a_3_a[4] = v_4(768u);
- Inner l_a_3_a_2 = v_2(896u);
+ Outer l_a[4] = v_11(0u);
+ Outer l_a_3 = v_8(768u);
+ Inner l_a_3_a[4] = v_3(768u);
+ Inner l_a_3_a_2 = v_1(896u);
float2x4 l_a_3_a_2_m = v(896u);
float4 l_a_3_a_2_m_1 = asfloat(a[57u]);
float l_a_3_a_2_m_1_0 = asfloat(a[57u].x);
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x4_f32/to_builtin.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat2x4_f32/to_builtin.wgsl.expected.ir.dxc.hlsl
index ab520e9..0d98195 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x4_f32/to_builtin.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat2x4_f32/to_builtin.wgsl.expected.ir.dxc.hlsl
@@ -3,8 +3,7 @@
uint4 u[32];
};
float2x4 v(uint start_byte_offset) {
- float4 v_1 = asfloat(u[(start_byte_offset / 16u)]);
- return float2x4(v_1, asfloat(u[((16u + start_byte_offset) / 16u)]));
+ return float2x4(asfloat(u[(start_byte_offset / 16u)]), asfloat(u[((16u + start_byte_offset) / 16u)]));
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x4_f32/to_builtin.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat2x4_f32/to_builtin.wgsl.expected.ir.fxc.hlsl
index ab520e9..0d98195 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x4_f32/to_builtin.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat2x4_f32/to_builtin.wgsl.expected.ir.fxc.hlsl
@@ -3,8 +3,7 @@
uint4 u[32];
};
float2x4 v(uint start_byte_offset) {
- float4 v_1 = asfloat(u[(start_byte_offset / 16u)]);
- return float2x4(v_1, asfloat(u[((16u + start_byte_offset) / 16u)]));
+ return float2x4(asfloat(u[(start_byte_offset / 16u)]), asfloat(u[((16u + start_byte_offset) / 16u)]));
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x4_f32/to_fn.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat2x4_f32/to_fn.wgsl.expected.ir.dxc.hlsl
index 08bbe4c..9961835 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x4_f32/to_fn.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat2x4_f32/to_fn.wgsl.expected.ir.dxc.hlsl
@@ -24,46 +24,45 @@
}
float2x4 v_1(uint start_byte_offset) {
- float4 v_2 = asfloat(u[(start_byte_offset / 16u)]);
- return float2x4(v_2, asfloat(u[((16u + start_byte_offset) / 16u)]));
+ return float2x4(asfloat(u[(start_byte_offset / 16u)]), asfloat(u[((16u + start_byte_offset) / 16u)]));
}
-S v_3(uint start_byte_offset) {
- int v_4 = asint(u[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]);
- float2x4 v_5 = v_1((16u + start_byte_offset));
- S v_6 = {v_4, v_5, asint(u[((64u + start_byte_offset) / 16u)][(((64u + start_byte_offset) % 16u) / 4u)])};
- return v_6;
+S v_2(uint start_byte_offset) {
+ int v_3 = asint(u[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]);
+ float2x4 v_4 = v_1((16u + start_byte_offset));
+ S v_5 = {v_3, v_4, asint(u[((64u + start_byte_offset) / 16u)][(((64u + start_byte_offset) % 16u) / 4u)])};
+ return v_5;
}
typedef S ary_ret[4];
-ary_ret v_7(uint start_byte_offset) {
+ary_ret v_6(uint start_byte_offset) {
S a_2[4] = (S[4])0;
{
- uint v_8 = 0u;
- v_8 = 0u;
+ uint v_7 = 0u;
+ v_7 = 0u;
while(true) {
- uint v_9 = v_8;
- if ((v_9 >= 4u)) {
+ uint v_8 = v_7;
+ if ((v_8 >= 4u)) {
break;
}
- S v_10 = v_3((start_byte_offset + (v_9 * 128u)));
- a_2[v_9] = v_10;
+ S v_9 = v_2((start_byte_offset + (v_8 * 128u)));
+ a_2[v_8] = v_9;
{
- v_8 = (v_9 + 1u);
+ v_7 = (v_8 + 1u);
}
continue;
}
}
- S v_11[4] = a_2;
- return v_11;
+ S v_10[4] = a_2;
+ return v_10;
}
[numthreads(1, 1, 1)]
void f() {
- S v_12[4] = v_7(0u);
- a(v_12);
- S v_13 = v_3(256u);
- b(v_13);
+ S v_11[4] = v_6(0u);
+ a(v_11);
+ S v_12 = v_2(256u);
+ b(v_12);
c(v_1(272u));
d(asfloat(u[2u]).ywxz);
e(asfloat(u[2u]).ywxz.x);
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x4_f32/to_fn.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat2x4_f32/to_fn.wgsl.expected.ir.fxc.hlsl
index 08bbe4c..9961835 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x4_f32/to_fn.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat2x4_f32/to_fn.wgsl.expected.ir.fxc.hlsl
@@ -24,46 +24,45 @@
}
float2x4 v_1(uint start_byte_offset) {
- float4 v_2 = asfloat(u[(start_byte_offset / 16u)]);
- return float2x4(v_2, asfloat(u[((16u + start_byte_offset) / 16u)]));
+ return float2x4(asfloat(u[(start_byte_offset / 16u)]), asfloat(u[((16u + start_byte_offset) / 16u)]));
}
-S v_3(uint start_byte_offset) {
- int v_4 = asint(u[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]);
- float2x4 v_5 = v_1((16u + start_byte_offset));
- S v_6 = {v_4, v_5, asint(u[((64u + start_byte_offset) / 16u)][(((64u + start_byte_offset) % 16u) / 4u)])};
- return v_6;
+S v_2(uint start_byte_offset) {
+ int v_3 = asint(u[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]);
+ float2x4 v_4 = v_1((16u + start_byte_offset));
+ S v_5 = {v_3, v_4, asint(u[((64u + start_byte_offset) / 16u)][(((64u + start_byte_offset) % 16u) / 4u)])};
+ return v_5;
}
typedef S ary_ret[4];
-ary_ret v_7(uint start_byte_offset) {
+ary_ret v_6(uint start_byte_offset) {
S a_2[4] = (S[4])0;
{
- uint v_8 = 0u;
- v_8 = 0u;
+ uint v_7 = 0u;
+ v_7 = 0u;
while(true) {
- uint v_9 = v_8;
- if ((v_9 >= 4u)) {
+ uint v_8 = v_7;
+ if ((v_8 >= 4u)) {
break;
}
- S v_10 = v_3((start_byte_offset + (v_9 * 128u)));
- a_2[v_9] = v_10;
+ S v_9 = v_2((start_byte_offset + (v_8 * 128u)));
+ a_2[v_8] = v_9;
{
- v_8 = (v_9 + 1u);
+ v_7 = (v_8 + 1u);
}
continue;
}
}
- S v_11[4] = a_2;
- return v_11;
+ S v_10[4] = a_2;
+ return v_10;
}
[numthreads(1, 1, 1)]
void f() {
- S v_12[4] = v_7(0u);
- a(v_12);
- S v_13 = v_3(256u);
- b(v_13);
+ S v_11[4] = v_6(0u);
+ a(v_11);
+ S v_12 = v_2(256u);
+ b(v_12);
c(v_1(272u));
d(asfloat(u[2u]).ywxz);
e(asfloat(u[2u]).ywxz.x);
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x4_f32/to_private.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat2x4_f32/to_private.wgsl.expected.ir.dxc.hlsl
index d0acf69..cf77f35 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x4_f32/to_private.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat2x4_f32/to_private.wgsl.expected.ir.dxc.hlsl
@@ -10,46 +10,45 @@
};
static S p[4] = (S[4])0;
float2x4 v(uint start_byte_offset) {
- float4 v_1 = asfloat(u[(start_byte_offset / 16u)]);
- return float2x4(v_1, asfloat(u[((16u + start_byte_offset) / 16u)]));
+ return float2x4(asfloat(u[(start_byte_offset / 16u)]), asfloat(u[((16u + start_byte_offset) / 16u)]));
}
-S v_2(uint start_byte_offset) {
- int v_3 = asint(u[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]);
- float2x4 v_4 = v((16u + start_byte_offset));
- S v_5 = {v_3, v_4, asint(u[((64u + start_byte_offset) / 16u)][(((64u + start_byte_offset) % 16u) / 4u)])};
- return v_5;
+S v_1(uint start_byte_offset) {
+ int v_2 = asint(u[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]);
+ float2x4 v_3 = v((16u + start_byte_offset));
+ S v_4 = {v_2, v_3, asint(u[((64u + start_byte_offset) / 16u)][(((64u + start_byte_offset) % 16u) / 4u)])};
+ return v_4;
}
typedef S ary_ret[4];
-ary_ret v_6(uint start_byte_offset) {
+ary_ret v_5(uint start_byte_offset) {
S a[4] = (S[4])0;
{
- uint v_7 = 0u;
- v_7 = 0u;
+ uint v_6 = 0u;
+ v_6 = 0u;
while(true) {
- uint v_8 = v_7;
- if ((v_8 >= 4u)) {
+ uint v_7 = v_6;
+ if ((v_7 >= 4u)) {
break;
}
- S v_9 = v_2((start_byte_offset + (v_8 * 128u)));
- a[v_8] = v_9;
+ S v_8 = v_1((start_byte_offset + (v_7 * 128u)));
+ a[v_7] = v_8;
{
- v_7 = (v_8 + 1u);
+ v_6 = (v_7 + 1u);
}
continue;
}
}
- S v_10[4] = a;
- return v_10;
+ S v_9[4] = a;
+ return v_9;
}
[numthreads(1, 1, 1)]
void f() {
- S v_11[4] = v_6(0u);
- p = v_11;
- S v_12 = v_2(256u);
- p[int(1)] = v_12;
+ S v_10[4] = v_5(0u);
+ p = v_10;
+ S v_11 = v_1(256u);
+ p[int(1)] = v_11;
p[int(3)].m = v(272u);
p[int(1)].m[int(0)] = asfloat(u[2u]).ywxz;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x4_f32/to_private.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat2x4_f32/to_private.wgsl.expected.ir.fxc.hlsl
index d0acf69..cf77f35 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x4_f32/to_private.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat2x4_f32/to_private.wgsl.expected.ir.fxc.hlsl
@@ -10,46 +10,45 @@
};
static S p[4] = (S[4])0;
float2x4 v(uint start_byte_offset) {
- float4 v_1 = asfloat(u[(start_byte_offset / 16u)]);
- return float2x4(v_1, asfloat(u[((16u + start_byte_offset) / 16u)]));
+ return float2x4(asfloat(u[(start_byte_offset / 16u)]), asfloat(u[((16u + start_byte_offset) / 16u)]));
}
-S v_2(uint start_byte_offset) {
- int v_3 = asint(u[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]);
- float2x4 v_4 = v((16u + start_byte_offset));
- S v_5 = {v_3, v_4, asint(u[((64u + start_byte_offset) / 16u)][(((64u + start_byte_offset) % 16u) / 4u)])};
- return v_5;
+S v_1(uint start_byte_offset) {
+ int v_2 = asint(u[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]);
+ float2x4 v_3 = v((16u + start_byte_offset));
+ S v_4 = {v_2, v_3, asint(u[((64u + start_byte_offset) / 16u)][(((64u + start_byte_offset) % 16u) / 4u)])};
+ return v_4;
}
typedef S ary_ret[4];
-ary_ret v_6(uint start_byte_offset) {
+ary_ret v_5(uint start_byte_offset) {
S a[4] = (S[4])0;
{
- uint v_7 = 0u;
- v_7 = 0u;
+ uint v_6 = 0u;
+ v_6 = 0u;
while(true) {
- uint v_8 = v_7;
- if ((v_8 >= 4u)) {
+ uint v_7 = v_6;
+ if ((v_7 >= 4u)) {
break;
}
- S v_9 = v_2((start_byte_offset + (v_8 * 128u)));
- a[v_8] = v_9;
+ S v_8 = v_1((start_byte_offset + (v_7 * 128u)));
+ a[v_7] = v_8;
{
- v_7 = (v_8 + 1u);
+ v_6 = (v_7 + 1u);
}
continue;
}
}
- S v_10[4] = a;
- return v_10;
+ S v_9[4] = a;
+ return v_9;
}
[numthreads(1, 1, 1)]
void f() {
- S v_11[4] = v_6(0u);
- p = v_11;
- S v_12 = v_2(256u);
- p[int(1)] = v_12;
+ S v_10[4] = v_5(0u);
+ p = v_10;
+ S v_11 = v_1(256u);
+ p[int(1)] = v_11;
p[int(3)].m = v(272u);
p[int(1)].m[int(0)] = asfloat(u[2u]).ywxz;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x4_f32/to_storage.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat2x4_f32/to_storage.wgsl.expected.ir.dxc.hlsl
index ddffdf6..e0b536f 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x4_f32/to_storage.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat2x4_f32/to_storage.wgsl.expected.ir.dxc.hlsl
@@ -15,36 +15,35 @@
}
float2x4 v_1(uint start_byte_offset) {
- float4 v_2 = asfloat(u[(start_byte_offset / 16u)]);
- return float2x4(v_2, asfloat(u[((16u + start_byte_offset) / 16u)]));
+ return float2x4(asfloat(u[(start_byte_offset / 16u)]), asfloat(u[((16u + start_byte_offset) / 16u)]));
}
-void v_3(uint offset, S obj) {
+void v_2(uint offset, S obj) {
s.Store((offset + 0u), asuint(obj.before));
v((offset + 16u), obj.m);
s.Store((offset + 64u), asuint(obj.after));
}
-S v_4(uint start_byte_offset) {
- int v_5 = asint(u[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]);
- float2x4 v_6 = v_1((16u + start_byte_offset));
- S v_7 = {v_5, v_6, asint(u[((64u + start_byte_offset) / 16u)][(((64u + start_byte_offset) % 16u) / 4u)])};
- return v_7;
+S v_3(uint start_byte_offset) {
+ int v_4 = asint(u[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]);
+ float2x4 v_5 = v_1((16u + start_byte_offset));
+ S v_6 = {v_4, v_5, asint(u[((64u + start_byte_offset) / 16u)][(((64u + start_byte_offset) % 16u) / 4u)])};
+ return v_6;
}
-void v_8(uint offset, S obj[4]) {
+void v_7(uint offset, S obj[4]) {
{
- uint v_9 = 0u;
- v_9 = 0u;
+ uint v_8 = 0u;
+ v_8 = 0u;
while(true) {
- uint v_10 = v_9;
- if ((v_10 >= 4u)) {
+ uint v_9 = v_8;
+ if ((v_9 >= 4u)) {
break;
}
- S v_11 = obj[v_10];
- v_3((offset + (v_10 * 128u)), v_11);
+ S v_10 = obj[v_9];
+ v_2((offset + (v_9 * 128u)), v_10);
{
- v_9 = (v_10 + 1u);
+ v_8 = (v_9 + 1u);
}
continue;
}
@@ -52,34 +51,34 @@
}
typedef S ary_ret[4];
-ary_ret v_12(uint start_byte_offset) {
+ary_ret v_11(uint start_byte_offset) {
S a[4] = (S[4])0;
{
- uint v_13 = 0u;
- v_13 = 0u;
+ uint v_12 = 0u;
+ v_12 = 0u;
while(true) {
- uint v_14 = v_13;
- if ((v_14 >= 4u)) {
+ uint v_13 = v_12;
+ if ((v_13 >= 4u)) {
break;
}
- S v_15 = v_4((start_byte_offset + (v_14 * 128u)));
- a[v_14] = v_15;
+ S v_14 = v_3((start_byte_offset + (v_13 * 128u)));
+ a[v_13] = v_14;
{
- v_13 = (v_14 + 1u);
+ v_12 = (v_13 + 1u);
}
continue;
}
}
- S v_16[4] = a;
- return v_16;
+ S v_15[4] = a;
+ return v_15;
}
[numthreads(1, 1, 1)]
void f() {
- S v_17[4] = v_12(0u);
- v_8(0u, v_17);
- S v_18 = v_4(256u);
- v_3(128u, v_18);
+ S v_16[4] = v_11(0u);
+ v_7(0u, v_16);
+ S v_17 = v_3(256u);
+ v_2(128u, v_17);
v(400u, v_1(272u));
s.Store4(144u, asuint(asfloat(u[2u]).ywxz));
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x4_f32/to_storage.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat2x4_f32/to_storage.wgsl.expected.ir.fxc.hlsl
index ddffdf6..e0b536f 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x4_f32/to_storage.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat2x4_f32/to_storage.wgsl.expected.ir.fxc.hlsl
@@ -15,36 +15,35 @@
}
float2x4 v_1(uint start_byte_offset) {
- float4 v_2 = asfloat(u[(start_byte_offset / 16u)]);
- return float2x4(v_2, asfloat(u[((16u + start_byte_offset) / 16u)]));
+ return float2x4(asfloat(u[(start_byte_offset / 16u)]), asfloat(u[((16u + start_byte_offset) / 16u)]));
}
-void v_3(uint offset, S obj) {
+void v_2(uint offset, S obj) {
s.Store((offset + 0u), asuint(obj.before));
v((offset + 16u), obj.m);
s.Store((offset + 64u), asuint(obj.after));
}
-S v_4(uint start_byte_offset) {
- int v_5 = asint(u[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]);
- float2x4 v_6 = v_1((16u + start_byte_offset));
- S v_7 = {v_5, v_6, asint(u[((64u + start_byte_offset) / 16u)][(((64u + start_byte_offset) % 16u) / 4u)])};
- return v_7;
+S v_3(uint start_byte_offset) {
+ int v_4 = asint(u[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]);
+ float2x4 v_5 = v_1((16u + start_byte_offset));
+ S v_6 = {v_4, v_5, asint(u[((64u + start_byte_offset) / 16u)][(((64u + start_byte_offset) % 16u) / 4u)])};
+ return v_6;
}
-void v_8(uint offset, S obj[4]) {
+void v_7(uint offset, S obj[4]) {
{
- uint v_9 = 0u;
- v_9 = 0u;
+ uint v_8 = 0u;
+ v_8 = 0u;
while(true) {
- uint v_10 = v_9;
- if ((v_10 >= 4u)) {
+ uint v_9 = v_8;
+ if ((v_9 >= 4u)) {
break;
}
- S v_11 = obj[v_10];
- v_3((offset + (v_10 * 128u)), v_11);
+ S v_10 = obj[v_9];
+ v_2((offset + (v_9 * 128u)), v_10);
{
- v_9 = (v_10 + 1u);
+ v_8 = (v_9 + 1u);
}
continue;
}
@@ -52,34 +51,34 @@
}
typedef S ary_ret[4];
-ary_ret v_12(uint start_byte_offset) {
+ary_ret v_11(uint start_byte_offset) {
S a[4] = (S[4])0;
{
- uint v_13 = 0u;
- v_13 = 0u;
+ uint v_12 = 0u;
+ v_12 = 0u;
while(true) {
- uint v_14 = v_13;
- if ((v_14 >= 4u)) {
+ uint v_13 = v_12;
+ if ((v_13 >= 4u)) {
break;
}
- S v_15 = v_4((start_byte_offset + (v_14 * 128u)));
- a[v_14] = v_15;
+ S v_14 = v_3((start_byte_offset + (v_13 * 128u)));
+ a[v_13] = v_14;
{
- v_13 = (v_14 + 1u);
+ v_12 = (v_13 + 1u);
}
continue;
}
}
- S v_16[4] = a;
- return v_16;
+ S v_15[4] = a;
+ return v_15;
}
[numthreads(1, 1, 1)]
void f() {
- S v_17[4] = v_12(0u);
- v_8(0u, v_17);
- S v_18 = v_4(256u);
- v_3(128u, v_18);
+ S v_16[4] = v_11(0u);
+ v_7(0u, v_16);
+ S v_17 = v_3(256u);
+ v_2(128u, v_17);
v(400u, v_1(272u));
s.Store4(144u, asuint(asfloat(u[2u]).ywxz));
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x4_f32/to_workgroup.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat2x4_f32/to_workgroup.wgsl.expected.ir.dxc.hlsl
index 64846e9..85949a0 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x4_f32/to_workgroup.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat2x4_f32/to_workgroup.wgsl.expected.ir.dxc.hlsl
@@ -14,62 +14,61 @@
};
groupshared S w[4];
float2x4 v(uint start_byte_offset) {
- float4 v_1 = asfloat(u[(start_byte_offset / 16u)]);
- return float2x4(v_1, asfloat(u[((16u + start_byte_offset) / 16u)]));
+ return float2x4(asfloat(u[(start_byte_offset / 16u)]), asfloat(u[((16u + start_byte_offset) / 16u)]));
}
-S v_2(uint start_byte_offset) {
- int v_3 = asint(u[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]);
- float2x4 v_4 = v((16u + start_byte_offset));
- S v_5 = {v_3, v_4, asint(u[((64u + start_byte_offset) / 16u)][(((64u + start_byte_offset) % 16u) / 4u)])};
- return v_5;
+S v_1(uint start_byte_offset) {
+ int v_2 = asint(u[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]);
+ float2x4 v_3 = v((16u + start_byte_offset));
+ S v_4 = {v_2, v_3, asint(u[((64u + start_byte_offset) / 16u)][(((64u + start_byte_offset) % 16u) / 4u)])};
+ return v_4;
}
typedef S ary_ret[4];
-ary_ret v_6(uint start_byte_offset) {
+ary_ret v_5(uint start_byte_offset) {
S a[4] = (S[4])0;
{
- uint v_7 = 0u;
- v_7 = 0u;
+ uint v_6 = 0u;
+ v_6 = 0u;
while(true) {
- uint v_8 = v_7;
- if ((v_8 >= 4u)) {
+ uint v_7 = v_6;
+ if ((v_7 >= 4u)) {
break;
}
- S v_9 = v_2((start_byte_offset + (v_8 * 128u)));
- a[v_8] = v_9;
+ S v_8 = v_1((start_byte_offset + (v_7 * 128u)));
+ a[v_7] = v_8;
{
- v_7 = (v_8 + 1u);
+ v_6 = (v_7 + 1u);
}
continue;
}
}
- S v_10[4] = a;
- return v_10;
+ S v_9[4] = a;
+ return v_9;
}
void f_inner(uint tint_local_index) {
{
- uint v_11 = 0u;
- v_11 = tint_local_index;
+ uint v_10 = 0u;
+ v_10 = tint_local_index;
while(true) {
- uint v_12 = v_11;
- if ((v_12 >= 4u)) {
+ uint v_11 = v_10;
+ if ((v_11 >= 4u)) {
break;
}
- S v_13 = (S)0;
- w[v_12] = v_13;
+ S v_12 = (S)0;
+ w[v_11] = v_12;
{
- v_11 = (v_12 + 1u);
+ v_10 = (v_11 + 1u);
}
continue;
}
}
GroupMemoryBarrierWithGroupSync();
- S v_14[4] = v_6(0u);
- w = v_14;
- S v_15 = v_2(256u);
- w[int(1)] = v_15;
+ S v_13[4] = v_5(0u);
+ w = v_13;
+ S v_14 = v_1(256u);
+ w[int(1)] = v_14;
w[int(3)].m = v(272u);
w[int(1)].m[int(0)] = asfloat(u[2u]).ywxz;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x4_f32/to_workgroup.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat2x4_f32/to_workgroup.wgsl.expected.ir.fxc.hlsl
index 64846e9..85949a0 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x4_f32/to_workgroup.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat2x4_f32/to_workgroup.wgsl.expected.ir.fxc.hlsl
@@ -14,62 +14,61 @@
};
groupshared S w[4];
float2x4 v(uint start_byte_offset) {
- float4 v_1 = asfloat(u[(start_byte_offset / 16u)]);
- return float2x4(v_1, asfloat(u[((16u + start_byte_offset) / 16u)]));
+ return float2x4(asfloat(u[(start_byte_offset / 16u)]), asfloat(u[((16u + start_byte_offset) / 16u)]));
}
-S v_2(uint start_byte_offset) {
- int v_3 = asint(u[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]);
- float2x4 v_4 = v((16u + start_byte_offset));
- S v_5 = {v_3, v_4, asint(u[((64u + start_byte_offset) / 16u)][(((64u + start_byte_offset) % 16u) / 4u)])};
- return v_5;
+S v_1(uint start_byte_offset) {
+ int v_2 = asint(u[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]);
+ float2x4 v_3 = v((16u + start_byte_offset));
+ S v_4 = {v_2, v_3, asint(u[((64u + start_byte_offset) / 16u)][(((64u + start_byte_offset) % 16u) / 4u)])};
+ return v_4;
}
typedef S ary_ret[4];
-ary_ret v_6(uint start_byte_offset) {
+ary_ret v_5(uint start_byte_offset) {
S a[4] = (S[4])0;
{
- uint v_7 = 0u;
- v_7 = 0u;
+ uint v_6 = 0u;
+ v_6 = 0u;
while(true) {
- uint v_8 = v_7;
- if ((v_8 >= 4u)) {
+ uint v_7 = v_6;
+ if ((v_7 >= 4u)) {
break;
}
- S v_9 = v_2((start_byte_offset + (v_8 * 128u)));
- a[v_8] = v_9;
+ S v_8 = v_1((start_byte_offset + (v_7 * 128u)));
+ a[v_7] = v_8;
{
- v_7 = (v_8 + 1u);
+ v_6 = (v_7 + 1u);
}
continue;
}
}
- S v_10[4] = a;
- return v_10;
+ S v_9[4] = a;
+ return v_9;
}
void f_inner(uint tint_local_index) {
{
- uint v_11 = 0u;
- v_11 = tint_local_index;
+ uint v_10 = 0u;
+ v_10 = tint_local_index;
while(true) {
- uint v_12 = v_11;
- if ((v_12 >= 4u)) {
+ uint v_11 = v_10;
+ if ((v_11 >= 4u)) {
break;
}
- S v_13 = (S)0;
- w[v_12] = v_13;
+ S v_12 = (S)0;
+ w[v_11] = v_12;
{
- v_11 = (v_12 + 1u);
+ v_10 = (v_11 + 1u);
}
continue;
}
}
GroupMemoryBarrierWithGroupSync();
- S v_14[4] = v_6(0u);
- w = v_14;
- S v_15 = v_2(256u);
- w[int(1)] = v_15;
+ S v_13[4] = v_5(0u);
+ w = v_13;
+ S v_14 = v_1(256u);
+ w[int(1)] = v_14;
w[int(3)].m = v(272u);
w[int(1)].m[int(0)] = asfloat(u[2u]).ywxz;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x3_f32/dynamic_index_via_ptr.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat3x3_f32/dynamic_index_via_ptr.wgsl.expected.ir.dxc.hlsl
index 8e45147..11a6f9d 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x3_f32/dynamic_index_via_ptr.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat3x3_f32/dynamic_index_via_ptr.wgsl.expected.ir.dxc.hlsl
@@ -17,80 +17,78 @@
}
float3x3 v(uint start_byte_offset) {
- float3 v_1 = asfloat(a[(start_byte_offset / 16u)].xyz);
- float3 v_2 = asfloat(a[((16u + start_byte_offset) / 16u)].xyz);
- return float3x3(v_1, v_2, asfloat(a[((32u + start_byte_offset) / 16u)].xyz));
+ return float3x3(asfloat(a[(start_byte_offset / 16u)].xyz), asfloat(a[((16u + start_byte_offset) / 16u)].xyz), asfloat(a[((32u + start_byte_offset) / 16u)].xyz));
}
-Inner v_3(uint start_byte_offset) {
- Inner v_4 = {v(start_byte_offset)};
- return v_4;
+Inner v_1(uint start_byte_offset) {
+ Inner v_2 = {v(start_byte_offset)};
+ return v_2;
}
typedef Inner ary_ret[4];
-ary_ret v_5(uint start_byte_offset) {
+ary_ret v_3(uint start_byte_offset) {
Inner a_2[4] = (Inner[4])0;
{
- uint v_6 = 0u;
- v_6 = 0u;
+ uint v_4 = 0u;
+ v_4 = 0u;
while(true) {
- uint v_7 = v_6;
- if ((v_7 >= 4u)) {
+ uint v_5 = v_4;
+ if ((v_5 >= 4u)) {
break;
}
- Inner v_8 = v_3((start_byte_offset + (v_7 * 64u)));
- a_2[v_7] = v_8;
+ Inner v_6 = v_1((start_byte_offset + (v_5 * 64u)));
+ a_2[v_5] = v_6;
{
- v_6 = (v_7 + 1u);
+ v_4 = (v_5 + 1u);
}
continue;
}
}
- Inner v_9[4] = a_2;
- return v_9;
+ Inner v_7[4] = a_2;
+ return v_7;
}
-Outer v_10(uint start_byte_offset) {
- Inner v_11[4] = v_5(start_byte_offset);
- Outer v_12 = {v_11};
- return v_12;
+Outer v_8(uint start_byte_offset) {
+ Inner v_9[4] = v_3(start_byte_offset);
+ Outer v_10 = {v_9};
+ return v_10;
}
typedef Outer ary_ret_1[4];
-ary_ret_1 v_13(uint start_byte_offset) {
+ary_ret_1 v_11(uint start_byte_offset) {
Outer a_1[4] = (Outer[4])0;
{
- uint v_14 = 0u;
- v_14 = 0u;
+ uint v_12 = 0u;
+ v_12 = 0u;
while(true) {
- uint v_15 = v_14;
- if ((v_15 >= 4u)) {
+ uint v_13 = v_12;
+ if ((v_13 >= 4u)) {
break;
}
- Outer v_16 = v_10((start_byte_offset + (v_15 * 256u)));
- a_1[v_15] = v_16;
+ Outer v_14 = v_8((start_byte_offset + (v_13 * 256u)));
+ a_1[v_13] = v_14;
{
- v_14 = (v_15 + 1u);
+ v_12 = (v_13 + 1u);
}
continue;
}
}
- Outer v_17[4] = a_1;
- return v_17;
+ Outer v_15[4] = a_1;
+ return v_15;
}
[numthreads(1, 1, 1)]
void f() {
- uint v_18 = (256u * uint(i()));
- uint v_19 = (64u * uint(i()));
- uint v_20 = (16u * uint(i()));
- Outer l_a[4] = v_13(0u);
- Outer l_a_i = v_10(v_18);
- Inner l_a_i_a[4] = v_5(v_18);
- Inner l_a_i_a_i = v_3((v_18 + v_19));
- float3x3 l_a_i_a_i_m = v((v_18 + v_19));
- float3 l_a_i_a_i_m_i = asfloat(a[(((v_18 + v_19) + v_20) / 16u)].xyz);
- uint v_21 = (((v_18 + v_19) + v_20) + (uint(i()) * 4u));
- float l_a_i_a_i_m_i_i = asfloat(a[(v_21 / 16u)][((v_21 % 16u) / 4u)]);
+ uint v_16 = (256u * uint(i()));
+ uint v_17 = (64u * uint(i()));
+ uint v_18 = (16u * uint(i()));
+ Outer l_a[4] = v_11(0u);
+ Outer l_a_i = v_8(v_16);
+ Inner l_a_i_a[4] = v_3(v_16);
+ Inner l_a_i_a_i = v_1((v_16 + v_17));
+ float3x3 l_a_i_a_i_m = v((v_16 + v_17));
+ float3 l_a_i_a_i_m_i = asfloat(a[(((v_16 + v_17) + v_18) / 16u)].xyz);
+ uint v_19 = (((v_16 + v_17) + v_18) + (uint(i()) * 4u));
+ float l_a_i_a_i_m_i_i = asfloat(a[(v_19 / 16u)][((v_19 % 16u) / 4u)]);
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x3_f32/dynamic_index_via_ptr.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat3x3_f32/dynamic_index_via_ptr.wgsl.expected.ir.fxc.hlsl
index 8e45147..11a6f9d 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x3_f32/dynamic_index_via_ptr.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat3x3_f32/dynamic_index_via_ptr.wgsl.expected.ir.fxc.hlsl
@@ -17,80 +17,78 @@
}
float3x3 v(uint start_byte_offset) {
- float3 v_1 = asfloat(a[(start_byte_offset / 16u)].xyz);
- float3 v_2 = asfloat(a[((16u + start_byte_offset) / 16u)].xyz);
- return float3x3(v_1, v_2, asfloat(a[((32u + start_byte_offset) / 16u)].xyz));
+ return float3x3(asfloat(a[(start_byte_offset / 16u)].xyz), asfloat(a[((16u + start_byte_offset) / 16u)].xyz), asfloat(a[((32u + start_byte_offset) / 16u)].xyz));
}
-Inner v_3(uint start_byte_offset) {
- Inner v_4 = {v(start_byte_offset)};
- return v_4;
+Inner v_1(uint start_byte_offset) {
+ Inner v_2 = {v(start_byte_offset)};
+ return v_2;
}
typedef Inner ary_ret[4];
-ary_ret v_5(uint start_byte_offset) {
+ary_ret v_3(uint start_byte_offset) {
Inner a_2[4] = (Inner[4])0;
{
- uint v_6 = 0u;
- v_6 = 0u;
+ uint v_4 = 0u;
+ v_4 = 0u;
while(true) {
- uint v_7 = v_6;
- if ((v_7 >= 4u)) {
+ uint v_5 = v_4;
+ if ((v_5 >= 4u)) {
break;
}
- Inner v_8 = v_3((start_byte_offset + (v_7 * 64u)));
- a_2[v_7] = v_8;
+ Inner v_6 = v_1((start_byte_offset + (v_5 * 64u)));
+ a_2[v_5] = v_6;
{
- v_6 = (v_7 + 1u);
+ v_4 = (v_5 + 1u);
}
continue;
}
}
- Inner v_9[4] = a_2;
- return v_9;
+ Inner v_7[4] = a_2;
+ return v_7;
}
-Outer v_10(uint start_byte_offset) {
- Inner v_11[4] = v_5(start_byte_offset);
- Outer v_12 = {v_11};
- return v_12;
+Outer v_8(uint start_byte_offset) {
+ Inner v_9[4] = v_3(start_byte_offset);
+ Outer v_10 = {v_9};
+ return v_10;
}
typedef Outer ary_ret_1[4];
-ary_ret_1 v_13(uint start_byte_offset) {
+ary_ret_1 v_11(uint start_byte_offset) {
Outer a_1[4] = (Outer[4])0;
{
- uint v_14 = 0u;
- v_14 = 0u;
+ uint v_12 = 0u;
+ v_12 = 0u;
while(true) {
- uint v_15 = v_14;
- if ((v_15 >= 4u)) {
+ uint v_13 = v_12;
+ if ((v_13 >= 4u)) {
break;
}
- Outer v_16 = v_10((start_byte_offset + (v_15 * 256u)));
- a_1[v_15] = v_16;
+ Outer v_14 = v_8((start_byte_offset + (v_13 * 256u)));
+ a_1[v_13] = v_14;
{
- v_14 = (v_15 + 1u);
+ v_12 = (v_13 + 1u);
}
continue;
}
}
- Outer v_17[4] = a_1;
- return v_17;
+ Outer v_15[4] = a_1;
+ return v_15;
}
[numthreads(1, 1, 1)]
void f() {
- uint v_18 = (256u * uint(i()));
- uint v_19 = (64u * uint(i()));
- uint v_20 = (16u * uint(i()));
- Outer l_a[4] = v_13(0u);
- Outer l_a_i = v_10(v_18);
- Inner l_a_i_a[4] = v_5(v_18);
- Inner l_a_i_a_i = v_3((v_18 + v_19));
- float3x3 l_a_i_a_i_m = v((v_18 + v_19));
- float3 l_a_i_a_i_m_i = asfloat(a[(((v_18 + v_19) + v_20) / 16u)].xyz);
- uint v_21 = (((v_18 + v_19) + v_20) + (uint(i()) * 4u));
- float l_a_i_a_i_m_i_i = asfloat(a[(v_21 / 16u)][((v_21 % 16u) / 4u)]);
+ uint v_16 = (256u * uint(i()));
+ uint v_17 = (64u * uint(i()));
+ uint v_18 = (16u * uint(i()));
+ Outer l_a[4] = v_11(0u);
+ Outer l_a_i = v_8(v_16);
+ Inner l_a_i_a[4] = v_3(v_16);
+ Inner l_a_i_a_i = v_1((v_16 + v_17));
+ float3x3 l_a_i_a_i_m = v((v_16 + v_17));
+ float3 l_a_i_a_i_m_i = asfloat(a[(((v_16 + v_17) + v_18) / 16u)].xyz);
+ uint v_19 = (((v_16 + v_17) + v_18) + (uint(i()) * 4u));
+ float l_a_i_a_i_m_i_i = asfloat(a[(v_19 / 16u)][((v_19 % 16u) / 4u)]);
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x3_f32/static_index_via_ptr.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat3x3_f32/static_index_via_ptr.wgsl.expected.ir.dxc.hlsl
index 0fddbf7..a18421b 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x3_f32/static_index_via_ptr.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat3x3_f32/static_index_via_ptr.wgsl.expected.ir.dxc.hlsl
@@ -11,74 +11,72 @@
uint4 a[64];
};
float3x3 v(uint start_byte_offset) {
- float3 v_1 = asfloat(a[(start_byte_offset / 16u)].xyz);
- float3 v_2 = asfloat(a[((16u + start_byte_offset) / 16u)].xyz);
- return float3x3(v_1, v_2, asfloat(a[((32u + start_byte_offset) / 16u)].xyz));
+ return float3x3(asfloat(a[(start_byte_offset / 16u)].xyz), asfloat(a[((16u + start_byte_offset) / 16u)].xyz), asfloat(a[((32u + start_byte_offset) / 16u)].xyz));
}
-Inner v_3(uint start_byte_offset) {
- Inner v_4 = {v(start_byte_offset)};
- return v_4;
+Inner v_1(uint start_byte_offset) {
+ Inner v_2 = {v(start_byte_offset)};
+ return v_2;
}
typedef Inner ary_ret[4];
-ary_ret v_5(uint start_byte_offset) {
+ary_ret v_3(uint start_byte_offset) {
Inner a_2[4] = (Inner[4])0;
{
- uint v_6 = 0u;
- v_6 = 0u;
+ uint v_4 = 0u;
+ v_4 = 0u;
while(true) {
- uint v_7 = v_6;
- if ((v_7 >= 4u)) {
+ uint v_5 = v_4;
+ if ((v_5 >= 4u)) {
break;
}
- Inner v_8 = v_3((start_byte_offset + (v_7 * 64u)));
- a_2[v_7] = v_8;
+ Inner v_6 = v_1((start_byte_offset + (v_5 * 64u)));
+ a_2[v_5] = v_6;
{
- v_6 = (v_7 + 1u);
+ v_4 = (v_5 + 1u);
}
continue;
}
}
- Inner v_9[4] = a_2;
- return v_9;
+ Inner v_7[4] = a_2;
+ return v_7;
}
-Outer v_10(uint start_byte_offset) {
- Inner v_11[4] = v_5(start_byte_offset);
- Outer v_12 = {v_11};
- return v_12;
+Outer v_8(uint start_byte_offset) {
+ Inner v_9[4] = v_3(start_byte_offset);
+ Outer v_10 = {v_9};
+ return v_10;
}
typedef Outer ary_ret_1[4];
-ary_ret_1 v_13(uint start_byte_offset) {
+ary_ret_1 v_11(uint start_byte_offset) {
Outer a_1[4] = (Outer[4])0;
{
- uint v_14 = 0u;
- v_14 = 0u;
+ uint v_12 = 0u;
+ v_12 = 0u;
while(true) {
- uint v_15 = v_14;
- if ((v_15 >= 4u)) {
+ uint v_13 = v_12;
+ if ((v_13 >= 4u)) {
break;
}
- Outer v_16 = v_10((start_byte_offset + (v_15 * 256u)));
- a_1[v_15] = v_16;
+ Outer v_14 = v_8((start_byte_offset + (v_13 * 256u)));
+ a_1[v_13] = v_14;
{
- v_14 = (v_15 + 1u);
+ v_12 = (v_13 + 1u);
}
continue;
}
}
- Outer v_17[4] = a_1;
- return v_17;
+ Outer v_15[4] = a_1;
+ return v_15;
}
[numthreads(1, 1, 1)]
void f() {
- Outer l_a[4] = v_13(0u);
- Outer l_a_3 = v_10(768u);
- Inner l_a_3_a[4] = v_5(768u);
- Inner l_a_3_a_2 = v_3(896u);
+ Outer l_a[4] = v_11(0u);
+ Outer l_a_3 = v_8(768u);
+ Inner l_a_3_a[4] = v_3(768u);
+ Inner l_a_3_a_2 = v_1(896u);
float3x3 l_a_3_a_2_m = v(896u);
float3 l_a_3_a_2_m_1 = asfloat(a[57u].xyz);
float l_a_3_a_2_m_1_0 = asfloat(a[57u].x);
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x3_f32/static_index_via_ptr.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat3x3_f32/static_index_via_ptr.wgsl.expected.ir.fxc.hlsl
index 0fddbf7..a18421b 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x3_f32/static_index_via_ptr.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat3x3_f32/static_index_via_ptr.wgsl.expected.ir.fxc.hlsl
@@ -11,74 +11,72 @@
uint4 a[64];
};
float3x3 v(uint start_byte_offset) {
- float3 v_1 = asfloat(a[(start_byte_offset / 16u)].xyz);
- float3 v_2 = asfloat(a[((16u + start_byte_offset) / 16u)].xyz);
- return float3x3(v_1, v_2, asfloat(a[((32u + start_byte_offset) / 16u)].xyz));
+ return float3x3(asfloat(a[(start_byte_offset / 16u)].xyz), asfloat(a[((16u + start_byte_offset) / 16u)].xyz), asfloat(a[((32u + start_byte_offset) / 16u)].xyz));
}
-Inner v_3(uint start_byte_offset) {
- Inner v_4 = {v(start_byte_offset)};
- return v_4;
+Inner v_1(uint start_byte_offset) {
+ Inner v_2 = {v(start_byte_offset)};
+ return v_2;
}
typedef Inner ary_ret[4];
-ary_ret v_5(uint start_byte_offset) {
+ary_ret v_3(uint start_byte_offset) {
Inner a_2[4] = (Inner[4])0;
{
- uint v_6 = 0u;
- v_6 = 0u;
+ uint v_4 = 0u;
+ v_4 = 0u;
while(true) {
- uint v_7 = v_6;
- if ((v_7 >= 4u)) {
+ uint v_5 = v_4;
+ if ((v_5 >= 4u)) {
break;
}
- Inner v_8 = v_3((start_byte_offset + (v_7 * 64u)));
- a_2[v_7] = v_8;
+ Inner v_6 = v_1((start_byte_offset + (v_5 * 64u)));
+ a_2[v_5] = v_6;
{
- v_6 = (v_7 + 1u);
+ v_4 = (v_5 + 1u);
}
continue;
}
}
- Inner v_9[4] = a_2;
- return v_9;
+ Inner v_7[4] = a_2;
+ return v_7;
}
-Outer v_10(uint start_byte_offset) {
- Inner v_11[4] = v_5(start_byte_offset);
- Outer v_12 = {v_11};
- return v_12;
+Outer v_8(uint start_byte_offset) {
+ Inner v_9[4] = v_3(start_byte_offset);
+ Outer v_10 = {v_9};
+ return v_10;
}
typedef Outer ary_ret_1[4];
-ary_ret_1 v_13(uint start_byte_offset) {
+ary_ret_1 v_11(uint start_byte_offset) {
Outer a_1[4] = (Outer[4])0;
{
- uint v_14 = 0u;
- v_14 = 0u;
+ uint v_12 = 0u;
+ v_12 = 0u;
while(true) {
- uint v_15 = v_14;
- if ((v_15 >= 4u)) {
+ uint v_13 = v_12;
+ if ((v_13 >= 4u)) {
break;
}
- Outer v_16 = v_10((start_byte_offset + (v_15 * 256u)));
- a_1[v_15] = v_16;
+ Outer v_14 = v_8((start_byte_offset + (v_13 * 256u)));
+ a_1[v_13] = v_14;
{
- v_14 = (v_15 + 1u);
+ v_12 = (v_13 + 1u);
}
continue;
}
}
- Outer v_17[4] = a_1;
- return v_17;
+ Outer v_15[4] = a_1;
+ return v_15;
}
[numthreads(1, 1, 1)]
void f() {
- Outer l_a[4] = v_13(0u);
- Outer l_a_3 = v_10(768u);
- Inner l_a_3_a[4] = v_5(768u);
- Inner l_a_3_a_2 = v_3(896u);
+ Outer l_a[4] = v_11(0u);
+ Outer l_a_3 = v_8(768u);
+ Inner l_a_3_a[4] = v_3(768u);
+ Inner l_a_3_a_2 = v_1(896u);
float3x3 l_a_3_a_2_m = v(896u);
float3 l_a_3_a_2_m_1 = asfloat(a[57u].xyz);
float l_a_3_a_2_m_1_0 = asfloat(a[57u].x);
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x3_f32/to_builtin.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat3x3_f32/to_builtin.wgsl.expected.ir.dxc.hlsl
index 93d9217..7110e27 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x3_f32/to_builtin.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat3x3_f32/to_builtin.wgsl.expected.ir.dxc.hlsl
@@ -3,9 +3,7 @@
uint4 u[32];
};
float3x3 v(uint start_byte_offset) {
- float3 v_1 = asfloat(u[(start_byte_offset / 16u)].xyz);
- float3 v_2 = asfloat(u[((16u + start_byte_offset) / 16u)].xyz);
- return float3x3(v_1, v_2, asfloat(u[((32u + start_byte_offset) / 16u)].xyz));
+ return float3x3(asfloat(u[(start_byte_offset / 16u)].xyz), asfloat(u[((16u + start_byte_offset) / 16u)].xyz), asfloat(u[((32u + start_byte_offset) / 16u)].xyz));
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x3_f32/to_builtin.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat3x3_f32/to_builtin.wgsl.expected.ir.fxc.hlsl
index 93d9217..7110e27 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x3_f32/to_builtin.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat3x3_f32/to_builtin.wgsl.expected.ir.fxc.hlsl
@@ -3,9 +3,7 @@
uint4 u[32];
};
float3x3 v(uint start_byte_offset) {
- float3 v_1 = asfloat(u[(start_byte_offset / 16u)].xyz);
- float3 v_2 = asfloat(u[((16u + start_byte_offset) / 16u)].xyz);
- return float3x3(v_1, v_2, asfloat(u[((32u + start_byte_offset) / 16u)].xyz));
+ return float3x3(asfloat(u[(start_byte_offset / 16u)].xyz), asfloat(u[((16u + start_byte_offset) / 16u)].xyz), asfloat(u[((32u + start_byte_offset) / 16u)].xyz));
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x3_f32/to_fn.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat3x3_f32/to_fn.wgsl.expected.ir.dxc.hlsl
index 6f9e5d9..3b9f299 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x3_f32/to_fn.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat3x3_f32/to_fn.wgsl.expected.ir.dxc.hlsl
@@ -24,47 +24,45 @@
}
float3x3 v_1(uint start_byte_offset) {
- float3 v_2 = asfloat(u[(start_byte_offset / 16u)].xyz);
- float3 v_3 = asfloat(u[((16u + start_byte_offset) / 16u)].xyz);
- return float3x3(v_2, v_3, asfloat(u[((32u + start_byte_offset) / 16u)].xyz));
+ return float3x3(asfloat(u[(start_byte_offset / 16u)].xyz), asfloat(u[((16u + start_byte_offset) / 16u)].xyz), asfloat(u[((32u + start_byte_offset) / 16u)].xyz));
}
-S v_4(uint start_byte_offset) {
- int v_5 = asint(u[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]);
- float3x3 v_6 = v_1((16u + start_byte_offset));
- S v_7 = {v_5, v_6, asint(u[((64u + start_byte_offset) / 16u)][(((64u + start_byte_offset) % 16u) / 4u)])};
- return v_7;
+S v_2(uint start_byte_offset) {
+ int v_3 = asint(u[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]);
+ float3x3 v_4 = v_1((16u + start_byte_offset));
+ S v_5 = {v_3, v_4, asint(u[((64u + start_byte_offset) / 16u)][(((64u + start_byte_offset) % 16u) / 4u)])};
+ return v_5;
}
typedef S ary_ret[4];
-ary_ret v_8(uint start_byte_offset) {
+ary_ret v_6(uint start_byte_offset) {
S a_2[4] = (S[4])0;
{
- uint v_9 = 0u;
- v_9 = 0u;
+ uint v_7 = 0u;
+ v_7 = 0u;
while(true) {
- uint v_10 = v_9;
- if ((v_10 >= 4u)) {
+ uint v_8 = v_7;
+ if ((v_8 >= 4u)) {
break;
}
- S v_11 = v_4((start_byte_offset + (v_10 * 128u)));
- a_2[v_10] = v_11;
+ S v_9 = v_2((start_byte_offset + (v_8 * 128u)));
+ a_2[v_8] = v_9;
{
- v_9 = (v_10 + 1u);
+ v_7 = (v_8 + 1u);
}
continue;
}
}
- S v_12[4] = a_2;
- return v_12;
+ S v_10[4] = a_2;
+ return v_10;
}
[numthreads(1, 1, 1)]
void f() {
- S v_13[4] = v_8(0u);
- a(v_13);
- S v_14 = v_4(256u);
- b(v_14);
+ S v_11[4] = v_6(0u);
+ a(v_11);
+ S v_12 = v_2(256u);
+ b(v_12);
c(v_1(272u));
d(asfloat(u[2u].xyz).zxy);
e(asfloat(u[2u].xyz).zxy.x);
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x3_f32/to_fn.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat3x3_f32/to_fn.wgsl.expected.ir.fxc.hlsl
index 6f9e5d9..3b9f299 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x3_f32/to_fn.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat3x3_f32/to_fn.wgsl.expected.ir.fxc.hlsl
@@ -24,47 +24,45 @@
}
float3x3 v_1(uint start_byte_offset) {
- float3 v_2 = asfloat(u[(start_byte_offset / 16u)].xyz);
- float3 v_3 = asfloat(u[((16u + start_byte_offset) / 16u)].xyz);
- return float3x3(v_2, v_3, asfloat(u[((32u + start_byte_offset) / 16u)].xyz));
+ return float3x3(asfloat(u[(start_byte_offset / 16u)].xyz), asfloat(u[((16u + start_byte_offset) / 16u)].xyz), asfloat(u[((32u + start_byte_offset) / 16u)].xyz));
}
-S v_4(uint start_byte_offset) {
- int v_5 = asint(u[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]);
- float3x3 v_6 = v_1((16u + start_byte_offset));
- S v_7 = {v_5, v_6, asint(u[((64u + start_byte_offset) / 16u)][(((64u + start_byte_offset) % 16u) / 4u)])};
- return v_7;
+S v_2(uint start_byte_offset) {
+ int v_3 = asint(u[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]);
+ float3x3 v_4 = v_1((16u + start_byte_offset));
+ S v_5 = {v_3, v_4, asint(u[((64u + start_byte_offset) / 16u)][(((64u + start_byte_offset) % 16u) / 4u)])};
+ return v_5;
}
typedef S ary_ret[4];
-ary_ret v_8(uint start_byte_offset) {
+ary_ret v_6(uint start_byte_offset) {
S a_2[4] = (S[4])0;
{
- uint v_9 = 0u;
- v_9 = 0u;
+ uint v_7 = 0u;
+ v_7 = 0u;
while(true) {
- uint v_10 = v_9;
- if ((v_10 >= 4u)) {
+ uint v_8 = v_7;
+ if ((v_8 >= 4u)) {
break;
}
- S v_11 = v_4((start_byte_offset + (v_10 * 128u)));
- a_2[v_10] = v_11;
+ S v_9 = v_2((start_byte_offset + (v_8 * 128u)));
+ a_2[v_8] = v_9;
{
- v_9 = (v_10 + 1u);
+ v_7 = (v_8 + 1u);
}
continue;
}
}
- S v_12[4] = a_2;
- return v_12;
+ S v_10[4] = a_2;
+ return v_10;
}
[numthreads(1, 1, 1)]
void f() {
- S v_13[4] = v_8(0u);
- a(v_13);
- S v_14 = v_4(256u);
- b(v_14);
+ S v_11[4] = v_6(0u);
+ a(v_11);
+ S v_12 = v_2(256u);
+ b(v_12);
c(v_1(272u));
d(asfloat(u[2u].xyz).zxy);
e(asfloat(u[2u].xyz).zxy.x);
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x3_f32/to_private.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat3x3_f32/to_private.wgsl.expected.ir.dxc.hlsl
index 39826bd..4a7e854 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x3_f32/to_private.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat3x3_f32/to_private.wgsl.expected.ir.dxc.hlsl
@@ -10,47 +10,45 @@
};
static S p[4] = (S[4])0;
float3x3 v(uint start_byte_offset) {
- float3 v_1 = asfloat(u[(start_byte_offset / 16u)].xyz);
- float3 v_2 = asfloat(u[((16u + start_byte_offset) / 16u)].xyz);
- return float3x3(v_1, v_2, asfloat(u[((32u + start_byte_offset) / 16u)].xyz));
+ return float3x3(asfloat(u[(start_byte_offset / 16u)].xyz), asfloat(u[((16u + start_byte_offset) / 16u)].xyz), asfloat(u[((32u + start_byte_offset) / 16u)].xyz));
}
-S v_3(uint start_byte_offset) {
- int v_4 = asint(u[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]);
- float3x3 v_5 = v((16u + start_byte_offset));
- S v_6 = {v_4, v_5, asint(u[((64u + start_byte_offset) / 16u)][(((64u + start_byte_offset) % 16u) / 4u)])};
- return v_6;
+S v_1(uint start_byte_offset) {
+ int v_2 = asint(u[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]);
+ float3x3 v_3 = v((16u + start_byte_offset));
+ S v_4 = {v_2, v_3, asint(u[((64u + start_byte_offset) / 16u)][(((64u + start_byte_offset) % 16u) / 4u)])};
+ return v_4;
}
typedef S ary_ret[4];
-ary_ret v_7(uint start_byte_offset) {
+ary_ret v_5(uint start_byte_offset) {
S a[4] = (S[4])0;
{
- uint v_8 = 0u;
- v_8 = 0u;
+ uint v_6 = 0u;
+ v_6 = 0u;
while(true) {
- uint v_9 = v_8;
- if ((v_9 >= 4u)) {
+ uint v_7 = v_6;
+ if ((v_7 >= 4u)) {
break;
}
- S v_10 = v_3((start_byte_offset + (v_9 * 128u)));
- a[v_9] = v_10;
+ S v_8 = v_1((start_byte_offset + (v_7 * 128u)));
+ a[v_7] = v_8;
{
- v_8 = (v_9 + 1u);
+ v_6 = (v_7 + 1u);
}
continue;
}
}
- S v_11[4] = a;
- return v_11;
+ S v_9[4] = a;
+ return v_9;
}
[numthreads(1, 1, 1)]
void f() {
- S v_12[4] = v_7(0u);
- p = v_12;
- S v_13 = v_3(256u);
- p[int(1)] = v_13;
+ S v_10[4] = v_5(0u);
+ p = v_10;
+ S v_11 = v_1(256u);
+ p[int(1)] = v_11;
p[int(3)].m = v(272u);
p[int(1)].m[int(0)] = asfloat(u[2u].xyz).zxy;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x3_f32/to_private.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat3x3_f32/to_private.wgsl.expected.ir.fxc.hlsl
index 39826bd..4a7e854 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x3_f32/to_private.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat3x3_f32/to_private.wgsl.expected.ir.fxc.hlsl
@@ -10,47 +10,45 @@
};
static S p[4] = (S[4])0;
float3x3 v(uint start_byte_offset) {
- float3 v_1 = asfloat(u[(start_byte_offset / 16u)].xyz);
- float3 v_2 = asfloat(u[((16u + start_byte_offset) / 16u)].xyz);
- return float3x3(v_1, v_2, asfloat(u[((32u + start_byte_offset) / 16u)].xyz));
+ return float3x3(asfloat(u[(start_byte_offset / 16u)].xyz), asfloat(u[((16u + start_byte_offset) / 16u)].xyz), asfloat(u[((32u + start_byte_offset) / 16u)].xyz));
}
-S v_3(uint start_byte_offset) {
- int v_4 = asint(u[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]);
- float3x3 v_5 = v((16u + start_byte_offset));
- S v_6 = {v_4, v_5, asint(u[((64u + start_byte_offset) / 16u)][(((64u + start_byte_offset) % 16u) / 4u)])};
- return v_6;
+S v_1(uint start_byte_offset) {
+ int v_2 = asint(u[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]);
+ float3x3 v_3 = v((16u + start_byte_offset));
+ S v_4 = {v_2, v_3, asint(u[((64u + start_byte_offset) / 16u)][(((64u + start_byte_offset) % 16u) / 4u)])};
+ return v_4;
}
typedef S ary_ret[4];
-ary_ret v_7(uint start_byte_offset) {
+ary_ret v_5(uint start_byte_offset) {
S a[4] = (S[4])0;
{
- uint v_8 = 0u;
- v_8 = 0u;
+ uint v_6 = 0u;
+ v_6 = 0u;
while(true) {
- uint v_9 = v_8;
- if ((v_9 >= 4u)) {
+ uint v_7 = v_6;
+ if ((v_7 >= 4u)) {
break;
}
- S v_10 = v_3((start_byte_offset + (v_9 * 128u)));
- a[v_9] = v_10;
+ S v_8 = v_1((start_byte_offset + (v_7 * 128u)));
+ a[v_7] = v_8;
{
- v_8 = (v_9 + 1u);
+ v_6 = (v_7 + 1u);
}
continue;
}
}
- S v_11[4] = a;
- return v_11;
+ S v_9[4] = a;
+ return v_9;
}
[numthreads(1, 1, 1)]
void f() {
- S v_12[4] = v_7(0u);
- p = v_12;
- S v_13 = v_3(256u);
- p[int(1)] = v_13;
+ S v_10[4] = v_5(0u);
+ p = v_10;
+ S v_11 = v_1(256u);
+ p[int(1)] = v_11;
p[int(3)].m = v(272u);
p[int(1)].m[int(0)] = asfloat(u[2u].xyz).zxy;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x3_f32/to_storage.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat3x3_f32/to_storage.wgsl.expected.ir.dxc.hlsl
index 0a30035..09f9558 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x3_f32/to_storage.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat3x3_f32/to_storage.wgsl.expected.ir.dxc.hlsl
@@ -16,37 +16,35 @@
}
float3x3 v_1(uint start_byte_offset) {
- float3 v_2 = asfloat(u[(start_byte_offset / 16u)].xyz);
- float3 v_3 = asfloat(u[((16u + start_byte_offset) / 16u)].xyz);
- return float3x3(v_2, v_3, asfloat(u[((32u + start_byte_offset) / 16u)].xyz));
+ return float3x3(asfloat(u[(start_byte_offset / 16u)].xyz), asfloat(u[((16u + start_byte_offset) / 16u)].xyz), asfloat(u[((32u + start_byte_offset) / 16u)].xyz));
}
-void v_4(uint offset, S obj) {
+void v_2(uint offset, S obj) {
s.Store((offset + 0u), asuint(obj.before));
v((offset + 16u), obj.m);
s.Store((offset + 64u), asuint(obj.after));
}
-S v_5(uint start_byte_offset) {
- int v_6 = asint(u[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]);
- float3x3 v_7 = v_1((16u + start_byte_offset));
- S v_8 = {v_6, v_7, asint(u[((64u + start_byte_offset) / 16u)][(((64u + start_byte_offset) % 16u) / 4u)])};
- return v_8;
+S v_3(uint start_byte_offset) {
+ int v_4 = asint(u[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]);
+ float3x3 v_5 = v_1((16u + start_byte_offset));
+ S v_6 = {v_4, v_5, asint(u[((64u + start_byte_offset) / 16u)][(((64u + start_byte_offset) % 16u) / 4u)])};
+ return v_6;
}
-void v_9(uint offset, S obj[4]) {
+void v_7(uint offset, S obj[4]) {
{
- uint v_10 = 0u;
- v_10 = 0u;
+ uint v_8 = 0u;
+ v_8 = 0u;
while(true) {
- uint v_11 = v_10;
- if ((v_11 >= 4u)) {
+ uint v_9 = v_8;
+ if ((v_9 >= 4u)) {
break;
}
- S v_12 = obj[v_11];
- v_4((offset + (v_11 * 128u)), v_12);
+ S v_10 = obj[v_9];
+ v_2((offset + (v_9 * 128u)), v_10);
{
- v_10 = (v_11 + 1u);
+ v_8 = (v_9 + 1u);
}
continue;
}
@@ -54,34 +52,34 @@
}
typedef S ary_ret[4];
-ary_ret v_13(uint start_byte_offset) {
+ary_ret v_11(uint start_byte_offset) {
S a[4] = (S[4])0;
{
- uint v_14 = 0u;
- v_14 = 0u;
+ uint v_12 = 0u;
+ v_12 = 0u;
while(true) {
- uint v_15 = v_14;
- if ((v_15 >= 4u)) {
+ uint v_13 = v_12;
+ if ((v_13 >= 4u)) {
break;
}
- S v_16 = v_5((start_byte_offset + (v_15 * 128u)));
- a[v_15] = v_16;
+ S v_14 = v_3((start_byte_offset + (v_13 * 128u)));
+ a[v_13] = v_14;
{
- v_14 = (v_15 + 1u);
+ v_12 = (v_13 + 1u);
}
continue;
}
}
- S v_17[4] = a;
- return v_17;
+ S v_15[4] = a;
+ return v_15;
}
[numthreads(1, 1, 1)]
void f() {
- S v_18[4] = v_13(0u);
- v_9(0u, v_18);
- S v_19 = v_5(256u);
- v_4(128u, v_19);
+ S v_16[4] = v_11(0u);
+ v_7(0u, v_16);
+ S v_17 = v_3(256u);
+ v_2(128u, v_17);
v(400u, v_1(272u));
s.Store3(144u, asuint(asfloat(u[2u].xyz).zxy));
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x3_f32/to_storage.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat3x3_f32/to_storage.wgsl.expected.ir.fxc.hlsl
index 0a30035..09f9558 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x3_f32/to_storage.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat3x3_f32/to_storage.wgsl.expected.ir.fxc.hlsl
@@ -16,37 +16,35 @@
}
float3x3 v_1(uint start_byte_offset) {
- float3 v_2 = asfloat(u[(start_byte_offset / 16u)].xyz);
- float3 v_3 = asfloat(u[((16u + start_byte_offset) / 16u)].xyz);
- return float3x3(v_2, v_3, asfloat(u[((32u + start_byte_offset) / 16u)].xyz));
+ return float3x3(asfloat(u[(start_byte_offset / 16u)].xyz), asfloat(u[((16u + start_byte_offset) / 16u)].xyz), asfloat(u[((32u + start_byte_offset) / 16u)].xyz));
}
-void v_4(uint offset, S obj) {
+void v_2(uint offset, S obj) {
s.Store((offset + 0u), asuint(obj.before));
v((offset + 16u), obj.m);
s.Store((offset + 64u), asuint(obj.after));
}
-S v_5(uint start_byte_offset) {
- int v_6 = asint(u[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]);
- float3x3 v_7 = v_1((16u + start_byte_offset));
- S v_8 = {v_6, v_7, asint(u[((64u + start_byte_offset) / 16u)][(((64u + start_byte_offset) % 16u) / 4u)])};
- return v_8;
+S v_3(uint start_byte_offset) {
+ int v_4 = asint(u[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]);
+ float3x3 v_5 = v_1((16u + start_byte_offset));
+ S v_6 = {v_4, v_5, asint(u[((64u + start_byte_offset) / 16u)][(((64u + start_byte_offset) % 16u) / 4u)])};
+ return v_6;
}
-void v_9(uint offset, S obj[4]) {
+void v_7(uint offset, S obj[4]) {
{
- uint v_10 = 0u;
- v_10 = 0u;
+ uint v_8 = 0u;
+ v_8 = 0u;
while(true) {
- uint v_11 = v_10;
- if ((v_11 >= 4u)) {
+ uint v_9 = v_8;
+ if ((v_9 >= 4u)) {
break;
}
- S v_12 = obj[v_11];
- v_4((offset + (v_11 * 128u)), v_12);
+ S v_10 = obj[v_9];
+ v_2((offset + (v_9 * 128u)), v_10);
{
- v_10 = (v_11 + 1u);
+ v_8 = (v_9 + 1u);
}
continue;
}
@@ -54,34 +52,34 @@
}
typedef S ary_ret[4];
-ary_ret v_13(uint start_byte_offset) {
+ary_ret v_11(uint start_byte_offset) {
S a[4] = (S[4])0;
{
- uint v_14 = 0u;
- v_14 = 0u;
+ uint v_12 = 0u;
+ v_12 = 0u;
while(true) {
- uint v_15 = v_14;
- if ((v_15 >= 4u)) {
+ uint v_13 = v_12;
+ if ((v_13 >= 4u)) {
break;
}
- S v_16 = v_5((start_byte_offset + (v_15 * 128u)));
- a[v_15] = v_16;
+ S v_14 = v_3((start_byte_offset + (v_13 * 128u)));
+ a[v_13] = v_14;
{
- v_14 = (v_15 + 1u);
+ v_12 = (v_13 + 1u);
}
continue;
}
}
- S v_17[4] = a;
- return v_17;
+ S v_15[4] = a;
+ return v_15;
}
[numthreads(1, 1, 1)]
void f() {
- S v_18[4] = v_13(0u);
- v_9(0u, v_18);
- S v_19 = v_5(256u);
- v_4(128u, v_19);
+ S v_16[4] = v_11(0u);
+ v_7(0u, v_16);
+ S v_17 = v_3(256u);
+ v_2(128u, v_17);
v(400u, v_1(272u));
s.Store3(144u, asuint(asfloat(u[2u].xyz).zxy));
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x3_f32/to_workgroup.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat3x3_f32/to_workgroup.wgsl.expected.ir.dxc.hlsl
index 32300ba..06a885e 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x3_f32/to_workgroup.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat3x3_f32/to_workgroup.wgsl.expected.ir.dxc.hlsl
@@ -14,63 +14,61 @@
};
groupshared S w[4];
float3x3 v(uint start_byte_offset) {
- float3 v_1 = asfloat(u[(start_byte_offset / 16u)].xyz);
- float3 v_2 = asfloat(u[((16u + start_byte_offset) / 16u)].xyz);
- return float3x3(v_1, v_2, asfloat(u[((32u + start_byte_offset) / 16u)].xyz));
+ return float3x3(asfloat(u[(start_byte_offset / 16u)].xyz), asfloat(u[((16u + start_byte_offset) / 16u)].xyz), asfloat(u[((32u + start_byte_offset) / 16u)].xyz));
}
-S v_3(uint start_byte_offset) {
- int v_4 = asint(u[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]);
- float3x3 v_5 = v((16u + start_byte_offset));
- S v_6 = {v_4, v_5, asint(u[((64u + start_byte_offset) / 16u)][(((64u + start_byte_offset) % 16u) / 4u)])};
- return v_6;
+S v_1(uint start_byte_offset) {
+ int v_2 = asint(u[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]);
+ float3x3 v_3 = v((16u + start_byte_offset));
+ S v_4 = {v_2, v_3, asint(u[((64u + start_byte_offset) / 16u)][(((64u + start_byte_offset) % 16u) / 4u)])};
+ return v_4;
}
typedef S ary_ret[4];
-ary_ret v_7(uint start_byte_offset) {
+ary_ret v_5(uint start_byte_offset) {
S a[4] = (S[4])0;
{
- uint v_8 = 0u;
- v_8 = 0u;
+ uint v_6 = 0u;
+ v_6 = 0u;
while(true) {
- uint v_9 = v_8;
- if ((v_9 >= 4u)) {
+ uint v_7 = v_6;
+ if ((v_7 >= 4u)) {
break;
}
- S v_10 = v_3((start_byte_offset + (v_9 * 128u)));
- a[v_9] = v_10;
+ S v_8 = v_1((start_byte_offset + (v_7 * 128u)));
+ a[v_7] = v_8;
{
- v_8 = (v_9 + 1u);
+ v_6 = (v_7 + 1u);
}
continue;
}
}
- S v_11[4] = a;
- return v_11;
+ S v_9[4] = a;
+ return v_9;
}
void f_inner(uint tint_local_index) {
{
- uint v_12 = 0u;
- v_12 = tint_local_index;
+ uint v_10 = 0u;
+ v_10 = tint_local_index;
while(true) {
- uint v_13 = v_12;
- if ((v_13 >= 4u)) {
+ uint v_11 = v_10;
+ if ((v_11 >= 4u)) {
break;
}
- S v_14 = (S)0;
- w[v_13] = v_14;
+ S v_12 = (S)0;
+ w[v_11] = v_12;
{
- v_12 = (v_13 + 1u);
+ v_10 = (v_11 + 1u);
}
continue;
}
}
GroupMemoryBarrierWithGroupSync();
- S v_15[4] = v_7(0u);
- w = v_15;
- S v_16 = v_3(256u);
- w[int(1)] = v_16;
+ S v_13[4] = v_5(0u);
+ w = v_13;
+ S v_14 = v_1(256u);
+ w[int(1)] = v_14;
w[int(3)].m = v(272u);
w[int(1)].m[int(0)] = asfloat(u[2u].xyz).zxy;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x3_f32/to_workgroup.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat3x3_f32/to_workgroup.wgsl.expected.ir.fxc.hlsl
index 32300ba..06a885e 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x3_f32/to_workgroup.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat3x3_f32/to_workgroup.wgsl.expected.ir.fxc.hlsl
@@ -14,63 +14,61 @@
};
groupshared S w[4];
float3x3 v(uint start_byte_offset) {
- float3 v_1 = asfloat(u[(start_byte_offset / 16u)].xyz);
- float3 v_2 = asfloat(u[((16u + start_byte_offset) / 16u)].xyz);
- return float3x3(v_1, v_2, asfloat(u[((32u + start_byte_offset) / 16u)].xyz));
+ return float3x3(asfloat(u[(start_byte_offset / 16u)].xyz), asfloat(u[((16u + start_byte_offset) / 16u)].xyz), asfloat(u[((32u + start_byte_offset) / 16u)].xyz));
}
-S v_3(uint start_byte_offset) {
- int v_4 = asint(u[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]);
- float3x3 v_5 = v((16u + start_byte_offset));
- S v_6 = {v_4, v_5, asint(u[((64u + start_byte_offset) / 16u)][(((64u + start_byte_offset) % 16u) / 4u)])};
- return v_6;
+S v_1(uint start_byte_offset) {
+ int v_2 = asint(u[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]);
+ float3x3 v_3 = v((16u + start_byte_offset));
+ S v_4 = {v_2, v_3, asint(u[((64u + start_byte_offset) / 16u)][(((64u + start_byte_offset) % 16u) / 4u)])};
+ return v_4;
}
typedef S ary_ret[4];
-ary_ret v_7(uint start_byte_offset) {
+ary_ret v_5(uint start_byte_offset) {
S a[4] = (S[4])0;
{
- uint v_8 = 0u;
- v_8 = 0u;
+ uint v_6 = 0u;
+ v_6 = 0u;
while(true) {
- uint v_9 = v_8;
- if ((v_9 >= 4u)) {
+ uint v_7 = v_6;
+ if ((v_7 >= 4u)) {
break;
}
- S v_10 = v_3((start_byte_offset + (v_9 * 128u)));
- a[v_9] = v_10;
+ S v_8 = v_1((start_byte_offset + (v_7 * 128u)));
+ a[v_7] = v_8;
{
- v_8 = (v_9 + 1u);
+ v_6 = (v_7 + 1u);
}
continue;
}
}
- S v_11[4] = a;
- return v_11;
+ S v_9[4] = a;
+ return v_9;
}
void f_inner(uint tint_local_index) {
{
- uint v_12 = 0u;
- v_12 = tint_local_index;
+ uint v_10 = 0u;
+ v_10 = tint_local_index;
while(true) {
- uint v_13 = v_12;
- if ((v_13 >= 4u)) {
+ uint v_11 = v_10;
+ if ((v_11 >= 4u)) {
break;
}
- S v_14 = (S)0;
- w[v_13] = v_14;
+ S v_12 = (S)0;
+ w[v_11] = v_12;
{
- v_12 = (v_13 + 1u);
+ v_10 = (v_11 + 1u);
}
continue;
}
}
GroupMemoryBarrierWithGroupSync();
- S v_15[4] = v_7(0u);
- w = v_15;
- S v_16 = v_3(256u);
- w[int(1)] = v_16;
+ S v_13[4] = v_5(0u);
+ w = v_13;
+ S v_14 = v_1(256u);
+ w[int(1)] = v_14;
w[int(3)].m = v(272u);
w[int(1)].m[int(0)] = asfloat(u[2u].xyz).zxy;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x4_f32/dynamic_index_via_ptr.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat3x4_f32/dynamic_index_via_ptr.wgsl.expected.ir.dxc.hlsl
index a752ac8..12ac2d6 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x4_f32/dynamic_index_via_ptr.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat3x4_f32/dynamic_index_via_ptr.wgsl.expected.ir.dxc.hlsl
@@ -17,80 +17,78 @@
}
float3x4 v(uint start_byte_offset) {
- float4 v_1 = asfloat(a[(start_byte_offset / 16u)]);
- float4 v_2 = asfloat(a[((16u + start_byte_offset) / 16u)]);
- return float3x4(v_1, v_2, asfloat(a[((32u + start_byte_offset) / 16u)]));
+ return float3x4(asfloat(a[(start_byte_offset / 16u)]), asfloat(a[((16u + start_byte_offset) / 16u)]), asfloat(a[((32u + start_byte_offset) / 16u)]));
}
-Inner v_3(uint start_byte_offset) {
- Inner v_4 = {v(start_byte_offset)};
- return v_4;
+Inner v_1(uint start_byte_offset) {
+ Inner v_2 = {v(start_byte_offset)};
+ return v_2;
}
typedef Inner ary_ret[4];
-ary_ret v_5(uint start_byte_offset) {
+ary_ret v_3(uint start_byte_offset) {
Inner a_2[4] = (Inner[4])0;
{
- uint v_6 = 0u;
- v_6 = 0u;
+ uint v_4 = 0u;
+ v_4 = 0u;
while(true) {
- uint v_7 = v_6;
- if ((v_7 >= 4u)) {
+ uint v_5 = v_4;
+ if ((v_5 >= 4u)) {
break;
}
- Inner v_8 = v_3((start_byte_offset + (v_7 * 64u)));
- a_2[v_7] = v_8;
+ Inner v_6 = v_1((start_byte_offset + (v_5 * 64u)));
+ a_2[v_5] = v_6;
{
- v_6 = (v_7 + 1u);
+ v_4 = (v_5 + 1u);
}
continue;
}
}
- Inner v_9[4] = a_2;
- return v_9;
+ Inner v_7[4] = a_2;
+ return v_7;
}
-Outer v_10(uint start_byte_offset) {
- Inner v_11[4] = v_5(start_byte_offset);
- Outer v_12 = {v_11};
- return v_12;
+Outer v_8(uint start_byte_offset) {
+ Inner v_9[4] = v_3(start_byte_offset);
+ Outer v_10 = {v_9};
+ return v_10;
}
typedef Outer ary_ret_1[4];
-ary_ret_1 v_13(uint start_byte_offset) {
+ary_ret_1 v_11(uint start_byte_offset) {
Outer a_1[4] = (Outer[4])0;
{
- uint v_14 = 0u;
- v_14 = 0u;
+ uint v_12 = 0u;
+ v_12 = 0u;
while(true) {
- uint v_15 = v_14;
- if ((v_15 >= 4u)) {
+ uint v_13 = v_12;
+ if ((v_13 >= 4u)) {
break;
}
- Outer v_16 = v_10((start_byte_offset + (v_15 * 256u)));
- a_1[v_15] = v_16;
+ Outer v_14 = v_8((start_byte_offset + (v_13 * 256u)));
+ a_1[v_13] = v_14;
{
- v_14 = (v_15 + 1u);
+ v_12 = (v_13 + 1u);
}
continue;
}
}
- Outer v_17[4] = a_1;
- return v_17;
+ Outer v_15[4] = a_1;
+ return v_15;
}
[numthreads(1, 1, 1)]
void f() {
- uint v_18 = (256u * uint(i()));
- uint v_19 = (64u * uint(i()));
- uint v_20 = (16u * uint(i()));
- Outer l_a[4] = v_13(0u);
- Outer l_a_i = v_10(v_18);
- Inner l_a_i_a[4] = v_5(v_18);
- Inner l_a_i_a_i = v_3((v_18 + v_19));
- float3x4 l_a_i_a_i_m = v((v_18 + v_19));
- float4 l_a_i_a_i_m_i = asfloat(a[(((v_18 + v_19) + v_20) / 16u)]);
- uint v_21 = (((v_18 + v_19) + v_20) + (uint(i()) * 4u));
- float l_a_i_a_i_m_i_i = asfloat(a[(v_21 / 16u)][((v_21 % 16u) / 4u)]);
+ uint v_16 = (256u * uint(i()));
+ uint v_17 = (64u * uint(i()));
+ uint v_18 = (16u * uint(i()));
+ Outer l_a[4] = v_11(0u);
+ Outer l_a_i = v_8(v_16);
+ Inner l_a_i_a[4] = v_3(v_16);
+ Inner l_a_i_a_i = v_1((v_16 + v_17));
+ float3x4 l_a_i_a_i_m = v((v_16 + v_17));
+ float4 l_a_i_a_i_m_i = asfloat(a[(((v_16 + v_17) + v_18) / 16u)]);
+ uint v_19 = (((v_16 + v_17) + v_18) + (uint(i()) * 4u));
+ float l_a_i_a_i_m_i_i = asfloat(a[(v_19 / 16u)][((v_19 % 16u) / 4u)]);
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x4_f32/dynamic_index_via_ptr.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat3x4_f32/dynamic_index_via_ptr.wgsl.expected.ir.fxc.hlsl
index a752ac8..12ac2d6 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x4_f32/dynamic_index_via_ptr.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat3x4_f32/dynamic_index_via_ptr.wgsl.expected.ir.fxc.hlsl
@@ -17,80 +17,78 @@
}
float3x4 v(uint start_byte_offset) {
- float4 v_1 = asfloat(a[(start_byte_offset / 16u)]);
- float4 v_2 = asfloat(a[((16u + start_byte_offset) / 16u)]);
- return float3x4(v_1, v_2, asfloat(a[((32u + start_byte_offset) / 16u)]));
+ return float3x4(asfloat(a[(start_byte_offset / 16u)]), asfloat(a[((16u + start_byte_offset) / 16u)]), asfloat(a[((32u + start_byte_offset) / 16u)]));
}
-Inner v_3(uint start_byte_offset) {
- Inner v_4 = {v(start_byte_offset)};
- return v_4;
+Inner v_1(uint start_byte_offset) {
+ Inner v_2 = {v(start_byte_offset)};
+ return v_2;
}
typedef Inner ary_ret[4];
-ary_ret v_5(uint start_byte_offset) {
+ary_ret v_3(uint start_byte_offset) {
Inner a_2[4] = (Inner[4])0;
{
- uint v_6 = 0u;
- v_6 = 0u;
+ uint v_4 = 0u;
+ v_4 = 0u;
while(true) {
- uint v_7 = v_6;
- if ((v_7 >= 4u)) {
+ uint v_5 = v_4;
+ if ((v_5 >= 4u)) {
break;
}
- Inner v_8 = v_3((start_byte_offset + (v_7 * 64u)));
- a_2[v_7] = v_8;
+ Inner v_6 = v_1((start_byte_offset + (v_5 * 64u)));
+ a_2[v_5] = v_6;
{
- v_6 = (v_7 + 1u);
+ v_4 = (v_5 + 1u);
}
continue;
}
}
- Inner v_9[4] = a_2;
- return v_9;
+ Inner v_7[4] = a_2;
+ return v_7;
}
-Outer v_10(uint start_byte_offset) {
- Inner v_11[4] = v_5(start_byte_offset);
- Outer v_12 = {v_11};
- return v_12;
+Outer v_8(uint start_byte_offset) {
+ Inner v_9[4] = v_3(start_byte_offset);
+ Outer v_10 = {v_9};
+ return v_10;
}
typedef Outer ary_ret_1[4];
-ary_ret_1 v_13(uint start_byte_offset) {
+ary_ret_1 v_11(uint start_byte_offset) {
Outer a_1[4] = (Outer[4])0;
{
- uint v_14 = 0u;
- v_14 = 0u;
+ uint v_12 = 0u;
+ v_12 = 0u;
while(true) {
- uint v_15 = v_14;
- if ((v_15 >= 4u)) {
+ uint v_13 = v_12;
+ if ((v_13 >= 4u)) {
break;
}
- Outer v_16 = v_10((start_byte_offset + (v_15 * 256u)));
- a_1[v_15] = v_16;
+ Outer v_14 = v_8((start_byte_offset + (v_13 * 256u)));
+ a_1[v_13] = v_14;
{
- v_14 = (v_15 + 1u);
+ v_12 = (v_13 + 1u);
}
continue;
}
}
- Outer v_17[4] = a_1;
- return v_17;
+ Outer v_15[4] = a_1;
+ return v_15;
}
[numthreads(1, 1, 1)]
void f() {
- uint v_18 = (256u * uint(i()));
- uint v_19 = (64u * uint(i()));
- uint v_20 = (16u * uint(i()));
- Outer l_a[4] = v_13(0u);
- Outer l_a_i = v_10(v_18);
- Inner l_a_i_a[4] = v_5(v_18);
- Inner l_a_i_a_i = v_3((v_18 + v_19));
- float3x4 l_a_i_a_i_m = v((v_18 + v_19));
- float4 l_a_i_a_i_m_i = asfloat(a[(((v_18 + v_19) + v_20) / 16u)]);
- uint v_21 = (((v_18 + v_19) + v_20) + (uint(i()) * 4u));
- float l_a_i_a_i_m_i_i = asfloat(a[(v_21 / 16u)][((v_21 % 16u) / 4u)]);
+ uint v_16 = (256u * uint(i()));
+ uint v_17 = (64u * uint(i()));
+ uint v_18 = (16u * uint(i()));
+ Outer l_a[4] = v_11(0u);
+ Outer l_a_i = v_8(v_16);
+ Inner l_a_i_a[4] = v_3(v_16);
+ Inner l_a_i_a_i = v_1((v_16 + v_17));
+ float3x4 l_a_i_a_i_m = v((v_16 + v_17));
+ float4 l_a_i_a_i_m_i = asfloat(a[(((v_16 + v_17) + v_18) / 16u)]);
+ uint v_19 = (((v_16 + v_17) + v_18) + (uint(i()) * 4u));
+ float l_a_i_a_i_m_i_i = asfloat(a[(v_19 / 16u)][((v_19 % 16u) / 4u)]);
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x4_f32/static_index_via_ptr.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat3x4_f32/static_index_via_ptr.wgsl.expected.ir.dxc.hlsl
index 09abd3c..9a2e136 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x4_f32/static_index_via_ptr.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat3x4_f32/static_index_via_ptr.wgsl.expected.ir.dxc.hlsl
@@ -11,74 +11,72 @@
uint4 a[64];
};
float3x4 v(uint start_byte_offset) {
- float4 v_1 = asfloat(a[(start_byte_offset / 16u)]);
- float4 v_2 = asfloat(a[((16u + start_byte_offset) / 16u)]);
- return float3x4(v_1, v_2, asfloat(a[((32u + start_byte_offset) / 16u)]));
+ return float3x4(asfloat(a[(start_byte_offset / 16u)]), asfloat(a[((16u + start_byte_offset) / 16u)]), asfloat(a[((32u + start_byte_offset) / 16u)]));
}
-Inner v_3(uint start_byte_offset) {
- Inner v_4 = {v(start_byte_offset)};
- return v_4;
+Inner v_1(uint start_byte_offset) {
+ Inner v_2 = {v(start_byte_offset)};
+ return v_2;
}
typedef Inner ary_ret[4];
-ary_ret v_5(uint start_byte_offset) {
+ary_ret v_3(uint start_byte_offset) {
Inner a_2[4] = (Inner[4])0;
{
- uint v_6 = 0u;
- v_6 = 0u;
+ uint v_4 = 0u;
+ v_4 = 0u;
while(true) {
- uint v_7 = v_6;
- if ((v_7 >= 4u)) {
+ uint v_5 = v_4;
+ if ((v_5 >= 4u)) {
break;
}
- Inner v_8 = v_3((start_byte_offset + (v_7 * 64u)));
- a_2[v_7] = v_8;
+ Inner v_6 = v_1((start_byte_offset + (v_5 * 64u)));
+ a_2[v_5] = v_6;
{
- v_6 = (v_7 + 1u);
+ v_4 = (v_5 + 1u);
}
continue;
}
}
- Inner v_9[4] = a_2;
- return v_9;
+ Inner v_7[4] = a_2;
+ return v_7;
}
-Outer v_10(uint start_byte_offset) {
- Inner v_11[4] = v_5(start_byte_offset);
- Outer v_12 = {v_11};
- return v_12;
+Outer v_8(uint start_byte_offset) {
+ Inner v_9[4] = v_3(start_byte_offset);
+ Outer v_10 = {v_9};
+ return v_10;
}
typedef Outer ary_ret_1[4];
-ary_ret_1 v_13(uint start_byte_offset) {
+ary_ret_1 v_11(uint start_byte_offset) {
Outer a_1[4] = (Outer[4])0;
{
- uint v_14 = 0u;
- v_14 = 0u;
+ uint v_12 = 0u;
+ v_12 = 0u;
while(true) {
- uint v_15 = v_14;
- if ((v_15 >= 4u)) {
+ uint v_13 = v_12;
+ if ((v_13 >= 4u)) {
break;
}
- Outer v_16 = v_10((start_byte_offset + (v_15 * 256u)));
- a_1[v_15] = v_16;
+ Outer v_14 = v_8((start_byte_offset + (v_13 * 256u)));
+ a_1[v_13] = v_14;
{
- v_14 = (v_15 + 1u);
+ v_12 = (v_13 + 1u);
}
continue;
}
}
- Outer v_17[4] = a_1;
- return v_17;
+ Outer v_15[4] = a_1;
+ return v_15;
}
[numthreads(1, 1, 1)]
void f() {
- Outer l_a[4] = v_13(0u);
- Outer l_a_3 = v_10(768u);
- Inner l_a_3_a[4] = v_5(768u);
- Inner l_a_3_a_2 = v_3(896u);
+ Outer l_a[4] = v_11(0u);
+ Outer l_a_3 = v_8(768u);
+ Inner l_a_3_a[4] = v_3(768u);
+ Inner l_a_3_a_2 = v_1(896u);
float3x4 l_a_3_a_2_m = v(896u);
float4 l_a_3_a_2_m_1 = asfloat(a[57u]);
float l_a_3_a_2_m_1_0 = asfloat(a[57u].x);
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x4_f32/static_index_via_ptr.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat3x4_f32/static_index_via_ptr.wgsl.expected.ir.fxc.hlsl
index 09abd3c..9a2e136 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x4_f32/static_index_via_ptr.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat3x4_f32/static_index_via_ptr.wgsl.expected.ir.fxc.hlsl
@@ -11,74 +11,72 @@
uint4 a[64];
};
float3x4 v(uint start_byte_offset) {
- float4 v_1 = asfloat(a[(start_byte_offset / 16u)]);
- float4 v_2 = asfloat(a[((16u + start_byte_offset) / 16u)]);
- return float3x4(v_1, v_2, asfloat(a[((32u + start_byte_offset) / 16u)]));
+ return float3x4(asfloat(a[(start_byte_offset / 16u)]), asfloat(a[((16u + start_byte_offset) / 16u)]), asfloat(a[((32u + start_byte_offset) / 16u)]));
}
-Inner v_3(uint start_byte_offset) {
- Inner v_4 = {v(start_byte_offset)};
- return v_4;
+Inner v_1(uint start_byte_offset) {
+ Inner v_2 = {v(start_byte_offset)};
+ return v_2;
}
typedef Inner ary_ret[4];
-ary_ret v_5(uint start_byte_offset) {
+ary_ret v_3(uint start_byte_offset) {
Inner a_2[4] = (Inner[4])0;
{
- uint v_6 = 0u;
- v_6 = 0u;
+ uint v_4 = 0u;
+ v_4 = 0u;
while(true) {
- uint v_7 = v_6;
- if ((v_7 >= 4u)) {
+ uint v_5 = v_4;
+ if ((v_5 >= 4u)) {
break;
}
- Inner v_8 = v_3((start_byte_offset + (v_7 * 64u)));
- a_2[v_7] = v_8;
+ Inner v_6 = v_1((start_byte_offset + (v_5 * 64u)));
+ a_2[v_5] = v_6;
{
- v_6 = (v_7 + 1u);
+ v_4 = (v_5 + 1u);
}
continue;
}
}
- Inner v_9[4] = a_2;
- return v_9;
+ Inner v_7[4] = a_2;
+ return v_7;
}
-Outer v_10(uint start_byte_offset) {
- Inner v_11[4] = v_5(start_byte_offset);
- Outer v_12 = {v_11};
- return v_12;
+Outer v_8(uint start_byte_offset) {
+ Inner v_9[4] = v_3(start_byte_offset);
+ Outer v_10 = {v_9};
+ return v_10;
}
typedef Outer ary_ret_1[4];
-ary_ret_1 v_13(uint start_byte_offset) {
+ary_ret_1 v_11(uint start_byte_offset) {
Outer a_1[4] = (Outer[4])0;
{
- uint v_14 = 0u;
- v_14 = 0u;
+ uint v_12 = 0u;
+ v_12 = 0u;
while(true) {
- uint v_15 = v_14;
- if ((v_15 >= 4u)) {
+ uint v_13 = v_12;
+ if ((v_13 >= 4u)) {
break;
}
- Outer v_16 = v_10((start_byte_offset + (v_15 * 256u)));
- a_1[v_15] = v_16;
+ Outer v_14 = v_8((start_byte_offset + (v_13 * 256u)));
+ a_1[v_13] = v_14;
{
- v_14 = (v_15 + 1u);
+ v_12 = (v_13 + 1u);
}
continue;
}
}
- Outer v_17[4] = a_1;
- return v_17;
+ Outer v_15[4] = a_1;
+ return v_15;
}
[numthreads(1, 1, 1)]
void f() {
- Outer l_a[4] = v_13(0u);
- Outer l_a_3 = v_10(768u);
- Inner l_a_3_a[4] = v_5(768u);
- Inner l_a_3_a_2 = v_3(896u);
+ Outer l_a[4] = v_11(0u);
+ Outer l_a_3 = v_8(768u);
+ Inner l_a_3_a[4] = v_3(768u);
+ Inner l_a_3_a_2 = v_1(896u);
float3x4 l_a_3_a_2_m = v(896u);
float4 l_a_3_a_2_m_1 = asfloat(a[57u]);
float l_a_3_a_2_m_1_0 = asfloat(a[57u].x);
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x4_f32/to_builtin.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat3x4_f32/to_builtin.wgsl.expected.ir.dxc.hlsl
index adf79e7..e900a7e 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x4_f32/to_builtin.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat3x4_f32/to_builtin.wgsl.expected.ir.dxc.hlsl
@@ -3,9 +3,7 @@
uint4 u[32];
};
float3x4 v(uint start_byte_offset) {
- float4 v_1 = asfloat(u[(start_byte_offset / 16u)]);
- float4 v_2 = asfloat(u[((16u + start_byte_offset) / 16u)]);
- return float3x4(v_1, v_2, asfloat(u[((32u + start_byte_offset) / 16u)]));
+ return float3x4(asfloat(u[(start_byte_offset / 16u)]), asfloat(u[((16u + start_byte_offset) / 16u)]), asfloat(u[((32u + start_byte_offset) / 16u)]));
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x4_f32/to_builtin.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat3x4_f32/to_builtin.wgsl.expected.ir.fxc.hlsl
index adf79e7..e900a7e 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x4_f32/to_builtin.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat3x4_f32/to_builtin.wgsl.expected.ir.fxc.hlsl
@@ -3,9 +3,7 @@
uint4 u[32];
};
float3x4 v(uint start_byte_offset) {
- float4 v_1 = asfloat(u[(start_byte_offset / 16u)]);
- float4 v_2 = asfloat(u[((16u + start_byte_offset) / 16u)]);
- return float3x4(v_1, v_2, asfloat(u[((32u + start_byte_offset) / 16u)]));
+ return float3x4(asfloat(u[(start_byte_offset / 16u)]), asfloat(u[((16u + start_byte_offset) / 16u)]), asfloat(u[((32u + start_byte_offset) / 16u)]));
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x4_f32/to_fn.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat3x4_f32/to_fn.wgsl.expected.ir.dxc.hlsl
index cbc6bd5..91b40ba 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x4_f32/to_fn.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat3x4_f32/to_fn.wgsl.expected.ir.dxc.hlsl
@@ -24,47 +24,45 @@
}
float3x4 v_1(uint start_byte_offset) {
- float4 v_2 = asfloat(u[(start_byte_offset / 16u)]);
- float4 v_3 = asfloat(u[((16u + start_byte_offset) / 16u)]);
- return float3x4(v_2, v_3, asfloat(u[((32u + start_byte_offset) / 16u)]));
+ return float3x4(asfloat(u[(start_byte_offset / 16u)]), asfloat(u[((16u + start_byte_offset) / 16u)]), asfloat(u[((32u + start_byte_offset) / 16u)]));
}
-S v_4(uint start_byte_offset) {
- int v_5 = asint(u[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]);
- float3x4 v_6 = v_1((16u + start_byte_offset));
- S v_7 = {v_5, v_6, asint(u[((64u + start_byte_offset) / 16u)][(((64u + start_byte_offset) % 16u) / 4u)])};
- return v_7;
+S v_2(uint start_byte_offset) {
+ int v_3 = asint(u[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]);
+ float3x4 v_4 = v_1((16u + start_byte_offset));
+ S v_5 = {v_3, v_4, asint(u[((64u + start_byte_offset) / 16u)][(((64u + start_byte_offset) % 16u) / 4u)])};
+ return v_5;
}
typedef S ary_ret[4];
-ary_ret v_8(uint start_byte_offset) {
+ary_ret v_6(uint start_byte_offset) {
S a_2[4] = (S[4])0;
{
- uint v_9 = 0u;
- v_9 = 0u;
+ uint v_7 = 0u;
+ v_7 = 0u;
while(true) {
- uint v_10 = v_9;
- if ((v_10 >= 4u)) {
+ uint v_8 = v_7;
+ if ((v_8 >= 4u)) {
break;
}
- S v_11 = v_4((start_byte_offset + (v_10 * 128u)));
- a_2[v_10] = v_11;
+ S v_9 = v_2((start_byte_offset + (v_8 * 128u)));
+ a_2[v_8] = v_9;
{
- v_9 = (v_10 + 1u);
+ v_7 = (v_8 + 1u);
}
continue;
}
}
- S v_12[4] = a_2;
- return v_12;
+ S v_10[4] = a_2;
+ return v_10;
}
[numthreads(1, 1, 1)]
void f() {
- S v_13[4] = v_8(0u);
- a(v_13);
- S v_14 = v_4(256u);
- b(v_14);
+ S v_11[4] = v_6(0u);
+ a(v_11);
+ S v_12 = v_2(256u);
+ b(v_12);
c(v_1(272u));
d(asfloat(u[2u]).ywxz);
e(asfloat(u[2u]).ywxz.x);
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x4_f32/to_fn.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat3x4_f32/to_fn.wgsl.expected.ir.fxc.hlsl
index cbc6bd5..91b40ba 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x4_f32/to_fn.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat3x4_f32/to_fn.wgsl.expected.ir.fxc.hlsl
@@ -24,47 +24,45 @@
}
float3x4 v_1(uint start_byte_offset) {
- float4 v_2 = asfloat(u[(start_byte_offset / 16u)]);
- float4 v_3 = asfloat(u[((16u + start_byte_offset) / 16u)]);
- return float3x4(v_2, v_3, asfloat(u[((32u + start_byte_offset) / 16u)]));
+ return float3x4(asfloat(u[(start_byte_offset / 16u)]), asfloat(u[((16u + start_byte_offset) / 16u)]), asfloat(u[((32u + start_byte_offset) / 16u)]));
}
-S v_4(uint start_byte_offset) {
- int v_5 = asint(u[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]);
- float3x4 v_6 = v_1((16u + start_byte_offset));
- S v_7 = {v_5, v_6, asint(u[((64u + start_byte_offset) / 16u)][(((64u + start_byte_offset) % 16u) / 4u)])};
- return v_7;
+S v_2(uint start_byte_offset) {
+ int v_3 = asint(u[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]);
+ float3x4 v_4 = v_1((16u + start_byte_offset));
+ S v_5 = {v_3, v_4, asint(u[((64u + start_byte_offset) / 16u)][(((64u + start_byte_offset) % 16u) / 4u)])};
+ return v_5;
}
typedef S ary_ret[4];
-ary_ret v_8(uint start_byte_offset) {
+ary_ret v_6(uint start_byte_offset) {
S a_2[4] = (S[4])0;
{
- uint v_9 = 0u;
- v_9 = 0u;
+ uint v_7 = 0u;
+ v_7 = 0u;
while(true) {
- uint v_10 = v_9;
- if ((v_10 >= 4u)) {
+ uint v_8 = v_7;
+ if ((v_8 >= 4u)) {
break;
}
- S v_11 = v_4((start_byte_offset + (v_10 * 128u)));
- a_2[v_10] = v_11;
+ S v_9 = v_2((start_byte_offset + (v_8 * 128u)));
+ a_2[v_8] = v_9;
{
- v_9 = (v_10 + 1u);
+ v_7 = (v_8 + 1u);
}
continue;
}
}
- S v_12[4] = a_2;
- return v_12;
+ S v_10[4] = a_2;
+ return v_10;
}
[numthreads(1, 1, 1)]
void f() {
- S v_13[4] = v_8(0u);
- a(v_13);
- S v_14 = v_4(256u);
- b(v_14);
+ S v_11[4] = v_6(0u);
+ a(v_11);
+ S v_12 = v_2(256u);
+ b(v_12);
c(v_1(272u));
d(asfloat(u[2u]).ywxz);
e(asfloat(u[2u]).ywxz.x);
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x4_f32/to_private.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat3x4_f32/to_private.wgsl.expected.ir.dxc.hlsl
index e392536..0483597 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x4_f32/to_private.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat3x4_f32/to_private.wgsl.expected.ir.dxc.hlsl
@@ -10,47 +10,45 @@
};
static S p[4] = (S[4])0;
float3x4 v(uint start_byte_offset) {
- float4 v_1 = asfloat(u[(start_byte_offset / 16u)]);
- float4 v_2 = asfloat(u[((16u + start_byte_offset) / 16u)]);
- return float3x4(v_1, v_2, asfloat(u[((32u + start_byte_offset) / 16u)]));
+ return float3x4(asfloat(u[(start_byte_offset / 16u)]), asfloat(u[((16u + start_byte_offset) / 16u)]), asfloat(u[((32u + start_byte_offset) / 16u)]));
}
-S v_3(uint start_byte_offset) {
- int v_4 = asint(u[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]);
- float3x4 v_5 = v((16u + start_byte_offset));
- S v_6 = {v_4, v_5, asint(u[((64u + start_byte_offset) / 16u)][(((64u + start_byte_offset) % 16u) / 4u)])};
- return v_6;
+S v_1(uint start_byte_offset) {
+ int v_2 = asint(u[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]);
+ float3x4 v_3 = v((16u + start_byte_offset));
+ S v_4 = {v_2, v_3, asint(u[((64u + start_byte_offset) / 16u)][(((64u + start_byte_offset) % 16u) / 4u)])};
+ return v_4;
}
typedef S ary_ret[4];
-ary_ret v_7(uint start_byte_offset) {
+ary_ret v_5(uint start_byte_offset) {
S a[4] = (S[4])0;
{
- uint v_8 = 0u;
- v_8 = 0u;
+ uint v_6 = 0u;
+ v_6 = 0u;
while(true) {
- uint v_9 = v_8;
- if ((v_9 >= 4u)) {
+ uint v_7 = v_6;
+ if ((v_7 >= 4u)) {
break;
}
- S v_10 = v_3((start_byte_offset + (v_9 * 128u)));
- a[v_9] = v_10;
+ S v_8 = v_1((start_byte_offset + (v_7 * 128u)));
+ a[v_7] = v_8;
{
- v_8 = (v_9 + 1u);
+ v_6 = (v_7 + 1u);
}
continue;
}
}
- S v_11[4] = a;
- return v_11;
+ S v_9[4] = a;
+ return v_9;
}
[numthreads(1, 1, 1)]
void f() {
- S v_12[4] = v_7(0u);
- p = v_12;
- S v_13 = v_3(256u);
- p[int(1)] = v_13;
+ S v_10[4] = v_5(0u);
+ p = v_10;
+ S v_11 = v_1(256u);
+ p[int(1)] = v_11;
p[int(3)].m = v(272u);
p[int(1)].m[int(0)] = asfloat(u[2u]).ywxz;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x4_f32/to_private.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat3x4_f32/to_private.wgsl.expected.ir.fxc.hlsl
index e392536..0483597 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x4_f32/to_private.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat3x4_f32/to_private.wgsl.expected.ir.fxc.hlsl
@@ -10,47 +10,45 @@
};
static S p[4] = (S[4])0;
float3x4 v(uint start_byte_offset) {
- float4 v_1 = asfloat(u[(start_byte_offset / 16u)]);
- float4 v_2 = asfloat(u[((16u + start_byte_offset) / 16u)]);
- return float3x4(v_1, v_2, asfloat(u[((32u + start_byte_offset) / 16u)]));
+ return float3x4(asfloat(u[(start_byte_offset / 16u)]), asfloat(u[((16u + start_byte_offset) / 16u)]), asfloat(u[((32u + start_byte_offset) / 16u)]));
}
-S v_3(uint start_byte_offset) {
- int v_4 = asint(u[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]);
- float3x4 v_5 = v((16u + start_byte_offset));
- S v_6 = {v_4, v_5, asint(u[((64u + start_byte_offset) / 16u)][(((64u + start_byte_offset) % 16u) / 4u)])};
- return v_6;
+S v_1(uint start_byte_offset) {
+ int v_2 = asint(u[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]);
+ float3x4 v_3 = v((16u + start_byte_offset));
+ S v_4 = {v_2, v_3, asint(u[((64u + start_byte_offset) / 16u)][(((64u + start_byte_offset) % 16u) / 4u)])};
+ return v_4;
}
typedef S ary_ret[4];
-ary_ret v_7(uint start_byte_offset) {
+ary_ret v_5(uint start_byte_offset) {
S a[4] = (S[4])0;
{
- uint v_8 = 0u;
- v_8 = 0u;
+ uint v_6 = 0u;
+ v_6 = 0u;
while(true) {
- uint v_9 = v_8;
- if ((v_9 >= 4u)) {
+ uint v_7 = v_6;
+ if ((v_7 >= 4u)) {
break;
}
- S v_10 = v_3((start_byte_offset + (v_9 * 128u)));
- a[v_9] = v_10;
+ S v_8 = v_1((start_byte_offset + (v_7 * 128u)));
+ a[v_7] = v_8;
{
- v_8 = (v_9 + 1u);
+ v_6 = (v_7 + 1u);
}
continue;
}
}
- S v_11[4] = a;
- return v_11;
+ S v_9[4] = a;
+ return v_9;
}
[numthreads(1, 1, 1)]
void f() {
- S v_12[4] = v_7(0u);
- p = v_12;
- S v_13 = v_3(256u);
- p[int(1)] = v_13;
+ S v_10[4] = v_5(0u);
+ p = v_10;
+ S v_11 = v_1(256u);
+ p[int(1)] = v_11;
p[int(3)].m = v(272u);
p[int(1)].m[int(0)] = asfloat(u[2u]).ywxz;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x4_f32/to_storage.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat3x4_f32/to_storage.wgsl.expected.ir.dxc.hlsl
index 2a8a444..1f0bff9 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x4_f32/to_storage.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat3x4_f32/to_storage.wgsl.expected.ir.dxc.hlsl
@@ -16,37 +16,35 @@
}
float3x4 v_1(uint start_byte_offset) {
- float4 v_2 = asfloat(u[(start_byte_offset / 16u)]);
- float4 v_3 = asfloat(u[((16u + start_byte_offset) / 16u)]);
- return float3x4(v_2, v_3, asfloat(u[((32u + start_byte_offset) / 16u)]));
+ return float3x4(asfloat(u[(start_byte_offset / 16u)]), asfloat(u[((16u + start_byte_offset) / 16u)]), asfloat(u[((32u + start_byte_offset) / 16u)]));
}
-void v_4(uint offset, S obj) {
+void v_2(uint offset, S obj) {
s.Store((offset + 0u), asuint(obj.before));
v((offset + 16u), obj.m);
s.Store((offset + 64u), asuint(obj.after));
}
-S v_5(uint start_byte_offset) {
- int v_6 = asint(u[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]);
- float3x4 v_7 = v_1((16u + start_byte_offset));
- S v_8 = {v_6, v_7, asint(u[((64u + start_byte_offset) / 16u)][(((64u + start_byte_offset) % 16u) / 4u)])};
- return v_8;
+S v_3(uint start_byte_offset) {
+ int v_4 = asint(u[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]);
+ float3x4 v_5 = v_1((16u + start_byte_offset));
+ S v_6 = {v_4, v_5, asint(u[((64u + start_byte_offset) / 16u)][(((64u + start_byte_offset) % 16u) / 4u)])};
+ return v_6;
}
-void v_9(uint offset, S obj[4]) {
+void v_7(uint offset, S obj[4]) {
{
- uint v_10 = 0u;
- v_10 = 0u;
+ uint v_8 = 0u;
+ v_8 = 0u;
while(true) {
- uint v_11 = v_10;
- if ((v_11 >= 4u)) {
+ uint v_9 = v_8;
+ if ((v_9 >= 4u)) {
break;
}
- S v_12 = obj[v_11];
- v_4((offset + (v_11 * 128u)), v_12);
+ S v_10 = obj[v_9];
+ v_2((offset + (v_9 * 128u)), v_10);
{
- v_10 = (v_11 + 1u);
+ v_8 = (v_9 + 1u);
}
continue;
}
@@ -54,34 +52,34 @@
}
typedef S ary_ret[4];
-ary_ret v_13(uint start_byte_offset) {
+ary_ret v_11(uint start_byte_offset) {
S a[4] = (S[4])0;
{
- uint v_14 = 0u;
- v_14 = 0u;
+ uint v_12 = 0u;
+ v_12 = 0u;
while(true) {
- uint v_15 = v_14;
- if ((v_15 >= 4u)) {
+ uint v_13 = v_12;
+ if ((v_13 >= 4u)) {
break;
}
- S v_16 = v_5((start_byte_offset + (v_15 * 128u)));
- a[v_15] = v_16;
+ S v_14 = v_3((start_byte_offset + (v_13 * 128u)));
+ a[v_13] = v_14;
{
- v_14 = (v_15 + 1u);
+ v_12 = (v_13 + 1u);
}
continue;
}
}
- S v_17[4] = a;
- return v_17;
+ S v_15[4] = a;
+ return v_15;
}
[numthreads(1, 1, 1)]
void f() {
- S v_18[4] = v_13(0u);
- v_9(0u, v_18);
- S v_19 = v_5(256u);
- v_4(128u, v_19);
+ S v_16[4] = v_11(0u);
+ v_7(0u, v_16);
+ S v_17 = v_3(256u);
+ v_2(128u, v_17);
v(400u, v_1(272u));
s.Store4(144u, asuint(asfloat(u[2u]).ywxz));
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x4_f32/to_storage.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat3x4_f32/to_storage.wgsl.expected.ir.fxc.hlsl
index 2a8a444..1f0bff9 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x4_f32/to_storage.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat3x4_f32/to_storage.wgsl.expected.ir.fxc.hlsl
@@ -16,37 +16,35 @@
}
float3x4 v_1(uint start_byte_offset) {
- float4 v_2 = asfloat(u[(start_byte_offset / 16u)]);
- float4 v_3 = asfloat(u[((16u + start_byte_offset) / 16u)]);
- return float3x4(v_2, v_3, asfloat(u[((32u + start_byte_offset) / 16u)]));
+ return float3x4(asfloat(u[(start_byte_offset / 16u)]), asfloat(u[((16u + start_byte_offset) / 16u)]), asfloat(u[((32u + start_byte_offset) / 16u)]));
}
-void v_4(uint offset, S obj) {
+void v_2(uint offset, S obj) {
s.Store((offset + 0u), asuint(obj.before));
v((offset + 16u), obj.m);
s.Store((offset + 64u), asuint(obj.after));
}
-S v_5(uint start_byte_offset) {
- int v_6 = asint(u[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]);
- float3x4 v_7 = v_1((16u + start_byte_offset));
- S v_8 = {v_6, v_7, asint(u[((64u + start_byte_offset) / 16u)][(((64u + start_byte_offset) % 16u) / 4u)])};
- return v_8;
+S v_3(uint start_byte_offset) {
+ int v_4 = asint(u[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]);
+ float3x4 v_5 = v_1((16u + start_byte_offset));
+ S v_6 = {v_4, v_5, asint(u[((64u + start_byte_offset) / 16u)][(((64u + start_byte_offset) % 16u) / 4u)])};
+ return v_6;
}
-void v_9(uint offset, S obj[4]) {
+void v_7(uint offset, S obj[4]) {
{
- uint v_10 = 0u;
- v_10 = 0u;
+ uint v_8 = 0u;
+ v_8 = 0u;
while(true) {
- uint v_11 = v_10;
- if ((v_11 >= 4u)) {
+ uint v_9 = v_8;
+ if ((v_9 >= 4u)) {
break;
}
- S v_12 = obj[v_11];
- v_4((offset + (v_11 * 128u)), v_12);
+ S v_10 = obj[v_9];
+ v_2((offset + (v_9 * 128u)), v_10);
{
- v_10 = (v_11 + 1u);
+ v_8 = (v_9 + 1u);
}
continue;
}
@@ -54,34 +52,34 @@
}
typedef S ary_ret[4];
-ary_ret v_13(uint start_byte_offset) {
+ary_ret v_11(uint start_byte_offset) {
S a[4] = (S[4])0;
{
- uint v_14 = 0u;
- v_14 = 0u;
+ uint v_12 = 0u;
+ v_12 = 0u;
while(true) {
- uint v_15 = v_14;
- if ((v_15 >= 4u)) {
+ uint v_13 = v_12;
+ if ((v_13 >= 4u)) {
break;
}
- S v_16 = v_5((start_byte_offset + (v_15 * 128u)));
- a[v_15] = v_16;
+ S v_14 = v_3((start_byte_offset + (v_13 * 128u)));
+ a[v_13] = v_14;
{
- v_14 = (v_15 + 1u);
+ v_12 = (v_13 + 1u);
}
continue;
}
}
- S v_17[4] = a;
- return v_17;
+ S v_15[4] = a;
+ return v_15;
}
[numthreads(1, 1, 1)]
void f() {
- S v_18[4] = v_13(0u);
- v_9(0u, v_18);
- S v_19 = v_5(256u);
- v_4(128u, v_19);
+ S v_16[4] = v_11(0u);
+ v_7(0u, v_16);
+ S v_17 = v_3(256u);
+ v_2(128u, v_17);
v(400u, v_1(272u));
s.Store4(144u, asuint(asfloat(u[2u]).ywxz));
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x4_f32/to_workgroup.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat3x4_f32/to_workgroup.wgsl.expected.ir.dxc.hlsl
index e457efe..9616584 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x4_f32/to_workgroup.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat3x4_f32/to_workgroup.wgsl.expected.ir.dxc.hlsl
@@ -14,63 +14,61 @@
};
groupshared S w[4];
float3x4 v(uint start_byte_offset) {
- float4 v_1 = asfloat(u[(start_byte_offset / 16u)]);
- float4 v_2 = asfloat(u[((16u + start_byte_offset) / 16u)]);
- return float3x4(v_1, v_2, asfloat(u[((32u + start_byte_offset) / 16u)]));
+ return float3x4(asfloat(u[(start_byte_offset / 16u)]), asfloat(u[((16u + start_byte_offset) / 16u)]), asfloat(u[((32u + start_byte_offset) / 16u)]));
}
-S v_3(uint start_byte_offset) {
- int v_4 = asint(u[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]);
- float3x4 v_5 = v((16u + start_byte_offset));
- S v_6 = {v_4, v_5, asint(u[((64u + start_byte_offset) / 16u)][(((64u + start_byte_offset) % 16u) / 4u)])};
- return v_6;
+S v_1(uint start_byte_offset) {
+ int v_2 = asint(u[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]);
+ float3x4 v_3 = v((16u + start_byte_offset));
+ S v_4 = {v_2, v_3, asint(u[((64u + start_byte_offset) / 16u)][(((64u + start_byte_offset) % 16u) / 4u)])};
+ return v_4;
}
typedef S ary_ret[4];
-ary_ret v_7(uint start_byte_offset) {
+ary_ret v_5(uint start_byte_offset) {
S a[4] = (S[4])0;
{
- uint v_8 = 0u;
- v_8 = 0u;
+ uint v_6 = 0u;
+ v_6 = 0u;
while(true) {
- uint v_9 = v_8;
- if ((v_9 >= 4u)) {
+ uint v_7 = v_6;
+ if ((v_7 >= 4u)) {
break;
}
- S v_10 = v_3((start_byte_offset + (v_9 * 128u)));
- a[v_9] = v_10;
+ S v_8 = v_1((start_byte_offset + (v_7 * 128u)));
+ a[v_7] = v_8;
{
- v_8 = (v_9 + 1u);
+ v_6 = (v_7 + 1u);
}
continue;
}
}
- S v_11[4] = a;
- return v_11;
+ S v_9[4] = a;
+ return v_9;
}
void f_inner(uint tint_local_index) {
{
- uint v_12 = 0u;
- v_12 = tint_local_index;
+ uint v_10 = 0u;
+ v_10 = tint_local_index;
while(true) {
- uint v_13 = v_12;
- if ((v_13 >= 4u)) {
+ uint v_11 = v_10;
+ if ((v_11 >= 4u)) {
break;
}
- S v_14 = (S)0;
- w[v_13] = v_14;
+ S v_12 = (S)0;
+ w[v_11] = v_12;
{
- v_12 = (v_13 + 1u);
+ v_10 = (v_11 + 1u);
}
continue;
}
}
GroupMemoryBarrierWithGroupSync();
- S v_15[4] = v_7(0u);
- w = v_15;
- S v_16 = v_3(256u);
- w[int(1)] = v_16;
+ S v_13[4] = v_5(0u);
+ w = v_13;
+ S v_14 = v_1(256u);
+ w[int(1)] = v_14;
w[int(3)].m = v(272u);
w[int(1)].m[int(0)] = asfloat(u[2u]).ywxz;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x4_f32/to_workgroup.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat3x4_f32/to_workgroup.wgsl.expected.ir.fxc.hlsl
index e457efe..9616584 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x4_f32/to_workgroup.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat3x4_f32/to_workgroup.wgsl.expected.ir.fxc.hlsl
@@ -14,63 +14,61 @@
};
groupshared S w[4];
float3x4 v(uint start_byte_offset) {
- float4 v_1 = asfloat(u[(start_byte_offset / 16u)]);
- float4 v_2 = asfloat(u[((16u + start_byte_offset) / 16u)]);
- return float3x4(v_1, v_2, asfloat(u[((32u + start_byte_offset) / 16u)]));
+ return float3x4(asfloat(u[(start_byte_offset / 16u)]), asfloat(u[((16u + start_byte_offset) / 16u)]), asfloat(u[((32u + start_byte_offset) / 16u)]));
}
-S v_3(uint start_byte_offset) {
- int v_4 = asint(u[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]);
- float3x4 v_5 = v((16u + start_byte_offset));
- S v_6 = {v_4, v_5, asint(u[((64u + start_byte_offset) / 16u)][(((64u + start_byte_offset) % 16u) / 4u)])};
- return v_6;
+S v_1(uint start_byte_offset) {
+ int v_2 = asint(u[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]);
+ float3x4 v_3 = v((16u + start_byte_offset));
+ S v_4 = {v_2, v_3, asint(u[((64u + start_byte_offset) / 16u)][(((64u + start_byte_offset) % 16u) / 4u)])};
+ return v_4;
}
typedef S ary_ret[4];
-ary_ret v_7(uint start_byte_offset) {
+ary_ret v_5(uint start_byte_offset) {
S a[4] = (S[4])0;
{
- uint v_8 = 0u;
- v_8 = 0u;
+ uint v_6 = 0u;
+ v_6 = 0u;
while(true) {
- uint v_9 = v_8;
- if ((v_9 >= 4u)) {
+ uint v_7 = v_6;
+ if ((v_7 >= 4u)) {
break;
}
- S v_10 = v_3((start_byte_offset + (v_9 * 128u)));
- a[v_9] = v_10;
+ S v_8 = v_1((start_byte_offset + (v_7 * 128u)));
+ a[v_7] = v_8;
{
- v_8 = (v_9 + 1u);
+ v_6 = (v_7 + 1u);
}
continue;
}
}
- S v_11[4] = a;
- return v_11;
+ S v_9[4] = a;
+ return v_9;
}
void f_inner(uint tint_local_index) {
{
- uint v_12 = 0u;
- v_12 = tint_local_index;
+ uint v_10 = 0u;
+ v_10 = tint_local_index;
while(true) {
- uint v_13 = v_12;
- if ((v_13 >= 4u)) {
+ uint v_11 = v_10;
+ if ((v_11 >= 4u)) {
break;
}
- S v_14 = (S)0;
- w[v_13] = v_14;
+ S v_12 = (S)0;
+ w[v_11] = v_12;
{
- v_12 = (v_13 + 1u);
+ v_10 = (v_11 + 1u);
}
continue;
}
}
GroupMemoryBarrierWithGroupSync();
- S v_15[4] = v_7(0u);
- w = v_15;
- S v_16 = v_3(256u);
- w[int(1)] = v_16;
+ S v_13[4] = v_5(0u);
+ w = v_13;
+ S v_14 = v_1(256u);
+ w[int(1)] = v_14;
w[int(3)].m = v(272u);
w[int(1)].m[int(0)] = asfloat(u[2u]).ywxz;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x3_f32/dynamic_index_via_ptr.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat4x3_f32/dynamic_index_via_ptr.wgsl.expected.ir.dxc.hlsl
index cbe24d0..e9d463d 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x3_f32/dynamic_index_via_ptr.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat4x3_f32/dynamic_index_via_ptr.wgsl.expected.ir.dxc.hlsl
@@ -17,81 +17,78 @@
}
float4x3 v(uint start_byte_offset) {
- float3 v_1 = asfloat(a[(start_byte_offset / 16u)].xyz);
- float3 v_2 = asfloat(a[((16u + start_byte_offset) / 16u)].xyz);
- float3 v_3 = asfloat(a[((32u + start_byte_offset) / 16u)].xyz);
- return float4x3(v_1, v_2, v_3, asfloat(a[((48u + start_byte_offset) / 16u)].xyz));
+ return float4x3(asfloat(a[(start_byte_offset / 16u)].xyz), asfloat(a[((16u + start_byte_offset) / 16u)].xyz), asfloat(a[((32u + start_byte_offset) / 16u)].xyz), asfloat(a[((48u + start_byte_offset) / 16u)].xyz));
}
-Inner v_4(uint start_byte_offset) {
- Inner v_5 = {v(start_byte_offset)};
- return v_5;
+Inner v_1(uint start_byte_offset) {
+ Inner v_2 = {v(start_byte_offset)};
+ return v_2;
}
typedef Inner ary_ret[4];
-ary_ret v_6(uint start_byte_offset) {
+ary_ret v_3(uint start_byte_offset) {
Inner a_2[4] = (Inner[4])0;
{
- uint v_7 = 0u;
- v_7 = 0u;
+ uint v_4 = 0u;
+ v_4 = 0u;
while(true) {
- uint v_8 = v_7;
- if ((v_8 >= 4u)) {
+ uint v_5 = v_4;
+ if ((v_5 >= 4u)) {
break;
}
- Inner v_9 = v_4((start_byte_offset + (v_8 * 64u)));
- a_2[v_8] = v_9;
+ Inner v_6 = v_1((start_byte_offset + (v_5 * 64u)));
+ a_2[v_5] = v_6;
{
- v_7 = (v_8 + 1u);
+ v_4 = (v_5 + 1u);
}
continue;
}
}
- Inner v_10[4] = a_2;
+ Inner v_7[4] = a_2;
+ return v_7;
+}
+
+Outer v_8(uint start_byte_offset) {
+ Inner v_9[4] = v_3(start_byte_offset);
+ Outer v_10 = {v_9};
return v_10;
}
-Outer v_11(uint start_byte_offset) {
- Inner v_12[4] = v_6(start_byte_offset);
- Outer v_13 = {v_12};
- return v_13;
-}
-
typedef Outer ary_ret_1[4];
-ary_ret_1 v_14(uint start_byte_offset) {
+ary_ret_1 v_11(uint start_byte_offset) {
Outer a_1[4] = (Outer[4])0;
{
- uint v_15 = 0u;
- v_15 = 0u;
+ uint v_12 = 0u;
+ v_12 = 0u;
while(true) {
- uint v_16 = v_15;
- if ((v_16 >= 4u)) {
+ uint v_13 = v_12;
+ if ((v_13 >= 4u)) {
break;
}
- Outer v_17 = v_11((start_byte_offset + (v_16 * 256u)));
- a_1[v_16] = v_17;
+ Outer v_14 = v_8((start_byte_offset + (v_13 * 256u)));
+ a_1[v_13] = v_14;
{
- v_15 = (v_16 + 1u);
+ v_12 = (v_13 + 1u);
}
continue;
}
}
- Outer v_18[4] = a_1;
- return v_18;
+ Outer v_15[4] = a_1;
+ return v_15;
}
[numthreads(1, 1, 1)]
void f() {
- uint v_19 = (256u * uint(i()));
- uint v_20 = (64u * uint(i()));
- uint v_21 = (16u * uint(i()));
- Outer l_a[4] = v_14(0u);
- Outer l_a_i = v_11(v_19);
- Inner l_a_i_a[4] = v_6(v_19);
- Inner l_a_i_a_i = v_4((v_19 + v_20));
- float4x3 l_a_i_a_i_m = v((v_19 + v_20));
- float3 l_a_i_a_i_m_i = asfloat(a[(((v_19 + v_20) + v_21) / 16u)].xyz);
- uint v_22 = (((v_19 + v_20) + v_21) + (uint(i()) * 4u));
- float l_a_i_a_i_m_i_i = asfloat(a[(v_22 / 16u)][((v_22 % 16u) / 4u)]);
+ uint v_16 = (256u * uint(i()));
+ uint v_17 = (64u * uint(i()));
+ uint v_18 = (16u * uint(i()));
+ Outer l_a[4] = v_11(0u);
+ Outer l_a_i = v_8(v_16);
+ Inner l_a_i_a[4] = v_3(v_16);
+ Inner l_a_i_a_i = v_1((v_16 + v_17));
+ float4x3 l_a_i_a_i_m = v((v_16 + v_17));
+ float3 l_a_i_a_i_m_i = asfloat(a[(((v_16 + v_17) + v_18) / 16u)].xyz);
+ uint v_19 = (((v_16 + v_17) + v_18) + (uint(i()) * 4u));
+ float l_a_i_a_i_m_i_i = asfloat(a[(v_19 / 16u)][((v_19 % 16u) / 4u)]);
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x3_f32/dynamic_index_via_ptr.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat4x3_f32/dynamic_index_via_ptr.wgsl.expected.ir.fxc.hlsl
index cbe24d0..e9d463d 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x3_f32/dynamic_index_via_ptr.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat4x3_f32/dynamic_index_via_ptr.wgsl.expected.ir.fxc.hlsl
@@ -17,81 +17,78 @@
}
float4x3 v(uint start_byte_offset) {
- float3 v_1 = asfloat(a[(start_byte_offset / 16u)].xyz);
- float3 v_2 = asfloat(a[((16u + start_byte_offset) / 16u)].xyz);
- float3 v_3 = asfloat(a[((32u + start_byte_offset) / 16u)].xyz);
- return float4x3(v_1, v_2, v_3, asfloat(a[((48u + start_byte_offset) / 16u)].xyz));
+ return float4x3(asfloat(a[(start_byte_offset / 16u)].xyz), asfloat(a[((16u + start_byte_offset) / 16u)].xyz), asfloat(a[((32u + start_byte_offset) / 16u)].xyz), asfloat(a[((48u + start_byte_offset) / 16u)].xyz));
}
-Inner v_4(uint start_byte_offset) {
- Inner v_5 = {v(start_byte_offset)};
- return v_5;
+Inner v_1(uint start_byte_offset) {
+ Inner v_2 = {v(start_byte_offset)};
+ return v_2;
}
typedef Inner ary_ret[4];
-ary_ret v_6(uint start_byte_offset) {
+ary_ret v_3(uint start_byte_offset) {
Inner a_2[4] = (Inner[4])0;
{
- uint v_7 = 0u;
- v_7 = 0u;
+ uint v_4 = 0u;
+ v_4 = 0u;
while(true) {
- uint v_8 = v_7;
- if ((v_8 >= 4u)) {
+ uint v_5 = v_4;
+ if ((v_5 >= 4u)) {
break;
}
- Inner v_9 = v_4((start_byte_offset + (v_8 * 64u)));
- a_2[v_8] = v_9;
+ Inner v_6 = v_1((start_byte_offset + (v_5 * 64u)));
+ a_2[v_5] = v_6;
{
- v_7 = (v_8 + 1u);
+ v_4 = (v_5 + 1u);
}
continue;
}
}
- Inner v_10[4] = a_2;
+ Inner v_7[4] = a_2;
+ return v_7;
+}
+
+Outer v_8(uint start_byte_offset) {
+ Inner v_9[4] = v_3(start_byte_offset);
+ Outer v_10 = {v_9};
return v_10;
}
-Outer v_11(uint start_byte_offset) {
- Inner v_12[4] = v_6(start_byte_offset);
- Outer v_13 = {v_12};
- return v_13;
-}
-
typedef Outer ary_ret_1[4];
-ary_ret_1 v_14(uint start_byte_offset) {
+ary_ret_1 v_11(uint start_byte_offset) {
Outer a_1[4] = (Outer[4])0;
{
- uint v_15 = 0u;
- v_15 = 0u;
+ uint v_12 = 0u;
+ v_12 = 0u;
while(true) {
- uint v_16 = v_15;
- if ((v_16 >= 4u)) {
+ uint v_13 = v_12;
+ if ((v_13 >= 4u)) {
break;
}
- Outer v_17 = v_11((start_byte_offset + (v_16 * 256u)));
- a_1[v_16] = v_17;
+ Outer v_14 = v_8((start_byte_offset + (v_13 * 256u)));
+ a_1[v_13] = v_14;
{
- v_15 = (v_16 + 1u);
+ v_12 = (v_13 + 1u);
}
continue;
}
}
- Outer v_18[4] = a_1;
- return v_18;
+ Outer v_15[4] = a_1;
+ return v_15;
}
[numthreads(1, 1, 1)]
void f() {
- uint v_19 = (256u * uint(i()));
- uint v_20 = (64u * uint(i()));
- uint v_21 = (16u * uint(i()));
- Outer l_a[4] = v_14(0u);
- Outer l_a_i = v_11(v_19);
- Inner l_a_i_a[4] = v_6(v_19);
- Inner l_a_i_a_i = v_4((v_19 + v_20));
- float4x3 l_a_i_a_i_m = v((v_19 + v_20));
- float3 l_a_i_a_i_m_i = asfloat(a[(((v_19 + v_20) + v_21) / 16u)].xyz);
- uint v_22 = (((v_19 + v_20) + v_21) + (uint(i()) * 4u));
- float l_a_i_a_i_m_i_i = asfloat(a[(v_22 / 16u)][((v_22 % 16u) / 4u)]);
+ uint v_16 = (256u * uint(i()));
+ uint v_17 = (64u * uint(i()));
+ uint v_18 = (16u * uint(i()));
+ Outer l_a[4] = v_11(0u);
+ Outer l_a_i = v_8(v_16);
+ Inner l_a_i_a[4] = v_3(v_16);
+ Inner l_a_i_a_i = v_1((v_16 + v_17));
+ float4x3 l_a_i_a_i_m = v((v_16 + v_17));
+ float3 l_a_i_a_i_m_i = asfloat(a[(((v_16 + v_17) + v_18) / 16u)].xyz);
+ uint v_19 = (((v_16 + v_17) + v_18) + (uint(i()) * 4u));
+ float l_a_i_a_i_m_i_i = asfloat(a[(v_19 / 16u)][((v_19 % 16u) / 4u)]);
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x3_f32/static_index_via_ptr.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat4x3_f32/static_index_via_ptr.wgsl.expected.ir.dxc.hlsl
index 354533c..e006479 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x3_f32/static_index_via_ptr.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat4x3_f32/static_index_via_ptr.wgsl.expected.ir.dxc.hlsl
@@ -11,75 +11,72 @@
uint4 a[64];
};
float4x3 v(uint start_byte_offset) {
- float3 v_1 = asfloat(a[(start_byte_offset / 16u)].xyz);
- float3 v_2 = asfloat(a[((16u + start_byte_offset) / 16u)].xyz);
- float3 v_3 = asfloat(a[((32u + start_byte_offset) / 16u)].xyz);
- return float4x3(v_1, v_2, v_3, asfloat(a[((48u + start_byte_offset) / 16u)].xyz));
+ return float4x3(asfloat(a[(start_byte_offset / 16u)].xyz), asfloat(a[((16u + start_byte_offset) / 16u)].xyz), asfloat(a[((32u + start_byte_offset) / 16u)].xyz), asfloat(a[((48u + start_byte_offset) / 16u)].xyz));
}
-Inner v_4(uint start_byte_offset) {
- Inner v_5 = {v(start_byte_offset)};
- return v_5;
+Inner v_1(uint start_byte_offset) {
+ Inner v_2 = {v(start_byte_offset)};
+ return v_2;
}
typedef Inner ary_ret[4];
-ary_ret v_6(uint start_byte_offset) {
+ary_ret v_3(uint start_byte_offset) {
Inner a_2[4] = (Inner[4])0;
{
- uint v_7 = 0u;
- v_7 = 0u;
+ uint v_4 = 0u;
+ v_4 = 0u;
while(true) {
- uint v_8 = v_7;
- if ((v_8 >= 4u)) {
+ uint v_5 = v_4;
+ if ((v_5 >= 4u)) {
break;
}
- Inner v_9 = v_4((start_byte_offset + (v_8 * 64u)));
- a_2[v_8] = v_9;
+ Inner v_6 = v_1((start_byte_offset + (v_5 * 64u)));
+ a_2[v_5] = v_6;
{
- v_7 = (v_8 + 1u);
+ v_4 = (v_5 + 1u);
}
continue;
}
}
- Inner v_10[4] = a_2;
+ Inner v_7[4] = a_2;
+ return v_7;
+}
+
+Outer v_8(uint start_byte_offset) {
+ Inner v_9[4] = v_3(start_byte_offset);
+ Outer v_10 = {v_9};
return v_10;
}
-Outer v_11(uint start_byte_offset) {
- Inner v_12[4] = v_6(start_byte_offset);
- Outer v_13 = {v_12};
- return v_13;
-}
-
typedef Outer ary_ret_1[4];
-ary_ret_1 v_14(uint start_byte_offset) {
+ary_ret_1 v_11(uint start_byte_offset) {
Outer a_1[4] = (Outer[4])0;
{
- uint v_15 = 0u;
- v_15 = 0u;
+ uint v_12 = 0u;
+ v_12 = 0u;
while(true) {
- uint v_16 = v_15;
- if ((v_16 >= 4u)) {
+ uint v_13 = v_12;
+ if ((v_13 >= 4u)) {
break;
}
- Outer v_17 = v_11((start_byte_offset + (v_16 * 256u)));
- a_1[v_16] = v_17;
+ Outer v_14 = v_8((start_byte_offset + (v_13 * 256u)));
+ a_1[v_13] = v_14;
{
- v_15 = (v_16 + 1u);
+ v_12 = (v_13 + 1u);
}
continue;
}
}
- Outer v_18[4] = a_1;
- return v_18;
+ Outer v_15[4] = a_1;
+ return v_15;
}
[numthreads(1, 1, 1)]
void f() {
- Outer l_a[4] = v_14(0u);
- Outer l_a_3 = v_11(768u);
- Inner l_a_3_a[4] = v_6(768u);
- Inner l_a_3_a_2 = v_4(896u);
+ Outer l_a[4] = v_11(0u);
+ Outer l_a_3 = v_8(768u);
+ Inner l_a_3_a[4] = v_3(768u);
+ Inner l_a_3_a_2 = v_1(896u);
float4x3 l_a_3_a_2_m = v(896u);
float3 l_a_3_a_2_m_1 = asfloat(a[57u].xyz);
float l_a_3_a_2_m_1_0 = asfloat(a[57u].x);
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x3_f32/static_index_via_ptr.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat4x3_f32/static_index_via_ptr.wgsl.expected.ir.fxc.hlsl
index 354533c..e006479 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x3_f32/static_index_via_ptr.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat4x3_f32/static_index_via_ptr.wgsl.expected.ir.fxc.hlsl
@@ -11,75 +11,72 @@
uint4 a[64];
};
float4x3 v(uint start_byte_offset) {
- float3 v_1 = asfloat(a[(start_byte_offset / 16u)].xyz);
- float3 v_2 = asfloat(a[((16u + start_byte_offset) / 16u)].xyz);
- float3 v_3 = asfloat(a[((32u + start_byte_offset) / 16u)].xyz);
- return float4x3(v_1, v_2, v_3, asfloat(a[((48u + start_byte_offset) / 16u)].xyz));
+ return float4x3(asfloat(a[(start_byte_offset / 16u)].xyz), asfloat(a[((16u + start_byte_offset) / 16u)].xyz), asfloat(a[((32u + start_byte_offset) / 16u)].xyz), asfloat(a[((48u + start_byte_offset) / 16u)].xyz));
}
-Inner v_4(uint start_byte_offset) {
- Inner v_5 = {v(start_byte_offset)};
- return v_5;
+Inner v_1(uint start_byte_offset) {
+ Inner v_2 = {v(start_byte_offset)};
+ return v_2;
}
typedef Inner ary_ret[4];
-ary_ret v_6(uint start_byte_offset) {
+ary_ret v_3(uint start_byte_offset) {
Inner a_2[4] = (Inner[4])0;
{
- uint v_7 = 0u;
- v_7 = 0u;
+ uint v_4 = 0u;
+ v_4 = 0u;
while(true) {
- uint v_8 = v_7;
- if ((v_8 >= 4u)) {
+ uint v_5 = v_4;
+ if ((v_5 >= 4u)) {
break;
}
- Inner v_9 = v_4((start_byte_offset + (v_8 * 64u)));
- a_2[v_8] = v_9;
+ Inner v_6 = v_1((start_byte_offset + (v_5 * 64u)));
+ a_2[v_5] = v_6;
{
- v_7 = (v_8 + 1u);
+ v_4 = (v_5 + 1u);
}
continue;
}
}
- Inner v_10[4] = a_2;
+ Inner v_7[4] = a_2;
+ return v_7;
+}
+
+Outer v_8(uint start_byte_offset) {
+ Inner v_9[4] = v_3(start_byte_offset);
+ Outer v_10 = {v_9};
return v_10;
}
-Outer v_11(uint start_byte_offset) {
- Inner v_12[4] = v_6(start_byte_offset);
- Outer v_13 = {v_12};
- return v_13;
-}
-
typedef Outer ary_ret_1[4];
-ary_ret_1 v_14(uint start_byte_offset) {
+ary_ret_1 v_11(uint start_byte_offset) {
Outer a_1[4] = (Outer[4])0;
{
- uint v_15 = 0u;
- v_15 = 0u;
+ uint v_12 = 0u;
+ v_12 = 0u;
while(true) {
- uint v_16 = v_15;
- if ((v_16 >= 4u)) {
+ uint v_13 = v_12;
+ if ((v_13 >= 4u)) {
break;
}
- Outer v_17 = v_11((start_byte_offset + (v_16 * 256u)));
- a_1[v_16] = v_17;
+ Outer v_14 = v_8((start_byte_offset + (v_13 * 256u)));
+ a_1[v_13] = v_14;
{
- v_15 = (v_16 + 1u);
+ v_12 = (v_13 + 1u);
}
continue;
}
}
- Outer v_18[4] = a_1;
- return v_18;
+ Outer v_15[4] = a_1;
+ return v_15;
}
[numthreads(1, 1, 1)]
void f() {
- Outer l_a[4] = v_14(0u);
- Outer l_a_3 = v_11(768u);
- Inner l_a_3_a[4] = v_6(768u);
- Inner l_a_3_a_2 = v_4(896u);
+ Outer l_a[4] = v_11(0u);
+ Outer l_a_3 = v_8(768u);
+ Inner l_a_3_a[4] = v_3(768u);
+ Inner l_a_3_a_2 = v_1(896u);
float4x3 l_a_3_a_2_m = v(896u);
float3 l_a_3_a_2_m_1 = asfloat(a[57u].xyz);
float l_a_3_a_2_m_1_0 = asfloat(a[57u].x);
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x3_f32/to_builtin.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat4x3_f32/to_builtin.wgsl.expected.ir.dxc.hlsl
index 7da4b988..ee1b7d2 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x3_f32/to_builtin.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat4x3_f32/to_builtin.wgsl.expected.ir.dxc.hlsl
@@ -3,10 +3,7 @@
uint4 u[48];
};
float4x3 v(uint start_byte_offset) {
- float3 v_1 = asfloat(u[(start_byte_offset / 16u)].xyz);
- float3 v_2 = asfloat(u[((16u + start_byte_offset) / 16u)].xyz);
- float3 v_3 = asfloat(u[((32u + start_byte_offset) / 16u)].xyz);
- return float4x3(v_1, v_2, v_3, asfloat(u[((48u + start_byte_offset) / 16u)].xyz));
+ return float4x3(asfloat(u[(start_byte_offset / 16u)].xyz), asfloat(u[((16u + start_byte_offset) / 16u)].xyz), asfloat(u[((32u + start_byte_offset) / 16u)].xyz), asfloat(u[((48u + start_byte_offset) / 16u)].xyz));
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x3_f32/to_builtin.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat4x3_f32/to_builtin.wgsl.expected.ir.fxc.hlsl
index 7da4b988..ee1b7d2 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x3_f32/to_builtin.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat4x3_f32/to_builtin.wgsl.expected.ir.fxc.hlsl
@@ -3,10 +3,7 @@
uint4 u[48];
};
float4x3 v(uint start_byte_offset) {
- float3 v_1 = asfloat(u[(start_byte_offset / 16u)].xyz);
- float3 v_2 = asfloat(u[((16u + start_byte_offset) / 16u)].xyz);
- float3 v_3 = asfloat(u[((32u + start_byte_offset) / 16u)].xyz);
- return float4x3(v_1, v_2, v_3, asfloat(u[((48u + start_byte_offset) / 16u)].xyz));
+ return float4x3(asfloat(u[(start_byte_offset / 16u)].xyz), asfloat(u[((16u + start_byte_offset) / 16u)].xyz), asfloat(u[((32u + start_byte_offset) / 16u)].xyz), asfloat(u[((48u + start_byte_offset) / 16u)].xyz));
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x3_f32/to_fn.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat4x3_f32/to_fn.wgsl.expected.ir.dxc.hlsl
index c100dfe..d34b343 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x3_f32/to_fn.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat4x3_f32/to_fn.wgsl.expected.ir.dxc.hlsl
@@ -24,48 +24,45 @@
}
float4x3 v_1(uint start_byte_offset) {
- float3 v_2 = asfloat(u[(start_byte_offset / 16u)].xyz);
- float3 v_3 = asfloat(u[((16u + start_byte_offset) / 16u)].xyz);
- float3 v_4 = asfloat(u[((32u + start_byte_offset) / 16u)].xyz);
- return float4x3(v_2, v_3, v_4, asfloat(u[((48u + start_byte_offset) / 16u)].xyz));
+ return float4x3(asfloat(u[(start_byte_offset / 16u)].xyz), asfloat(u[((16u + start_byte_offset) / 16u)].xyz), asfloat(u[((32u + start_byte_offset) / 16u)].xyz), asfloat(u[((48u + start_byte_offset) / 16u)].xyz));
}
-S v_5(uint start_byte_offset) {
- int v_6 = asint(u[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]);
- float4x3 v_7 = v_1((16u + start_byte_offset));
- S v_8 = {v_6, v_7, asint(u[((128u + start_byte_offset) / 16u)][(((128u + start_byte_offset) % 16u) / 4u)])};
- return v_8;
+S v_2(uint start_byte_offset) {
+ int v_3 = asint(u[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]);
+ float4x3 v_4 = v_1((16u + start_byte_offset));
+ S v_5 = {v_3, v_4, asint(u[((128u + start_byte_offset) / 16u)][(((128u + start_byte_offset) % 16u) / 4u)])};
+ return v_5;
}
typedef S ary_ret[4];
-ary_ret v_9(uint start_byte_offset) {
+ary_ret v_6(uint start_byte_offset) {
S a_2[4] = (S[4])0;
{
- uint v_10 = 0u;
- v_10 = 0u;
+ uint v_7 = 0u;
+ v_7 = 0u;
while(true) {
- uint v_11 = v_10;
- if ((v_11 >= 4u)) {
+ uint v_8 = v_7;
+ if ((v_8 >= 4u)) {
break;
}
- S v_12 = v_5((start_byte_offset + (v_11 * 192u)));
- a_2[v_11] = v_12;
+ S v_9 = v_2((start_byte_offset + (v_8 * 192u)));
+ a_2[v_8] = v_9;
{
- v_10 = (v_11 + 1u);
+ v_7 = (v_8 + 1u);
}
continue;
}
}
- S v_13[4] = a_2;
- return v_13;
+ S v_10[4] = a_2;
+ return v_10;
}
[numthreads(1, 1, 1)]
void f() {
- S v_14[4] = v_9(0u);
- a(v_14);
- S v_15 = v_5(384u);
- b(v_15);
+ S v_11[4] = v_6(0u);
+ a(v_11);
+ S v_12 = v_2(384u);
+ b(v_12);
c(v_1(400u));
d(asfloat(u[2u].xyz).zxy);
e(asfloat(u[2u].xyz).zxy.x);
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x3_f32/to_fn.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat4x3_f32/to_fn.wgsl.expected.ir.fxc.hlsl
index c100dfe..d34b343 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x3_f32/to_fn.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat4x3_f32/to_fn.wgsl.expected.ir.fxc.hlsl
@@ -24,48 +24,45 @@
}
float4x3 v_1(uint start_byte_offset) {
- float3 v_2 = asfloat(u[(start_byte_offset / 16u)].xyz);
- float3 v_3 = asfloat(u[((16u + start_byte_offset) / 16u)].xyz);
- float3 v_4 = asfloat(u[((32u + start_byte_offset) / 16u)].xyz);
- return float4x3(v_2, v_3, v_4, asfloat(u[((48u + start_byte_offset) / 16u)].xyz));
+ return float4x3(asfloat(u[(start_byte_offset / 16u)].xyz), asfloat(u[((16u + start_byte_offset) / 16u)].xyz), asfloat(u[((32u + start_byte_offset) / 16u)].xyz), asfloat(u[((48u + start_byte_offset) / 16u)].xyz));
}
-S v_5(uint start_byte_offset) {
- int v_6 = asint(u[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]);
- float4x3 v_7 = v_1((16u + start_byte_offset));
- S v_8 = {v_6, v_7, asint(u[((128u + start_byte_offset) / 16u)][(((128u + start_byte_offset) % 16u) / 4u)])};
- return v_8;
+S v_2(uint start_byte_offset) {
+ int v_3 = asint(u[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]);
+ float4x3 v_4 = v_1((16u + start_byte_offset));
+ S v_5 = {v_3, v_4, asint(u[((128u + start_byte_offset) / 16u)][(((128u + start_byte_offset) % 16u) / 4u)])};
+ return v_5;
}
typedef S ary_ret[4];
-ary_ret v_9(uint start_byte_offset) {
+ary_ret v_6(uint start_byte_offset) {
S a_2[4] = (S[4])0;
{
- uint v_10 = 0u;
- v_10 = 0u;
+ uint v_7 = 0u;
+ v_7 = 0u;
while(true) {
- uint v_11 = v_10;
- if ((v_11 >= 4u)) {
+ uint v_8 = v_7;
+ if ((v_8 >= 4u)) {
break;
}
- S v_12 = v_5((start_byte_offset + (v_11 * 192u)));
- a_2[v_11] = v_12;
+ S v_9 = v_2((start_byte_offset + (v_8 * 192u)));
+ a_2[v_8] = v_9;
{
- v_10 = (v_11 + 1u);
+ v_7 = (v_8 + 1u);
}
continue;
}
}
- S v_13[4] = a_2;
- return v_13;
+ S v_10[4] = a_2;
+ return v_10;
}
[numthreads(1, 1, 1)]
void f() {
- S v_14[4] = v_9(0u);
- a(v_14);
- S v_15 = v_5(384u);
- b(v_15);
+ S v_11[4] = v_6(0u);
+ a(v_11);
+ S v_12 = v_2(384u);
+ b(v_12);
c(v_1(400u));
d(asfloat(u[2u].xyz).zxy);
e(asfloat(u[2u].xyz).zxy.x);
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x3_f32/to_private.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat4x3_f32/to_private.wgsl.expected.ir.dxc.hlsl
index cd04642..973dbfe 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x3_f32/to_private.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat4x3_f32/to_private.wgsl.expected.ir.dxc.hlsl
@@ -10,48 +10,45 @@
};
static S p[4] = (S[4])0;
float4x3 v(uint start_byte_offset) {
- float3 v_1 = asfloat(u[(start_byte_offset / 16u)].xyz);
- float3 v_2 = asfloat(u[((16u + start_byte_offset) / 16u)].xyz);
- float3 v_3 = asfloat(u[((32u + start_byte_offset) / 16u)].xyz);
- return float4x3(v_1, v_2, v_3, asfloat(u[((48u + start_byte_offset) / 16u)].xyz));
+ return float4x3(asfloat(u[(start_byte_offset / 16u)].xyz), asfloat(u[((16u + start_byte_offset) / 16u)].xyz), asfloat(u[((32u + start_byte_offset) / 16u)].xyz), asfloat(u[((48u + start_byte_offset) / 16u)].xyz));
}
-S v_4(uint start_byte_offset) {
- int v_5 = asint(u[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]);
- float4x3 v_6 = v((16u + start_byte_offset));
- S v_7 = {v_5, v_6, asint(u[((128u + start_byte_offset) / 16u)][(((128u + start_byte_offset) % 16u) / 4u)])};
- return v_7;
+S v_1(uint start_byte_offset) {
+ int v_2 = asint(u[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]);
+ float4x3 v_3 = v((16u + start_byte_offset));
+ S v_4 = {v_2, v_3, asint(u[((128u + start_byte_offset) / 16u)][(((128u + start_byte_offset) % 16u) / 4u)])};
+ return v_4;
}
typedef S ary_ret[4];
-ary_ret v_8(uint start_byte_offset) {
+ary_ret v_5(uint start_byte_offset) {
S a[4] = (S[4])0;
{
- uint v_9 = 0u;
- v_9 = 0u;
+ uint v_6 = 0u;
+ v_6 = 0u;
while(true) {
- uint v_10 = v_9;
- if ((v_10 >= 4u)) {
+ uint v_7 = v_6;
+ if ((v_7 >= 4u)) {
break;
}
- S v_11 = v_4((start_byte_offset + (v_10 * 192u)));
- a[v_10] = v_11;
+ S v_8 = v_1((start_byte_offset + (v_7 * 192u)));
+ a[v_7] = v_8;
{
- v_9 = (v_10 + 1u);
+ v_6 = (v_7 + 1u);
}
continue;
}
}
- S v_12[4] = a;
- return v_12;
+ S v_9[4] = a;
+ return v_9;
}
[numthreads(1, 1, 1)]
void f() {
- S v_13[4] = v_8(0u);
- p = v_13;
- S v_14 = v_4(384u);
- p[int(1)] = v_14;
+ S v_10[4] = v_5(0u);
+ p = v_10;
+ S v_11 = v_1(384u);
+ p[int(1)] = v_11;
p[int(3)].m = v(400u);
p[int(1)].m[int(0)] = asfloat(u[2u].xyz).zxy;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x3_f32/to_private.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat4x3_f32/to_private.wgsl.expected.ir.fxc.hlsl
index cd04642..973dbfe 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x3_f32/to_private.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat4x3_f32/to_private.wgsl.expected.ir.fxc.hlsl
@@ -10,48 +10,45 @@
};
static S p[4] = (S[4])0;
float4x3 v(uint start_byte_offset) {
- float3 v_1 = asfloat(u[(start_byte_offset / 16u)].xyz);
- float3 v_2 = asfloat(u[((16u + start_byte_offset) / 16u)].xyz);
- float3 v_3 = asfloat(u[((32u + start_byte_offset) / 16u)].xyz);
- return float4x3(v_1, v_2, v_3, asfloat(u[((48u + start_byte_offset) / 16u)].xyz));
+ return float4x3(asfloat(u[(start_byte_offset / 16u)].xyz), asfloat(u[((16u + start_byte_offset) / 16u)].xyz), asfloat(u[((32u + start_byte_offset) / 16u)].xyz), asfloat(u[((48u + start_byte_offset) / 16u)].xyz));
}
-S v_4(uint start_byte_offset) {
- int v_5 = asint(u[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]);
- float4x3 v_6 = v((16u + start_byte_offset));
- S v_7 = {v_5, v_6, asint(u[((128u + start_byte_offset) / 16u)][(((128u + start_byte_offset) % 16u) / 4u)])};
- return v_7;
+S v_1(uint start_byte_offset) {
+ int v_2 = asint(u[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]);
+ float4x3 v_3 = v((16u + start_byte_offset));
+ S v_4 = {v_2, v_3, asint(u[((128u + start_byte_offset) / 16u)][(((128u + start_byte_offset) % 16u) / 4u)])};
+ return v_4;
}
typedef S ary_ret[4];
-ary_ret v_8(uint start_byte_offset) {
+ary_ret v_5(uint start_byte_offset) {
S a[4] = (S[4])0;
{
- uint v_9 = 0u;
- v_9 = 0u;
+ uint v_6 = 0u;
+ v_6 = 0u;
while(true) {
- uint v_10 = v_9;
- if ((v_10 >= 4u)) {
+ uint v_7 = v_6;
+ if ((v_7 >= 4u)) {
break;
}
- S v_11 = v_4((start_byte_offset + (v_10 * 192u)));
- a[v_10] = v_11;
+ S v_8 = v_1((start_byte_offset + (v_7 * 192u)));
+ a[v_7] = v_8;
{
- v_9 = (v_10 + 1u);
+ v_6 = (v_7 + 1u);
}
continue;
}
}
- S v_12[4] = a;
- return v_12;
+ S v_9[4] = a;
+ return v_9;
}
[numthreads(1, 1, 1)]
void f() {
- S v_13[4] = v_8(0u);
- p = v_13;
- S v_14 = v_4(384u);
- p[int(1)] = v_14;
+ S v_10[4] = v_5(0u);
+ p = v_10;
+ S v_11 = v_1(384u);
+ p[int(1)] = v_11;
p[int(3)].m = v(400u);
p[int(1)].m[int(0)] = asfloat(u[2u].xyz).zxy;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x3_f32/to_storage.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat4x3_f32/to_storage.wgsl.expected.ir.dxc.hlsl
index 73f939b..887bf51 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x3_f32/to_storage.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat4x3_f32/to_storage.wgsl.expected.ir.dxc.hlsl
@@ -17,38 +17,35 @@
}
float4x3 v_1(uint start_byte_offset) {
- float3 v_2 = asfloat(u[(start_byte_offset / 16u)].xyz);
- float3 v_3 = asfloat(u[((16u + start_byte_offset) / 16u)].xyz);
- float3 v_4 = asfloat(u[((32u + start_byte_offset) / 16u)].xyz);
- return float4x3(v_2, v_3, v_4, asfloat(u[((48u + start_byte_offset) / 16u)].xyz));
+ return float4x3(asfloat(u[(start_byte_offset / 16u)].xyz), asfloat(u[((16u + start_byte_offset) / 16u)].xyz), asfloat(u[((32u + start_byte_offset) / 16u)].xyz), asfloat(u[((48u + start_byte_offset) / 16u)].xyz));
}
-void v_5(uint offset, S obj) {
+void v_2(uint offset, S obj) {
s.Store((offset + 0u), asuint(obj.before));
v((offset + 16u), obj.m);
s.Store((offset + 128u), asuint(obj.after));
}
-S v_6(uint start_byte_offset) {
- int v_7 = asint(u[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]);
- float4x3 v_8 = v_1((16u + start_byte_offset));
- S v_9 = {v_7, v_8, asint(u[((128u + start_byte_offset) / 16u)][(((128u + start_byte_offset) % 16u) / 4u)])};
- return v_9;
+S v_3(uint start_byte_offset) {
+ int v_4 = asint(u[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]);
+ float4x3 v_5 = v_1((16u + start_byte_offset));
+ S v_6 = {v_4, v_5, asint(u[((128u + start_byte_offset) / 16u)][(((128u + start_byte_offset) % 16u) / 4u)])};
+ return v_6;
}
-void v_10(uint offset, S obj[4]) {
+void v_7(uint offset, S obj[4]) {
{
- uint v_11 = 0u;
- v_11 = 0u;
+ uint v_8 = 0u;
+ v_8 = 0u;
while(true) {
- uint v_12 = v_11;
- if ((v_12 >= 4u)) {
+ uint v_9 = v_8;
+ if ((v_9 >= 4u)) {
break;
}
- S v_13 = obj[v_12];
- v_5((offset + (v_12 * 192u)), v_13);
+ S v_10 = obj[v_9];
+ v_2((offset + (v_9 * 192u)), v_10);
{
- v_11 = (v_12 + 1u);
+ v_8 = (v_9 + 1u);
}
continue;
}
@@ -56,34 +53,34 @@
}
typedef S ary_ret[4];
-ary_ret v_14(uint start_byte_offset) {
+ary_ret v_11(uint start_byte_offset) {
S a[4] = (S[4])0;
{
- uint v_15 = 0u;
- v_15 = 0u;
+ uint v_12 = 0u;
+ v_12 = 0u;
while(true) {
- uint v_16 = v_15;
- if ((v_16 >= 4u)) {
+ uint v_13 = v_12;
+ if ((v_13 >= 4u)) {
break;
}
- S v_17 = v_6((start_byte_offset + (v_16 * 192u)));
- a[v_16] = v_17;
+ S v_14 = v_3((start_byte_offset + (v_13 * 192u)));
+ a[v_13] = v_14;
{
- v_15 = (v_16 + 1u);
+ v_12 = (v_13 + 1u);
}
continue;
}
}
- S v_18[4] = a;
- return v_18;
+ S v_15[4] = a;
+ return v_15;
}
[numthreads(1, 1, 1)]
void f() {
- S v_19[4] = v_14(0u);
- v_10(0u, v_19);
- S v_20 = v_6(384u);
- v_5(192u, v_20);
+ S v_16[4] = v_11(0u);
+ v_7(0u, v_16);
+ S v_17 = v_3(384u);
+ v_2(192u, v_17);
v(592u, v_1(400u));
s.Store3(208u, asuint(asfloat(u[2u].xyz).zxy));
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x3_f32/to_storage.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat4x3_f32/to_storage.wgsl.expected.ir.fxc.hlsl
index 73f939b..887bf51 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x3_f32/to_storage.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat4x3_f32/to_storage.wgsl.expected.ir.fxc.hlsl
@@ -17,38 +17,35 @@
}
float4x3 v_1(uint start_byte_offset) {
- float3 v_2 = asfloat(u[(start_byte_offset / 16u)].xyz);
- float3 v_3 = asfloat(u[((16u + start_byte_offset) / 16u)].xyz);
- float3 v_4 = asfloat(u[((32u + start_byte_offset) / 16u)].xyz);
- return float4x3(v_2, v_3, v_4, asfloat(u[((48u + start_byte_offset) / 16u)].xyz));
+ return float4x3(asfloat(u[(start_byte_offset / 16u)].xyz), asfloat(u[((16u + start_byte_offset) / 16u)].xyz), asfloat(u[((32u + start_byte_offset) / 16u)].xyz), asfloat(u[((48u + start_byte_offset) / 16u)].xyz));
}
-void v_5(uint offset, S obj) {
+void v_2(uint offset, S obj) {
s.Store((offset + 0u), asuint(obj.before));
v((offset + 16u), obj.m);
s.Store((offset + 128u), asuint(obj.after));
}
-S v_6(uint start_byte_offset) {
- int v_7 = asint(u[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]);
- float4x3 v_8 = v_1((16u + start_byte_offset));
- S v_9 = {v_7, v_8, asint(u[((128u + start_byte_offset) / 16u)][(((128u + start_byte_offset) % 16u) / 4u)])};
- return v_9;
+S v_3(uint start_byte_offset) {
+ int v_4 = asint(u[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]);
+ float4x3 v_5 = v_1((16u + start_byte_offset));
+ S v_6 = {v_4, v_5, asint(u[((128u + start_byte_offset) / 16u)][(((128u + start_byte_offset) % 16u) / 4u)])};
+ return v_6;
}
-void v_10(uint offset, S obj[4]) {
+void v_7(uint offset, S obj[4]) {
{
- uint v_11 = 0u;
- v_11 = 0u;
+ uint v_8 = 0u;
+ v_8 = 0u;
while(true) {
- uint v_12 = v_11;
- if ((v_12 >= 4u)) {
+ uint v_9 = v_8;
+ if ((v_9 >= 4u)) {
break;
}
- S v_13 = obj[v_12];
- v_5((offset + (v_12 * 192u)), v_13);
+ S v_10 = obj[v_9];
+ v_2((offset + (v_9 * 192u)), v_10);
{
- v_11 = (v_12 + 1u);
+ v_8 = (v_9 + 1u);
}
continue;
}
@@ -56,34 +53,34 @@
}
typedef S ary_ret[4];
-ary_ret v_14(uint start_byte_offset) {
+ary_ret v_11(uint start_byte_offset) {
S a[4] = (S[4])0;
{
- uint v_15 = 0u;
- v_15 = 0u;
+ uint v_12 = 0u;
+ v_12 = 0u;
while(true) {
- uint v_16 = v_15;
- if ((v_16 >= 4u)) {
+ uint v_13 = v_12;
+ if ((v_13 >= 4u)) {
break;
}
- S v_17 = v_6((start_byte_offset + (v_16 * 192u)));
- a[v_16] = v_17;
+ S v_14 = v_3((start_byte_offset + (v_13 * 192u)));
+ a[v_13] = v_14;
{
- v_15 = (v_16 + 1u);
+ v_12 = (v_13 + 1u);
}
continue;
}
}
- S v_18[4] = a;
- return v_18;
+ S v_15[4] = a;
+ return v_15;
}
[numthreads(1, 1, 1)]
void f() {
- S v_19[4] = v_14(0u);
- v_10(0u, v_19);
- S v_20 = v_6(384u);
- v_5(192u, v_20);
+ S v_16[4] = v_11(0u);
+ v_7(0u, v_16);
+ S v_17 = v_3(384u);
+ v_2(192u, v_17);
v(592u, v_1(400u));
s.Store3(208u, asuint(asfloat(u[2u].xyz).zxy));
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x3_f32/to_workgroup.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat4x3_f32/to_workgroup.wgsl.expected.ir.dxc.hlsl
index 29890e1..0edb429d 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x3_f32/to_workgroup.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat4x3_f32/to_workgroup.wgsl.expected.ir.dxc.hlsl
@@ -14,64 +14,61 @@
};
groupshared S w[4];
float4x3 v(uint start_byte_offset) {
- float3 v_1 = asfloat(u[(start_byte_offset / 16u)].xyz);
- float3 v_2 = asfloat(u[((16u + start_byte_offset) / 16u)].xyz);
- float3 v_3 = asfloat(u[((32u + start_byte_offset) / 16u)].xyz);
- return float4x3(v_1, v_2, v_3, asfloat(u[((48u + start_byte_offset) / 16u)].xyz));
+ return float4x3(asfloat(u[(start_byte_offset / 16u)].xyz), asfloat(u[((16u + start_byte_offset) / 16u)].xyz), asfloat(u[((32u + start_byte_offset) / 16u)].xyz), asfloat(u[((48u + start_byte_offset) / 16u)].xyz));
}
-S v_4(uint start_byte_offset) {
- int v_5 = asint(u[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]);
- float4x3 v_6 = v((16u + start_byte_offset));
- S v_7 = {v_5, v_6, asint(u[((128u + start_byte_offset) / 16u)][(((128u + start_byte_offset) % 16u) / 4u)])};
- return v_7;
+S v_1(uint start_byte_offset) {
+ int v_2 = asint(u[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]);
+ float4x3 v_3 = v((16u + start_byte_offset));
+ S v_4 = {v_2, v_3, asint(u[((128u + start_byte_offset) / 16u)][(((128u + start_byte_offset) % 16u) / 4u)])};
+ return v_4;
}
typedef S ary_ret[4];
-ary_ret v_8(uint start_byte_offset) {
+ary_ret v_5(uint start_byte_offset) {
S a[4] = (S[4])0;
{
- uint v_9 = 0u;
- v_9 = 0u;
+ uint v_6 = 0u;
+ v_6 = 0u;
while(true) {
- uint v_10 = v_9;
- if ((v_10 >= 4u)) {
+ uint v_7 = v_6;
+ if ((v_7 >= 4u)) {
break;
}
- S v_11 = v_4((start_byte_offset + (v_10 * 192u)));
- a[v_10] = v_11;
+ S v_8 = v_1((start_byte_offset + (v_7 * 192u)));
+ a[v_7] = v_8;
{
- v_9 = (v_10 + 1u);
+ v_6 = (v_7 + 1u);
}
continue;
}
}
- S v_12[4] = a;
- return v_12;
+ S v_9[4] = a;
+ return v_9;
}
void f_inner(uint tint_local_index) {
{
- uint v_13 = 0u;
- v_13 = tint_local_index;
+ uint v_10 = 0u;
+ v_10 = tint_local_index;
while(true) {
- uint v_14 = v_13;
- if ((v_14 >= 4u)) {
+ uint v_11 = v_10;
+ if ((v_11 >= 4u)) {
break;
}
- S v_15 = (S)0;
- w[v_14] = v_15;
+ S v_12 = (S)0;
+ w[v_11] = v_12;
{
- v_13 = (v_14 + 1u);
+ v_10 = (v_11 + 1u);
}
continue;
}
}
GroupMemoryBarrierWithGroupSync();
- S v_16[4] = v_8(0u);
- w = v_16;
- S v_17 = v_4(384u);
- w[int(1)] = v_17;
+ S v_13[4] = v_5(0u);
+ w = v_13;
+ S v_14 = v_1(384u);
+ w[int(1)] = v_14;
w[int(3)].m = v(400u);
w[int(1)].m[int(0)] = asfloat(u[2u].xyz).zxy;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x3_f32/to_workgroup.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat4x3_f32/to_workgroup.wgsl.expected.ir.fxc.hlsl
index 29890e1..0edb429d 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x3_f32/to_workgroup.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat4x3_f32/to_workgroup.wgsl.expected.ir.fxc.hlsl
@@ -14,64 +14,61 @@
};
groupshared S w[4];
float4x3 v(uint start_byte_offset) {
- float3 v_1 = asfloat(u[(start_byte_offset / 16u)].xyz);
- float3 v_2 = asfloat(u[((16u + start_byte_offset) / 16u)].xyz);
- float3 v_3 = asfloat(u[((32u + start_byte_offset) / 16u)].xyz);
- return float4x3(v_1, v_2, v_3, asfloat(u[((48u + start_byte_offset) / 16u)].xyz));
+ return float4x3(asfloat(u[(start_byte_offset / 16u)].xyz), asfloat(u[((16u + start_byte_offset) / 16u)].xyz), asfloat(u[((32u + start_byte_offset) / 16u)].xyz), asfloat(u[((48u + start_byte_offset) / 16u)].xyz));
}
-S v_4(uint start_byte_offset) {
- int v_5 = asint(u[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]);
- float4x3 v_6 = v((16u + start_byte_offset));
- S v_7 = {v_5, v_6, asint(u[((128u + start_byte_offset) / 16u)][(((128u + start_byte_offset) % 16u) / 4u)])};
- return v_7;
+S v_1(uint start_byte_offset) {
+ int v_2 = asint(u[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]);
+ float4x3 v_3 = v((16u + start_byte_offset));
+ S v_4 = {v_2, v_3, asint(u[((128u + start_byte_offset) / 16u)][(((128u + start_byte_offset) % 16u) / 4u)])};
+ return v_4;
}
typedef S ary_ret[4];
-ary_ret v_8(uint start_byte_offset) {
+ary_ret v_5(uint start_byte_offset) {
S a[4] = (S[4])0;
{
- uint v_9 = 0u;
- v_9 = 0u;
+ uint v_6 = 0u;
+ v_6 = 0u;
while(true) {
- uint v_10 = v_9;
- if ((v_10 >= 4u)) {
+ uint v_7 = v_6;
+ if ((v_7 >= 4u)) {
break;
}
- S v_11 = v_4((start_byte_offset + (v_10 * 192u)));
- a[v_10] = v_11;
+ S v_8 = v_1((start_byte_offset + (v_7 * 192u)));
+ a[v_7] = v_8;
{
- v_9 = (v_10 + 1u);
+ v_6 = (v_7 + 1u);
}
continue;
}
}
- S v_12[4] = a;
- return v_12;
+ S v_9[4] = a;
+ return v_9;
}
void f_inner(uint tint_local_index) {
{
- uint v_13 = 0u;
- v_13 = tint_local_index;
+ uint v_10 = 0u;
+ v_10 = tint_local_index;
while(true) {
- uint v_14 = v_13;
- if ((v_14 >= 4u)) {
+ uint v_11 = v_10;
+ if ((v_11 >= 4u)) {
break;
}
- S v_15 = (S)0;
- w[v_14] = v_15;
+ S v_12 = (S)0;
+ w[v_11] = v_12;
{
- v_13 = (v_14 + 1u);
+ v_10 = (v_11 + 1u);
}
continue;
}
}
GroupMemoryBarrierWithGroupSync();
- S v_16[4] = v_8(0u);
- w = v_16;
- S v_17 = v_4(384u);
- w[int(1)] = v_17;
+ S v_13[4] = v_5(0u);
+ w = v_13;
+ S v_14 = v_1(384u);
+ w[int(1)] = v_14;
w[int(3)].m = v(400u);
w[int(1)].m[int(0)] = asfloat(u[2u].xyz).zxy;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x4_f32/dynamic_index_via_ptr.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat4x4_f32/dynamic_index_via_ptr.wgsl.expected.ir.dxc.hlsl
index e1efcf0..97e2183 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x4_f32/dynamic_index_via_ptr.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat4x4_f32/dynamic_index_via_ptr.wgsl.expected.ir.dxc.hlsl
@@ -17,81 +17,78 @@
}
float4x4 v(uint start_byte_offset) {
- float4 v_1 = asfloat(a[(start_byte_offset / 16u)]);
- float4 v_2 = asfloat(a[((16u + start_byte_offset) / 16u)]);
- float4 v_3 = asfloat(a[((32u + start_byte_offset) / 16u)]);
- return float4x4(v_1, v_2, v_3, asfloat(a[((48u + start_byte_offset) / 16u)]));
+ return float4x4(asfloat(a[(start_byte_offset / 16u)]), asfloat(a[((16u + start_byte_offset) / 16u)]), asfloat(a[((32u + start_byte_offset) / 16u)]), asfloat(a[((48u + start_byte_offset) / 16u)]));
}
-Inner v_4(uint start_byte_offset) {
- Inner v_5 = {v(start_byte_offset)};
- return v_5;
+Inner v_1(uint start_byte_offset) {
+ Inner v_2 = {v(start_byte_offset)};
+ return v_2;
}
typedef Inner ary_ret[4];
-ary_ret v_6(uint start_byte_offset) {
+ary_ret v_3(uint start_byte_offset) {
Inner a_2[4] = (Inner[4])0;
{
- uint v_7 = 0u;
- v_7 = 0u;
+ uint v_4 = 0u;
+ v_4 = 0u;
while(true) {
- uint v_8 = v_7;
- if ((v_8 >= 4u)) {
+ uint v_5 = v_4;
+ if ((v_5 >= 4u)) {
break;
}
- Inner v_9 = v_4((start_byte_offset + (v_8 * 64u)));
- a_2[v_8] = v_9;
+ Inner v_6 = v_1((start_byte_offset + (v_5 * 64u)));
+ a_2[v_5] = v_6;
{
- v_7 = (v_8 + 1u);
+ v_4 = (v_5 + 1u);
}
continue;
}
}
- Inner v_10[4] = a_2;
+ Inner v_7[4] = a_2;
+ return v_7;
+}
+
+Outer v_8(uint start_byte_offset) {
+ Inner v_9[4] = v_3(start_byte_offset);
+ Outer v_10 = {v_9};
return v_10;
}
-Outer v_11(uint start_byte_offset) {
- Inner v_12[4] = v_6(start_byte_offset);
- Outer v_13 = {v_12};
- return v_13;
-}
-
typedef Outer ary_ret_1[4];
-ary_ret_1 v_14(uint start_byte_offset) {
+ary_ret_1 v_11(uint start_byte_offset) {
Outer a_1[4] = (Outer[4])0;
{
- uint v_15 = 0u;
- v_15 = 0u;
+ uint v_12 = 0u;
+ v_12 = 0u;
while(true) {
- uint v_16 = v_15;
- if ((v_16 >= 4u)) {
+ uint v_13 = v_12;
+ if ((v_13 >= 4u)) {
break;
}
- Outer v_17 = v_11((start_byte_offset + (v_16 * 256u)));
- a_1[v_16] = v_17;
+ Outer v_14 = v_8((start_byte_offset + (v_13 * 256u)));
+ a_1[v_13] = v_14;
{
- v_15 = (v_16 + 1u);
+ v_12 = (v_13 + 1u);
}
continue;
}
}
- Outer v_18[4] = a_1;
- return v_18;
+ Outer v_15[4] = a_1;
+ return v_15;
}
[numthreads(1, 1, 1)]
void f() {
- uint v_19 = (256u * uint(i()));
- uint v_20 = (64u * uint(i()));
- uint v_21 = (16u * uint(i()));
- Outer l_a[4] = v_14(0u);
- Outer l_a_i = v_11(v_19);
- Inner l_a_i_a[4] = v_6(v_19);
- Inner l_a_i_a_i = v_4((v_19 + v_20));
- float4x4 l_a_i_a_i_m = v((v_19 + v_20));
- float4 l_a_i_a_i_m_i = asfloat(a[(((v_19 + v_20) + v_21) / 16u)]);
- uint v_22 = (((v_19 + v_20) + v_21) + (uint(i()) * 4u));
- float l_a_i_a_i_m_i_i = asfloat(a[(v_22 / 16u)][((v_22 % 16u) / 4u)]);
+ uint v_16 = (256u * uint(i()));
+ uint v_17 = (64u * uint(i()));
+ uint v_18 = (16u * uint(i()));
+ Outer l_a[4] = v_11(0u);
+ Outer l_a_i = v_8(v_16);
+ Inner l_a_i_a[4] = v_3(v_16);
+ Inner l_a_i_a_i = v_1((v_16 + v_17));
+ float4x4 l_a_i_a_i_m = v((v_16 + v_17));
+ float4 l_a_i_a_i_m_i = asfloat(a[(((v_16 + v_17) + v_18) / 16u)]);
+ uint v_19 = (((v_16 + v_17) + v_18) + (uint(i()) * 4u));
+ float l_a_i_a_i_m_i_i = asfloat(a[(v_19 / 16u)][((v_19 % 16u) / 4u)]);
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x4_f32/dynamic_index_via_ptr.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat4x4_f32/dynamic_index_via_ptr.wgsl.expected.ir.fxc.hlsl
index e1efcf0..97e2183 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x4_f32/dynamic_index_via_ptr.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat4x4_f32/dynamic_index_via_ptr.wgsl.expected.ir.fxc.hlsl
@@ -17,81 +17,78 @@
}
float4x4 v(uint start_byte_offset) {
- float4 v_1 = asfloat(a[(start_byte_offset / 16u)]);
- float4 v_2 = asfloat(a[((16u + start_byte_offset) / 16u)]);
- float4 v_3 = asfloat(a[((32u + start_byte_offset) / 16u)]);
- return float4x4(v_1, v_2, v_3, asfloat(a[((48u + start_byte_offset) / 16u)]));
+ return float4x4(asfloat(a[(start_byte_offset / 16u)]), asfloat(a[((16u + start_byte_offset) / 16u)]), asfloat(a[((32u + start_byte_offset) / 16u)]), asfloat(a[((48u + start_byte_offset) / 16u)]));
}
-Inner v_4(uint start_byte_offset) {
- Inner v_5 = {v(start_byte_offset)};
- return v_5;
+Inner v_1(uint start_byte_offset) {
+ Inner v_2 = {v(start_byte_offset)};
+ return v_2;
}
typedef Inner ary_ret[4];
-ary_ret v_6(uint start_byte_offset) {
+ary_ret v_3(uint start_byte_offset) {
Inner a_2[4] = (Inner[4])0;
{
- uint v_7 = 0u;
- v_7 = 0u;
+ uint v_4 = 0u;
+ v_4 = 0u;
while(true) {
- uint v_8 = v_7;
- if ((v_8 >= 4u)) {
+ uint v_5 = v_4;
+ if ((v_5 >= 4u)) {
break;
}
- Inner v_9 = v_4((start_byte_offset + (v_8 * 64u)));
- a_2[v_8] = v_9;
+ Inner v_6 = v_1((start_byte_offset + (v_5 * 64u)));
+ a_2[v_5] = v_6;
{
- v_7 = (v_8 + 1u);
+ v_4 = (v_5 + 1u);
}
continue;
}
}
- Inner v_10[4] = a_2;
+ Inner v_7[4] = a_2;
+ return v_7;
+}
+
+Outer v_8(uint start_byte_offset) {
+ Inner v_9[4] = v_3(start_byte_offset);
+ Outer v_10 = {v_9};
return v_10;
}
-Outer v_11(uint start_byte_offset) {
- Inner v_12[4] = v_6(start_byte_offset);
- Outer v_13 = {v_12};
- return v_13;
-}
-
typedef Outer ary_ret_1[4];
-ary_ret_1 v_14(uint start_byte_offset) {
+ary_ret_1 v_11(uint start_byte_offset) {
Outer a_1[4] = (Outer[4])0;
{
- uint v_15 = 0u;
- v_15 = 0u;
+ uint v_12 = 0u;
+ v_12 = 0u;
while(true) {
- uint v_16 = v_15;
- if ((v_16 >= 4u)) {
+ uint v_13 = v_12;
+ if ((v_13 >= 4u)) {
break;
}
- Outer v_17 = v_11((start_byte_offset + (v_16 * 256u)));
- a_1[v_16] = v_17;
+ Outer v_14 = v_8((start_byte_offset + (v_13 * 256u)));
+ a_1[v_13] = v_14;
{
- v_15 = (v_16 + 1u);
+ v_12 = (v_13 + 1u);
}
continue;
}
}
- Outer v_18[4] = a_1;
- return v_18;
+ Outer v_15[4] = a_1;
+ return v_15;
}
[numthreads(1, 1, 1)]
void f() {
- uint v_19 = (256u * uint(i()));
- uint v_20 = (64u * uint(i()));
- uint v_21 = (16u * uint(i()));
- Outer l_a[4] = v_14(0u);
- Outer l_a_i = v_11(v_19);
- Inner l_a_i_a[4] = v_6(v_19);
- Inner l_a_i_a_i = v_4((v_19 + v_20));
- float4x4 l_a_i_a_i_m = v((v_19 + v_20));
- float4 l_a_i_a_i_m_i = asfloat(a[(((v_19 + v_20) + v_21) / 16u)]);
- uint v_22 = (((v_19 + v_20) + v_21) + (uint(i()) * 4u));
- float l_a_i_a_i_m_i_i = asfloat(a[(v_22 / 16u)][((v_22 % 16u) / 4u)]);
+ uint v_16 = (256u * uint(i()));
+ uint v_17 = (64u * uint(i()));
+ uint v_18 = (16u * uint(i()));
+ Outer l_a[4] = v_11(0u);
+ Outer l_a_i = v_8(v_16);
+ Inner l_a_i_a[4] = v_3(v_16);
+ Inner l_a_i_a_i = v_1((v_16 + v_17));
+ float4x4 l_a_i_a_i_m = v((v_16 + v_17));
+ float4 l_a_i_a_i_m_i = asfloat(a[(((v_16 + v_17) + v_18) / 16u)]);
+ uint v_19 = (((v_16 + v_17) + v_18) + (uint(i()) * 4u));
+ float l_a_i_a_i_m_i_i = asfloat(a[(v_19 / 16u)][((v_19 % 16u) / 4u)]);
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x4_f32/static_index_via_ptr.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat4x4_f32/static_index_via_ptr.wgsl.expected.ir.dxc.hlsl
index 0cf0757..1f87c84 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x4_f32/static_index_via_ptr.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat4x4_f32/static_index_via_ptr.wgsl.expected.ir.dxc.hlsl
@@ -11,75 +11,72 @@
uint4 a[64];
};
float4x4 v(uint start_byte_offset) {
- float4 v_1 = asfloat(a[(start_byte_offset / 16u)]);
- float4 v_2 = asfloat(a[((16u + start_byte_offset) / 16u)]);
- float4 v_3 = asfloat(a[((32u + start_byte_offset) / 16u)]);
- return float4x4(v_1, v_2, v_3, asfloat(a[((48u + start_byte_offset) / 16u)]));
+ return float4x4(asfloat(a[(start_byte_offset / 16u)]), asfloat(a[((16u + start_byte_offset) / 16u)]), asfloat(a[((32u + start_byte_offset) / 16u)]), asfloat(a[((48u + start_byte_offset) / 16u)]));
}
-Inner v_4(uint start_byte_offset) {
- Inner v_5 = {v(start_byte_offset)};
- return v_5;
+Inner v_1(uint start_byte_offset) {
+ Inner v_2 = {v(start_byte_offset)};
+ return v_2;
}
typedef Inner ary_ret[4];
-ary_ret v_6(uint start_byte_offset) {
+ary_ret v_3(uint start_byte_offset) {
Inner a_2[4] = (Inner[4])0;
{
- uint v_7 = 0u;
- v_7 = 0u;
+ uint v_4 = 0u;
+ v_4 = 0u;
while(true) {
- uint v_8 = v_7;
- if ((v_8 >= 4u)) {
+ uint v_5 = v_4;
+ if ((v_5 >= 4u)) {
break;
}
- Inner v_9 = v_4((start_byte_offset + (v_8 * 64u)));
- a_2[v_8] = v_9;
+ Inner v_6 = v_1((start_byte_offset + (v_5 * 64u)));
+ a_2[v_5] = v_6;
{
- v_7 = (v_8 + 1u);
+ v_4 = (v_5 + 1u);
}
continue;
}
}
- Inner v_10[4] = a_2;
+ Inner v_7[4] = a_2;
+ return v_7;
+}
+
+Outer v_8(uint start_byte_offset) {
+ Inner v_9[4] = v_3(start_byte_offset);
+ Outer v_10 = {v_9};
return v_10;
}
-Outer v_11(uint start_byte_offset) {
- Inner v_12[4] = v_6(start_byte_offset);
- Outer v_13 = {v_12};
- return v_13;
-}
-
typedef Outer ary_ret_1[4];
-ary_ret_1 v_14(uint start_byte_offset) {
+ary_ret_1 v_11(uint start_byte_offset) {
Outer a_1[4] = (Outer[4])0;
{
- uint v_15 = 0u;
- v_15 = 0u;
+ uint v_12 = 0u;
+ v_12 = 0u;
while(true) {
- uint v_16 = v_15;
- if ((v_16 >= 4u)) {
+ uint v_13 = v_12;
+ if ((v_13 >= 4u)) {
break;
}
- Outer v_17 = v_11((start_byte_offset + (v_16 * 256u)));
- a_1[v_16] = v_17;
+ Outer v_14 = v_8((start_byte_offset + (v_13 * 256u)));
+ a_1[v_13] = v_14;
{
- v_15 = (v_16 + 1u);
+ v_12 = (v_13 + 1u);
}
continue;
}
}
- Outer v_18[4] = a_1;
- return v_18;
+ Outer v_15[4] = a_1;
+ return v_15;
}
[numthreads(1, 1, 1)]
void f() {
- Outer l_a[4] = v_14(0u);
- Outer l_a_3 = v_11(768u);
- Inner l_a_3_a[4] = v_6(768u);
- Inner l_a_3_a_2 = v_4(896u);
+ Outer l_a[4] = v_11(0u);
+ Outer l_a_3 = v_8(768u);
+ Inner l_a_3_a[4] = v_3(768u);
+ Inner l_a_3_a_2 = v_1(896u);
float4x4 l_a_3_a_2_m = v(896u);
float4 l_a_3_a_2_m_1 = asfloat(a[57u]);
float l_a_3_a_2_m_1_0 = asfloat(a[57u].x);
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x4_f32/static_index_via_ptr.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat4x4_f32/static_index_via_ptr.wgsl.expected.ir.fxc.hlsl
index 0cf0757..1f87c84 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x4_f32/static_index_via_ptr.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat4x4_f32/static_index_via_ptr.wgsl.expected.ir.fxc.hlsl
@@ -11,75 +11,72 @@
uint4 a[64];
};
float4x4 v(uint start_byte_offset) {
- float4 v_1 = asfloat(a[(start_byte_offset / 16u)]);
- float4 v_2 = asfloat(a[((16u + start_byte_offset) / 16u)]);
- float4 v_3 = asfloat(a[((32u + start_byte_offset) / 16u)]);
- return float4x4(v_1, v_2, v_3, asfloat(a[((48u + start_byte_offset) / 16u)]));
+ return float4x4(asfloat(a[(start_byte_offset / 16u)]), asfloat(a[((16u + start_byte_offset) / 16u)]), asfloat(a[((32u + start_byte_offset) / 16u)]), asfloat(a[((48u + start_byte_offset) / 16u)]));
}
-Inner v_4(uint start_byte_offset) {
- Inner v_5 = {v(start_byte_offset)};
- return v_5;
+Inner v_1(uint start_byte_offset) {
+ Inner v_2 = {v(start_byte_offset)};
+ return v_2;
}
typedef Inner ary_ret[4];
-ary_ret v_6(uint start_byte_offset) {
+ary_ret v_3(uint start_byte_offset) {
Inner a_2[4] = (Inner[4])0;
{
- uint v_7 = 0u;
- v_7 = 0u;
+ uint v_4 = 0u;
+ v_4 = 0u;
while(true) {
- uint v_8 = v_7;
- if ((v_8 >= 4u)) {
+ uint v_5 = v_4;
+ if ((v_5 >= 4u)) {
break;
}
- Inner v_9 = v_4((start_byte_offset + (v_8 * 64u)));
- a_2[v_8] = v_9;
+ Inner v_6 = v_1((start_byte_offset + (v_5 * 64u)));
+ a_2[v_5] = v_6;
{
- v_7 = (v_8 + 1u);
+ v_4 = (v_5 + 1u);
}
continue;
}
}
- Inner v_10[4] = a_2;
+ Inner v_7[4] = a_2;
+ return v_7;
+}
+
+Outer v_8(uint start_byte_offset) {
+ Inner v_9[4] = v_3(start_byte_offset);
+ Outer v_10 = {v_9};
return v_10;
}
-Outer v_11(uint start_byte_offset) {
- Inner v_12[4] = v_6(start_byte_offset);
- Outer v_13 = {v_12};
- return v_13;
-}
-
typedef Outer ary_ret_1[4];
-ary_ret_1 v_14(uint start_byte_offset) {
+ary_ret_1 v_11(uint start_byte_offset) {
Outer a_1[4] = (Outer[4])0;
{
- uint v_15 = 0u;
- v_15 = 0u;
+ uint v_12 = 0u;
+ v_12 = 0u;
while(true) {
- uint v_16 = v_15;
- if ((v_16 >= 4u)) {
+ uint v_13 = v_12;
+ if ((v_13 >= 4u)) {
break;
}
- Outer v_17 = v_11((start_byte_offset + (v_16 * 256u)));
- a_1[v_16] = v_17;
+ Outer v_14 = v_8((start_byte_offset + (v_13 * 256u)));
+ a_1[v_13] = v_14;
{
- v_15 = (v_16 + 1u);
+ v_12 = (v_13 + 1u);
}
continue;
}
}
- Outer v_18[4] = a_1;
- return v_18;
+ Outer v_15[4] = a_1;
+ return v_15;
}
[numthreads(1, 1, 1)]
void f() {
- Outer l_a[4] = v_14(0u);
- Outer l_a_3 = v_11(768u);
- Inner l_a_3_a[4] = v_6(768u);
- Inner l_a_3_a_2 = v_4(896u);
+ Outer l_a[4] = v_11(0u);
+ Outer l_a_3 = v_8(768u);
+ Inner l_a_3_a[4] = v_3(768u);
+ Inner l_a_3_a_2 = v_1(896u);
float4x4 l_a_3_a_2_m = v(896u);
float4 l_a_3_a_2_m_1 = asfloat(a[57u]);
float l_a_3_a_2_m_1_0 = asfloat(a[57u].x);
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x4_f32/to_builtin.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat4x4_f32/to_builtin.wgsl.expected.ir.dxc.hlsl
index 7247765..0d61772 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x4_f32/to_builtin.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat4x4_f32/to_builtin.wgsl.expected.ir.dxc.hlsl
@@ -3,10 +3,7 @@
uint4 u[48];
};
float4x4 v(uint start_byte_offset) {
- float4 v_1 = asfloat(u[(start_byte_offset / 16u)]);
- float4 v_2 = asfloat(u[((16u + start_byte_offset) / 16u)]);
- float4 v_3 = asfloat(u[((32u + start_byte_offset) / 16u)]);
- return float4x4(v_1, v_2, v_3, asfloat(u[((48u + start_byte_offset) / 16u)]));
+ return float4x4(asfloat(u[(start_byte_offset / 16u)]), asfloat(u[((16u + start_byte_offset) / 16u)]), asfloat(u[((32u + start_byte_offset) / 16u)]), asfloat(u[((48u + start_byte_offset) / 16u)]));
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x4_f32/to_builtin.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat4x4_f32/to_builtin.wgsl.expected.ir.fxc.hlsl
index 7247765..0d61772 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x4_f32/to_builtin.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat4x4_f32/to_builtin.wgsl.expected.ir.fxc.hlsl
@@ -3,10 +3,7 @@
uint4 u[48];
};
float4x4 v(uint start_byte_offset) {
- float4 v_1 = asfloat(u[(start_byte_offset / 16u)]);
- float4 v_2 = asfloat(u[((16u + start_byte_offset) / 16u)]);
- float4 v_3 = asfloat(u[((32u + start_byte_offset) / 16u)]);
- return float4x4(v_1, v_2, v_3, asfloat(u[((48u + start_byte_offset) / 16u)]));
+ return float4x4(asfloat(u[(start_byte_offset / 16u)]), asfloat(u[((16u + start_byte_offset) / 16u)]), asfloat(u[((32u + start_byte_offset) / 16u)]), asfloat(u[((48u + start_byte_offset) / 16u)]));
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x4_f32/to_fn.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat4x4_f32/to_fn.wgsl.expected.ir.dxc.hlsl
index 45ad235..cd3c37e 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x4_f32/to_fn.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat4x4_f32/to_fn.wgsl.expected.ir.dxc.hlsl
@@ -24,48 +24,45 @@
}
float4x4 v_1(uint start_byte_offset) {
- float4 v_2 = asfloat(u[(start_byte_offset / 16u)]);
- float4 v_3 = asfloat(u[((16u + start_byte_offset) / 16u)]);
- float4 v_4 = asfloat(u[((32u + start_byte_offset) / 16u)]);
- return float4x4(v_2, v_3, v_4, asfloat(u[((48u + start_byte_offset) / 16u)]));
+ return float4x4(asfloat(u[(start_byte_offset / 16u)]), asfloat(u[((16u + start_byte_offset) / 16u)]), asfloat(u[((32u + start_byte_offset) / 16u)]), asfloat(u[((48u + start_byte_offset) / 16u)]));
}
-S v_5(uint start_byte_offset) {
- int v_6 = asint(u[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]);
- float4x4 v_7 = v_1((16u + start_byte_offset));
- S v_8 = {v_6, v_7, asint(u[((128u + start_byte_offset) / 16u)][(((128u + start_byte_offset) % 16u) / 4u)])};
- return v_8;
+S v_2(uint start_byte_offset) {
+ int v_3 = asint(u[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]);
+ float4x4 v_4 = v_1((16u + start_byte_offset));
+ S v_5 = {v_3, v_4, asint(u[((128u + start_byte_offset) / 16u)][(((128u + start_byte_offset) % 16u) / 4u)])};
+ return v_5;
}
typedef S ary_ret[4];
-ary_ret v_9(uint start_byte_offset) {
+ary_ret v_6(uint start_byte_offset) {
S a_2[4] = (S[4])0;
{
- uint v_10 = 0u;
- v_10 = 0u;
+ uint v_7 = 0u;
+ v_7 = 0u;
while(true) {
- uint v_11 = v_10;
- if ((v_11 >= 4u)) {
+ uint v_8 = v_7;
+ if ((v_8 >= 4u)) {
break;
}
- S v_12 = v_5((start_byte_offset + (v_11 * 192u)));
- a_2[v_11] = v_12;
+ S v_9 = v_2((start_byte_offset + (v_8 * 192u)));
+ a_2[v_8] = v_9;
{
- v_10 = (v_11 + 1u);
+ v_7 = (v_8 + 1u);
}
continue;
}
}
- S v_13[4] = a_2;
- return v_13;
+ S v_10[4] = a_2;
+ return v_10;
}
[numthreads(1, 1, 1)]
void f() {
- S v_14[4] = v_9(0u);
- a(v_14);
- S v_15 = v_5(384u);
- b(v_15);
+ S v_11[4] = v_6(0u);
+ a(v_11);
+ S v_12 = v_2(384u);
+ b(v_12);
c(v_1(400u));
d(asfloat(u[2u]).ywxz);
e(asfloat(u[2u]).ywxz.x);
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x4_f32/to_fn.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat4x4_f32/to_fn.wgsl.expected.ir.fxc.hlsl
index 45ad235..cd3c37e 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x4_f32/to_fn.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat4x4_f32/to_fn.wgsl.expected.ir.fxc.hlsl
@@ -24,48 +24,45 @@
}
float4x4 v_1(uint start_byte_offset) {
- float4 v_2 = asfloat(u[(start_byte_offset / 16u)]);
- float4 v_3 = asfloat(u[((16u + start_byte_offset) / 16u)]);
- float4 v_4 = asfloat(u[((32u + start_byte_offset) / 16u)]);
- return float4x4(v_2, v_3, v_4, asfloat(u[((48u + start_byte_offset) / 16u)]));
+ return float4x4(asfloat(u[(start_byte_offset / 16u)]), asfloat(u[((16u + start_byte_offset) / 16u)]), asfloat(u[((32u + start_byte_offset) / 16u)]), asfloat(u[((48u + start_byte_offset) / 16u)]));
}
-S v_5(uint start_byte_offset) {
- int v_6 = asint(u[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]);
- float4x4 v_7 = v_1((16u + start_byte_offset));
- S v_8 = {v_6, v_7, asint(u[((128u + start_byte_offset) / 16u)][(((128u + start_byte_offset) % 16u) / 4u)])};
- return v_8;
+S v_2(uint start_byte_offset) {
+ int v_3 = asint(u[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]);
+ float4x4 v_4 = v_1((16u + start_byte_offset));
+ S v_5 = {v_3, v_4, asint(u[((128u + start_byte_offset) / 16u)][(((128u + start_byte_offset) % 16u) / 4u)])};
+ return v_5;
}
typedef S ary_ret[4];
-ary_ret v_9(uint start_byte_offset) {
+ary_ret v_6(uint start_byte_offset) {
S a_2[4] = (S[4])0;
{
- uint v_10 = 0u;
- v_10 = 0u;
+ uint v_7 = 0u;
+ v_7 = 0u;
while(true) {
- uint v_11 = v_10;
- if ((v_11 >= 4u)) {
+ uint v_8 = v_7;
+ if ((v_8 >= 4u)) {
break;
}
- S v_12 = v_5((start_byte_offset + (v_11 * 192u)));
- a_2[v_11] = v_12;
+ S v_9 = v_2((start_byte_offset + (v_8 * 192u)));
+ a_2[v_8] = v_9;
{
- v_10 = (v_11 + 1u);
+ v_7 = (v_8 + 1u);
}
continue;
}
}
- S v_13[4] = a_2;
- return v_13;
+ S v_10[4] = a_2;
+ return v_10;
}
[numthreads(1, 1, 1)]
void f() {
- S v_14[4] = v_9(0u);
- a(v_14);
- S v_15 = v_5(384u);
- b(v_15);
+ S v_11[4] = v_6(0u);
+ a(v_11);
+ S v_12 = v_2(384u);
+ b(v_12);
c(v_1(400u));
d(asfloat(u[2u]).ywxz);
e(asfloat(u[2u]).ywxz.x);
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x4_f32/to_private.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat4x4_f32/to_private.wgsl.expected.ir.dxc.hlsl
index 320f1f1..9f77f6f 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x4_f32/to_private.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat4x4_f32/to_private.wgsl.expected.ir.dxc.hlsl
@@ -10,48 +10,45 @@
};
static S p[4] = (S[4])0;
float4x4 v(uint start_byte_offset) {
- float4 v_1 = asfloat(u[(start_byte_offset / 16u)]);
- float4 v_2 = asfloat(u[((16u + start_byte_offset) / 16u)]);
- float4 v_3 = asfloat(u[((32u + start_byte_offset) / 16u)]);
- return float4x4(v_1, v_2, v_3, asfloat(u[((48u + start_byte_offset) / 16u)]));
+ return float4x4(asfloat(u[(start_byte_offset / 16u)]), asfloat(u[((16u + start_byte_offset) / 16u)]), asfloat(u[((32u + start_byte_offset) / 16u)]), asfloat(u[((48u + start_byte_offset) / 16u)]));
}
-S v_4(uint start_byte_offset) {
- int v_5 = asint(u[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]);
- float4x4 v_6 = v((16u + start_byte_offset));
- S v_7 = {v_5, v_6, asint(u[((128u + start_byte_offset) / 16u)][(((128u + start_byte_offset) % 16u) / 4u)])};
- return v_7;
+S v_1(uint start_byte_offset) {
+ int v_2 = asint(u[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]);
+ float4x4 v_3 = v((16u + start_byte_offset));
+ S v_4 = {v_2, v_3, asint(u[((128u + start_byte_offset) / 16u)][(((128u + start_byte_offset) % 16u) / 4u)])};
+ return v_4;
}
typedef S ary_ret[4];
-ary_ret v_8(uint start_byte_offset) {
+ary_ret v_5(uint start_byte_offset) {
S a[4] = (S[4])0;
{
- uint v_9 = 0u;
- v_9 = 0u;
+ uint v_6 = 0u;
+ v_6 = 0u;
while(true) {
- uint v_10 = v_9;
- if ((v_10 >= 4u)) {
+ uint v_7 = v_6;
+ if ((v_7 >= 4u)) {
break;
}
- S v_11 = v_4((start_byte_offset + (v_10 * 192u)));
- a[v_10] = v_11;
+ S v_8 = v_1((start_byte_offset + (v_7 * 192u)));
+ a[v_7] = v_8;
{
- v_9 = (v_10 + 1u);
+ v_6 = (v_7 + 1u);
}
continue;
}
}
- S v_12[4] = a;
- return v_12;
+ S v_9[4] = a;
+ return v_9;
}
[numthreads(1, 1, 1)]
void f() {
- S v_13[4] = v_8(0u);
- p = v_13;
- S v_14 = v_4(384u);
- p[int(1)] = v_14;
+ S v_10[4] = v_5(0u);
+ p = v_10;
+ S v_11 = v_1(384u);
+ p[int(1)] = v_11;
p[int(3)].m = v(400u);
p[int(1)].m[int(0)] = asfloat(u[2u]).ywxz;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x4_f32/to_private.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat4x4_f32/to_private.wgsl.expected.ir.fxc.hlsl
index 320f1f1..9f77f6f 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x4_f32/to_private.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat4x4_f32/to_private.wgsl.expected.ir.fxc.hlsl
@@ -10,48 +10,45 @@
};
static S p[4] = (S[4])0;
float4x4 v(uint start_byte_offset) {
- float4 v_1 = asfloat(u[(start_byte_offset / 16u)]);
- float4 v_2 = asfloat(u[((16u + start_byte_offset) / 16u)]);
- float4 v_3 = asfloat(u[((32u + start_byte_offset) / 16u)]);
- return float4x4(v_1, v_2, v_3, asfloat(u[((48u + start_byte_offset) / 16u)]));
+ return float4x4(asfloat(u[(start_byte_offset / 16u)]), asfloat(u[((16u + start_byte_offset) / 16u)]), asfloat(u[((32u + start_byte_offset) / 16u)]), asfloat(u[((48u + start_byte_offset) / 16u)]));
}
-S v_4(uint start_byte_offset) {
- int v_5 = asint(u[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]);
- float4x4 v_6 = v((16u + start_byte_offset));
- S v_7 = {v_5, v_6, asint(u[((128u + start_byte_offset) / 16u)][(((128u + start_byte_offset) % 16u) / 4u)])};
- return v_7;
+S v_1(uint start_byte_offset) {
+ int v_2 = asint(u[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]);
+ float4x4 v_3 = v((16u + start_byte_offset));
+ S v_4 = {v_2, v_3, asint(u[((128u + start_byte_offset) / 16u)][(((128u + start_byte_offset) % 16u) / 4u)])};
+ return v_4;
}
typedef S ary_ret[4];
-ary_ret v_8(uint start_byte_offset) {
+ary_ret v_5(uint start_byte_offset) {
S a[4] = (S[4])0;
{
- uint v_9 = 0u;
- v_9 = 0u;
+ uint v_6 = 0u;
+ v_6 = 0u;
while(true) {
- uint v_10 = v_9;
- if ((v_10 >= 4u)) {
+ uint v_7 = v_6;
+ if ((v_7 >= 4u)) {
break;
}
- S v_11 = v_4((start_byte_offset + (v_10 * 192u)));
- a[v_10] = v_11;
+ S v_8 = v_1((start_byte_offset + (v_7 * 192u)));
+ a[v_7] = v_8;
{
- v_9 = (v_10 + 1u);
+ v_6 = (v_7 + 1u);
}
continue;
}
}
- S v_12[4] = a;
- return v_12;
+ S v_9[4] = a;
+ return v_9;
}
[numthreads(1, 1, 1)]
void f() {
- S v_13[4] = v_8(0u);
- p = v_13;
- S v_14 = v_4(384u);
- p[int(1)] = v_14;
+ S v_10[4] = v_5(0u);
+ p = v_10;
+ S v_11 = v_1(384u);
+ p[int(1)] = v_11;
p[int(3)].m = v(400u);
p[int(1)].m[int(0)] = asfloat(u[2u]).ywxz;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x4_f32/to_storage.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat4x4_f32/to_storage.wgsl.expected.ir.dxc.hlsl
index 8da18b2..fd22210 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x4_f32/to_storage.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat4x4_f32/to_storage.wgsl.expected.ir.dxc.hlsl
@@ -17,38 +17,35 @@
}
float4x4 v_1(uint start_byte_offset) {
- float4 v_2 = asfloat(u[(start_byte_offset / 16u)]);
- float4 v_3 = asfloat(u[((16u + start_byte_offset) / 16u)]);
- float4 v_4 = asfloat(u[((32u + start_byte_offset) / 16u)]);
- return float4x4(v_2, v_3, v_4, asfloat(u[((48u + start_byte_offset) / 16u)]));
+ return float4x4(asfloat(u[(start_byte_offset / 16u)]), asfloat(u[((16u + start_byte_offset) / 16u)]), asfloat(u[((32u + start_byte_offset) / 16u)]), asfloat(u[((48u + start_byte_offset) / 16u)]));
}
-void v_5(uint offset, S obj) {
+void v_2(uint offset, S obj) {
s.Store((offset + 0u), asuint(obj.before));
v((offset + 16u), obj.m);
s.Store((offset + 128u), asuint(obj.after));
}
-S v_6(uint start_byte_offset) {
- int v_7 = asint(u[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]);
- float4x4 v_8 = v_1((16u + start_byte_offset));
- S v_9 = {v_7, v_8, asint(u[((128u + start_byte_offset) / 16u)][(((128u + start_byte_offset) % 16u) / 4u)])};
- return v_9;
+S v_3(uint start_byte_offset) {
+ int v_4 = asint(u[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]);
+ float4x4 v_5 = v_1((16u + start_byte_offset));
+ S v_6 = {v_4, v_5, asint(u[((128u + start_byte_offset) / 16u)][(((128u + start_byte_offset) % 16u) / 4u)])};
+ return v_6;
}
-void v_10(uint offset, S obj[4]) {
+void v_7(uint offset, S obj[4]) {
{
- uint v_11 = 0u;
- v_11 = 0u;
+ uint v_8 = 0u;
+ v_8 = 0u;
while(true) {
- uint v_12 = v_11;
- if ((v_12 >= 4u)) {
+ uint v_9 = v_8;
+ if ((v_9 >= 4u)) {
break;
}
- S v_13 = obj[v_12];
- v_5((offset + (v_12 * 192u)), v_13);
+ S v_10 = obj[v_9];
+ v_2((offset + (v_9 * 192u)), v_10);
{
- v_11 = (v_12 + 1u);
+ v_8 = (v_9 + 1u);
}
continue;
}
@@ -56,34 +53,34 @@
}
typedef S ary_ret[4];
-ary_ret v_14(uint start_byte_offset) {
+ary_ret v_11(uint start_byte_offset) {
S a[4] = (S[4])0;
{
- uint v_15 = 0u;
- v_15 = 0u;
+ uint v_12 = 0u;
+ v_12 = 0u;
while(true) {
- uint v_16 = v_15;
- if ((v_16 >= 4u)) {
+ uint v_13 = v_12;
+ if ((v_13 >= 4u)) {
break;
}
- S v_17 = v_6((start_byte_offset + (v_16 * 192u)));
- a[v_16] = v_17;
+ S v_14 = v_3((start_byte_offset + (v_13 * 192u)));
+ a[v_13] = v_14;
{
- v_15 = (v_16 + 1u);
+ v_12 = (v_13 + 1u);
}
continue;
}
}
- S v_18[4] = a;
- return v_18;
+ S v_15[4] = a;
+ return v_15;
}
[numthreads(1, 1, 1)]
void f() {
- S v_19[4] = v_14(0u);
- v_10(0u, v_19);
- S v_20 = v_6(384u);
- v_5(192u, v_20);
+ S v_16[4] = v_11(0u);
+ v_7(0u, v_16);
+ S v_17 = v_3(384u);
+ v_2(192u, v_17);
v(592u, v_1(400u));
s.Store4(208u, asuint(asfloat(u[2u]).ywxz));
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x4_f32/to_storage.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat4x4_f32/to_storage.wgsl.expected.ir.fxc.hlsl
index 8da18b2..fd22210 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x4_f32/to_storage.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat4x4_f32/to_storage.wgsl.expected.ir.fxc.hlsl
@@ -17,38 +17,35 @@
}
float4x4 v_1(uint start_byte_offset) {
- float4 v_2 = asfloat(u[(start_byte_offset / 16u)]);
- float4 v_3 = asfloat(u[((16u + start_byte_offset) / 16u)]);
- float4 v_4 = asfloat(u[((32u + start_byte_offset) / 16u)]);
- return float4x4(v_2, v_3, v_4, asfloat(u[((48u + start_byte_offset) / 16u)]));
+ return float4x4(asfloat(u[(start_byte_offset / 16u)]), asfloat(u[((16u + start_byte_offset) / 16u)]), asfloat(u[((32u + start_byte_offset) / 16u)]), asfloat(u[((48u + start_byte_offset) / 16u)]));
}
-void v_5(uint offset, S obj) {
+void v_2(uint offset, S obj) {
s.Store((offset + 0u), asuint(obj.before));
v((offset + 16u), obj.m);
s.Store((offset + 128u), asuint(obj.after));
}
-S v_6(uint start_byte_offset) {
- int v_7 = asint(u[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]);
- float4x4 v_8 = v_1((16u + start_byte_offset));
- S v_9 = {v_7, v_8, asint(u[((128u + start_byte_offset) / 16u)][(((128u + start_byte_offset) % 16u) / 4u)])};
- return v_9;
+S v_3(uint start_byte_offset) {
+ int v_4 = asint(u[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]);
+ float4x4 v_5 = v_1((16u + start_byte_offset));
+ S v_6 = {v_4, v_5, asint(u[((128u + start_byte_offset) / 16u)][(((128u + start_byte_offset) % 16u) / 4u)])};
+ return v_6;
}
-void v_10(uint offset, S obj[4]) {
+void v_7(uint offset, S obj[4]) {
{
- uint v_11 = 0u;
- v_11 = 0u;
+ uint v_8 = 0u;
+ v_8 = 0u;
while(true) {
- uint v_12 = v_11;
- if ((v_12 >= 4u)) {
+ uint v_9 = v_8;
+ if ((v_9 >= 4u)) {
break;
}
- S v_13 = obj[v_12];
- v_5((offset + (v_12 * 192u)), v_13);
+ S v_10 = obj[v_9];
+ v_2((offset + (v_9 * 192u)), v_10);
{
- v_11 = (v_12 + 1u);
+ v_8 = (v_9 + 1u);
}
continue;
}
@@ -56,34 +53,34 @@
}
typedef S ary_ret[4];
-ary_ret v_14(uint start_byte_offset) {
+ary_ret v_11(uint start_byte_offset) {
S a[4] = (S[4])0;
{
- uint v_15 = 0u;
- v_15 = 0u;
+ uint v_12 = 0u;
+ v_12 = 0u;
while(true) {
- uint v_16 = v_15;
- if ((v_16 >= 4u)) {
+ uint v_13 = v_12;
+ if ((v_13 >= 4u)) {
break;
}
- S v_17 = v_6((start_byte_offset + (v_16 * 192u)));
- a[v_16] = v_17;
+ S v_14 = v_3((start_byte_offset + (v_13 * 192u)));
+ a[v_13] = v_14;
{
- v_15 = (v_16 + 1u);
+ v_12 = (v_13 + 1u);
}
continue;
}
}
- S v_18[4] = a;
- return v_18;
+ S v_15[4] = a;
+ return v_15;
}
[numthreads(1, 1, 1)]
void f() {
- S v_19[4] = v_14(0u);
- v_10(0u, v_19);
- S v_20 = v_6(384u);
- v_5(192u, v_20);
+ S v_16[4] = v_11(0u);
+ v_7(0u, v_16);
+ S v_17 = v_3(384u);
+ v_2(192u, v_17);
v(592u, v_1(400u));
s.Store4(208u, asuint(asfloat(u[2u]).ywxz));
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x4_f32/to_workgroup.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat4x4_f32/to_workgroup.wgsl.expected.ir.dxc.hlsl
index c0c6a30..4a68386 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x4_f32/to_workgroup.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat4x4_f32/to_workgroup.wgsl.expected.ir.dxc.hlsl
@@ -14,64 +14,61 @@
};
groupshared S w[4];
float4x4 v(uint start_byte_offset) {
- float4 v_1 = asfloat(u[(start_byte_offset / 16u)]);
- float4 v_2 = asfloat(u[((16u + start_byte_offset) / 16u)]);
- float4 v_3 = asfloat(u[((32u + start_byte_offset) / 16u)]);
- return float4x4(v_1, v_2, v_3, asfloat(u[((48u + start_byte_offset) / 16u)]));
+ return float4x4(asfloat(u[(start_byte_offset / 16u)]), asfloat(u[((16u + start_byte_offset) / 16u)]), asfloat(u[((32u + start_byte_offset) / 16u)]), asfloat(u[((48u + start_byte_offset) / 16u)]));
}
-S v_4(uint start_byte_offset) {
- int v_5 = asint(u[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]);
- float4x4 v_6 = v((16u + start_byte_offset));
- S v_7 = {v_5, v_6, asint(u[((128u + start_byte_offset) / 16u)][(((128u + start_byte_offset) % 16u) / 4u)])};
- return v_7;
+S v_1(uint start_byte_offset) {
+ int v_2 = asint(u[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]);
+ float4x4 v_3 = v((16u + start_byte_offset));
+ S v_4 = {v_2, v_3, asint(u[((128u + start_byte_offset) / 16u)][(((128u + start_byte_offset) % 16u) / 4u)])};
+ return v_4;
}
typedef S ary_ret[4];
-ary_ret v_8(uint start_byte_offset) {
+ary_ret v_5(uint start_byte_offset) {
S a[4] = (S[4])0;
{
- uint v_9 = 0u;
- v_9 = 0u;
+ uint v_6 = 0u;
+ v_6 = 0u;
while(true) {
- uint v_10 = v_9;
- if ((v_10 >= 4u)) {
+ uint v_7 = v_6;
+ if ((v_7 >= 4u)) {
break;
}
- S v_11 = v_4((start_byte_offset + (v_10 * 192u)));
- a[v_10] = v_11;
+ S v_8 = v_1((start_byte_offset + (v_7 * 192u)));
+ a[v_7] = v_8;
{
- v_9 = (v_10 + 1u);
+ v_6 = (v_7 + 1u);
}
continue;
}
}
- S v_12[4] = a;
- return v_12;
+ S v_9[4] = a;
+ return v_9;
}
void f_inner(uint tint_local_index) {
{
- uint v_13 = 0u;
- v_13 = tint_local_index;
+ uint v_10 = 0u;
+ v_10 = tint_local_index;
while(true) {
- uint v_14 = v_13;
- if ((v_14 >= 4u)) {
+ uint v_11 = v_10;
+ if ((v_11 >= 4u)) {
break;
}
- S v_15 = (S)0;
- w[v_14] = v_15;
+ S v_12 = (S)0;
+ w[v_11] = v_12;
{
- v_13 = (v_14 + 1u);
+ v_10 = (v_11 + 1u);
}
continue;
}
}
GroupMemoryBarrierWithGroupSync();
- S v_16[4] = v_8(0u);
- w = v_16;
- S v_17 = v_4(384u);
- w[int(1)] = v_17;
+ S v_13[4] = v_5(0u);
+ w = v_13;
+ S v_14 = v_1(384u);
+ w[int(1)] = v_14;
w[int(3)].m = v(400u);
w[int(1)].m[int(0)] = asfloat(u[2u]).ywxz;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x4_f32/to_workgroup.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/uniform/std140/struct/mat4x4_f32/to_workgroup.wgsl.expected.ir.fxc.hlsl
index c0c6a30..4a68386 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x4_f32/to_workgroup.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/struct/mat4x4_f32/to_workgroup.wgsl.expected.ir.fxc.hlsl
@@ -14,64 +14,61 @@
};
groupshared S w[4];
float4x4 v(uint start_byte_offset) {
- float4 v_1 = asfloat(u[(start_byte_offset / 16u)]);
- float4 v_2 = asfloat(u[((16u + start_byte_offset) / 16u)]);
- float4 v_3 = asfloat(u[((32u + start_byte_offset) / 16u)]);
- return float4x4(v_1, v_2, v_3, asfloat(u[((48u + start_byte_offset) / 16u)]));
+ return float4x4(asfloat(u[(start_byte_offset / 16u)]), asfloat(u[((16u + start_byte_offset) / 16u)]), asfloat(u[((32u + start_byte_offset) / 16u)]), asfloat(u[((48u + start_byte_offset) / 16u)]));
}
-S v_4(uint start_byte_offset) {
- int v_5 = asint(u[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]);
- float4x4 v_6 = v((16u + start_byte_offset));
- S v_7 = {v_5, v_6, asint(u[((128u + start_byte_offset) / 16u)][(((128u + start_byte_offset) % 16u) / 4u)])};
- return v_7;
+S v_1(uint start_byte_offset) {
+ int v_2 = asint(u[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]);
+ float4x4 v_3 = v((16u + start_byte_offset));
+ S v_4 = {v_2, v_3, asint(u[((128u + start_byte_offset) / 16u)][(((128u + start_byte_offset) % 16u) / 4u)])};
+ return v_4;
}
typedef S ary_ret[4];
-ary_ret v_8(uint start_byte_offset) {
+ary_ret v_5(uint start_byte_offset) {
S a[4] = (S[4])0;
{
- uint v_9 = 0u;
- v_9 = 0u;
+ uint v_6 = 0u;
+ v_6 = 0u;
while(true) {
- uint v_10 = v_9;
- if ((v_10 >= 4u)) {
+ uint v_7 = v_6;
+ if ((v_7 >= 4u)) {
break;
}
- S v_11 = v_4((start_byte_offset + (v_10 * 192u)));
- a[v_10] = v_11;
+ S v_8 = v_1((start_byte_offset + (v_7 * 192u)));
+ a[v_7] = v_8;
{
- v_9 = (v_10 + 1u);
+ v_6 = (v_7 + 1u);
}
continue;
}
}
- S v_12[4] = a;
- return v_12;
+ S v_9[4] = a;
+ return v_9;
}
void f_inner(uint tint_local_index) {
{
- uint v_13 = 0u;
- v_13 = tint_local_index;
+ uint v_10 = 0u;
+ v_10 = tint_local_index;
while(true) {
- uint v_14 = v_13;
- if ((v_14 >= 4u)) {
+ uint v_11 = v_10;
+ if ((v_11 >= 4u)) {
break;
}
- S v_15 = (S)0;
- w[v_14] = v_15;
+ S v_12 = (S)0;
+ w[v_11] = v_12;
{
- v_13 = (v_14 + 1u);
+ v_10 = (v_11 + 1u);
}
continue;
}
}
GroupMemoryBarrierWithGroupSync();
- S v_16[4] = v_8(0u);
- w = v_16;
- S v_17 = v_4(384u);
- w[int(1)] = v_17;
+ S v_13[4] = v_5(0u);
+ w = v_13;
+ S v_14 = v_1(384u);
+ w[int(1)] = v_14;
w[int(3)].m = v(400u);
w[int(1)].m[int(0)] = asfloat(u[2u]).ywxz;
}
diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/dynamic_index_via_ptr.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/dynamic_index_via_ptr.wgsl.expected.ir.dxc.hlsl
index 9bc711f..0d7ddb4 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/dynamic_index_via_ptr.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/dynamic_index_via_ptr.wgsl.expected.ir.dxc.hlsl
@@ -9,14 +9,13 @@
}
float2x3 v(uint start_byte_offset) {
- float3 v_1 = asfloat(m[(start_byte_offset / 16u)].xyz);
- return float2x3(v_1, asfloat(m[((16u + start_byte_offset) / 16u)].xyz));
+ return float2x3(asfloat(m[(start_byte_offset / 16u)].xyz), asfloat(m[((16u + start_byte_offset) / 16u)].xyz));
}
[numthreads(1, 1, 1)]
void f() {
- uint v_2 = (16u * uint(i()));
+ uint v_1 = (16u * uint(i()));
float2x3 l_m = v(0u);
- float3 l_m_i = asfloat(m[(v_2 / 16u)].xyz);
+ float3 l_m_i = asfloat(m[(v_1 / 16u)].xyz);
}
diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/dynamic_index_via_ptr.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/dynamic_index_via_ptr.wgsl.expected.ir.fxc.hlsl
index 9bc711f..0d7ddb4 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/dynamic_index_via_ptr.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/dynamic_index_via_ptr.wgsl.expected.ir.fxc.hlsl
@@ -9,14 +9,13 @@
}
float2x3 v(uint start_byte_offset) {
- float3 v_1 = asfloat(m[(start_byte_offset / 16u)].xyz);
- return float2x3(v_1, asfloat(m[((16u + start_byte_offset) / 16u)].xyz));
+ return float2x3(asfloat(m[(start_byte_offset / 16u)].xyz), asfloat(m[((16u + start_byte_offset) / 16u)].xyz));
}
[numthreads(1, 1, 1)]
void f() {
- uint v_2 = (16u * uint(i()));
+ uint v_1 = (16u * uint(i()));
float2x3 l_m = v(0u);
- float3 l_m_i = asfloat(m[(v_2 / 16u)].xyz);
+ float3 l_m_i = asfloat(m[(v_1 / 16u)].xyz);
}
diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/static_index_via_ptr.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/static_index_via_ptr.wgsl.expected.ir.dxc.hlsl
index b7d1ec8..f0b0e7a 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/static_index_via_ptr.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/static_index_via_ptr.wgsl.expected.ir.dxc.hlsl
@@ -9,8 +9,7 @@
}
float2x3 v(uint start_byte_offset) {
- float3 v_1 = asfloat(m[(start_byte_offset / 16u)].xyz);
- return float2x3(v_1, asfloat(m[((16u + start_byte_offset) / 16u)].xyz));
+ return float2x3(asfloat(m[(start_byte_offset / 16u)].xyz), asfloat(m[((16u + start_byte_offset) / 16u)].xyz));
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/static_index_via_ptr.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/static_index_via_ptr.wgsl.expected.ir.fxc.hlsl
index b7d1ec8..f0b0e7a 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/static_index_via_ptr.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/static_index_via_ptr.wgsl.expected.ir.fxc.hlsl
@@ -9,8 +9,7 @@
}
float2x3 v(uint start_byte_offset) {
- float3 v_1 = asfloat(m[(start_byte_offset / 16u)].xyz);
- return float2x3(v_1, asfloat(m[((16u + start_byte_offset) / 16u)].xyz));
+ return float2x3(asfloat(m[(start_byte_offset / 16u)].xyz), asfloat(m[((16u + start_byte_offset) / 16u)].xyz));
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/to_builtin.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/to_builtin.wgsl.expected.ir.dxc.hlsl
index e296f0a..ea0e275 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/to_builtin.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/to_builtin.wgsl.expected.ir.dxc.hlsl
@@ -3,8 +3,7 @@
uint4 u[2];
};
float2x3 v(uint start_byte_offset) {
- float3 v_1 = asfloat(u[(start_byte_offset / 16u)].xyz);
- return float2x3(v_1, asfloat(u[((16u + start_byte_offset) / 16u)].xyz));
+ return float2x3(asfloat(u[(start_byte_offset / 16u)].xyz), asfloat(u[((16u + start_byte_offset) / 16u)].xyz));
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/to_builtin.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/to_builtin.wgsl.expected.ir.fxc.hlsl
index e296f0a..ea0e275 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/to_builtin.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/to_builtin.wgsl.expected.ir.fxc.hlsl
@@ -3,8 +3,7 @@
uint4 u[2];
};
float2x3 v(uint start_byte_offset) {
- float3 v_1 = asfloat(u[(start_byte_offset / 16u)].xyz);
- return float2x3(v_1, asfloat(u[((16u + start_byte_offset) / 16u)].xyz));
+ return float2x3(asfloat(u[(start_byte_offset / 16u)].xyz), asfloat(u[((16u + start_byte_offset) / 16u)].xyz));
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/to_fn.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/to_fn.wgsl.expected.ir.dxc.hlsl
index 245eb48..15fd4bc 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/to_fn.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/to_fn.wgsl.expected.ir.dxc.hlsl
@@ -12,8 +12,7 @@
}
float2x3 v_1(uint start_byte_offset) {
- float3 v_2 = asfloat(u[(start_byte_offset / 16u)].xyz);
- return float2x3(v_2, asfloat(u[((16u + start_byte_offset) / 16u)].xyz));
+ return float2x3(asfloat(u[(start_byte_offset / 16u)].xyz), asfloat(u[((16u + start_byte_offset) / 16u)].xyz));
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/to_fn.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/to_fn.wgsl.expected.ir.fxc.hlsl
index 245eb48..15fd4bc 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/to_fn.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/to_fn.wgsl.expected.ir.fxc.hlsl
@@ -12,8 +12,7 @@
}
float2x3 v_1(uint start_byte_offset) {
- float3 v_2 = asfloat(u[(start_byte_offset / 16u)].xyz);
- return float2x3(v_2, asfloat(u[((16u + start_byte_offset) / 16u)].xyz));
+ return float2x3(asfloat(u[(start_byte_offset / 16u)].xyz), asfloat(u[((16u + start_byte_offset) / 16u)].xyz));
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/to_private.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/to_private.wgsl.expected.ir.dxc.hlsl
index 582620d..0ad7b3d 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/to_private.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/to_private.wgsl.expected.ir.dxc.hlsl
@@ -4,8 +4,7 @@
};
static float2x3 p = float2x3((0.0f).xxx, (0.0f).xxx);
float2x3 v(uint start_byte_offset) {
- float3 v_1 = asfloat(u[(start_byte_offset / 16u)].xyz);
- return float2x3(v_1, asfloat(u[((16u + start_byte_offset) / 16u)].xyz));
+ return float2x3(asfloat(u[(start_byte_offset / 16u)].xyz), asfloat(u[((16u + start_byte_offset) / 16u)].xyz));
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/to_private.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/to_private.wgsl.expected.ir.fxc.hlsl
index 582620d..0ad7b3d 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/to_private.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/to_private.wgsl.expected.ir.fxc.hlsl
@@ -4,8 +4,7 @@
};
static float2x3 p = float2x3((0.0f).xxx, (0.0f).xxx);
float2x3 v(uint start_byte_offset) {
- float3 v_1 = asfloat(u[(start_byte_offset / 16u)].xyz);
- return float2x3(v_1, asfloat(u[((16u + start_byte_offset) / 16u)].xyz));
+ return float2x3(asfloat(u[(start_byte_offset / 16u)].xyz), asfloat(u[((16u + start_byte_offset) / 16u)].xyz));
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/to_storage.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/to_storage.wgsl.expected.ir.dxc.hlsl
index 80bbb7e..b47e6c0 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/to_storage.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/to_storage.wgsl.expected.ir.dxc.hlsl
@@ -9,8 +9,7 @@
}
float2x3 v_1(uint start_byte_offset) {
- float3 v_2 = asfloat(u[(start_byte_offset / 16u)].xyz);
- return float2x3(v_2, asfloat(u[((16u + start_byte_offset) / 16u)].xyz));
+ return float2x3(asfloat(u[(start_byte_offset / 16u)].xyz), asfloat(u[((16u + start_byte_offset) / 16u)].xyz));
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/to_storage.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/to_storage.wgsl.expected.ir.fxc.hlsl
index 80bbb7e..b47e6c0 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/to_storage.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/to_storage.wgsl.expected.ir.fxc.hlsl
@@ -9,8 +9,7 @@
}
float2x3 v_1(uint start_byte_offset) {
- float3 v_2 = asfloat(u[(start_byte_offset / 16u)].xyz);
- return float2x3(v_2, asfloat(u[((16u + start_byte_offset) / 16u)].xyz));
+ return float2x3(asfloat(u[(start_byte_offset / 16u)].xyz), asfloat(u[((16u + start_byte_offset) / 16u)].xyz));
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/to_workgroup.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/to_workgroup.wgsl.expected.ir.dxc.hlsl
index 0dcd1ba..c75d957 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/to_workgroup.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/to_workgroup.wgsl.expected.ir.dxc.hlsl
@@ -8,8 +8,7 @@
};
groupshared float2x3 w;
float2x3 v(uint start_byte_offset) {
- float3 v_1 = asfloat(u[(start_byte_offset / 16u)].xyz);
- return float2x3(v_1, asfloat(u[((16u + start_byte_offset) / 16u)].xyz));
+ return float2x3(asfloat(u[(start_byte_offset / 16u)].xyz), asfloat(u[((16u + start_byte_offset) / 16u)].xyz));
}
void f_inner(uint tint_local_index) {
diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/to_workgroup.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/to_workgroup.wgsl.expected.ir.fxc.hlsl
index 0dcd1ba..c75d957 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/to_workgroup.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/to_workgroup.wgsl.expected.ir.fxc.hlsl
@@ -8,8 +8,7 @@
};
groupshared float2x3 w;
float2x3 v(uint start_byte_offset) {
- float3 v_1 = asfloat(u[(start_byte_offset / 16u)].xyz);
- return float2x3(v_1, asfloat(u[((16u + start_byte_offset) / 16u)].xyz));
+ return float2x3(asfloat(u[(start_byte_offset / 16u)].xyz), asfloat(u[((16u + start_byte_offset) / 16u)].xyz));
}
void f_inner(uint tint_local_index) {
diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/dynamic_index_via_ptr.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/dynamic_index_via_ptr.wgsl.expected.ir.dxc.hlsl
index 0cbb903..8033aed 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/dynamic_index_via_ptr.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/dynamic_index_via_ptr.wgsl.expected.ir.dxc.hlsl
@@ -9,14 +9,13 @@
}
float2x4 v(uint start_byte_offset) {
- float4 v_1 = asfloat(m[(start_byte_offset / 16u)]);
- return float2x4(v_1, asfloat(m[((16u + start_byte_offset) / 16u)]));
+ return float2x4(asfloat(m[(start_byte_offset / 16u)]), asfloat(m[((16u + start_byte_offset) / 16u)]));
}
[numthreads(1, 1, 1)]
void f() {
- uint v_2 = (16u * uint(i()));
+ uint v_1 = (16u * uint(i()));
float2x4 l_m = v(0u);
- float4 l_m_i = asfloat(m[(v_2 / 16u)]);
+ float4 l_m_i = asfloat(m[(v_1 / 16u)]);
}
diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/dynamic_index_via_ptr.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/dynamic_index_via_ptr.wgsl.expected.ir.fxc.hlsl
index 0cbb903..8033aed 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/dynamic_index_via_ptr.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/dynamic_index_via_ptr.wgsl.expected.ir.fxc.hlsl
@@ -9,14 +9,13 @@
}
float2x4 v(uint start_byte_offset) {
- float4 v_1 = asfloat(m[(start_byte_offset / 16u)]);
- return float2x4(v_1, asfloat(m[((16u + start_byte_offset) / 16u)]));
+ return float2x4(asfloat(m[(start_byte_offset / 16u)]), asfloat(m[((16u + start_byte_offset) / 16u)]));
}
[numthreads(1, 1, 1)]
void f() {
- uint v_2 = (16u * uint(i()));
+ uint v_1 = (16u * uint(i()));
float2x4 l_m = v(0u);
- float4 l_m_i = asfloat(m[(v_2 / 16u)]);
+ float4 l_m_i = asfloat(m[(v_1 / 16u)]);
}
diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/static_index_via_ptr.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/static_index_via_ptr.wgsl.expected.ir.dxc.hlsl
index fdd87cc..7feb25f 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/static_index_via_ptr.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/static_index_via_ptr.wgsl.expected.ir.dxc.hlsl
@@ -9,8 +9,7 @@
}
float2x4 v(uint start_byte_offset) {
- float4 v_1 = asfloat(m[(start_byte_offset / 16u)]);
- return float2x4(v_1, asfloat(m[((16u + start_byte_offset) / 16u)]));
+ return float2x4(asfloat(m[(start_byte_offset / 16u)]), asfloat(m[((16u + start_byte_offset) / 16u)]));
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/static_index_via_ptr.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/static_index_via_ptr.wgsl.expected.ir.fxc.hlsl
index fdd87cc..7feb25f 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/static_index_via_ptr.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/static_index_via_ptr.wgsl.expected.ir.fxc.hlsl
@@ -9,8 +9,7 @@
}
float2x4 v(uint start_byte_offset) {
- float4 v_1 = asfloat(m[(start_byte_offset / 16u)]);
- return float2x4(v_1, asfloat(m[((16u + start_byte_offset) / 16u)]));
+ return float2x4(asfloat(m[(start_byte_offset / 16u)]), asfloat(m[((16u + start_byte_offset) / 16u)]));
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/to_builtin.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/to_builtin.wgsl.expected.ir.dxc.hlsl
index afe937c..c147fad 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/to_builtin.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/to_builtin.wgsl.expected.ir.dxc.hlsl
@@ -3,8 +3,7 @@
uint4 u[2];
};
float2x4 v(uint start_byte_offset) {
- float4 v_1 = asfloat(u[(start_byte_offset / 16u)]);
- return float2x4(v_1, asfloat(u[((16u + start_byte_offset) / 16u)]));
+ return float2x4(asfloat(u[(start_byte_offset / 16u)]), asfloat(u[((16u + start_byte_offset) / 16u)]));
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/to_builtin.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/to_builtin.wgsl.expected.ir.fxc.hlsl
index afe937c..c147fad 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/to_builtin.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/to_builtin.wgsl.expected.ir.fxc.hlsl
@@ -3,8 +3,7 @@
uint4 u[2];
};
float2x4 v(uint start_byte_offset) {
- float4 v_1 = asfloat(u[(start_byte_offset / 16u)]);
- return float2x4(v_1, asfloat(u[((16u + start_byte_offset) / 16u)]));
+ return float2x4(asfloat(u[(start_byte_offset / 16u)]), asfloat(u[((16u + start_byte_offset) / 16u)]));
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/to_fn.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/to_fn.wgsl.expected.ir.dxc.hlsl
index 115d90d..acb94bc 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/to_fn.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/to_fn.wgsl.expected.ir.dxc.hlsl
@@ -12,8 +12,7 @@
}
float2x4 v_1(uint start_byte_offset) {
- float4 v_2 = asfloat(u[(start_byte_offset / 16u)]);
- return float2x4(v_2, asfloat(u[((16u + start_byte_offset) / 16u)]));
+ return float2x4(asfloat(u[(start_byte_offset / 16u)]), asfloat(u[((16u + start_byte_offset) / 16u)]));
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/to_fn.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/to_fn.wgsl.expected.ir.fxc.hlsl
index 115d90d..acb94bc 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/to_fn.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/to_fn.wgsl.expected.ir.fxc.hlsl
@@ -12,8 +12,7 @@
}
float2x4 v_1(uint start_byte_offset) {
- float4 v_2 = asfloat(u[(start_byte_offset / 16u)]);
- return float2x4(v_2, asfloat(u[((16u + start_byte_offset) / 16u)]));
+ return float2x4(asfloat(u[(start_byte_offset / 16u)]), asfloat(u[((16u + start_byte_offset) / 16u)]));
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/to_private.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/to_private.wgsl.expected.ir.dxc.hlsl
index d245cc6..59bdb22 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/to_private.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/to_private.wgsl.expected.ir.dxc.hlsl
@@ -4,8 +4,7 @@
};
static float2x4 p = float2x4((0.0f).xxxx, (0.0f).xxxx);
float2x4 v(uint start_byte_offset) {
- float4 v_1 = asfloat(u[(start_byte_offset / 16u)]);
- return float2x4(v_1, asfloat(u[((16u + start_byte_offset) / 16u)]));
+ return float2x4(asfloat(u[(start_byte_offset / 16u)]), asfloat(u[((16u + start_byte_offset) / 16u)]));
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/to_private.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/to_private.wgsl.expected.ir.fxc.hlsl
index d245cc6..59bdb22 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/to_private.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/to_private.wgsl.expected.ir.fxc.hlsl
@@ -4,8 +4,7 @@
};
static float2x4 p = float2x4((0.0f).xxxx, (0.0f).xxxx);
float2x4 v(uint start_byte_offset) {
- float4 v_1 = asfloat(u[(start_byte_offset / 16u)]);
- return float2x4(v_1, asfloat(u[((16u + start_byte_offset) / 16u)]));
+ return float2x4(asfloat(u[(start_byte_offset / 16u)]), asfloat(u[((16u + start_byte_offset) / 16u)]));
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/to_storage.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/to_storage.wgsl.expected.ir.dxc.hlsl
index 86540e2..044216d 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/to_storage.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/to_storage.wgsl.expected.ir.dxc.hlsl
@@ -9,8 +9,7 @@
}
float2x4 v_1(uint start_byte_offset) {
- float4 v_2 = asfloat(u[(start_byte_offset / 16u)]);
- return float2x4(v_2, asfloat(u[((16u + start_byte_offset) / 16u)]));
+ return float2x4(asfloat(u[(start_byte_offset / 16u)]), asfloat(u[((16u + start_byte_offset) / 16u)]));
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/to_storage.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/to_storage.wgsl.expected.ir.fxc.hlsl
index 86540e2..044216d 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/to_storage.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/to_storage.wgsl.expected.ir.fxc.hlsl
@@ -9,8 +9,7 @@
}
float2x4 v_1(uint start_byte_offset) {
- float4 v_2 = asfloat(u[(start_byte_offset / 16u)]);
- return float2x4(v_2, asfloat(u[((16u + start_byte_offset) / 16u)]));
+ return float2x4(asfloat(u[(start_byte_offset / 16u)]), asfloat(u[((16u + start_byte_offset) / 16u)]));
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/to_workgroup.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/to_workgroup.wgsl.expected.ir.dxc.hlsl
index efa3a40..0e9fa0a 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/to_workgroup.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/to_workgroup.wgsl.expected.ir.dxc.hlsl
@@ -8,8 +8,7 @@
};
groupshared float2x4 w;
float2x4 v(uint start_byte_offset) {
- float4 v_1 = asfloat(u[(start_byte_offset / 16u)]);
- return float2x4(v_1, asfloat(u[((16u + start_byte_offset) / 16u)]));
+ return float2x4(asfloat(u[(start_byte_offset / 16u)]), asfloat(u[((16u + start_byte_offset) / 16u)]));
}
void f_inner(uint tint_local_index) {
diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/to_workgroup.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/to_workgroup.wgsl.expected.ir.fxc.hlsl
index efa3a40..0e9fa0a 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/to_workgroup.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/to_workgroup.wgsl.expected.ir.fxc.hlsl
@@ -8,8 +8,7 @@
};
groupshared float2x4 w;
float2x4 v(uint start_byte_offset) {
- float4 v_1 = asfloat(u[(start_byte_offset / 16u)]);
- return float2x4(v_1, asfloat(u[((16u + start_byte_offset) / 16u)]));
+ return float2x4(asfloat(u[(start_byte_offset / 16u)]), asfloat(u[((16u + start_byte_offset) / 16u)]));
}
void f_inner(uint tint_local_index) {
diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/dynamic_index_via_ptr.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/dynamic_index_via_ptr.wgsl.expected.ir.dxc.hlsl
index 0c169cd..fad5437 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/dynamic_index_via_ptr.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/dynamic_index_via_ptr.wgsl.expected.ir.dxc.hlsl
@@ -9,15 +9,13 @@
}
float3x3 v(uint start_byte_offset) {
- float3 v_1 = asfloat(m[(start_byte_offset / 16u)].xyz);
- float3 v_2 = asfloat(m[((16u + start_byte_offset) / 16u)].xyz);
- return float3x3(v_1, v_2, asfloat(m[((32u + start_byte_offset) / 16u)].xyz));
+ return float3x3(asfloat(m[(start_byte_offset / 16u)].xyz), asfloat(m[((16u + start_byte_offset) / 16u)].xyz), asfloat(m[((32u + start_byte_offset) / 16u)].xyz));
}
[numthreads(1, 1, 1)]
void f() {
- uint v_3 = (16u * uint(i()));
+ uint v_1 = (16u * uint(i()));
float3x3 l_m = v(0u);
- float3 l_m_i = asfloat(m[(v_3 / 16u)].xyz);
+ float3 l_m_i = asfloat(m[(v_1 / 16u)].xyz);
}
diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/dynamic_index_via_ptr.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/dynamic_index_via_ptr.wgsl.expected.ir.fxc.hlsl
index 0c169cd..fad5437 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/dynamic_index_via_ptr.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/dynamic_index_via_ptr.wgsl.expected.ir.fxc.hlsl
@@ -9,15 +9,13 @@
}
float3x3 v(uint start_byte_offset) {
- float3 v_1 = asfloat(m[(start_byte_offset / 16u)].xyz);
- float3 v_2 = asfloat(m[((16u + start_byte_offset) / 16u)].xyz);
- return float3x3(v_1, v_2, asfloat(m[((32u + start_byte_offset) / 16u)].xyz));
+ return float3x3(asfloat(m[(start_byte_offset / 16u)].xyz), asfloat(m[((16u + start_byte_offset) / 16u)].xyz), asfloat(m[((32u + start_byte_offset) / 16u)].xyz));
}
[numthreads(1, 1, 1)]
void f() {
- uint v_3 = (16u * uint(i()));
+ uint v_1 = (16u * uint(i()));
float3x3 l_m = v(0u);
- float3 l_m_i = asfloat(m[(v_3 / 16u)].xyz);
+ float3 l_m_i = asfloat(m[(v_1 / 16u)].xyz);
}
diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/static_index_via_ptr.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/static_index_via_ptr.wgsl.expected.ir.dxc.hlsl
index 6b282ff8..cb6dd53 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/static_index_via_ptr.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/static_index_via_ptr.wgsl.expected.ir.dxc.hlsl
@@ -9,9 +9,7 @@
}
float3x3 v(uint start_byte_offset) {
- float3 v_1 = asfloat(m[(start_byte_offset / 16u)].xyz);
- float3 v_2 = asfloat(m[((16u + start_byte_offset) / 16u)].xyz);
- return float3x3(v_1, v_2, asfloat(m[((32u + start_byte_offset) / 16u)].xyz));
+ return float3x3(asfloat(m[(start_byte_offset / 16u)].xyz), asfloat(m[((16u + start_byte_offset) / 16u)].xyz), asfloat(m[((32u + start_byte_offset) / 16u)].xyz));
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/static_index_via_ptr.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/static_index_via_ptr.wgsl.expected.ir.fxc.hlsl
index 6b282ff8..cb6dd53 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/static_index_via_ptr.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/static_index_via_ptr.wgsl.expected.ir.fxc.hlsl
@@ -9,9 +9,7 @@
}
float3x3 v(uint start_byte_offset) {
- float3 v_1 = asfloat(m[(start_byte_offset / 16u)].xyz);
- float3 v_2 = asfloat(m[((16u + start_byte_offset) / 16u)].xyz);
- return float3x3(v_1, v_2, asfloat(m[((32u + start_byte_offset) / 16u)].xyz));
+ return float3x3(asfloat(m[(start_byte_offset / 16u)].xyz), asfloat(m[((16u + start_byte_offset) / 16u)].xyz), asfloat(m[((32u + start_byte_offset) / 16u)].xyz));
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/to_builtin.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/to_builtin.wgsl.expected.ir.dxc.hlsl
index 43edf47..38443d1 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/to_builtin.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/to_builtin.wgsl.expected.ir.dxc.hlsl
@@ -3,9 +3,7 @@
uint4 u[3];
};
float3x3 v(uint start_byte_offset) {
- float3 v_1 = asfloat(u[(start_byte_offset / 16u)].xyz);
- float3 v_2 = asfloat(u[((16u + start_byte_offset) / 16u)].xyz);
- return float3x3(v_1, v_2, asfloat(u[((32u + start_byte_offset) / 16u)].xyz));
+ return float3x3(asfloat(u[(start_byte_offset / 16u)].xyz), asfloat(u[((16u + start_byte_offset) / 16u)].xyz), asfloat(u[((32u + start_byte_offset) / 16u)].xyz));
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/to_builtin.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/to_builtin.wgsl.expected.ir.fxc.hlsl
index 43edf47..38443d1 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/to_builtin.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/to_builtin.wgsl.expected.ir.fxc.hlsl
@@ -3,9 +3,7 @@
uint4 u[3];
};
float3x3 v(uint start_byte_offset) {
- float3 v_1 = asfloat(u[(start_byte_offset / 16u)].xyz);
- float3 v_2 = asfloat(u[((16u + start_byte_offset) / 16u)].xyz);
- return float3x3(v_1, v_2, asfloat(u[((32u + start_byte_offset) / 16u)].xyz));
+ return float3x3(asfloat(u[(start_byte_offset / 16u)].xyz), asfloat(u[((16u + start_byte_offset) / 16u)].xyz), asfloat(u[((32u + start_byte_offset) / 16u)].xyz));
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/to_fn.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/to_fn.wgsl.expected.ir.dxc.hlsl
index 5d24420..5d6cf5c 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/to_fn.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/to_fn.wgsl.expected.ir.dxc.hlsl
@@ -12,9 +12,7 @@
}
float3x3 v_1(uint start_byte_offset) {
- float3 v_2 = asfloat(u[(start_byte_offset / 16u)].xyz);
- float3 v_3 = asfloat(u[((16u + start_byte_offset) / 16u)].xyz);
- return float3x3(v_2, v_3, asfloat(u[((32u + start_byte_offset) / 16u)].xyz));
+ return float3x3(asfloat(u[(start_byte_offset / 16u)].xyz), asfloat(u[((16u + start_byte_offset) / 16u)].xyz), asfloat(u[((32u + start_byte_offset) / 16u)].xyz));
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/to_fn.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/to_fn.wgsl.expected.ir.fxc.hlsl
index 5d24420..5d6cf5c 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/to_fn.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/to_fn.wgsl.expected.ir.fxc.hlsl
@@ -12,9 +12,7 @@
}
float3x3 v_1(uint start_byte_offset) {
- float3 v_2 = asfloat(u[(start_byte_offset / 16u)].xyz);
- float3 v_3 = asfloat(u[((16u + start_byte_offset) / 16u)].xyz);
- return float3x3(v_2, v_3, asfloat(u[((32u + start_byte_offset) / 16u)].xyz));
+ return float3x3(asfloat(u[(start_byte_offset / 16u)].xyz), asfloat(u[((16u + start_byte_offset) / 16u)].xyz), asfloat(u[((32u + start_byte_offset) / 16u)].xyz));
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/to_private.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/to_private.wgsl.expected.ir.dxc.hlsl
index 911dded..44e136b 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/to_private.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/to_private.wgsl.expected.ir.dxc.hlsl
@@ -4,9 +4,7 @@
};
static float3x3 p = float3x3((0.0f).xxx, (0.0f).xxx, (0.0f).xxx);
float3x3 v(uint start_byte_offset) {
- float3 v_1 = asfloat(u[(start_byte_offset / 16u)].xyz);
- float3 v_2 = asfloat(u[((16u + start_byte_offset) / 16u)].xyz);
- return float3x3(v_1, v_2, asfloat(u[((32u + start_byte_offset) / 16u)].xyz));
+ return float3x3(asfloat(u[(start_byte_offset / 16u)].xyz), asfloat(u[((16u + start_byte_offset) / 16u)].xyz), asfloat(u[((32u + start_byte_offset) / 16u)].xyz));
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/to_private.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/to_private.wgsl.expected.ir.fxc.hlsl
index 911dded..44e136b 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/to_private.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/to_private.wgsl.expected.ir.fxc.hlsl
@@ -4,9 +4,7 @@
};
static float3x3 p = float3x3((0.0f).xxx, (0.0f).xxx, (0.0f).xxx);
float3x3 v(uint start_byte_offset) {
- float3 v_1 = asfloat(u[(start_byte_offset / 16u)].xyz);
- float3 v_2 = asfloat(u[((16u + start_byte_offset) / 16u)].xyz);
- return float3x3(v_1, v_2, asfloat(u[((32u + start_byte_offset) / 16u)].xyz));
+ return float3x3(asfloat(u[(start_byte_offset / 16u)].xyz), asfloat(u[((16u + start_byte_offset) / 16u)].xyz), asfloat(u[((32u + start_byte_offset) / 16u)].xyz));
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/to_storage.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/to_storage.wgsl.expected.ir.dxc.hlsl
index ee5e537..a08f86c 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/to_storage.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/to_storage.wgsl.expected.ir.dxc.hlsl
@@ -10,9 +10,7 @@
}
float3x3 v_1(uint start_byte_offset) {
- float3 v_2 = asfloat(u[(start_byte_offset / 16u)].xyz);
- float3 v_3 = asfloat(u[((16u + start_byte_offset) / 16u)].xyz);
- return float3x3(v_2, v_3, asfloat(u[((32u + start_byte_offset) / 16u)].xyz));
+ return float3x3(asfloat(u[(start_byte_offset / 16u)].xyz), asfloat(u[((16u + start_byte_offset) / 16u)].xyz), asfloat(u[((32u + start_byte_offset) / 16u)].xyz));
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/to_storage.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/to_storage.wgsl.expected.ir.fxc.hlsl
index ee5e537..a08f86c 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/to_storage.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/to_storage.wgsl.expected.ir.fxc.hlsl
@@ -10,9 +10,7 @@
}
float3x3 v_1(uint start_byte_offset) {
- float3 v_2 = asfloat(u[(start_byte_offset / 16u)].xyz);
- float3 v_3 = asfloat(u[((16u + start_byte_offset) / 16u)].xyz);
- return float3x3(v_2, v_3, asfloat(u[((32u + start_byte_offset) / 16u)].xyz));
+ return float3x3(asfloat(u[(start_byte_offset / 16u)].xyz), asfloat(u[((16u + start_byte_offset) / 16u)].xyz), asfloat(u[((32u + start_byte_offset) / 16u)].xyz));
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/to_workgroup.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/to_workgroup.wgsl.expected.ir.dxc.hlsl
index beead4c..ace6b4f 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/to_workgroup.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/to_workgroup.wgsl.expected.ir.dxc.hlsl
@@ -8,9 +8,7 @@
};
groupshared float3x3 w;
float3x3 v(uint start_byte_offset) {
- float3 v_1 = asfloat(u[(start_byte_offset / 16u)].xyz);
- float3 v_2 = asfloat(u[((16u + start_byte_offset) / 16u)].xyz);
- return float3x3(v_1, v_2, asfloat(u[((32u + start_byte_offset) / 16u)].xyz));
+ return float3x3(asfloat(u[(start_byte_offset / 16u)].xyz), asfloat(u[((16u + start_byte_offset) / 16u)].xyz), asfloat(u[((32u + start_byte_offset) / 16u)].xyz));
}
void f_inner(uint tint_local_index) {
diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/to_workgroup.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/to_workgroup.wgsl.expected.ir.fxc.hlsl
index beead4c..ace6b4f 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/to_workgroup.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/to_workgroup.wgsl.expected.ir.fxc.hlsl
@@ -8,9 +8,7 @@
};
groupshared float3x3 w;
float3x3 v(uint start_byte_offset) {
- float3 v_1 = asfloat(u[(start_byte_offset / 16u)].xyz);
- float3 v_2 = asfloat(u[((16u + start_byte_offset) / 16u)].xyz);
- return float3x3(v_1, v_2, asfloat(u[((32u + start_byte_offset) / 16u)].xyz));
+ return float3x3(asfloat(u[(start_byte_offset / 16u)].xyz), asfloat(u[((16u + start_byte_offset) / 16u)].xyz), asfloat(u[((32u + start_byte_offset) / 16u)].xyz));
}
void f_inner(uint tint_local_index) {
diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/dynamic_index_via_ptr.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/dynamic_index_via_ptr.wgsl.expected.ir.dxc.hlsl
index e42e306..37ecdb1 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/dynamic_index_via_ptr.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/dynamic_index_via_ptr.wgsl.expected.ir.dxc.hlsl
@@ -9,15 +9,13 @@
}
float3x4 v(uint start_byte_offset) {
- float4 v_1 = asfloat(m[(start_byte_offset / 16u)]);
- float4 v_2 = asfloat(m[((16u + start_byte_offset) / 16u)]);
- return float3x4(v_1, v_2, asfloat(m[((32u + start_byte_offset) / 16u)]));
+ return float3x4(asfloat(m[(start_byte_offset / 16u)]), asfloat(m[((16u + start_byte_offset) / 16u)]), asfloat(m[((32u + start_byte_offset) / 16u)]));
}
[numthreads(1, 1, 1)]
void f() {
- uint v_3 = (16u * uint(i()));
+ uint v_1 = (16u * uint(i()));
float3x4 l_m = v(0u);
- float4 l_m_i = asfloat(m[(v_3 / 16u)]);
+ float4 l_m_i = asfloat(m[(v_1 / 16u)]);
}
diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/dynamic_index_via_ptr.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/dynamic_index_via_ptr.wgsl.expected.ir.fxc.hlsl
index e42e306..37ecdb1 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/dynamic_index_via_ptr.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/dynamic_index_via_ptr.wgsl.expected.ir.fxc.hlsl
@@ -9,15 +9,13 @@
}
float3x4 v(uint start_byte_offset) {
- float4 v_1 = asfloat(m[(start_byte_offset / 16u)]);
- float4 v_2 = asfloat(m[((16u + start_byte_offset) / 16u)]);
- return float3x4(v_1, v_2, asfloat(m[((32u + start_byte_offset) / 16u)]));
+ return float3x4(asfloat(m[(start_byte_offset / 16u)]), asfloat(m[((16u + start_byte_offset) / 16u)]), asfloat(m[((32u + start_byte_offset) / 16u)]));
}
[numthreads(1, 1, 1)]
void f() {
- uint v_3 = (16u * uint(i()));
+ uint v_1 = (16u * uint(i()));
float3x4 l_m = v(0u);
- float4 l_m_i = asfloat(m[(v_3 / 16u)]);
+ float4 l_m_i = asfloat(m[(v_1 / 16u)]);
}
diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/static_index_via_ptr.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/static_index_via_ptr.wgsl.expected.ir.dxc.hlsl
index 73118ab..d18ae02 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/static_index_via_ptr.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/static_index_via_ptr.wgsl.expected.ir.dxc.hlsl
@@ -9,9 +9,7 @@
}
float3x4 v(uint start_byte_offset) {
- float4 v_1 = asfloat(m[(start_byte_offset / 16u)]);
- float4 v_2 = asfloat(m[((16u + start_byte_offset) / 16u)]);
- return float3x4(v_1, v_2, asfloat(m[((32u + start_byte_offset) / 16u)]));
+ return float3x4(asfloat(m[(start_byte_offset / 16u)]), asfloat(m[((16u + start_byte_offset) / 16u)]), asfloat(m[((32u + start_byte_offset) / 16u)]));
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/static_index_via_ptr.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/static_index_via_ptr.wgsl.expected.ir.fxc.hlsl
index 73118ab..d18ae02 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/static_index_via_ptr.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/static_index_via_ptr.wgsl.expected.ir.fxc.hlsl
@@ -9,9 +9,7 @@
}
float3x4 v(uint start_byte_offset) {
- float4 v_1 = asfloat(m[(start_byte_offset / 16u)]);
- float4 v_2 = asfloat(m[((16u + start_byte_offset) / 16u)]);
- return float3x4(v_1, v_2, asfloat(m[((32u + start_byte_offset) / 16u)]));
+ return float3x4(asfloat(m[(start_byte_offset / 16u)]), asfloat(m[((16u + start_byte_offset) / 16u)]), asfloat(m[((32u + start_byte_offset) / 16u)]));
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/to_builtin.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/to_builtin.wgsl.expected.ir.dxc.hlsl
index f75ca45..21c761f 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/to_builtin.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/to_builtin.wgsl.expected.ir.dxc.hlsl
@@ -3,9 +3,7 @@
uint4 u[3];
};
float3x4 v(uint start_byte_offset) {
- float4 v_1 = asfloat(u[(start_byte_offset / 16u)]);
- float4 v_2 = asfloat(u[((16u + start_byte_offset) / 16u)]);
- return float3x4(v_1, v_2, asfloat(u[((32u + start_byte_offset) / 16u)]));
+ return float3x4(asfloat(u[(start_byte_offset / 16u)]), asfloat(u[((16u + start_byte_offset) / 16u)]), asfloat(u[((32u + start_byte_offset) / 16u)]));
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/to_builtin.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/to_builtin.wgsl.expected.ir.fxc.hlsl
index f75ca45..21c761f 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/to_builtin.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/to_builtin.wgsl.expected.ir.fxc.hlsl
@@ -3,9 +3,7 @@
uint4 u[3];
};
float3x4 v(uint start_byte_offset) {
- float4 v_1 = asfloat(u[(start_byte_offset / 16u)]);
- float4 v_2 = asfloat(u[((16u + start_byte_offset) / 16u)]);
- return float3x4(v_1, v_2, asfloat(u[((32u + start_byte_offset) / 16u)]));
+ return float3x4(asfloat(u[(start_byte_offset / 16u)]), asfloat(u[((16u + start_byte_offset) / 16u)]), asfloat(u[((32u + start_byte_offset) / 16u)]));
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/to_fn.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/to_fn.wgsl.expected.ir.dxc.hlsl
index c268c20..f607e5c 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/to_fn.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/to_fn.wgsl.expected.ir.dxc.hlsl
@@ -12,9 +12,7 @@
}
float3x4 v_1(uint start_byte_offset) {
- float4 v_2 = asfloat(u[(start_byte_offset / 16u)]);
- float4 v_3 = asfloat(u[((16u + start_byte_offset) / 16u)]);
- return float3x4(v_2, v_3, asfloat(u[((32u + start_byte_offset) / 16u)]));
+ return float3x4(asfloat(u[(start_byte_offset / 16u)]), asfloat(u[((16u + start_byte_offset) / 16u)]), asfloat(u[((32u + start_byte_offset) / 16u)]));
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/to_fn.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/to_fn.wgsl.expected.ir.fxc.hlsl
index c268c20..f607e5c 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/to_fn.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/to_fn.wgsl.expected.ir.fxc.hlsl
@@ -12,9 +12,7 @@
}
float3x4 v_1(uint start_byte_offset) {
- float4 v_2 = asfloat(u[(start_byte_offset / 16u)]);
- float4 v_3 = asfloat(u[((16u + start_byte_offset) / 16u)]);
- return float3x4(v_2, v_3, asfloat(u[((32u + start_byte_offset) / 16u)]));
+ return float3x4(asfloat(u[(start_byte_offset / 16u)]), asfloat(u[((16u + start_byte_offset) / 16u)]), asfloat(u[((32u + start_byte_offset) / 16u)]));
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/to_private.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/to_private.wgsl.expected.ir.dxc.hlsl
index 3edad22..e1b225e 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/to_private.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/to_private.wgsl.expected.ir.dxc.hlsl
@@ -4,9 +4,7 @@
};
static float3x4 p = float3x4((0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx);
float3x4 v(uint start_byte_offset) {
- float4 v_1 = asfloat(u[(start_byte_offset / 16u)]);
- float4 v_2 = asfloat(u[((16u + start_byte_offset) / 16u)]);
- return float3x4(v_1, v_2, asfloat(u[((32u + start_byte_offset) / 16u)]));
+ return float3x4(asfloat(u[(start_byte_offset / 16u)]), asfloat(u[((16u + start_byte_offset) / 16u)]), asfloat(u[((32u + start_byte_offset) / 16u)]));
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/to_private.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/to_private.wgsl.expected.ir.fxc.hlsl
index 3edad22..e1b225e 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/to_private.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/to_private.wgsl.expected.ir.fxc.hlsl
@@ -4,9 +4,7 @@
};
static float3x4 p = float3x4((0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx);
float3x4 v(uint start_byte_offset) {
- float4 v_1 = asfloat(u[(start_byte_offset / 16u)]);
- float4 v_2 = asfloat(u[((16u + start_byte_offset) / 16u)]);
- return float3x4(v_1, v_2, asfloat(u[((32u + start_byte_offset) / 16u)]));
+ return float3x4(asfloat(u[(start_byte_offset / 16u)]), asfloat(u[((16u + start_byte_offset) / 16u)]), asfloat(u[((32u + start_byte_offset) / 16u)]));
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/to_storage.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/to_storage.wgsl.expected.ir.dxc.hlsl
index 3d3e665..0ba4ddb 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/to_storage.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/to_storage.wgsl.expected.ir.dxc.hlsl
@@ -10,9 +10,7 @@
}
float3x4 v_1(uint start_byte_offset) {
- float4 v_2 = asfloat(u[(start_byte_offset / 16u)]);
- float4 v_3 = asfloat(u[((16u + start_byte_offset) / 16u)]);
- return float3x4(v_2, v_3, asfloat(u[((32u + start_byte_offset) / 16u)]));
+ return float3x4(asfloat(u[(start_byte_offset / 16u)]), asfloat(u[((16u + start_byte_offset) / 16u)]), asfloat(u[((32u + start_byte_offset) / 16u)]));
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/to_storage.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/to_storage.wgsl.expected.ir.fxc.hlsl
index 3d3e665..0ba4ddb 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/to_storage.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/to_storage.wgsl.expected.ir.fxc.hlsl
@@ -10,9 +10,7 @@
}
float3x4 v_1(uint start_byte_offset) {
- float4 v_2 = asfloat(u[(start_byte_offset / 16u)]);
- float4 v_3 = asfloat(u[((16u + start_byte_offset) / 16u)]);
- return float3x4(v_2, v_3, asfloat(u[((32u + start_byte_offset) / 16u)]));
+ return float3x4(asfloat(u[(start_byte_offset / 16u)]), asfloat(u[((16u + start_byte_offset) / 16u)]), asfloat(u[((32u + start_byte_offset) / 16u)]));
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/to_workgroup.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/to_workgroup.wgsl.expected.ir.dxc.hlsl
index 484287c..f787945 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/to_workgroup.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/to_workgroup.wgsl.expected.ir.dxc.hlsl
@@ -8,9 +8,7 @@
};
groupshared float3x4 w;
float3x4 v(uint start_byte_offset) {
- float4 v_1 = asfloat(u[(start_byte_offset / 16u)]);
- float4 v_2 = asfloat(u[((16u + start_byte_offset) / 16u)]);
- return float3x4(v_1, v_2, asfloat(u[((32u + start_byte_offset) / 16u)]));
+ return float3x4(asfloat(u[(start_byte_offset / 16u)]), asfloat(u[((16u + start_byte_offset) / 16u)]), asfloat(u[((32u + start_byte_offset) / 16u)]));
}
void f_inner(uint tint_local_index) {
diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/to_workgroup.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/to_workgroup.wgsl.expected.ir.fxc.hlsl
index 484287c..f787945 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/to_workgroup.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/to_workgroup.wgsl.expected.ir.fxc.hlsl
@@ -8,9 +8,7 @@
};
groupshared float3x4 w;
float3x4 v(uint start_byte_offset) {
- float4 v_1 = asfloat(u[(start_byte_offset / 16u)]);
- float4 v_2 = asfloat(u[((16u + start_byte_offset) / 16u)]);
- return float3x4(v_1, v_2, asfloat(u[((32u + start_byte_offset) / 16u)]));
+ return float3x4(asfloat(u[(start_byte_offset / 16u)]), asfloat(u[((16u + start_byte_offset) / 16u)]), asfloat(u[((32u + start_byte_offset) / 16u)]));
}
void f_inner(uint tint_local_index) {
diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/dynamic_index_via_ptr.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/dynamic_index_via_ptr.wgsl.expected.ir.dxc.hlsl
index 0df07ef..b75fcc2 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/dynamic_index_via_ptr.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/dynamic_index_via_ptr.wgsl.expected.ir.dxc.hlsl
@@ -9,16 +9,13 @@
}
float4x3 v(uint start_byte_offset) {
- float3 v_1 = asfloat(m[(start_byte_offset / 16u)].xyz);
- float3 v_2 = asfloat(m[((16u + start_byte_offset) / 16u)].xyz);
- float3 v_3 = asfloat(m[((32u + start_byte_offset) / 16u)].xyz);
- return float4x3(v_1, v_2, v_3, asfloat(m[((48u + start_byte_offset) / 16u)].xyz));
+ return float4x3(asfloat(m[(start_byte_offset / 16u)].xyz), asfloat(m[((16u + start_byte_offset) / 16u)].xyz), asfloat(m[((32u + start_byte_offset) / 16u)].xyz), asfloat(m[((48u + start_byte_offset) / 16u)].xyz));
}
[numthreads(1, 1, 1)]
void f() {
- uint v_4 = (16u * uint(i()));
+ uint v_1 = (16u * uint(i()));
float4x3 l_m = v(0u);
- float3 l_m_i = asfloat(m[(v_4 / 16u)].xyz);
+ float3 l_m_i = asfloat(m[(v_1 / 16u)].xyz);
}
diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/dynamic_index_via_ptr.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/dynamic_index_via_ptr.wgsl.expected.ir.fxc.hlsl
index 0df07ef..b75fcc2 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/dynamic_index_via_ptr.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/dynamic_index_via_ptr.wgsl.expected.ir.fxc.hlsl
@@ -9,16 +9,13 @@
}
float4x3 v(uint start_byte_offset) {
- float3 v_1 = asfloat(m[(start_byte_offset / 16u)].xyz);
- float3 v_2 = asfloat(m[((16u + start_byte_offset) / 16u)].xyz);
- float3 v_3 = asfloat(m[((32u + start_byte_offset) / 16u)].xyz);
- return float4x3(v_1, v_2, v_3, asfloat(m[((48u + start_byte_offset) / 16u)].xyz));
+ return float4x3(asfloat(m[(start_byte_offset / 16u)].xyz), asfloat(m[((16u + start_byte_offset) / 16u)].xyz), asfloat(m[((32u + start_byte_offset) / 16u)].xyz), asfloat(m[((48u + start_byte_offset) / 16u)].xyz));
}
[numthreads(1, 1, 1)]
void f() {
- uint v_4 = (16u * uint(i()));
+ uint v_1 = (16u * uint(i()));
float4x3 l_m = v(0u);
- float3 l_m_i = asfloat(m[(v_4 / 16u)].xyz);
+ float3 l_m_i = asfloat(m[(v_1 / 16u)].xyz);
}
diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/static_index_via_ptr.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/static_index_via_ptr.wgsl.expected.ir.dxc.hlsl
index e56cc5e..e333a03 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/static_index_via_ptr.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/static_index_via_ptr.wgsl.expected.ir.dxc.hlsl
@@ -9,10 +9,7 @@
}
float4x3 v(uint start_byte_offset) {
- float3 v_1 = asfloat(m[(start_byte_offset / 16u)].xyz);
- float3 v_2 = asfloat(m[((16u + start_byte_offset) / 16u)].xyz);
- float3 v_3 = asfloat(m[((32u + start_byte_offset) / 16u)].xyz);
- return float4x3(v_1, v_2, v_3, asfloat(m[((48u + start_byte_offset) / 16u)].xyz));
+ return float4x3(asfloat(m[(start_byte_offset / 16u)].xyz), asfloat(m[((16u + start_byte_offset) / 16u)].xyz), asfloat(m[((32u + start_byte_offset) / 16u)].xyz), asfloat(m[((48u + start_byte_offset) / 16u)].xyz));
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/static_index_via_ptr.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/static_index_via_ptr.wgsl.expected.ir.fxc.hlsl
index e56cc5e..e333a03 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/static_index_via_ptr.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/static_index_via_ptr.wgsl.expected.ir.fxc.hlsl
@@ -9,10 +9,7 @@
}
float4x3 v(uint start_byte_offset) {
- float3 v_1 = asfloat(m[(start_byte_offset / 16u)].xyz);
- float3 v_2 = asfloat(m[((16u + start_byte_offset) / 16u)].xyz);
- float3 v_3 = asfloat(m[((32u + start_byte_offset) / 16u)].xyz);
- return float4x3(v_1, v_2, v_3, asfloat(m[((48u + start_byte_offset) / 16u)].xyz));
+ return float4x3(asfloat(m[(start_byte_offset / 16u)].xyz), asfloat(m[((16u + start_byte_offset) / 16u)].xyz), asfloat(m[((32u + start_byte_offset) / 16u)].xyz), asfloat(m[((48u + start_byte_offset) / 16u)].xyz));
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/to_builtin.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/to_builtin.wgsl.expected.ir.dxc.hlsl
index 68410ae..5e789ab 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/to_builtin.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/to_builtin.wgsl.expected.ir.dxc.hlsl
@@ -3,10 +3,7 @@
uint4 u[4];
};
float4x3 v(uint start_byte_offset) {
- float3 v_1 = asfloat(u[(start_byte_offset / 16u)].xyz);
- float3 v_2 = asfloat(u[((16u + start_byte_offset) / 16u)].xyz);
- float3 v_3 = asfloat(u[((32u + start_byte_offset) / 16u)].xyz);
- return float4x3(v_1, v_2, v_3, asfloat(u[((48u + start_byte_offset) / 16u)].xyz));
+ return float4x3(asfloat(u[(start_byte_offset / 16u)].xyz), asfloat(u[((16u + start_byte_offset) / 16u)].xyz), asfloat(u[((32u + start_byte_offset) / 16u)].xyz), asfloat(u[((48u + start_byte_offset) / 16u)].xyz));
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/to_builtin.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/to_builtin.wgsl.expected.ir.fxc.hlsl
index 68410ae..5e789ab 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/to_builtin.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/to_builtin.wgsl.expected.ir.fxc.hlsl
@@ -3,10 +3,7 @@
uint4 u[4];
};
float4x3 v(uint start_byte_offset) {
- float3 v_1 = asfloat(u[(start_byte_offset / 16u)].xyz);
- float3 v_2 = asfloat(u[((16u + start_byte_offset) / 16u)].xyz);
- float3 v_3 = asfloat(u[((32u + start_byte_offset) / 16u)].xyz);
- return float4x3(v_1, v_2, v_3, asfloat(u[((48u + start_byte_offset) / 16u)].xyz));
+ return float4x3(asfloat(u[(start_byte_offset / 16u)].xyz), asfloat(u[((16u + start_byte_offset) / 16u)].xyz), asfloat(u[((32u + start_byte_offset) / 16u)].xyz), asfloat(u[((48u + start_byte_offset) / 16u)].xyz));
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/to_fn.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/to_fn.wgsl.expected.ir.dxc.hlsl
index 13fb969..5f04d45 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/to_fn.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/to_fn.wgsl.expected.ir.dxc.hlsl
@@ -12,10 +12,7 @@
}
float4x3 v_1(uint start_byte_offset) {
- float3 v_2 = asfloat(u[(start_byte_offset / 16u)].xyz);
- float3 v_3 = asfloat(u[((16u + start_byte_offset) / 16u)].xyz);
- float3 v_4 = asfloat(u[((32u + start_byte_offset) / 16u)].xyz);
- return float4x3(v_2, v_3, v_4, asfloat(u[((48u + start_byte_offset) / 16u)].xyz));
+ return float4x3(asfloat(u[(start_byte_offset / 16u)].xyz), asfloat(u[((16u + start_byte_offset) / 16u)].xyz), asfloat(u[((32u + start_byte_offset) / 16u)].xyz), asfloat(u[((48u + start_byte_offset) / 16u)].xyz));
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/to_fn.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/to_fn.wgsl.expected.ir.fxc.hlsl
index 13fb969..5f04d45 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/to_fn.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/to_fn.wgsl.expected.ir.fxc.hlsl
@@ -12,10 +12,7 @@
}
float4x3 v_1(uint start_byte_offset) {
- float3 v_2 = asfloat(u[(start_byte_offset / 16u)].xyz);
- float3 v_3 = asfloat(u[((16u + start_byte_offset) / 16u)].xyz);
- float3 v_4 = asfloat(u[((32u + start_byte_offset) / 16u)].xyz);
- return float4x3(v_2, v_3, v_4, asfloat(u[((48u + start_byte_offset) / 16u)].xyz));
+ return float4x3(asfloat(u[(start_byte_offset / 16u)].xyz), asfloat(u[((16u + start_byte_offset) / 16u)].xyz), asfloat(u[((32u + start_byte_offset) / 16u)].xyz), asfloat(u[((48u + start_byte_offset) / 16u)].xyz));
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/to_private.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/to_private.wgsl.expected.ir.dxc.hlsl
index e837eb5..1e57a99 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/to_private.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/to_private.wgsl.expected.ir.dxc.hlsl
@@ -4,10 +4,7 @@
};
static float4x3 p = float4x3((0.0f).xxx, (0.0f).xxx, (0.0f).xxx, (0.0f).xxx);
float4x3 v(uint start_byte_offset) {
- float3 v_1 = asfloat(u[(start_byte_offset / 16u)].xyz);
- float3 v_2 = asfloat(u[((16u + start_byte_offset) / 16u)].xyz);
- float3 v_3 = asfloat(u[((32u + start_byte_offset) / 16u)].xyz);
- return float4x3(v_1, v_2, v_3, asfloat(u[((48u + start_byte_offset) / 16u)].xyz));
+ return float4x3(asfloat(u[(start_byte_offset / 16u)].xyz), asfloat(u[((16u + start_byte_offset) / 16u)].xyz), asfloat(u[((32u + start_byte_offset) / 16u)].xyz), asfloat(u[((48u + start_byte_offset) / 16u)].xyz));
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/to_private.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/to_private.wgsl.expected.ir.fxc.hlsl
index e837eb5..1e57a99 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/to_private.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/to_private.wgsl.expected.ir.fxc.hlsl
@@ -4,10 +4,7 @@
};
static float4x3 p = float4x3((0.0f).xxx, (0.0f).xxx, (0.0f).xxx, (0.0f).xxx);
float4x3 v(uint start_byte_offset) {
- float3 v_1 = asfloat(u[(start_byte_offset / 16u)].xyz);
- float3 v_2 = asfloat(u[((16u + start_byte_offset) / 16u)].xyz);
- float3 v_3 = asfloat(u[((32u + start_byte_offset) / 16u)].xyz);
- return float4x3(v_1, v_2, v_3, asfloat(u[((48u + start_byte_offset) / 16u)].xyz));
+ return float4x3(asfloat(u[(start_byte_offset / 16u)].xyz), asfloat(u[((16u + start_byte_offset) / 16u)].xyz), asfloat(u[((32u + start_byte_offset) / 16u)].xyz), asfloat(u[((48u + start_byte_offset) / 16u)].xyz));
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/to_storage.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/to_storage.wgsl.expected.ir.dxc.hlsl
index 9b74965..0f9c9e5 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/to_storage.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/to_storage.wgsl.expected.ir.dxc.hlsl
@@ -11,10 +11,7 @@
}
float4x3 v_1(uint start_byte_offset) {
- float3 v_2 = asfloat(u[(start_byte_offset / 16u)].xyz);
- float3 v_3 = asfloat(u[((16u + start_byte_offset) / 16u)].xyz);
- float3 v_4 = asfloat(u[((32u + start_byte_offset) / 16u)].xyz);
- return float4x3(v_2, v_3, v_4, asfloat(u[((48u + start_byte_offset) / 16u)].xyz));
+ return float4x3(asfloat(u[(start_byte_offset / 16u)].xyz), asfloat(u[((16u + start_byte_offset) / 16u)].xyz), asfloat(u[((32u + start_byte_offset) / 16u)].xyz), asfloat(u[((48u + start_byte_offset) / 16u)].xyz));
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/to_storage.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/to_storage.wgsl.expected.ir.fxc.hlsl
index 9b74965..0f9c9e5 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/to_storage.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/to_storage.wgsl.expected.ir.fxc.hlsl
@@ -11,10 +11,7 @@
}
float4x3 v_1(uint start_byte_offset) {
- float3 v_2 = asfloat(u[(start_byte_offset / 16u)].xyz);
- float3 v_3 = asfloat(u[((16u + start_byte_offset) / 16u)].xyz);
- float3 v_4 = asfloat(u[((32u + start_byte_offset) / 16u)].xyz);
- return float4x3(v_2, v_3, v_4, asfloat(u[((48u + start_byte_offset) / 16u)].xyz));
+ return float4x3(asfloat(u[(start_byte_offset / 16u)].xyz), asfloat(u[((16u + start_byte_offset) / 16u)].xyz), asfloat(u[((32u + start_byte_offset) / 16u)].xyz), asfloat(u[((48u + start_byte_offset) / 16u)].xyz));
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/to_workgroup.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/to_workgroup.wgsl.expected.ir.dxc.hlsl
index e7293dc..5ec546d 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/to_workgroup.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/to_workgroup.wgsl.expected.ir.dxc.hlsl
@@ -8,10 +8,7 @@
};
groupshared float4x3 w;
float4x3 v(uint start_byte_offset) {
- float3 v_1 = asfloat(u[(start_byte_offset / 16u)].xyz);
- float3 v_2 = asfloat(u[((16u + start_byte_offset) / 16u)].xyz);
- float3 v_3 = asfloat(u[((32u + start_byte_offset) / 16u)].xyz);
- return float4x3(v_1, v_2, v_3, asfloat(u[((48u + start_byte_offset) / 16u)].xyz));
+ return float4x3(asfloat(u[(start_byte_offset / 16u)].xyz), asfloat(u[((16u + start_byte_offset) / 16u)].xyz), asfloat(u[((32u + start_byte_offset) / 16u)].xyz), asfloat(u[((48u + start_byte_offset) / 16u)].xyz));
}
void f_inner(uint tint_local_index) {
diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/to_workgroup.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/to_workgroup.wgsl.expected.ir.fxc.hlsl
index e7293dc..5ec546d 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/to_workgroup.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/to_workgroup.wgsl.expected.ir.fxc.hlsl
@@ -8,10 +8,7 @@
};
groupshared float4x3 w;
float4x3 v(uint start_byte_offset) {
- float3 v_1 = asfloat(u[(start_byte_offset / 16u)].xyz);
- float3 v_2 = asfloat(u[((16u + start_byte_offset) / 16u)].xyz);
- float3 v_3 = asfloat(u[((32u + start_byte_offset) / 16u)].xyz);
- return float4x3(v_1, v_2, v_3, asfloat(u[((48u + start_byte_offset) / 16u)].xyz));
+ return float4x3(asfloat(u[(start_byte_offset / 16u)].xyz), asfloat(u[((16u + start_byte_offset) / 16u)].xyz), asfloat(u[((32u + start_byte_offset) / 16u)].xyz), asfloat(u[((48u + start_byte_offset) / 16u)].xyz));
}
void f_inner(uint tint_local_index) {
diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/dynamic_index_via_ptr.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/dynamic_index_via_ptr.wgsl.expected.ir.dxc.hlsl
index d73c46c..7ea5f8f 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/dynamic_index_via_ptr.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/dynamic_index_via_ptr.wgsl.expected.ir.dxc.hlsl
@@ -9,16 +9,13 @@
}
float4x4 v(uint start_byte_offset) {
- float4 v_1 = asfloat(m[(start_byte_offset / 16u)]);
- float4 v_2 = asfloat(m[((16u + start_byte_offset) / 16u)]);
- float4 v_3 = asfloat(m[((32u + start_byte_offset) / 16u)]);
- return float4x4(v_1, v_2, v_3, asfloat(m[((48u + start_byte_offset) / 16u)]));
+ return float4x4(asfloat(m[(start_byte_offset / 16u)]), asfloat(m[((16u + start_byte_offset) / 16u)]), asfloat(m[((32u + start_byte_offset) / 16u)]), asfloat(m[((48u + start_byte_offset) / 16u)]));
}
[numthreads(1, 1, 1)]
void f() {
- uint v_4 = (16u * uint(i()));
+ uint v_1 = (16u * uint(i()));
float4x4 l_m = v(0u);
- float4 l_m_i = asfloat(m[(v_4 / 16u)]);
+ float4 l_m_i = asfloat(m[(v_1 / 16u)]);
}
diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/dynamic_index_via_ptr.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/dynamic_index_via_ptr.wgsl.expected.ir.fxc.hlsl
index d73c46c..7ea5f8f 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/dynamic_index_via_ptr.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/dynamic_index_via_ptr.wgsl.expected.ir.fxc.hlsl
@@ -9,16 +9,13 @@
}
float4x4 v(uint start_byte_offset) {
- float4 v_1 = asfloat(m[(start_byte_offset / 16u)]);
- float4 v_2 = asfloat(m[((16u + start_byte_offset) / 16u)]);
- float4 v_3 = asfloat(m[((32u + start_byte_offset) / 16u)]);
- return float4x4(v_1, v_2, v_3, asfloat(m[((48u + start_byte_offset) / 16u)]));
+ return float4x4(asfloat(m[(start_byte_offset / 16u)]), asfloat(m[((16u + start_byte_offset) / 16u)]), asfloat(m[((32u + start_byte_offset) / 16u)]), asfloat(m[((48u + start_byte_offset) / 16u)]));
}
[numthreads(1, 1, 1)]
void f() {
- uint v_4 = (16u * uint(i()));
+ uint v_1 = (16u * uint(i()));
float4x4 l_m = v(0u);
- float4 l_m_i = asfloat(m[(v_4 / 16u)]);
+ float4 l_m_i = asfloat(m[(v_1 / 16u)]);
}
diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/static_index_via_ptr.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/static_index_via_ptr.wgsl.expected.ir.dxc.hlsl
index 7b2ecaf..3186f19 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/static_index_via_ptr.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/static_index_via_ptr.wgsl.expected.ir.dxc.hlsl
@@ -9,10 +9,7 @@
}
float4x4 v(uint start_byte_offset) {
- float4 v_1 = asfloat(m[(start_byte_offset / 16u)]);
- float4 v_2 = asfloat(m[((16u + start_byte_offset) / 16u)]);
- float4 v_3 = asfloat(m[((32u + start_byte_offset) / 16u)]);
- return float4x4(v_1, v_2, v_3, asfloat(m[((48u + start_byte_offset) / 16u)]));
+ return float4x4(asfloat(m[(start_byte_offset / 16u)]), asfloat(m[((16u + start_byte_offset) / 16u)]), asfloat(m[((32u + start_byte_offset) / 16u)]), asfloat(m[((48u + start_byte_offset) / 16u)]));
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/static_index_via_ptr.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/static_index_via_ptr.wgsl.expected.ir.fxc.hlsl
index 7b2ecaf..3186f19 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/static_index_via_ptr.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/static_index_via_ptr.wgsl.expected.ir.fxc.hlsl
@@ -9,10 +9,7 @@
}
float4x4 v(uint start_byte_offset) {
- float4 v_1 = asfloat(m[(start_byte_offset / 16u)]);
- float4 v_2 = asfloat(m[((16u + start_byte_offset) / 16u)]);
- float4 v_3 = asfloat(m[((32u + start_byte_offset) / 16u)]);
- return float4x4(v_1, v_2, v_3, asfloat(m[((48u + start_byte_offset) / 16u)]));
+ return float4x4(asfloat(m[(start_byte_offset / 16u)]), asfloat(m[((16u + start_byte_offset) / 16u)]), asfloat(m[((32u + start_byte_offset) / 16u)]), asfloat(m[((48u + start_byte_offset) / 16u)]));
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/to_builtin.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/to_builtin.wgsl.expected.ir.dxc.hlsl
index bd02195..9d0cd77 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/to_builtin.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/to_builtin.wgsl.expected.ir.dxc.hlsl
@@ -3,10 +3,7 @@
uint4 u[4];
};
float4x4 v(uint start_byte_offset) {
- float4 v_1 = asfloat(u[(start_byte_offset / 16u)]);
- float4 v_2 = asfloat(u[((16u + start_byte_offset) / 16u)]);
- float4 v_3 = asfloat(u[((32u + start_byte_offset) / 16u)]);
- return float4x4(v_1, v_2, v_3, asfloat(u[((48u + start_byte_offset) / 16u)]));
+ return float4x4(asfloat(u[(start_byte_offset / 16u)]), asfloat(u[((16u + start_byte_offset) / 16u)]), asfloat(u[((32u + start_byte_offset) / 16u)]), asfloat(u[((48u + start_byte_offset) / 16u)]));
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/to_builtin.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/to_builtin.wgsl.expected.ir.fxc.hlsl
index bd02195..9d0cd77 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/to_builtin.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/to_builtin.wgsl.expected.ir.fxc.hlsl
@@ -3,10 +3,7 @@
uint4 u[4];
};
float4x4 v(uint start_byte_offset) {
- float4 v_1 = asfloat(u[(start_byte_offset / 16u)]);
- float4 v_2 = asfloat(u[((16u + start_byte_offset) / 16u)]);
- float4 v_3 = asfloat(u[((32u + start_byte_offset) / 16u)]);
- return float4x4(v_1, v_2, v_3, asfloat(u[((48u + start_byte_offset) / 16u)]));
+ return float4x4(asfloat(u[(start_byte_offset / 16u)]), asfloat(u[((16u + start_byte_offset) / 16u)]), asfloat(u[((32u + start_byte_offset) / 16u)]), asfloat(u[((48u + start_byte_offset) / 16u)]));
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/to_fn.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/to_fn.wgsl.expected.ir.dxc.hlsl
index a2deccc..bf2d1d5 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/to_fn.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/to_fn.wgsl.expected.ir.dxc.hlsl
@@ -12,10 +12,7 @@
}
float4x4 v_1(uint start_byte_offset) {
- float4 v_2 = asfloat(u[(start_byte_offset / 16u)]);
- float4 v_3 = asfloat(u[((16u + start_byte_offset) / 16u)]);
- float4 v_4 = asfloat(u[((32u + start_byte_offset) / 16u)]);
- return float4x4(v_2, v_3, v_4, asfloat(u[((48u + start_byte_offset) / 16u)]));
+ return float4x4(asfloat(u[(start_byte_offset / 16u)]), asfloat(u[((16u + start_byte_offset) / 16u)]), asfloat(u[((32u + start_byte_offset) / 16u)]), asfloat(u[((48u + start_byte_offset) / 16u)]));
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/to_fn.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/to_fn.wgsl.expected.ir.fxc.hlsl
index a2deccc..bf2d1d5 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/to_fn.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/to_fn.wgsl.expected.ir.fxc.hlsl
@@ -12,10 +12,7 @@
}
float4x4 v_1(uint start_byte_offset) {
- float4 v_2 = asfloat(u[(start_byte_offset / 16u)]);
- float4 v_3 = asfloat(u[((16u + start_byte_offset) / 16u)]);
- float4 v_4 = asfloat(u[((32u + start_byte_offset) / 16u)]);
- return float4x4(v_2, v_3, v_4, asfloat(u[((48u + start_byte_offset) / 16u)]));
+ return float4x4(asfloat(u[(start_byte_offset / 16u)]), asfloat(u[((16u + start_byte_offset) / 16u)]), asfloat(u[((32u + start_byte_offset) / 16u)]), asfloat(u[((48u + start_byte_offset) / 16u)]));
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/to_private.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/to_private.wgsl.expected.ir.dxc.hlsl
index c6aff1a..9e75ac2 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/to_private.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/to_private.wgsl.expected.ir.dxc.hlsl
@@ -4,10 +4,7 @@
};
static float4x4 p = float4x4((0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx);
float4x4 v(uint start_byte_offset) {
- float4 v_1 = asfloat(u[(start_byte_offset / 16u)]);
- float4 v_2 = asfloat(u[((16u + start_byte_offset) / 16u)]);
- float4 v_3 = asfloat(u[((32u + start_byte_offset) / 16u)]);
- return float4x4(v_1, v_2, v_3, asfloat(u[((48u + start_byte_offset) / 16u)]));
+ return float4x4(asfloat(u[(start_byte_offset / 16u)]), asfloat(u[((16u + start_byte_offset) / 16u)]), asfloat(u[((32u + start_byte_offset) / 16u)]), asfloat(u[((48u + start_byte_offset) / 16u)]));
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/to_private.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/to_private.wgsl.expected.ir.fxc.hlsl
index c6aff1a..9e75ac2 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/to_private.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/to_private.wgsl.expected.ir.fxc.hlsl
@@ -4,10 +4,7 @@
};
static float4x4 p = float4x4((0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx);
float4x4 v(uint start_byte_offset) {
- float4 v_1 = asfloat(u[(start_byte_offset / 16u)]);
- float4 v_2 = asfloat(u[((16u + start_byte_offset) / 16u)]);
- float4 v_3 = asfloat(u[((32u + start_byte_offset) / 16u)]);
- return float4x4(v_1, v_2, v_3, asfloat(u[((48u + start_byte_offset) / 16u)]));
+ return float4x4(asfloat(u[(start_byte_offset / 16u)]), asfloat(u[((16u + start_byte_offset) / 16u)]), asfloat(u[((32u + start_byte_offset) / 16u)]), asfloat(u[((48u + start_byte_offset) / 16u)]));
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/to_storage.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/to_storage.wgsl.expected.ir.dxc.hlsl
index 21b8977..75d6bca 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/to_storage.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/to_storage.wgsl.expected.ir.dxc.hlsl
@@ -11,10 +11,7 @@
}
float4x4 v_1(uint start_byte_offset) {
- float4 v_2 = asfloat(u[(start_byte_offset / 16u)]);
- float4 v_3 = asfloat(u[((16u + start_byte_offset) / 16u)]);
- float4 v_4 = asfloat(u[((32u + start_byte_offset) / 16u)]);
- return float4x4(v_2, v_3, v_4, asfloat(u[((48u + start_byte_offset) / 16u)]));
+ return float4x4(asfloat(u[(start_byte_offset / 16u)]), asfloat(u[((16u + start_byte_offset) / 16u)]), asfloat(u[((32u + start_byte_offset) / 16u)]), asfloat(u[((48u + start_byte_offset) / 16u)]));
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/to_storage.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/to_storage.wgsl.expected.ir.fxc.hlsl
index 21b8977..75d6bca 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/to_storage.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/to_storage.wgsl.expected.ir.fxc.hlsl
@@ -11,10 +11,7 @@
}
float4x4 v_1(uint start_byte_offset) {
- float4 v_2 = asfloat(u[(start_byte_offset / 16u)]);
- float4 v_3 = asfloat(u[((16u + start_byte_offset) / 16u)]);
- float4 v_4 = asfloat(u[((32u + start_byte_offset) / 16u)]);
- return float4x4(v_2, v_3, v_4, asfloat(u[((48u + start_byte_offset) / 16u)]));
+ return float4x4(asfloat(u[(start_byte_offset / 16u)]), asfloat(u[((16u + start_byte_offset) / 16u)]), asfloat(u[((32u + start_byte_offset) / 16u)]), asfloat(u[((48u + start_byte_offset) / 16u)]));
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/to_workgroup.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/to_workgroup.wgsl.expected.ir.dxc.hlsl
index a3908b8..9a18993 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/to_workgroup.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/to_workgroup.wgsl.expected.ir.dxc.hlsl
@@ -8,10 +8,7 @@
};
groupshared float4x4 w;
float4x4 v(uint start_byte_offset) {
- float4 v_1 = asfloat(u[(start_byte_offset / 16u)]);
- float4 v_2 = asfloat(u[((16u + start_byte_offset) / 16u)]);
- float4 v_3 = asfloat(u[((32u + start_byte_offset) / 16u)]);
- return float4x4(v_1, v_2, v_3, asfloat(u[((48u + start_byte_offset) / 16u)]));
+ return float4x4(asfloat(u[(start_byte_offset / 16u)]), asfloat(u[((16u + start_byte_offset) / 16u)]), asfloat(u[((32u + start_byte_offset) / 16u)]), asfloat(u[((48u + start_byte_offset) / 16u)]));
}
void f_inner(uint tint_local_index) {
diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/to_workgroup.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/to_workgroup.wgsl.expected.ir.fxc.hlsl
index a3908b8..9a18993 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/to_workgroup.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/to_workgroup.wgsl.expected.ir.fxc.hlsl
@@ -8,10 +8,7 @@
};
groupshared float4x4 w;
float4x4 v(uint start_byte_offset) {
- float4 v_1 = asfloat(u[(start_byte_offset / 16u)]);
- float4 v_2 = asfloat(u[((16u + start_byte_offset) / 16u)]);
- float4 v_3 = asfloat(u[((32u + start_byte_offset) / 16u)]);
- return float4x4(v_1, v_2, v_3, asfloat(u[((48u + start_byte_offset) / 16u)]));
+ return float4x4(asfloat(u[(start_byte_offset / 16u)]), asfloat(u[((16u + start_byte_offset) / 16u)]), asfloat(u[((32u + start_byte_offset) / 16u)]), asfloat(u[((48u + start_byte_offset) / 16u)]));
}
void f_inner(uint tint_local_index) {
diff --git a/test/tint/buffer/uniform/types/mat2x3_f32.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/uniform/types/mat2x3_f32.wgsl.expected.ir.dxc.hlsl
index 851fb87..0cbe724 100644
--- a/test/tint/buffer/uniform/types/mat2x3_f32.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/uniform/types/mat2x3_f32.wgsl.expected.ir.dxc.hlsl
@@ -9,8 +9,7 @@
}
float2x3 v_1(uint start_byte_offset) {
- float3 v_2 = asfloat(u[(start_byte_offset / 16u)].xyz);
- return float2x3(v_2, asfloat(u[((16u + start_byte_offset) / 16u)].xyz));
+ return float2x3(asfloat(u[(start_byte_offset / 16u)].xyz), asfloat(u[((16u + start_byte_offset) / 16u)].xyz));
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/buffer/uniform/types/mat2x3_f32.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/uniform/types/mat2x3_f32.wgsl.expected.ir.fxc.hlsl
index 851fb87..0cbe724 100644
--- a/test/tint/buffer/uniform/types/mat2x3_f32.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/uniform/types/mat2x3_f32.wgsl.expected.ir.fxc.hlsl
@@ -9,8 +9,7 @@
}
float2x3 v_1(uint start_byte_offset) {
- float3 v_2 = asfloat(u[(start_byte_offset / 16u)].xyz);
- return float2x3(v_2, asfloat(u[((16u + start_byte_offset) / 16u)].xyz));
+ return float2x3(asfloat(u[(start_byte_offset / 16u)].xyz), asfloat(u[((16u + start_byte_offset) / 16u)].xyz));
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/buffer/uniform/types/mat2x4_f32.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/uniform/types/mat2x4_f32.wgsl.expected.ir.dxc.hlsl
index cd56bd8..1ccf474 100644
--- a/test/tint/buffer/uniform/types/mat2x4_f32.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/uniform/types/mat2x4_f32.wgsl.expected.ir.dxc.hlsl
@@ -9,8 +9,7 @@
}
float2x4 v_1(uint start_byte_offset) {
- float4 v_2 = asfloat(u[(start_byte_offset / 16u)]);
- return float2x4(v_2, asfloat(u[((16u + start_byte_offset) / 16u)]));
+ return float2x4(asfloat(u[(start_byte_offset / 16u)]), asfloat(u[((16u + start_byte_offset) / 16u)]));
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/buffer/uniform/types/mat2x4_f32.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/uniform/types/mat2x4_f32.wgsl.expected.ir.fxc.hlsl
index cd56bd8..1ccf474 100644
--- a/test/tint/buffer/uniform/types/mat2x4_f32.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/uniform/types/mat2x4_f32.wgsl.expected.ir.fxc.hlsl
@@ -9,8 +9,7 @@
}
float2x4 v_1(uint start_byte_offset) {
- float4 v_2 = asfloat(u[(start_byte_offset / 16u)]);
- return float2x4(v_2, asfloat(u[((16u + start_byte_offset) / 16u)]));
+ return float2x4(asfloat(u[(start_byte_offset / 16u)]), asfloat(u[((16u + start_byte_offset) / 16u)]));
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/buffer/uniform/types/mat3x3_f32.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/uniform/types/mat3x3_f32.wgsl.expected.ir.dxc.hlsl
index bee4ee7..47b3c39 100644
--- a/test/tint/buffer/uniform/types/mat3x3_f32.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/uniform/types/mat3x3_f32.wgsl.expected.ir.dxc.hlsl
@@ -10,9 +10,7 @@
}
float3x3 v_1(uint start_byte_offset) {
- float3 v_2 = asfloat(u[(start_byte_offset / 16u)].xyz);
- float3 v_3 = asfloat(u[((16u + start_byte_offset) / 16u)].xyz);
- return float3x3(v_2, v_3, asfloat(u[((32u + start_byte_offset) / 16u)].xyz));
+ return float3x3(asfloat(u[(start_byte_offset / 16u)].xyz), asfloat(u[((16u + start_byte_offset) / 16u)].xyz), asfloat(u[((32u + start_byte_offset) / 16u)].xyz));
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/buffer/uniform/types/mat3x3_f32.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/uniform/types/mat3x3_f32.wgsl.expected.ir.fxc.hlsl
index bee4ee7..47b3c39 100644
--- a/test/tint/buffer/uniform/types/mat3x3_f32.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/uniform/types/mat3x3_f32.wgsl.expected.ir.fxc.hlsl
@@ -10,9 +10,7 @@
}
float3x3 v_1(uint start_byte_offset) {
- float3 v_2 = asfloat(u[(start_byte_offset / 16u)].xyz);
- float3 v_3 = asfloat(u[((16u + start_byte_offset) / 16u)].xyz);
- return float3x3(v_2, v_3, asfloat(u[((32u + start_byte_offset) / 16u)].xyz));
+ return float3x3(asfloat(u[(start_byte_offset / 16u)].xyz), asfloat(u[((16u + start_byte_offset) / 16u)].xyz), asfloat(u[((32u + start_byte_offset) / 16u)].xyz));
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/buffer/uniform/types/mat3x4_f32.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/uniform/types/mat3x4_f32.wgsl.expected.ir.dxc.hlsl
index 749d4b8..dbdf37b 100644
--- a/test/tint/buffer/uniform/types/mat3x4_f32.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/uniform/types/mat3x4_f32.wgsl.expected.ir.dxc.hlsl
@@ -10,9 +10,7 @@
}
float3x4 v_1(uint start_byte_offset) {
- float4 v_2 = asfloat(u[(start_byte_offset / 16u)]);
- float4 v_3 = asfloat(u[((16u + start_byte_offset) / 16u)]);
- return float3x4(v_2, v_3, asfloat(u[((32u + start_byte_offset) / 16u)]));
+ return float3x4(asfloat(u[(start_byte_offset / 16u)]), asfloat(u[((16u + start_byte_offset) / 16u)]), asfloat(u[((32u + start_byte_offset) / 16u)]));
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/buffer/uniform/types/mat3x4_f32.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/uniform/types/mat3x4_f32.wgsl.expected.ir.fxc.hlsl
index 749d4b8..dbdf37b 100644
--- a/test/tint/buffer/uniform/types/mat3x4_f32.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/uniform/types/mat3x4_f32.wgsl.expected.ir.fxc.hlsl
@@ -10,9 +10,7 @@
}
float3x4 v_1(uint start_byte_offset) {
- float4 v_2 = asfloat(u[(start_byte_offset / 16u)]);
- float4 v_3 = asfloat(u[((16u + start_byte_offset) / 16u)]);
- return float3x4(v_2, v_3, asfloat(u[((32u + start_byte_offset) / 16u)]));
+ return float3x4(asfloat(u[(start_byte_offset / 16u)]), asfloat(u[((16u + start_byte_offset) / 16u)]), asfloat(u[((32u + start_byte_offset) / 16u)]));
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/buffer/uniform/types/mat4x3_f32.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/uniform/types/mat4x3_f32.wgsl.expected.ir.dxc.hlsl
index 0171680..097c3b3 100644
--- a/test/tint/buffer/uniform/types/mat4x3_f32.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/uniform/types/mat4x3_f32.wgsl.expected.ir.dxc.hlsl
@@ -11,10 +11,7 @@
}
float4x3 v_1(uint start_byte_offset) {
- float3 v_2 = asfloat(u[(start_byte_offset / 16u)].xyz);
- float3 v_3 = asfloat(u[((16u + start_byte_offset) / 16u)].xyz);
- float3 v_4 = asfloat(u[((32u + start_byte_offset) / 16u)].xyz);
- return float4x3(v_2, v_3, v_4, asfloat(u[((48u + start_byte_offset) / 16u)].xyz));
+ return float4x3(asfloat(u[(start_byte_offset / 16u)].xyz), asfloat(u[((16u + start_byte_offset) / 16u)].xyz), asfloat(u[((32u + start_byte_offset) / 16u)].xyz), asfloat(u[((48u + start_byte_offset) / 16u)].xyz));
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/buffer/uniform/types/mat4x3_f32.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/uniform/types/mat4x3_f32.wgsl.expected.ir.fxc.hlsl
index 0171680..097c3b3 100644
--- a/test/tint/buffer/uniform/types/mat4x3_f32.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/uniform/types/mat4x3_f32.wgsl.expected.ir.fxc.hlsl
@@ -11,10 +11,7 @@
}
float4x3 v_1(uint start_byte_offset) {
- float3 v_2 = asfloat(u[(start_byte_offset / 16u)].xyz);
- float3 v_3 = asfloat(u[((16u + start_byte_offset) / 16u)].xyz);
- float3 v_4 = asfloat(u[((32u + start_byte_offset) / 16u)].xyz);
- return float4x3(v_2, v_3, v_4, asfloat(u[((48u + start_byte_offset) / 16u)].xyz));
+ return float4x3(asfloat(u[(start_byte_offset / 16u)].xyz), asfloat(u[((16u + start_byte_offset) / 16u)].xyz), asfloat(u[((32u + start_byte_offset) / 16u)].xyz), asfloat(u[((48u + start_byte_offset) / 16u)].xyz));
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/buffer/uniform/types/mat4x4_f32.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/uniform/types/mat4x4_f32.wgsl.expected.ir.dxc.hlsl
index a231b32..2d0d45a 100644
--- a/test/tint/buffer/uniform/types/mat4x4_f32.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/uniform/types/mat4x4_f32.wgsl.expected.ir.dxc.hlsl
@@ -11,10 +11,7 @@
}
float4x4 v_1(uint start_byte_offset) {
- float4 v_2 = asfloat(u[(start_byte_offset / 16u)]);
- float4 v_3 = asfloat(u[((16u + start_byte_offset) / 16u)]);
- float4 v_4 = asfloat(u[((32u + start_byte_offset) / 16u)]);
- return float4x4(v_2, v_3, v_4, asfloat(u[((48u + start_byte_offset) / 16u)]));
+ return float4x4(asfloat(u[(start_byte_offset / 16u)]), asfloat(u[((16u + start_byte_offset) / 16u)]), asfloat(u[((32u + start_byte_offset) / 16u)]), asfloat(u[((48u + start_byte_offset) / 16u)]));
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/buffer/uniform/types/mat4x4_f32.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/uniform/types/mat4x4_f32.wgsl.expected.ir.fxc.hlsl
index a231b32..2d0d45a 100644
--- a/test/tint/buffer/uniform/types/mat4x4_f32.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/uniform/types/mat4x4_f32.wgsl.expected.ir.fxc.hlsl
@@ -11,10 +11,7 @@
}
float4x4 v_1(uint start_byte_offset) {
- float4 v_2 = asfloat(u[(start_byte_offset / 16u)]);
- float4 v_3 = asfloat(u[((16u + start_byte_offset) / 16u)]);
- float4 v_4 = asfloat(u[((32u + start_byte_offset) / 16u)]);
- return float4x4(v_2, v_3, v_4, asfloat(u[((48u + start_byte_offset) / 16u)]));
+ return float4x4(asfloat(u[(start_byte_offset / 16u)]), asfloat(u[((16u + start_byte_offset) / 16u)]), asfloat(u[((32u + start_byte_offset) / 16u)]), asfloat(u[((48u + start_byte_offset) / 16u)]));
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/buffer/uniform/types/struct_f32.wgsl.expected.ir.dxc.hlsl b/test/tint/buffer/uniform/types/struct_f32.wgsl.expected.ir.dxc.hlsl
index 07ac12a..898b8b1 100644
--- a/test/tint/buffer/uniform/types/struct_f32.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/buffer/uniform/types/struct_f32.wgsl.expected.ir.dxc.hlsl
@@ -30,26 +30,25 @@
}
float2x4 v_4(uint start_byte_offset) {
- float4 v_5 = asfloat(u[(start_byte_offset / 16u)]);
- return float2x4(v_5, asfloat(u[((16u + start_byte_offset) / 16u)]));
+ return float2x4(asfloat(u[(start_byte_offset / 16u)]), asfloat(u[((16u + start_byte_offset) / 16u)]));
}
-Inner v_6(uint start_byte_offset) {
- float v_7 = asfloat(u[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]);
- float3 v_8 = asfloat(u[((16u + start_byte_offset) / 16u)].xyz);
- Inner v_9 = {v_7, v_8, v_4((32u + start_byte_offset))};
- return v_9;
+Inner v_5(uint start_byte_offset) {
+ float v_6 = asfloat(u[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]);
+ float3 v_7 = asfloat(u[((16u + start_byte_offset) / 16u)].xyz);
+ Inner v_8 = {v_6, v_7, v_4((32u + start_byte_offset))};
+ return v_8;
}
-S v_10(uint start_byte_offset) {
- Inner v_11 = v_6(start_byte_offset);
- S v_12 = {v_11};
- return v_12;
+S v_9(uint start_byte_offset) {
+ Inner v_10 = v_5(start_byte_offset);
+ S v_11 = {v_10};
+ return v_11;
}
[numthreads(1, 1, 1)]
void main() {
- S x = v_10(0u);
+ S x = v_9(0u);
v_2(0u, x);
}
diff --git a/test/tint/buffer/uniform/types/struct_f32.wgsl.expected.ir.fxc.hlsl b/test/tint/buffer/uniform/types/struct_f32.wgsl.expected.ir.fxc.hlsl
index 07ac12a..898b8b1 100644
--- a/test/tint/buffer/uniform/types/struct_f32.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/buffer/uniform/types/struct_f32.wgsl.expected.ir.fxc.hlsl
@@ -30,26 +30,25 @@
}
float2x4 v_4(uint start_byte_offset) {
- float4 v_5 = asfloat(u[(start_byte_offset / 16u)]);
- return float2x4(v_5, asfloat(u[((16u + start_byte_offset) / 16u)]));
+ return float2x4(asfloat(u[(start_byte_offset / 16u)]), asfloat(u[((16u + start_byte_offset) / 16u)]));
}
-Inner v_6(uint start_byte_offset) {
- float v_7 = asfloat(u[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]);
- float3 v_8 = asfloat(u[((16u + start_byte_offset) / 16u)].xyz);
- Inner v_9 = {v_7, v_8, v_4((32u + start_byte_offset))};
- return v_9;
+Inner v_5(uint start_byte_offset) {
+ float v_6 = asfloat(u[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]);
+ float3 v_7 = asfloat(u[((16u + start_byte_offset) / 16u)].xyz);
+ Inner v_8 = {v_6, v_7, v_4((32u + start_byte_offset))};
+ return v_8;
}
-S v_10(uint start_byte_offset) {
- Inner v_11 = v_6(start_byte_offset);
- S v_12 = {v_11};
- return v_12;
+S v_9(uint start_byte_offset) {
+ Inner v_10 = v_5(start_byte_offset);
+ S v_11 = {v_10};
+ return v_11;
}
[numthreads(1, 1, 1)]
void main() {
- S x = v_10(0u);
+ S x = v_9(0u);
v_2(0u, x);
}
diff --git a/test/tint/bug/chromium/1273230.wgsl.expected.glsl b/test/tint/bug/chromium/1273230.wgsl.expected.glsl
index a004ee5..edec4a1 100644
--- a/test/tint/bug/chromium/1273230.wgsl.expected.glsl
+++ b/test/tint/bug/chromium/1273230.wgsl.expected.glsl
@@ -55,8 +55,7 @@
vec3 bbMin = vec3(v.inner.bbMin.x, v.inner.bbMin.y, v.inner.bbMin.z);
vec3 bbMax = vec3(v.inner.bbMax.x, v.inner.bbMax.y, v.inner.bbMax.z);
vec3 bbSize = (bbMin - bbMin);
- float v_2 = max(bbMax.x, bbMax.y);
- float cubeSize = max(v_2, bbSize.z);
+ float cubeSize = max(max(bbMax.x, bbMax.y), bbSize.z);
float gridSize = float(v.inner.gridSize);
float gx = ((cubeSize * (position[0u] - v.inner.bbMin.x)) / cubeSize);
float gy = ((gx * (position[1u] - v.inner.bbMin.y)) / gridSize);
@@ -64,9 +63,7 @@
return vec3(gz, gz, gz);
}
uvec3 tint_v3f32_to_v3u32(vec3 value) {
- uvec3 v_3 = uvec3(value);
- uvec3 v_4 = mix(uvec3(0u), v_3, greaterThanEqual(value, vec3(0.0f)));
- return mix(uvec3(4294967295u), v_4, lessThanEqual(value, vec3(4294967040.0f)));
+ return mix(uvec3(4294967295u), mix(uvec3(0u), uvec3(value), greaterThanEqual(value, vec3(0.0f))), lessThanEqual(value, vec3(4294967040.0f)));
}
uint toIndex1D(uint gridSize, vec3 voxelPos) {
uvec3 icoord = tint_v3f32_to_v3u32(voxelPos);
@@ -90,20 +87,20 @@
return;
}
doIgnore();
- uint v_5 = ((3u * triangleIndex) + 0u);
- uint i0 = indices.values[v_5];
- uint v_6 = ((3u * i0) + 1u);
- uint i1 = indices.values[v_6];
- uint v_7 = ((3u * i0) + 2u);
- uint i2 = indices.values[v_7];
+ uint v_2 = ((3u * triangleIndex) + 0u);
+ uint i0 = indices.values[v_2];
+ uint v_3 = ((3u * i0) + 1u);
+ uint i1 = indices.values[v_3];
+ uint v_4 = ((3u * i0) + 2u);
+ uint i2 = indices.values[v_4];
vec3 p0 = loadPosition(i0);
vec3 p1 = loadPosition(i0);
vec3 p2 = loadPosition(i2);
vec3 center = (((p0 + p2) + p1) / 3.0f);
vec3 voxelPos = toVoxelPos(p1);
uint lIndex = toIndex1D(v.inner.gridSize, p0);
- uint v_8 = i1;
- int triangleOffset = atomicAdd(LUT.values[v_8], 1);
+ uint v_5 = i1;
+ int triangleOffset = atomicAdd(LUT.values[v_5], 1);
}
layout(local_size_x = 128, local_size_y = 1, local_size_z = 1) in;
void main() {
diff --git a/test/tint/bug/chromium/1273230.wgsl.expected.ir.dxc.hlsl b/test/tint/bug/chromium/1273230.wgsl.expected.ir.dxc.hlsl
index c912907..6bfefb7 100644
--- a/test/tint/bug/chromium/1273230.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/bug/chromium/1273230.wgsl.expected.ir.dxc.hlsl
@@ -15,25 +15,14 @@
}
float3 toVoxelPos(float3 position) {
- float v = asfloat(uniforms[1u].x);
- float v_1 = asfloat(uniforms[1u].y);
- float3 bbMin = float3(v, v_1, asfloat(uniforms[1u].z));
- float v_2 = asfloat(uniforms[2u].x);
- float v_3 = asfloat(uniforms[2u].y);
- float3 bbMax = float3(v_2, v_3, asfloat(uniforms[2u].z));
+ float3 bbMin = float3(asfloat(uniforms[1u].x), asfloat(uniforms[1u].y), asfloat(uniforms[1u].z));
+ float3 bbMax = float3(asfloat(uniforms[2u].x), asfloat(uniforms[2u].y), asfloat(uniforms[2u].z));
float3 bbSize = (bbMin - bbMin);
- float v_4 = max(bbMax.x, bbMax.y);
- float cubeSize = max(v_4, bbSize.z);
+ float cubeSize = max(max(bbMax.x, bbMax.y), bbSize.z);
float gridSize = float(uniforms[0u].y);
- float v_5 = cubeSize;
- float v_6 = (v_5 * (position.x - asfloat(uniforms[1u].x)));
- float gx = (v_6 / cubeSize);
- float v_7 = gx;
- float v_8 = (v_7 * (position.y - asfloat(uniforms[1u].y)));
- float gy = (v_8 / gridSize);
- float v_9 = gridSize;
- float v_10 = (v_9 * (position.z - asfloat(uniforms[1u].z)));
- float gz = (v_10 / gridSize);
+ float gx = ((cubeSize * (position.x - asfloat(uniforms[1u].x))) / cubeSize);
+ float gy = ((gx * (position.y - asfloat(uniforms[1u].y))) / gridSize);
+ float gz = ((gridSize * (position.z - asfloat(uniforms[1u].z))) / gridSize);
return float3(gz, gz, gz);
}
@@ -47,8 +36,8 @@
}
uint tint_mod_u32(uint lhs, uint rhs) {
- uint v_11 = (((rhs == 0u)) ? (1u) : (rhs));
- return (lhs - ((lhs / v_11) * v_11));
+ uint v = (((rhs == 0u)) ? (1u) : (rhs));
+ return (lhs - ((lhs / v) * v));
}
uint tint_div_u32(uint lhs, uint rhs) {
@@ -63,23 +52,23 @@
}
float3 loadPosition(uint vertexIndex) {
- float v_12 = asfloat(positions.Load((0u + (uint(((3u * vertexIndex) + 0u)) * 4u))));
- float v_13 = asfloat(positions.Load((0u + (uint(((3u * vertexIndex) + 1u)) * 4u))));
- float3 position = float3(v_12, v_13, asfloat(positions.Load((0u + (uint(((3u * vertexIndex) + 2u)) * 4u)))));
+ float v_1 = asfloat(positions.Load((0u + (uint(((3u * vertexIndex) + 0u)) * 4u))));
+ float v_2 = asfloat(positions.Load((0u + (uint(((3u * vertexIndex) + 1u)) * 4u))));
+ float3 position = float3(v_1, v_2, asfloat(positions.Load((0u + (uint(((3u * vertexIndex) + 2u)) * 4u)))));
return position;
}
void doIgnore() {
uint g43 = uniforms[0u].x;
uint kj6 = dbg.Load(20u);
- uint v_14 = 0u;
- counters.InterlockedOr(uint(0u), 0u, v_14);
- uint b53 = v_14;
+ uint v_3 = 0u;
+ counters.InterlockedOr(uint(0u), 0u, v_3);
+ uint b53 = v_3;
uint rwg = indices.Load(0u);
float rb5 = asfloat(positions.Load(0u));
- int v_15 = int(0);
- LUT.InterlockedOr(int(0u), int(0), v_15);
- int g55 = v_15;
+ int v_4 = int(0);
+ LUT.InterlockedOr(int(0u), int(0), v_4);
+ int g55 = v_4;
}
void main_count_inner(uint3 GlobalInvocationID) {
@@ -97,9 +86,9 @@
float3 center = (((p0 + p2) + p1) / 3.0f);
float3 voxelPos = toVoxelPos(p1);
uint lIndex = toIndex1D(uniforms[0u].y, p0);
- int v_16 = int(0);
- LUT.InterlockedAdd(int((0u + (uint(i1) * 4u))), int(1), v_16);
- int triangleOffset = v_16;
+ int v_5 = int(0);
+ LUT.InterlockedAdd(int((0u + (uint(i1) * 4u))), int(1), v_5);
+ int triangleOffset = v_5;
}
[numthreads(128, 1, 1)]
diff --git a/test/tint/bug/chromium/1273230.wgsl.expected.ir.fxc.hlsl b/test/tint/bug/chromium/1273230.wgsl.expected.ir.fxc.hlsl
index c912907..6bfefb7 100644
--- a/test/tint/bug/chromium/1273230.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/bug/chromium/1273230.wgsl.expected.ir.fxc.hlsl
@@ -15,25 +15,14 @@
}
float3 toVoxelPos(float3 position) {
- float v = asfloat(uniforms[1u].x);
- float v_1 = asfloat(uniforms[1u].y);
- float3 bbMin = float3(v, v_1, asfloat(uniforms[1u].z));
- float v_2 = asfloat(uniforms[2u].x);
- float v_3 = asfloat(uniforms[2u].y);
- float3 bbMax = float3(v_2, v_3, asfloat(uniforms[2u].z));
+ float3 bbMin = float3(asfloat(uniforms[1u].x), asfloat(uniforms[1u].y), asfloat(uniforms[1u].z));
+ float3 bbMax = float3(asfloat(uniforms[2u].x), asfloat(uniforms[2u].y), asfloat(uniforms[2u].z));
float3 bbSize = (bbMin - bbMin);
- float v_4 = max(bbMax.x, bbMax.y);
- float cubeSize = max(v_4, bbSize.z);
+ float cubeSize = max(max(bbMax.x, bbMax.y), bbSize.z);
float gridSize = float(uniforms[0u].y);
- float v_5 = cubeSize;
- float v_6 = (v_5 * (position.x - asfloat(uniforms[1u].x)));
- float gx = (v_6 / cubeSize);
- float v_7 = gx;
- float v_8 = (v_7 * (position.y - asfloat(uniforms[1u].y)));
- float gy = (v_8 / gridSize);
- float v_9 = gridSize;
- float v_10 = (v_9 * (position.z - asfloat(uniforms[1u].z)));
- float gz = (v_10 / gridSize);
+ float gx = ((cubeSize * (position.x - asfloat(uniforms[1u].x))) / cubeSize);
+ float gy = ((gx * (position.y - asfloat(uniforms[1u].y))) / gridSize);
+ float gz = ((gridSize * (position.z - asfloat(uniforms[1u].z))) / gridSize);
return float3(gz, gz, gz);
}
@@ -47,8 +36,8 @@
}
uint tint_mod_u32(uint lhs, uint rhs) {
- uint v_11 = (((rhs == 0u)) ? (1u) : (rhs));
- return (lhs - ((lhs / v_11) * v_11));
+ uint v = (((rhs == 0u)) ? (1u) : (rhs));
+ return (lhs - ((lhs / v) * v));
}
uint tint_div_u32(uint lhs, uint rhs) {
@@ -63,23 +52,23 @@
}
float3 loadPosition(uint vertexIndex) {
- float v_12 = asfloat(positions.Load((0u + (uint(((3u * vertexIndex) + 0u)) * 4u))));
- float v_13 = asfloat(positions.Load((0u + (uint(((3u * vertexIndex) + 1u)) * 4u))));
- float3 position = float3(v_12, v_13, asfloat(positions.Load((0u + (uint(((3u * vertexIndex) + 2u)) * 4u)))));
+ float v_1 = asfloat(positions.Load((0u + (uint(((3u * vertexIndex) + 0u)) * 4u))));
+ float v_2 = asfloat(positions.Load((0u + (uint(((3u * vertexIndex) + 1u)) * 4u))));
+ float3 position = float3(v_1, v_2, asfloat(positions.Load((0u + (uint(((3u * vertexIndex) + 2u)) * 4u)))));
return position;
}
void doIgnore() {
uint g43 = uniforms[0u].x;
uint kj6 = dbg.Load(20u);
- uint v_14 = 0u;
- counters.InterlockedOr(uint(0u), 0u, v_14);
- uint b53 = v_14;
+ uint v_3 = 0u;
+ counters.InterlockedOr(uint(0u), 0u, v_3);
+ uint b53 = v_3;
uint rwg = indices.Load(0u);
float rb5 = asfloat(positions.Load(0u));
- int v_15 = int(0);
- LUT.InterlockedOr(int(0u), int(0), v_15);
- int g55 = v_15;
+ int v_4 = int(0);
+ LUT.InterlockedOr(int(0u), int(0), v_4);
+ int g55 = v_4;
}
void main_count_inner(uint3 GlobalInvocationID) {
@@ -97,9 +86,9 @@
float3 center = (((p0 + p2) + p1) / 3.0f);
float3 voxelPos = toVoxelPos(p1);
uint lIndex = toIndex1D(uniforms[0u].y, p0);
- int v_16 = int(0);
- LUT.InterlockedAdd(int((0u + (uint(i1) * 4u))), int(1), v_16);
- int triangleOffset = v_16;
+ int v_5 = int(0);
+ LUT.InterlockedAdd(int((0u + (uint(i1) * 4u))), int(1), v_5);
+ int triangleOffset = v_5;
}
[numthreads(128, 1, 1)]
diff --git a/test/tint/bug/chromium/1273230.wgsl.expected.ir.msl b/test/tint/bug/chromium/1273230.wgsl.expected.ir.msl
index 7f6db83..7b8e619 100644
--- a/test/tint/bug/chromium/1273230.wgsl.expected.ir.msl
+++ b/test/tint/bug/chromium/1273230.wgsl.expected.ir.msl
@@ -71,8 +71,7 @@
float3 bbMin = float3((*tint_module_vars.uniforms).bbMin[0u], (*tint_module_vars.uniforms).bbMin[1u], (*tint_module_vars.uniforms).bbMin[2u]);
float3 bbMax = float3((*tint_module_vars.uniforms).bbMax[0u], (*tint_module_vars.uniforms).bbMax[1u], (*tint_module_vars.uniforms).bbMax[2u]);
float3 bbSize = (bbMin - bbMin);
- float const v = max(bbMax[0u], bbMax[1u]);
- float cubeSize = max(v, bbSize[2u]);
+ float cubeSize = max(max(bbMax[0u], bbMax[1u]), bbSize[2u]);
float gridSize = float((*tint_module_vars.uniforms).gridSize);
float gx = ((cubeSize * (position[0u] - (*tint_module_vars.uniforms).bbMin[0u])) / cubeSize);
float gy = ((gx * (position[1u] - (*tint_module_vars.uniforms).bbMin[1u])) / gridSize);
@@ -90,8 +89,7 @@
}
uint tint_mod_u32(uint lhs, uint rhs) {
- uint const v_1 = select(rhs, 1u, (rhs == 0u));
- return (lhs - ((lhs / v_1) * v_1));
+ return (lhs - ((lhs / select(rhs, 1u, (rhs == 0u))) * select(rhs, 1u, (rhs == 0u))));
}
uint tint_div_u32(uint lhs, uint rhs) {
diff --git a/test/tint/bug/chromium/1386647.wgsl.expected.glsl b/test/tint/bug/chromium/1386647.wgsl.expected.glsl
index 6c96696..5f5d57c 100644
--- a/test/tint/bug/chromium/1386647.wgsl.expected.glsl
+++ b/test/tint/bug/chromium/1386647.wgsl.expected.glsl
@@ -1,8 +1,7 @@
#version 310 es
uint tint_mod_u32(uint lhs, uint rhs) {
- uint v_1 = mix(rhs, 1u, (rhs == 0u));
- return (lhs - ((lhs / v_1) * v_1));
+ return (lhs - ((lhs / mix(rhs, 1u, (rhs == 0u))) * mix(rhs, 1u, (rhs == 0u))));
}
void f_inner(uvec3 v) {
uint l = (v[0u] << (tint_mod_u32(v[1u], 1u) & 31u));
diff --git a/test/tint/bug/chromium/1386647.wgsl.expected.ir.msl b/test/tint/bug/chromium/1386647.wgsl.expected.ir.msl
index 291ad88..67ec1d2 100644
--- a/test/tint/bug/chromium/1386647.wgsl.expected.ir.msl
+++ b/test/tint/bug/chromium/1386647.wgsl.expected.ir.msl
@@ -2,8 +2,7 @@
using namespace metal;
uint tint_mod_u32(uint lhs, uint rhs) {
- uint const v_1 = select(rhs, 1u, (rhs == 0u));
- return (lhs - ((lhs / v_1) * v_1));
+ return (lhs - ((lhs / select(rhs, 1u, (rhs == 0u))) * select(rhs, 1u, (rhs == 0u))));
}
void f_inner(uint3 v) {
diff --git a/test/tint/bug/chromium/1434271.wgsl.expected.glsl b/test/tint/bug/chromium/1434271.wgsl.expected.glsl
index 4760c94..9ea1c71 100644
--- a/test/tint/bug/chromium/1434271.wgsl.expected.glsl
+++ b/test/tint/bug/chromium/1434271.wgsl.expected.glsl
@@ -172,8 +172,7 @@
float d = buf_in.weights[v_2];
float sum = dot(vec4(a, b, c, d), vec4(1.0f));
buf_out.weights[dst_offset] = tint_float_modulo(sum, 4.0f);
- vec4 v_3 = vec4(a, (a * b), ((a / b) + c), sum);
- vec4 probabilities = (v_3 + max(sum, 0.0f));
+ vec4 probabilities = (vec4(a, (a * b), ((a / b) + c), sum) + max(sum, 0.0f));
imageStore(tex_out, ivec2(coord.xy), probabilities);
}
}
diff --git a/test/tint/bug/chromium/1434271.wgsl.expected.ir.dxc.hlsl b/test/tint/bug/chromium/1434271.wgsl.expected.ir.dxc.hlsl
index d7b7cd5..e99d442 100644
--- a/test/tint/bug/chromium/1434271.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/bug/chromium/1434271.wgsl.expected.ir.dxc.hlsl
@@ -79,55 +79,48 @@
}
float4x4 v_1(uint start_byte_offset) {
- float4 v_2 = asfloat(render_params[(start_byte_offset / 16u)]);
- float4 v_3 = asfloat(render_params[((16u + start_byte_offset) / 16u)]);
- float4 v_4 = asfloat(render_params[((32u + start_byte_offset) / 16u)]);
- return float4x4(v_2, v_3, v_4, asfloat(render_params[((48u + start_byte_offset) / 16u)]));
+ return float4x4(asfloat(render_params[(start_byte_offset / 16u)]), asfloat(render_params[((16u + start_byte_offset) / 16u)]), asfloat(render_params[((32u + start_byte_offset) / 16u)]), asfloat(render_params[((48u + start_byte_offset) / 16u)]));
}
VertexOutput vs_main_inner(VertexInput tint_symbol) {
- float3 v_5 = asfloat(render_params[4u].xyz);
- float3 quad_pos = mul(tint_symbol.quad_pos, float2x3(v_5, asfloat(render_params[5u].xyz)));
+ float3 quad_pos = mul(tint_symbol.quad_pos, float2x3(asfloat(render_params[4u].xyz), asfloat(render_params[5u].xyz)));
float3 position = (tint_symbol.position - (quad_pos + 0.00999999977648258209f));
VertexOutput tint_symbol_1 = (VertexOutput)0;
- float4x4 v_6 = v_1(0u);
- tint_symbol_1.position = mul(float4(position, 1.0f), v_6);
+ float4x4 v_2 = v_1(0u);
+ tint_symbol_1.position = mul(float4(position, 1.0f), v_2);
tint_symbol_1.color = tint_symbol.color;
tint_symbol_1.quad_pos = tint_symbol.quad_pos;
- VertexOutput v_7 = tint_symbol_1;
- return v_7;
+ VertexOutput v_3 = tint_symbol_1;
+ return v_3;
}
-void v_8(uint offset, Particle obj) {
+void v_4(uint offset, Particle obj) {
data.Store3((offset + 0u), asuint(obj.position));
data.Store((offset + 12u), asuint(obj.lifetime));
data.Store4((offset + 16u), asuint(obj.color));
data.Store2((offset + 32u), asuint(obj.velocity));
}
-Particle v_9(uint offset) {
- float3 v_10 = asfloat(data.Load3((offset + 0u)));
- float v_11 = asfloat(data.Load((offset + 12u)));
- float4 v_12 = asfloat(data.Load4((offset + 16u)));
- Particle v_13 = {v_10, v_11, v_12, asfloat(data.Load2((offset + 32u)))};
- return v_13;
+Particle v_5(uint offset) {
+ Particle v_6 = {asfloat(data.Load3((offset + 0u))), asfloat(data.Load((offset + 12u))), asfloat(data.Load4((offset + 16u))), asfloat(data.Load2((offset + 32u)))};
+ return v_6;
}
void simulate_inner(uint3 GlobalInvocationID) {
- float2 v_14 = asfloat(sim_params[1u]).xy;
- float2 v_15 = (v_14 * float2(GlobalInvocationID.xy));
- rand_seed = (v_15 * asfloat(sim_params[1u]).zw);
+ float2 v_7 = asfloat(sim_params[1u]).xy;
+ float2 v_8 = (v_7 * float2(GlobalInvocationID.xy));
+ rand_seed = (v_8 * asfloat(sim_params[1u]).zw);
uint idx = GlobalInvocationID.x;
- Particle particle = v_9((0u + (uint(idx) * 48u)));
- uint v_16 = (uint(idx) * 48u);
- Particle v_17 = particle;
- v_8((0u + v_16), v_17);
+ Particle particle = v_5((0u + (uint(idx) * 48u)));
+ uint v_9 = (uint(idx) * 48u);
+ Particle v_10 = particle;
+ v_4((0u + v_9), v_10);
}
void export_level_inner(uint3 coord) {
- uint2 v_18 = (0u).xx;
- tex_out.GetDimensions(v_18.x, v_18.y);
- if (all((coord.xy < uint2(v_18)))) {
+ uint2 v_11 = (0u).xx;
+ tex_out.GetDimensions(v_11.x, v_11.y);
+ if (all((coord.xy < uint2(v_11)))) {
uint dst_offset = (coord.x << ((coord.y * ubo[0u].x) & 31u));
uint src_offset = ((coord.x - 2u) + ((coord.y >> (2u & 31u)) * ubo[0u].x));
float a = asfloat(buf_in.Load((0u + (uint((src_offset << (0u & 31u))) * 4u))));
@@ -135,26 +128,24 @@
float c = asfloat(buf_in.Load((0u + (uint(((src_offset + 1u) + ubo[0u].x)) * 4u))));
float d = asfloat(buf_in.Load((0u + (uint(((src_offset + 1u) + ubo[0u].x)) * 4u))));
float sum = dot(float4(a, b, c, d), (1.0f).xxxx);
- uint v_19 = (uint(dst_offset) * 4u);
- float v_20 = (sum / 4.0f);
- float v_21 = floor(v_20);
- buf_out.Store((0u + v_19), asuint((sum - ((((v_20 < 0.0f)) ? (ceil(v_20)) : (v_21)) * 4.0f))));
- float4 v_22 = float4(a, (a * b), ((a / b) + c), sum);
- float4 probabilities = (v_22 + max(sum, 0.0f));
+ uint v_12 = (uint(dst_offset) * 4u);
+ float v_13 = (sum / 4.0f);
+ buf_out.Store((0u + v_12), asuint((sum - ((((v_13 < 0.0f)) ? (ceil(v_13)) : (floor(v_13))) * 4.0f))));
+ float4 probabilities = (float4(a, (a * b), ((a / b) + c), sum) + max(sum, 0.0f));
tex_out[int2(coord.xy)] = probabilities;
}
}
vertex_main_outputs vertex_main() {
- vertex_main_outputs v_23 = {vertex_main_inner()};
- return v_23;
+ vertex_main_outputs v_14 = {vertex_main_inner()};
+ return v_14;
}
vs_main_outputs vs_main(vs_main_inputs inputs) {
- VertexInput v_24 = {inputs.VertexInput_position, inputs.VertexInput_color, inputs.VertexInput_quad_pos};
- VertexOutput v_25 = vs_main_inner(v_24);
- vs_main_outputs v_26 = {v_25.color, v_25.quad_pos, v_25.position};
- return v_26;
+ VertexInput v_15 = {inputs.VertexInput_position, inputs.VertexInput_color, inputs.VertexInput_quad_pos};
+ VertexOutput v_16 = vs_main_inner(v_15);
+ vs_main_outputs v_17 = {v_16.color, v_16.quad_pos, v_16.position};
+ return v_17;
}
[numthreads(64, 1, 1)]
diff --git a/test/tint/bug/chromium/1434271.wgsl.expected.ir.msl b/test/tint/bug/chromium/1434271.wgsl.expected.ir.msl
index ac63654..905dbd8 100644
--- a/test/tint/bug/chromium/1434271.wgsl.expected.ir.msl
+++ b/test/tint/bug/chromium/1434271.wgsl.expected.ir.msl
@@ -147,8 +147,7 @@
}
void export_level_inner(uint3 coord, tint_module_vars_struct tint_module_vars) {
- uint const v_5 = tint_module_vars.tex_out.get_width(0u);
- if (all((coord.xy < uint2(uint2(v_5, tint_module_vars.tex_out.get_height(0u)))))) {
+ if (all((coord.xy < uint2(uint2(tint_module_vars.tex_out.get_width(0u), tint_module_vars.tex_out.get_height(0u)))))) {
uint const dst_offset = (coord[0u] << ((coord[1u] * (*tint_module_vars.ubo).width) & 31u));
uint const src_offset = ((coord[0u] - 2u) + ((coord[1u] >> (2u & 31u)) * (*tint_module_vars.ubo).width));
float const a = (*tint_module_vars.buf_in).weights[(src_offset << (0u & 31u))];
@@ -157,8 +156,7 @@
float const d = (*tint_module_vars.buf_in).weights[((src_offset + 1u) + (*tint_module_vars.ubo).width)];
float const sum = dot(float4(a, b, c, d), float4(1.0f));
(*tint_module_vars.buf_out).weights[dst_offset] = fmod(sum, 4.0f);
- float4 const v_6 = float4(a, (a * b), ((a / b) + c), sum);
- float4 const probabilities = (v_6 + max(sum, 0.0f));
+ float4 const probabilities = (float4(a, (a * b), ((a / b) + c), sum) + max(sum, 0.0f));
tint_module_vars.tex_out.write(probabilities, uint2(int2(coord.xy)));
}
}
@@ -171,11 +169,11 @@
vertex vs_main_outputs vs_main(vs_main_inputs inputs [[stage_in]], const constant RenderParams_packed_vec3* render_params [[buffer(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.render_params=render_params};
- VertexOutput const v_7 = vs_main_inner(VertexInput{.position=inputs.VertexInput_position, .color=inputs.VertexInput_color, .quad_pos=inputs.VertexInput_quad_pos}, tint_module_vars);
+ VertexOutput const v_5 = vs_main_inner(VertexInput{.position=inputs.VertexInput_position, .color=inputs.VertexInput_color, .quad_pos=inputs.VertexInput_quad_pos}, tint_module_vars);
vs_main_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_position = v_7.position;
- tint_wrapper_result.VertexOutput_color = v_7.color;
- tint_wrapper_result.VertexOutput_quad_pos = v_7.quad_pos;
+ tint_wrapper_result.VertexOutput_position = v_5.position;
+ tint_wrapper_result.VertexOutput_color = v_5.color;
+ tint_wrapper_result.VertexOutput_quad_pos = v_5.quad_pos;
return tint_wrapper_result;
}
diff --git a/test/tint/bug/chromium/344265982.wgsl.expected.ir.dxc.hlsl b/test/tint/bug/chromium/344265982.wgsl.expected.ir.dxc.hlsl
index 3f19234..fec9e75 100644
--- a/test/tint/bug/chromium/344265982.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/bug/chromium/344265982.wgsl.expected.ir.dxc.hlsl
@@ -17,8 +17,7 @@
}
default:
{
- uint v = (0u + (uint(i) * 4u));
- buffer.Store(v, asuint(int(2)));
+ buffer.Store((0u + (uint(i) * 4u)), asuint(int(2)));
break;
}
}
diff --git a/test/tint/bug/chromium/344265982.wgsl.expected.ir.fxc.hlsl b/test/tint/bug/chromium/344265982.wgsl.expected.ir.fxc.hlsl
index 3f19234..fec9e75 100644
--- a/test/tint/bug/chromium/344265982.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/bug/chromium/344265982.wgsl.expected.ir.fxc.hlsl
@@ -17,8 +17,7 @@
}
default:
{
- uint v = (0u + (uint(i) * 4u));
- buffer.Store(v, asuint(int(2)));
+ buffer.Store((0u + (uint(i) * 4u)), asuint(int(2)));
break;
}
}
diff --git a/test/tint/bug/chromium/378541479.wgsl.expected.ir.dxc.hlsl b/test/tint/bug/chromium/378541479.wgsl.expected.ir.dxc.hlsl
index d108164..2790e87 100644
--- a/test/tint/bug/chromium/378541479.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/bug/chromium/378541479.wgsl.expected.ir.dxc.hlsl
@@ -9,13 +9,12 @@
[numthreads(1, 1, 1)]
void compute_main() {
uint2 v = coords[0u].xy;
- uint v_1 = level[0u].x;
- uint3 v_2 = (0u).xxx;
- tex.GetDimensions(0u, v_2.x, v_2.y, v_2.z);
- uint v_3 = min(v_1, (v_2.z - 1u));
- uint3 v_4 = (0u).xxx;
- tex.GetDimensions(uint(v_3), v_4.x, v_4.y, v_4.z);
- int2 v_5 = int2(min(v, (v_4.xy - (1u).xx)));
- float res = tex.Load(int3(v_5, int(v_3))).x;
+ uint3 v_1 = (0u).xxx;
+ tex.GetDimensions(0u, v_1.x, v_1.y, v_1.z);
+ uint v_2 = min(level[0u].x, (v_1.z - 1u));
+ uint3 v_3 = (0u).xxx;
+ tex.GetDimensions(uint(v_2), v_3.x, v_3.y, v_3.z);
+ int2 v_4 = int2(min(v, (v_3.xy - (1u).xx)));
+ float res = tex.Load(int3(v_4, int(v_2))).x;
}
diff --git a/test/tint/bug/chromium/378541479.wgsl.expected.ir.fxc.hlsl b/test/tint/bug/chromium/378541479.wgsl.expected.ir.fxc.hlsl
index d108164..2790e87 100644
--- a/test/tint/bug/chromium/378541479.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/bug/chromium/378541479.wgsl.expected.ir.fxc.hlsl
@@ -9,13 +9,12 @@
[numthreads(1, 1, 1)]
void compute_main() {
uint2 v = coords[0u].xy;
- uint v_1 = level[0u].x;
- uint3 v_2 = (0u).xxx;
- tex.GetDimensions(0u, v_2.x, v_2.y, v_2.z);
- uint v_3 = min(v_1, (v_2.z - 1u));
- uint3 v_4 = (0u).xxx;
- tex.GetDimensions(uint(v_3), v_4.x, v_4.y, v_4.z);
- int2 v_5 = int2(min(v, (v_4.xy - (1u).xx)));
- float res = tex.Load(int3(v_5, int(v_3))).x;
+ uint3 v_1 = (0u).xxx;
+ tex.GetDimensions(0u, v_1.x, v_1.y, v_1.z);
+ uint v_2 = min(level[0u].x, (v_1.z - 1u));
+ uint3 v_3 = (0u).xxx;
+ tex.GetDimensions(uint(v_2), v_3.x, v_3.y, v_3.z);
+ int2 v_4 = int2(min(v, (v_3.xy - (1u).xx)));
+ float res = tex.Load(int3(v_4, int(v_2))).x;
}
diff --git a/test/tint/bug/chromium/378541479.wgsl.expected.ir.msl b/test/tint/bug/chromium/378541479.wgsl.expected.ir.msl
index b1edc57..6c3874d 100644
--- a/test/tint/bug/chromium/378541479.wgsl.expected.ir.msl
+++ b/test/tint/bug/chromium/378541479.wgsl.expected.ir.msl
@@ -10,8 +10,6 @@
kernel void compute_main(const constant uint* level [[buffer(1)]], const constant uint2* coords [[buffer(0)]], depth2d<float, access::sample> tex [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.level=level, .coords=coords, .tex=tex};
uint2 const v = (*tint_module_vars.coords);
- uint const v_1 = (*tint_module_vars.level);
- uint const v_2 = min(v_1, (tint_module_vars.tex.get_num_mip_levels() - 1u));
- uint const v_3 = tint_module_vars.tex.get_width(v_2);
- float res = tint_module_vars.tex.read(min(v, (uint2(v_3, tint_module_vars.tex.get_height(v_2)) - uint2(1u))), v_2);
+ uint const v_1 = min((*tint_module_vars.level), (tint_module_vars.tex.get_num_mip_levels() - 1u));
+ float res = tint_module_vars.tex.read(min(v, (uint2(tint_module_vars.tex.get_width(v_1), tint_module_vars.tex.get_height(v_1)) - uint2(1u))), v_1);
}
diff --git a/test/tint/bug/dawn/947.wgsl.expected.ir.dxc.hlsl b/test/tint/bug/dawn/947.wgsl.expected.ir.dxc.hlsl
index 181b807..f8f9577 100644
--- a/test/tint/bug/dawn/947.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/bug/dawn/947.wgsl.expected.ir.dxc.hlsl
@@ -33,16 +33,12 @@
output.position = float4(((texcoord[VertexIndex] * 2.0f) - (1.0f).xx), 0.0f, 1.0f);
bool flipY = (asfloat(uniforms[0u].y) < 0.0f);
if (flipY) {
- float2 v = texcoord[VertexIndex];
- float2 v_1 = (v * asfloat(uniforms[0u].xy));
- output.texcoords = (((v_1 + asfloat(uniforms[0u].zw)) * float2(1.0f, -1.0f)) + float2(0.0f, 1.0f));
+ output.texcoords = ((((texcoord[VertexIndex] * asfloat(uniforms[0u].xy)) + asfloat(uniforms[0u].zw)) * float2(1.0f, -1.0f)) + float2(0.0f, 1.0f));
} else {
- float2 v_2 = ((texcoord[VertexIndex] * float2(1.0f, -1.0f)) + float2(0.0f, 1.0f));
- float2 v_3 = (v_2 * asfloat(uniforms[0u].xy));
- output.texcoords = (v_3 + asfloat(uniforms[0u].zw));
+ output.texcoords = ((((texcoord[VertexIndex] * float2(1.0f, -1.0f)) + float2(0.0f, 1.0f)) * asfloat(uniforms[0u].xy)) + asfloat(uniforms[0u].zw));
}
- VertexOutputs v_4 = output;
- return v_4;
+ VertexOutputs v = output;
+ return v;
}
float4 fs_main_inner(float2 texcoord) {
@@ -55,16 +51,16 @@
}
vs_main_outputs vs_main(vs_main_inputs inputs) {
- VertexOutputs v_5 = vs_main_inner(inputs.VertexIndex);
- vs_main_outputs v_6 = {v_5.texcoords, v_5.position};
- return v_6;
+ VertexOutputs v_1 = vs_main_inner(inputs.VertexIndex);
+ vs_main_outputs v_2 = {v_1.texcoords, v_1.position};
+ return v_2;
}
fs_main_outputs fs_main(fs_main_inputs inputs) {
- fs_main_outputs v_7 = {fs_main_inner(inputs.texcoord)};
+ fs_main_outputs v_3 = {fs_main_inner(inputs.texcoord)};
if (!(continue_execution)) {
discard;
}
- return v_7;
+ return v_3;
}
diff --git a/test/tint/bug/dawn/947.wgsl.expected.ir.fxc.hlsl b/test/tint/bug/dawn/947.wgsl.expected.ir.fxc.hlsl
index 181b807..f8f9577 100644
--- a/test/tint/bug/dawn/947.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/bug/dawn/947.wgsl.expected.ir.fxc.hlsl
@@ -33,16 +33,12 @@
output.position = float4(((texcoord[VertexIndex] * 2.0f) - (1.0f).xx), 0.0f, 1.0f);
bool flipY = (asfloat(uniforms[0u].y) < 0.0f);
if (flipY) {
- float2 v = texcoord[VertexIndex];
- float2 v_1 = (v * asfloat(uniforms[0u].xy));
- output.texcoords = (((v_1 + asfloat(uniforms[0u].zw)) * float2(1.0f, -1.0f)) + float2(0.0f, 1.0f));
+ output.texcoords = ((((texcoord[VertexIndex] * asfloat(uniforms[0u].xy)) + asfloat(uniforms[0u].zw)) * float2(1.0f, -1.0f)) + float2(0.0f, 1.0f));
} else {
- float2 v_2 = ((texcoord[VertexIndex] * float2(1.0f, -1.0f)) + float2(0.0f, 1.0f));
- float2 v_3 = (v_2 * asfloat(uniforms[0u].xy));
- output.texcoords = (v_3 + asfloat(uniforms[0u].zw));
+ output.texcoords = ((((texcoord[VertexIndex] * float2(1.0f, -1.0f)) + float2(0.0f, 1.0f)) * asfloat(uniforms[0u].xy)) + asfloat(uniforms[0u].zw));
}
- VertexOutputs v_4 = output;
- return v_4;
+ VertexOutputs v = output;
+ return v;
}
float4 fs_main_inner(float2 texcoord) {
@@ -55,16 +51,16 @@
}
vs_main_outputs vs_main(vs_main_inputs inputs) {
- VertexOutputs v_5 = vs_main_inner(inputs.VertexIndex);
- vs_main_outputs v_6 = {v_5.texcoords, v_5.position};
- return v_6;
+ VertexOutputs v_1 = vs_main_inner(inputs.VertexIndex);
+ vs_main_outputs v_2 = {v_1.texcoords, v_1.position};
+ return v_2;
}
fs_main_outputs fs_main(fs_main_inputs inputs) {
- fs_main_outputs v_7 = {fs_main_inner(inputs.texcoord)};
+ fs_main_outputs v_3 = {fs_main_inner(inputs.texcoord)};
if (!(continue_execution)) {
discard;
}
- return v_7;
+ return v_3;
}
diff --git a/test/tint/bug/fxc/dyn_array_idx/write/storage.wgsl.expected.ir.dxc.hlsl b/test/tint/bug/fxc/dyn_array_idx/write/storage.wgsl.expected.ir.dxc.hlsl
index 2198338..ec10569 100644
--- a/test/tint/bug/fxc/dyn_array_idx/write/storage.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/bug/fxc/dyn_array_idx/write/storage.wgsl.expected.ir.dxc.hlsl
@@ -6,8 +6,7 @@
RWByteAddressBuffer ssbo : register(u1);
[numthreads(1, 1, 1)]
void f() {
- uint v = (0u + (uint(asint(ubo[0u].x)) * 4u));
- ssbo.Store(v, asuint(int(1)));
+ ssbo.Store((0u + (uint(asint(ubo[0u].x)) * 4u)), asuint(int(1)));
result.Store(0u, asuint(asint(ssbo.Load(12u))));
}
diff --git a/test/tint/bug/fxc/dyn_array_idx/write/storage.wgsl.expected.ir.fxc.hlsl b/test/tint/bug/fxc/dyn_array_idx/write/storage.wgsl.expected.ir.fxc.hlsl
index 2198338..ec10569 100644
--- a/test/tint/bug/fxc/dyn_array_idx/write/storage.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/bug/fxc/dyn_array_idx/write/storage.wgsl.expected.ir.fxc.hlsl
@@ -6,8 +6,7 @@
RWByteAddressBuffer ssbo : register(u1);
[numthreads(1, 1, 1)]
void f() {
- uint v = (0u + (uint(asint(ubo[0u].x)) * 4u));
- ssbo.Store(v, asuint(int(1)));
+ ssbo.Store((0u + (uint(asint(ubo[0u].x)) * 4u)), asuint(int(1)));
result.Store(0u, asuint(asint(ssbo.Load(12u))));
}
diff --git a/test/tint/bug/fxc/indexed_assign_to_array_in_struct/1206.wgsl.expected.ir.dxc.hlsl b/test/tint/bug/fxc/indexed_assign_to_array_in_struct/1206.wgsl.expected.ir.dxc.hlsl
index 36f86f4..03a9a03 100644
--- a/test/tint/bug/fxc/indexed_assign_to_array_in_struct/1206.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/bug/fxc/indexed_assign_to_array_in_struct/1206.wgsl.expected.ir.dxc.hlsl
@@ -34,17 +34,15 @@
Particle v_4(uint offset) {
float3 v_5[8] = v((offset + 0u));
- float v_6 = asfloat(particles.Load((offset + 128u)));
- float4 v_7 = asfloat(particles.Load4((offset + 144u)));
- Particle v_8 = {v_5, v_6, v_7, asfloat(particles.Load3((offset + 160u)))};
- return v_8;
+ Particle v_6 = {v_5, asfloat(particles.Load((offset + 128u))), asfloat(particles.Load4((offset + 144u))), asfloat(particles.Load3((offset + 160u)))};
+ return v_6;
}
[numthreads(1, 1, 1)]
void main() {
Particle particle = v_4(0u);
- uint v_9 = sim[0u].x;
- uint v_10 = sim[0u].x;
- particle.position[v_9] = particle.position[v_10];
+ uint v_7 = sim[0u].x;
+ uint v_8 = sim[0u].x;
+ particle.position[v_7] = particle.position[v_8];
}
diff --git a/test/tint/bug/fxc/indexed_assign_to_array_in_struct/1206.wgsl.expected.ir.fxc.hlsl b/test/tint/bug/fxc/indexed_assign_to_array_in_struct/1206.wgsl.expected.ir.fxc.hlsl
index 390abea..6bab655 100644
--- a/test/tint/bug/fxc/indexed_assign_to_array_in_struct/1206.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/bug/fxc/indexed_assign_to_array_in_struct/1206.wgsl.expected.ir.fxc.hlsl
@@ -34,20 +34,18 @@
Particle v_4(uint offset) {
float3 v_5[8] = v((offset + 0u));
- float v_6 = asfloat(particles.Load((offset + 128u)));
- float4 v_7 = asfloat(particles.Load4((offset + 144u)));
- Particle v_8 = {v_5, v_6, v_7, asfloat(particles.Load3((offset + 160u)))};
- return v_8;
+ Particle v_6 = {v_5, asfloat(particles.Load((offset + 128u))), asfloat(particles.Load4((offset + 144u))), asfloat(particles.Load3((offset + 160u)))};
+ return v_6;
}
[numthreads(1, 1, 1)]
void main() {
Particle particle = v_4(0u);
- uint v_9 = sim[0u].x;
- uint v_10 = sim[0u].x;
+ uint v_7 = sim[0u].x;
+ uint v_8 = sim[0u].x;
float3 tint_array_copy[8] = particle.position;
- tint_array_copy[v_9] = particle.position[v_10];
- float3 v_11[8] = tint_array_copy;
- particle.position = v_11;
+ tint_array_copy[v_7] = particle.position[v_8];
+ float3 v_9[8] = tint_array_copy;
+ particle.position = v_9;
}
diff --git a/test/tint/bug/fxc/vector_assignment_dynamic_index/storage_var.wgsl.expected.ir.dxc.hlsl b/test/tint/bug/fxc/vector_assignment_dynamic_index/storage_var.wgsl.expected.ir.dxc.hlsl
index 345e683..b301a66 100644
--- a/test/tint/bug/fxc/vector_assignment_dynamic_index/storage_var.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/bug/fxc/vector_assignment_dynamic_index/storage_var.wgsl.expected.ir.dxc.hlsl
@@ -5,7 +5,6 @@
RWByteAddressBuffer v1 : register(u1);
[numthreads(1, 1, 1)]
void main() {
- uint v = (0u + (uint(i[0u].x) * 4u));
- v1.Store(v, asuint(1.0f));
+ v1.Store((0u + (uint(i[0u].x) * 4u)), asuint(1.0f));
}
diff --git a/test/tint/bug/fxc/vector_assignment_dynamic_index/storage_var.wgsl.expected.ir.fxc.hlsl b/test/tint/bug/fxc/vector_assignment_dynamic_index/storage_var.wgsl.expected.ir.fxc.hlsl
index 345e683..b301a66 100644
--- a/test/tint/bug/fxc/vector_assignment_dynamic_index/storage_var.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/bug/fxc/vector_assignment_dynamic_index/storage_var.wgsl.expected.ir.fxc.hlsl
@@ -5,7 +5,6 @@
RWByteAddressBuffer v1 : register(u1);
[numthreads(1, 1, 1)]
void main() {
- uint v = (0u + (uint(i[0u].x) * 4u));
- v1.Store(v, asuint(1.0f));
+ v1.Store((0u + (uint(i[0u].x) * 4u)), asuint(1.0f));
}
diff --git a/test/tint/bug/tint/1046.wgsl.expected.ir.dxc.hlsl b/test/tint/bug/tint/1046.wgsl.expected.ir.dxc.hlsl
index d97abd5..9bf4bd7 100644
--- a/test/tint/bug/tint/1046.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/bug/tint/1046.wgsl.expected.ir.dxc.hlsl
@@ -59,33 +59,28 @@
}
float4x4 v(uint start_byte_offset) {
- float4 v_1 = asfloat(uniforms[(start_byte_offset / 16u)]);
- float4 v_2 = asfloat(uniforms[((16u + start_byte_offset) / 16u)]);
- float4 v_3 = asfloat(uniforms[((32u + start_byte_offset) / 16u)]);
- return float4x4(v_1, v_2, v_3, asfloat(uniforms[((48u + start_byte_offset) / 16u)]));
+ return float4x4(asfloat(uniforms[(start_byte_offset / 16u)]), asfloat(uniforms[((16u + start_byte_offset) / 16u)]), asfloat(uniforms[((32u + start_byte_offset) / 16u)]), asfloat(uniforms[((48u + start_byte_offset) / 16u)]));
}
-Uniforms v_4(uint start_byte_offset) {
- float4x4 v_5 = v(start_byte_offset);
- float4x4 v_6 = v((64u + start_byte_offset));
- uint v_7 = uniforms[((128u + start_byte_offset) / 16u)][(((128u + start_byte_offset) % 16u) / 4u)];
- uint v_8 = uniforms[((132u + start_byte_offset) / 16u)][(((132u + start_byte_offset) % 16u) / 4u)];
- Uniforms v_9 = {v_5, v_6, v_7, v_8, asfloat(uniforms[((144u + start_byte_offset) / 16u)])};
- return v_9;
+Uniforms v_1(uint start_byte_offset) {
+ float4x4 v_2 = v(start_byte_offset);
+ float4x4 v_3 = v((64u + start_byte_offset));
+ Uniforms v_4 = {v_2, v_3, uniforms[((128u + start_byte_offset) / 16u)][(((128u + start_byte_offset) % 16u) / 4u)], uniforms[((132u + start_byte_offset) / 16u)][(((132u + start_byte_offset) % 16u) / 4u)], asfloat(uniforms[((144u + start_byte_offset) / 16u)])};
+ return v_4;
}
FragmentOutput main_inner(FragmentInput fragment) {
FragmentOutput output = (FragmentOutput)0;
output.color = float4(1.0f, 0.0f, 0.0f, 1.0f);
- v_4(0u);
- FragmentOutput v_10 = output;
- return v_10;
+ v_1(0u);
+ FragmentOutput v_5 = output;
+ return v_5;
}
main_outputs main(main_inputs inputs) {
- FragmentInput v_11 = {float4(inputs.FragmentInput_position.xyz, (1.0f / inputs.FragmentInput_position.w)), inputs.FragmentInput_view_position, inputs.FragmentInput_normal, inputs.FragmentInput_uv, inputs.FragmentInput_color};
- FragmentOutput v_12 = main_inner(v_11);
- main_outputs v_13 = {v_12.color};
- return v_13;
+ FragmentInput v_6 = {float4(inputs.FragmentInput_position.xyz, (1.0f / inputs.FragmentInput_position.w)), inputs.FragmentInput_view_position, inputs.FragmentInput_normal, inputs.FragmentInput_uv, inputs.FragmentInput_color};
+ FragmentOutput v_7 = main_inner(v_6);
+ main_outputs v_8 = {v_7.color};
+ return v_8;
}
diff --git a/test/tint/bug/tint/1046.wgsl.expected.ir.fxc.hlsl b/test/tint/bug/tint/1046.wgsl.expected.ir.fxc.hlsl
index d97abd5..9bf4bd7 100644
--- a/test/tint/bug/tint/1046.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/bug/tint/1046.wgsl.expected.ir.fxc.hlsl
@@ -59,33 +59,28 @@
}
float4x4 v(uint start_byte_offset) {
- float4 v_1 = asfloat(uniforms[(start_byte_offset / 16u)]);
- float4 v_2 = asfloat(uniforms[((16u + start_byte_offset) / 16u)]);
- float4 v_3 = asfloat(uniforms[((32u + start_byte_offset) / 16u)]);
- return float4x4(v_1, v_2, v_3, asfloat(uniforms[((48u + start_byte_offset) / 16u)]));
+ return float4x4(asfloat(uniforms[(start_byte_offset / 16u)]), asfloat(uniforms[((16u + start_byte_offset) / 16u)]), asfloat(uniforms[((32u + start_byte_offset) / 16u)]), asfloat(uniforms[((48u + start_byte_offset) / 16u)]));
}
-Uniforms v_4(uint start_byte_offset) {
- float4x4 v_5 = v(start_byte_offset);
- float4x4 v_6 = v((64u + start_byte_offset));
- uint v_7 = uniforms[((128u + start_byte_offset) / 16u)][(((128u + start_byte_offset) % 16u) / 4u)];
- uint v_8 = uniforms[((132u + start_byte_offset) / 16u)][(((132u + start_byte_offset) % 16u) / 4u)];
- Uniforms v_9 = {v_5, v_6, v_7, v_8, asfloat(uniforms[((144u + start_byte_offset) / 16u)])};
- return v_9;
+Uniforms v_1(uint start_byte_offset) {
+ float4x4 v_2 = v(start_byte_offset);
+ float4x4 v_3 = v((64u + start_byte_offset));
+ Uniforms v_4 = {v_2, v_3, uniforms[((128u + start_byte_offset) / 16u)][(((128u + start_byte_offset) % 16u) / 4u)], uniforms[((132u + start_byte_offset) / 16u)][(((132u + start_byte_offset) % 16u) / 4u)], asfloat(uniforms[((144u + start_byte_offset) / 16u)])};
+ return v_4;
}
FragmentOutput main_inner(FragmentInput fragment) {
FragmentOutput output = (FragmentOutput)0;
output.color = float4(1.0f, 0.0f, 0.0f, 1.0f);
- v_4(0u);
- FragmentOutput v_10 = output;
- return v_10;
+ v_1(0u);
+ FragmentOutput v_5 = output;
+ return v_5;
}
main_outputs main(main_inputs inputs) {
- FragmentInput v_11 = {float4(inputs.FragmentInput_position.xyz, (1.0f / inputs.FragmentInput_position.w)), inputs.FragmentInput_view_position, inputs.FragmentInput_normal, inputs.FragmentInput_uv, inputs.FragmentInput_color};
- FragmentOutput v_12 = main_inner(v_11);
- main_outputs v_13 = {v_12.color};
- return v_13;
+ FragmentInput v_6 = {float4(inputs.FragmentInput_position.xyz, (1.0f / inputs.FragmentInput_position.w)), inputs.FragmentInput_view_position, inputs.FragmentInput_normal, inputs.FragmentInput_uv, inputs.FragmentInput_color};
+ FragmentOutput v_7 = main_inner(v_6);
+ main_outputs v_8 = {v_7.color};
+ return v_8;
}
diff --git a/test/tint/bug/tint/1061.spvasm.expected.glsl b/test/tint/bug/tint/1061.spvasm.expected.glsl
index dc5efb5..80b0052 100644
--- a/test/tint/bug/tint/1061.spvasm.expected.glsl
+++ b/test/tint/bug/tint/1061.spvasm.expected.glsl
@@ -21,10 +21,7 @@
float f = 0.0f;
vec4 v = vec4(0.0f);
f = 1.0f;
- float v_2 = sin(f);
- float v_3 = cos(f);
- float v_4 = exp2(f);
- v = vec4(v_2, v_3, v_4, log(f));
+ v = vec4(sin(f), cos(f), exp2(f), log(f));
if ((distance(v, v_1.inner.r) < 0.10000000149011611938f)) {
x_GLF_color = vec4(1.0f, 0.0f, 0.0f, 1.0f);
} else {
diff --git a/test/tint/bug/tint/1061.spvasm.expected.ir.dxc.hlsl b/test/tint/bug/tint/1061.spvasm.expected.ir.dxc.hlsl
index 497511b..b783d2e 100644
--- a/test/tint/bug/tint/1061.spvasm.expected.ir.dxc.hlsl
+++ b/test/tint/bug/tint/1061.spvasm.expected.ir.dxc.hlsl
@@ -15,12 +15,8 @@
float f = 0.0f;
float4 v = (0.0f).xxxx;
f = 1.0f;
- float v_1 = sin(f);
- float v_2 = cos(f);
- float v_3 = exp2(f);
- v = float4(v_1, v_2, v_3, log(f));
- float4 v_4 = v;
- if ((distance(v_4, asfloat(x_7[0u])) < 0.10000000149011611938f)) {
+ v = float4(sin(f), cos(f), exp2(f), log(f));
+ if ((distance(v, asfloat(x_7[0u])) < 0.10000000149011611938f)) {
x_GLF_color = float4(1.0f, 0.0f, 0.0f, 1.0f);
} else {
x_GLF_color = (0.0f).xxxx;
@@ -29,13 +25,13 @@
main_out main_inner() {
main_1();
- main_out v_5 = {x_GLF_color};
- return v_5;
+ main_out v_1 = {x_GLF_color};
+ return v_1;
}
main_outputs main() {
- main_out v_6 = main_inner();
- main_outputs v_7 = {v_6.x_GLF_color_1};
- return v_7;
+ main_out v_2 = main_inner();
+ main_outputs v_3 = {v_2.x_GLF_color_1};
+ return v_3;
}
diff --git a/test/tint/bug/tint/1061.spvasm.expected.ir.fxc.hlsl b/test/tint/bug/tint/1061.spvasm.expected.ir.fxc.hlsl
index 497511b..b783d2e 100644
--- a/test/tint/bug/tint/1061.spvasm.expected.ir.fxc.hlsl
+++ b/test/tint/bug/tint/1061.spvasm.expected.ir.fxc.hlsl
@@ -15,12 +15,8 @@
float f = 0.0f;
float4 v = (0.0f).xxxx;
f = 1.0f;
- float v_1 = sin(f);
- float v_2 = cos(f);
- float v_3 = exp2(f);
- v = float4(v_1, v_2, v_3, log(f));
- float4 v_4 = v;
- if ((distance(v_4, asfloat(x_7[0u])) < 0.10000000149011611938f)) {
+ v = float4(sin(f), cos(f), exp2(f), log(f));
+ if ((distance(v, asfloat(x_7[0u])) < 0.10000000149011611938f)) {
x_GLF_color = float4(1.0f, 0.0f, 0.0f, 1.0f);
} else {
x_GLF_color = (0.0f).xxxx;
@@ -29,13 +25,13 @@
main_out main_inner() {
main_1();
- main_out v_5 = {x_GLF_color};
- return v_5;
+ main_out v_1 = {x_GLF_color};
+ return v_1;
}
main_outputs main() {
- main_out v_6 = main_inner();
- main_outputs v_7 = {v_6.x_GLF_color_1};
- return v_7;
+ main_out v_2 = main_inner();
+ main_outputs v_3 = {v_2.x_GLF_color_1};
+ return v_3;
}
diff --git a/test/tint/bug/tint/1061.spvasm.expected.ir.msl b/test/tint/bug/tint/1061.spvasm.expected.ir.msl
index 87969ba..d3ed5cf 100644
--- a/test/tint/bug/tint/1061.spvasm.expected.ir.msl
+++ b/test/tint/bug/tint/1061.spvasm.expected.ir.msl
@@ -22,10 +22,7 @@
float f = 0.0f;
float4 v = 0.0f;
f = 1.0f;
- float const v_1 = sin(f);
- float const v_2 = cos(f);
- float const v_3 = exp2(f);
- v = float4(v_1, v_2, v_3, log(f));
+ v = float4(sin(f), cos(f), exp2(f), log(f));
if ((distance(v, (*tint_module_vars.x_7).r) < 0.10000000149011611938f)) {
(*tint_module_vars.x_GLF_color) = float4(1.0f, 0.0f, 0.0f, 1.0f);
} else {
diff --git a/test/tint/bug/tint/1088.spvasm.expected.glsl b/test/tint/bug/tint/1088.spvasm.expected.glsl
index fd5647d..3f4f3c5 100644
--- a/test/tint/bug/tint/1088.spvasm.expected.glsl
+++ b/test/tint/bug/tint/1088.spvasm.expected.glsl
@@ -41,12 +41,10 @@
vec3 p = vec3(0.0f);
q = vec4(position_1.x, position_1.y, position_1.z, 1.0f);
p = q.xyz;
- float v_1 = p.x;
- p[0u] = (v_1 + sin(((v.inner.test[0].el * position_1.y) + v.inner.time)));
- float v_2 = p.y;
- p[1u] = (v_2 + sin((v.inner.time + 4.0f)));
- mat4 v_3 = v.inner.worldViewProjection;
- tint_symbol = (v_3 * vec4(p.x, p.y, p.z, 1.0f));
+ p[0u] = (p.x + sin(((v.inner.test[0].el * position_1.y) + v.inner.time)));
+ p[1u] = (p.y + sin((v.inner.time + 4.0f)));
+ mat4 v_1 = v.inner.worldViewProjection;
+ tint_symbol = (v_1 * vec4(p.x, p.y, p.z, 1.0f));
vUV = uv;
tint_symbol[1u] = (tint_symbol.y * -1.0f);
}
@@ -58,10 +56,10 @@
return main_out(tint_symbol, vUV);
}
void main() {
- main_out v_4 = tint_symbol_1_inner(tint_symbol_1_loc0_Input, tint_symbol_1_loc2_Input, tint_symbol_1_loc1_Input);
- gl_Position = v_4.tint_symbol;
+ main_out v_2 = tint_symbol_1_inner(tint_symbol_1_loc0_Input, tint_symbol_1_loc2_Input, tint_symbol_1_loc1_Input);
+ gl_Position = v_2.tint_symbol;
gl_Position[1u] = -(gl_Position.y);
gl_Position[2u] = ((2.0f * gl_Position.z) - gl_Position.w);
- tint_symbol_1_loc0_Output = v_4.vUV_1;
+ tint_symbol_1_loc0_Output = v_2.vUV_1;
gl_PointSize = 1.0f;
}
diff --git a/test/tint/bug/tint/1088.spvasm.expected.ir.dxc.hlsl b/test/tint/bug/tint/1088.spvasm.expected.ir.dxc.hlsl
index 1906426..320bc85 100644
--- a/test/tint/bug/tint/1088.spvasm.expected.ir.dxc.hlsl
+++ b/test/tint/bug/tint/1088.spvasm.expected.ir.dxc.hlsl
@@ -24,10 +24,7 @@
static float3 normal = (0.0f).xxx;
static float4 gl_Position = (0.0f).xxxx;
float4x4 v(uint start_byte_offset) {
- float4 v_1 = asfloat(x_14[(start_byte_offset / 16u)]);
- float4 v_2 = asfloat(x_14[((16u + start_byte_offset) / 16u)]);
- float4 v_3 = asfloat(x_14[((32u + start_byte_offset) / 16u)]);
- return float4x4(v_1, v_2, v_3, asfloat(x_14[((48u + start_byte_offset) / 16u)]));
+ return float4x4(asfloat(x_14[(start_byte_offset / 16u)]), asfloat(x_14[((16u + start_byte_offset) / 16u)]), asfloat(x_14[((32u + start_byte_offset) / 16u)]), asfloat(x_14[((48u + start_byte_offset) / 16u)]));
}
void main_1() {
@@ -35,14 +32,10 @@
float3 p = (0.0f).xxx;
q = float4(position_1.x, position_1.y, position_1.z, 1.0f);
p = q.xyz;
- float v_4 = p.x;
- float v_5 = asfloat(x_14[13u].x);
- float v_6 = (v_5 * position_1.y);
- p.x = (v_4 + sin((v_6 + asfloat(x_14[4u].x))));
- float v_7 = p.y;
- p.y = (v_7 + sin((asfloat(x_14[4u].x) + 4.0f)));
- float4x4 v_8 = v(0u);
- gl_Position = mul(float4(p.x, p.y, p.z, 1.0f), v_8);
+ p.x = (p.x + sin(((asfloat(x_14[13u].x) * position_1.y) + asfloat(x_14[4u].x))));
+ p.y = (p.y + sin((asfloat(x_14[4u].x) + 4.0f)));
+ float4x4 v_1 = v(0u);
+ gl_Position = mul(float4(p.x, p.y, p.z, 1.0f), v_1);
vUV = uv;
gl_Position.y = (gl_Position.y * -1.0f);
}
@@ -52,13 +45,13 @@
uv = uv_param;
normal = normal_param;
main_1();
- main_out v_9 = {gl_Position, vUV};
- return v_9;
+ main_out v_2 = {gl_Position, vUV};
+ return v_2;
}
main_outputs main(main_inputs inputs) {
- main_out v_10 = main_inner(inputs.position_1_param, inputs.uv_param, inputs.normal_param);
- main_outputs v_11 = {v_10.vUV_1, v_10.gl_Position};
- return v_11;
+ main_out v_3 = main_inner(inputs.position_1_param, inputs.uv_param, inputs.normal_param);
+ main_outputs v_4 = {v_3.vUV_1, v_3.gl_Position};
+ return v_4;
}
diff --git a/test/tint/bug/tint/1088.spvasm.expected.ir.fxc.hlsl b/test/tint/bug/tint/1088.spvasm.expected.ir.fxc.hlsl
index 1906426..320bc85 100644
--- a/test/tint/bug/tint/1088.spvasm.expected.ir.fxc.hlsl
+++ b/test/tint/bug/tint/1088.spvasm.expected.ir.fxc.hlsl
@@ -24,10 +24,7 @@
static float3 normal = (0.0f).xxx;
static float4 gl_Position = (0.0f).xxxx;
float4x4 v(uint start_byte_offset) {
- float4 v_1 = asfloat(x_14[(start_byte_offset / 16u)]);
- float4 v_2 = asfloat(x_14[((16u + start_byte_offset) / 16u)]);
- float4 v_3 = asfloat(x_14[((32u + start_byte_offset) / 16u)]);
- return float4x4(v_1, v_2, v_3, asfloat(x_14[((48u + start_byte_offset) / 16u)]));
+ return float4x4(asfloat(x_14[(start_byte_offset / 16u)]), asfloat(x_14[((16u + start_byte_offset) / 16u)]), asfloat(x_14[((32u + start_byte_offset) / 16u)]), asfloat(x_14[((48u + start_byte_offset) / 16u)]));
}
void main_1() {
@@ -35,14 +32,10 @@
float3 p = (0.0f).xxx;
q = float4(position_1.x, position_1.y, position_1.z, 1.0f);
p = q.xyz;
- float v_4 = p.x;
- float v_5 = asfloat(x_14[13u].x);
- float v_6 = (v_5 * position_1.y);
- p.x = (v_4 + sin((v_6 + asfloat(x_14[4u].x))));
- float v_7 = p.y;
- p.y = (v_7 + sin((asfloat(x_14[4u].x) + 4.0f)));
- float4x4 v_8 = v(0u);
- gl_Position = mul(float4(p.x, p.y, p.z, 1.0f), v_8);
+ p.x = (p.x + sin(((asfloat(x_14[13u].x) * position_1.y) + asfloat(x_14[4u].x))));
+ p.y = (p.y + sin((asfloat(x_14[4u].x) + 4.0f)));
+ float4x4 v_1 = v(0u);
+ gl_Position = mul(float4(p.x, p.y, p.z, 1.0f), v_1);
vUV = uv;
gl_Position.y = (gl_Position.y * -1.0f);
}
@@ -52,13 +45,13 @@
uv = uv_param;
normal = normal_param;
main_1();
- main_out v_9 = {gl_Position, vUV};
- return v_9;
+ main_out v_2 = {gl_Position, vUV};
+ return v_2;
}
main_outputs main(main_inputs inputs) {
- main_out v_10 = main_inner(inputs.position_1_param, inputs.uv_param, inputs.normal_param);
- main_outputs v_11 = {v_10.vUV_1, v_10.gl_Position};
- return v_11;
+ main_out v_3 = main_inner(inputs.position_1_param, inputs.uv_param, inputs.normal_param);
+ main_outputs v_4 = {v_3.vUV_1, v_3.gl_Position};
+ return v_4;
}
diff --git a/test/tint/bug/tint/1088.spvasm.expected.ir.msl b/test/tint/bug/tint/1088.spvasm.expected.ir.msl
index 6615a8b..6cfa262 100644
--- a/test/tint/bug/tint/1088.spvasm.expected.ir.msl
+++ b/test/tint/bug/tint/1088.spvasm.expected.ir.msl
@@ -56,12 +56,10 @@
float3 p = 0.0f;
q = float4((*tint_module_vars.position_1)[0u], (*tint_module_vars.position_1)[1u], (*tint_module_vars.position_1)[2u], 1.0f);
p = q.xyz;
- float const v = p[0u];
- p[0u] = (v + sin((((*tint_module_vars.x_14).test[0].el * (*tint_module_vars.position_1)[1u]) + (*tint_module_vars.x_14).time)));
- float const v_1 = p[1u];
- p[1u] = (v_1 + sin(((*tint_module_vars.x_14).time + 4.0f)));
- float4x4 const v_2 = (*tint_module_vars.x_14).worldViewProjection;
- (*tint_module_vars.gl_Position) = (v_2 * float4(p[0u], p[1u], p[2u], 1.0f));
+ p[0u] = (p[0u] + sin((((*tint_module_vars.x_14).test[0].el * (*tint_module_vars.position_1)[1u]) + (*tint_module_vars.x_14).time)));
+ p[1u] = (p[1u] + sin(((*tint_module_vars.x_14).time + 4.0f)));
+ float4x4 const v = (*tint_module_vars.x_14).worldViewProjection;
+ (*tint_module_vars.gl_Position) = (v * float4(p[0u], p[1u], p[2u], 1.0f));
(*tint_module_vars.vUV) = (*tint_module_vars.uv);
(*tint_module_vars.gl_Position)[1u] = ((*tint_module_vars.gl_Position)[1u] * -1.0f);
}
@@ -81,9 +79,9 @@
thread float3 normal = 0.0f;
thread float4 gl_Position = 0.0f;
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.position_1=(&position_1), .x_14=x_14, .vUV=(&vUV), .uv=(&uv), .normal=(&normal), .gl_Position=(&gl_Position)};
- main_out const v_3 = tint_symbol_inner(inputs.position_1_param, inputs.uv_param, inputs.normal_param, tint_module_vars);
+ main_out const v_1 = tint_symbol_inner(inputs.position_1_param, inputs.uv_param, inputs.normal_param, tint_module_vars);
tint_symbol_outputs tint_wrapper_result = {};
- tint_wrapper_result.main_out_gl_Position = v_3.gl_Position;
- tint_wrapper_result.main_out_vUV_1 = v_3.vUV_1;
+ tint_wrapper_result.main_out_gl_Position = v_1.gl_Position;
+ tint_wrapper_result.main_out_vUV_1 = v_1.vUV_1;
return tint_wrapper_result;
}
diff --git a/test/tint/bug/tint/1113.wgsl.expected.glsl b/test/tint/bug/tint/1113.wgsl.expected.glsl
index 79e6097..c57d440 100644
--- a/test/tint/bug/tint/1113.wgsl.expected.glsl
+++ b/test/tint/bug/tint/1113.wgsl.expected.glsl
@@ -55,8 +55,7 @@
vec3 bbMin = vec3(v.inner.bbMin.x, v.inner.bbMin.y, v.inner.bbMin.z);
vec3 bbMax = vec3(v.inner.bbMax.x, v.inner.bbMax.y, v.inner.bbMax.z);
vec3 bbSize = (bbMax - bbMin);
- float v_2 = max(bbSize.x, bbSize.y);
- float cubeSize = max(v_2, bbSize.z);
+ float cubeSize = max(max(bbSize.x, bbSize.y), bbSize.z);
float gridSize = float(v.inner.gridSize);
float gx = ((gridSize * (position[0u] - v.inner.bbMin.x)) / cubeSize);
float gy = ((gridSize * (position[1u] - v.inner.bbMin.y)) / cubeSize);
@@ -64,9 +63,7 @@
return vec3(gx, gy, gz);
}
uvec3 tint_v3f32_to_v3u32(vec3 value) {
- uvec3 v_3 = uvec3(value);
- uvec3 v_4 = mix(uvec3(0u), v_3, greaterThanEqual(value, vec3(0.0f)));
- return mix(uvec3(4294967295u), v_4, lessThanEqual(value, vec3(4294967040.0f)));
+ return mix(uvec3(4294967295u), mix(uvec3(0u), uvec3(value), greaterThanEqual(value, vec3(0.0f))), lessThanEqual(value, vec3(4294967040.0f)));
}
uint toIndex1D(uint gridSize, vec3 voxelPos) {
uvec3 icoord = tint_v3f32_to_v3u32(voxelPos);
@@ -90,20 +87,20 @@
return;
}
doIgnore();
- uint v_5 = ((3u * triangleIndex) + 0u);
- uint i0 = indices.values[v_5];
- uint v_6 = ((3u * triangleIndex) + 1u);
- uint i1 = indices.values[v_6];
- uint v_7 = ((3u * triangleIndex) + 2u);
- uint i2 = indices.values[v_7];
+ uint v_2 = ((3u * triangleIndex) + 0u);
+ uint i0 = indices.values[v_2];
+ uint v_3 = ((3u * triangleIndex) + 1u);
+ uint i1 = indices.values[v_3];
+ uint v_4 = ((3u * triangleIndex) + 2u);
+ uint i2 = indices.values[v_4];
vec3 p0 = loadPosition(i0);
vec3 p1 = loadPosition(i1);
vec3 p2 = loadPosition(i2);
vec3 center = (((p0 + p1) + p2) / 3.0f);
vec3 voxelPos = toVoxelPos(center);
uint voxelIndex = toIndex1D(v.inner.gridSize, voxelPos);
- uint v_8 = voxelIndex;
- uint acefg = atomicAdd(counters.values[v_8], 1u);
+ uint v_5 = voxelIndex;
+ uint acefg = atomicAdd(counters.values[v_5], 1u);
if ((triangleIndex == 0u)) {
v_1.inner.value0 = v.inner.gridSize;
v_1.inner.value_f32_0 = center.x;
@@ -253,8 +250,7 @@
vec3 bbMin = vec3(v.inner.bbMin.x, v.inner.bbMin.y, v.inner.bbMin.z);
vec3 bbMax = vec3(v.inner.bbMax.x, v.inner.bbMax.y, v.inner.bbMax.z);
vec3 bbSize = (bbMax - bbMin);
- float v_2 = max(bbSize.x, bbSize.y);
- float cubeSize = max(v_2, bbSize.z);
+ float cubeSize = max(max(bbSize.x, bbSize.y), bbSize.z);
float gridSize = float(v.inner.gridSize);
float gx = ((gridSize * (position[0u] - v.inner.bbMin.x)) / cubeSize);
float gy = ((gridSize * (position[1u] - v.inner.bbMin.y)) / cubeSize);
@@ -262,9 +258,7 @@
return vec3(gx, gy, gz);
}
uvec3 tint_v3f32_to_v3u32(vec3 value) {
- uvec3 v_3 = uvec3(value);
- uvec3 v_4 = mix(uvec3(0u), v_3, greaterThanEqual(value, vec3(0.0f)));
- return mix(uvec3(4294967295u), v_4, lessThanEqual(value, vec3(4294967040.0f)));
+ return mix(uvec3(4294967295u), mix(uvec3(0u), uvec3(value), greaterThanEqual(value, vec3(0.0f))), lessThanEqual(value, vec3(4294967040.0f)));
}
uint toIndex1D(uint gridSize, vec3 voxelPos) {
uvec3 icoord = tint_v3f32_to_v3u32(voxelPos);
@@ -288,20 +282,20 @@
if ((triangleIndex >= v.inner.numTriangles)) {
return;
}
- uint v_5 = ((3u * triangleIndex) + 0u);
- uint i0 = indices.values[v_5];
- uint v_6 = ((3u * triangleIndex) + 1u);
- uint i1 = indices.values[v_6];
- uint v_7 = ((3u * triangleIndex) + 2u);
- uint i2 = indices.values[v_7];
+ uint v_2 = ((3u * triangleIndex) + 0u);
+ uint i0 = indices.values[v_2];
+ uint v_3 = ((3u * triangleIndex) + 1u);
+ uint i1 = indices.values[v_3];
+ uint v_4 = ((3u * triangleIndex) + 2u);
+ uint i2 = indices.values[v_4];
vec3 p0 = loadPosition(i0);
vec3 p1 = loadPosition(i1);
vec3 p2 = loadPosition(i2);
vec3 center = (((p0 + p1) + p2) / 3.0f);
vec3 voxelPos = toVoxelPos(center);
uint voxelIndex = toIndex1D(v.inner.gridSize, voxelPos);
- uint v_8 = voxelIndex;
- int triangleOffset = atomicAdd(LUT.values[v_8], 1);
+ uint v_5 = voxelIndex;
+ int triangleOffset = atomicAdd(LUT.values[v_5], 1);
}
layout(local_size_x = 128, local_size_y = 1, local_size_z = 1) in;
void main() {
diff --git a/test/tint/bug/tint/1113.wgsl.expected.ir.dxc.hlsl b/test/tint/bug/tint/1113.wgsl.expected.ir.dxc.hlsl
index 8ba921a..3fc28ad 100644
--- a/test/tint/bug/tint/1113.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/bug/tint/1113.wgsl.expected.ir.dxc.hlsl
@@ -20,25 +20,14 @@
RWByteAddressBuffer LUT : register(u21);
RWByteAddressBuffer dbg : register(u50);
float3 toVoxelPos(float3 position) {
- float v = asfloat(uniforms[1u].x);
- float v_1 = asfloat(uniforms[1u].y);
- float3 bbMin = float3(v, v_1, asfloat(uniforms[1u].z));
- float v_2 = asfloat(uniforms[2u].x);
- float v_3 = asfloat(uniforms[2u].y);
- float3 bbMax = float3(v_2, v_3, asfloat(uniforms[2u].z));
+ float3 bbMin = float3(asfloat(uniforms[1u].x), asfloat(uniforms[1u].y), asfloat(uniforms[1u].z));
+ float3 bbMax = float3(asfloat(uniforms[2u].x), asfloat(uniforms[2u].y), asfloat(uniforms[2u].z));
float3 bbSize = (bbMax - bbMin);
- float v_4 = max(bbSize.x, bbSize.y);
- float cubeSize = max(v_4, bbSize.z);
+ float cubeSize = max(max(bbSize.x, bbSize.y), bbSize.z);
float gridSize = float(uniforms[0u].y);
- float v_5 = gridSize;
- float v_6 = (v_5 * (position.x - asfloat(uniforms[1u].x)));
- float gx = (v_6 / cubeSize);
- float v_7 = gridSize;
- float v_8 = (v_7 * (position.y - asfloat(uniforms[1u].y)));
- float gy = (v_8 / cubeSize);
- float v_9 = gridSize;
- float v_10 = (v_9 * (position.z - asfloat(uniforms[1u].z)));
- float gz = (v_10 / cubeSize);
+ float gx = ((gridSize * (position.x - asfloat(uniforms[1u].x))) / cubeSize);
+ float gy = ((gridSize * (position.y - asfloat(uniforms[1u].y))) / cubeSize);
+ float gz = ((gridSize * (position.z - asfloat(uniforms[1u].z))) / cubeSize);
return float3(gx, gy, gz);
}
@@ -52,8 +41,8 @@
}
uint tint_mod_u32(uint lhs, uint rhs) {
- uint v_11 = (((rhs == 0u)) ? (1u) : (rhs));
- return (lhs - ((lhs / v_11) * v_11));
+ uint v = (((rhs == 0u)) ? (1u) : (rhs));
+ return (lhs - ((lhs / v) * v));
}
uint tint_div_u32(uint lhs, uint rhs) {
@@ -68,23 +57,23 @@
}
float3 loadPosition(uint vertexIndex) {
- float v_12 = asfloat(positions.Load((0u + (uint(((3u * vertexIndex) + 0u)) * 4u))));
- float v_13 = asfloat(positions.Load((0u + (uint(((3u * vertexIndex) + 1u)) * 4u))));
- float3 position = float3(v_12, v_13, asfloat(positions.Load((0u + (uint(((3u * vertexIndex) + 2u)) * 4u)))));
+ float v_1 = asfloat(positions.Load((0u + (uint(((3u * vertexIndex) + 0u)) * 4u))));
+ float v_2 = asfloat(positions.Load((0u + (uint(((3u * vertexIndex) + 1u)) * 4u))));
+ float3 position = float3(v_1, v_2, asfloat(positions.Load((0u + (uint(((3u * vertexIndex) + 2u)) * 4u)))));
return position;
}
void doIgnore() {
uint g42 = uniforms[0u].x;
uint kj6 = dbg.Load(20u);
- uint v_14 = 0u;
- counters.InterlockedOr(uint(0u), 0u, v_14);
- uint b53 = v_14;
+ uint v_3 = 0u;
+ counters.InterlockedOr(uint(0u), 0u, v_3);
+ uint b53 = v_3;
uint rwg = indices.Load(0u);
float rb5 = asfloat(positions.Load(0u));
- int v_15 = int(0);
- LUT.InterlockedOr(int(0u), int(0), v_15);
- int g55 = v_15;
+ int v_4 = int(0);
+ LUT.InterlockedOr(int(0u), int(0), v_4);
+ int g55 = v_4;
}
void main_count_inner(uint3 GlobalInvocationID) {
@@ -102,9 +91,9 @@
float3 center = (((p0 + p1) + p2) / 3.0f);
float3 voxelPos = toVoxelPos(center);
uint voxelIndex = toIndex1D(uniforms[0u].y, voxelPos);
- uint v_16 = 0u;
- counters.InterlockedAdd(uint((0u + (uint(voxelIndex) * 4u))), 1u, v_16);
- uint acefg = v_16;
+ uint v_5 = 0u;
+ counters.InterlockedAdd(uint((0u + (uint(voxelIndex) * 4u))), 1u, v_5);
+ uint acefg = v_5;
if ((triangleIndex == 0u)) {
dbg.Store(16u, uniforms[0u].y);
dbg.Store(32u, asuint(center.x));
@@ -120,20 +109,20 @@
if ((voxelIndex >= maxVoxels)) {
return;
}
- uint v_17 = 0u;
- counters.InterlockedOr(uint((0u + (uint(voxelIndex) * 4u))), 0u, v_17);
- uint numTriangles = v_17;
+ uint v_6 = 0u;
+ counters.InterlockedOr(uint((0u + (uint(voxelIndex) * 4u))), 0u, v_6);
+ uint numTriangles = v_6;
int offset = int(-1);
if ((numTriangles > 0u)) {
- uint v_18 = numTriangles;
- uint v_19 = 0u;
- dbg.InterlockedAdd(uint(0u), v_18, v_19);
- offset = int(v_19);
+ uint v_7 = numTriangles;
+ uint v_8 = 0u;
+ dbg.InterlockedAdd(uint(0u), v_7, v_8);
+ offset = int(v_8);
}
- uint v_20 = (uint(voxelIndex) * 4u);
- int v_21 = offset;
- int v_22 = int(0);
- LUT.InterlockedExchange(int((0u + v_20)), v_21, v_22);
+ uint v_9 = (uint(voxelIndex) * 4u);
+ int v_10 = offset;
+ int v_11 = int(0);
+ LUT.InterlockedExchange(int((0u + v_9)), v_10, v_11);
}
void main_sort_triangles_inner(uint3 GlobalInvocationID) {
@@ -151,9 +140,9 @@
float3 center = (((p0 + p1) + p2) / 3.0f);
float3 voxelPos = toVoxelPos(center);
uint voxelIndex = toIndex1D(uniforms[0u].y, voxelPos);
- int v_23 = int(0);
- LUT.InterlockedAdd(int((0u + (uint(voxelIndex) * 4u))), int(1), v_23);
- int triangleOffset = v_23;
+ int v_12 = int(0);
+ LUT.InterlockedAdd(int((0u + (uint(voxelIndex) * 4u))), int(1), v_12);
+ int triangleOffset = v_12;
}
[numthreads(128, 1, 1)]
diff --git a/test/tint/bug/tint/1113.wgsl.expected.ir.fxc.hlsl b/test/tint/bug/tint/1113.wgsl.expected.ir.fxc.hlsl
index 8ba921a..3fc28ad 100644
--- a/test/tint/bug/tint/1113.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/bug/tint/1113.wgsl.expected.ir.fxc.hlsl
@@ -20,25 +20,14 @@
RWByteAddressBuffer LUT : register(u21);
RWByteAddressBuffer dbg : register(u50);
float3 toVoxelPos(float3 position) {
- float v = asfloat(uniforms[1u].x);
- float v_1 = asfloat(uniforms[1u].y);
- float3 bbMin = float3(v, v_1, asfloat(uniforms[1u].z));
- float v_2 = asfloat(uniforms[2u].x);
- float v_3 = asfloat(uniforms[2u].y);
- float3 bbMax = float3(v_2, v_3, asfloat(uniforms[2u].z));
+ float3 bbMin = float3(asfloat(uniforms[1u].x), asfloat(uniforms[1u].y), asfloat(uniforms[1u].z));
+ float3 bbMax = float3(asfloat(uniforms[2u].x), asfloat(uniforms[2u].y), asfloat(uniforms[2u].z));
float3 bbSize = (bbMax - bbMin);
- float v_4 = max(bbSize.x, bbSize.y);
- float cubeSize = max(v_4, bbSize.z);
+ float cubeSize = max(max(bbSize.x, bbSize.y), bbSize.z);
float gridSize = float(uniforms[0u].y);
- float v_5 = gridSize;
- float v_6 = (v_5 * (position.x - asfloat(uniforms[1u].x)));
- float gx = (v_6 / cubeSize);
- float v_7 = gridSize;
- float v_8 = (v_7 * (position.y - asfloat(uniforms[1u].y)));
- float gy = (v_8 / cubeSize);
- float v_9 = gridSize;
- float v_10 = (v_9 * (position.z - asfloat(uniforms[1u].z)));
- float gz = (v_10 / cubeSize);
+ float gx = ((gridSize * (position.x - asfloat(uniforms[1u].x))) / cubeSize);
+ float gy = ((gridSize * (position.y - asfloat(uniforms[1u].y))) / cubeSize);
+ float gz = ((gridSize * (position.z - asfloat(uniforms[1u].z))) / cubeSize);
return float3(gx, gy, gz);
}
@@ -52,8 +41,8 @@
}
uint tint_mod_u32(uint lhs, uint rhs) {
- uint v_11 = (((rhs == 0u)) ? (1u) : (rhs));
- return (lhs - ((lhs / v_11) * v_11));
+ uint v = (((rhs == 0u)) ? (1u) : (rhs));
+ return (lhs - ((lhs / v) * v));
}
uint tint_div_u32(uint lhs, uint rhs) {
@@ -68,23 +57,23 @@
}
float3 loadPosition(uint vertexIndex) {
- float v_12 = asfloat(positions.Load((0u + (uint(((3u * vertexIndex) + 0u)) * 4u))));
- float v_13 = asfloat(positions.Load((0u + (uint(((3u * vertexIndex) + 1u)) * 4u))));
- float3 position = float3(v_12, v_13, asfloat(positions.Load((0u + (uint(((3u * vertexIndex) + 2u)) * 4u)))));
+ float v_1 = asfloat(positions.Load((0u + (uint(((3u * vertexIndex) + 0u)) * 4u))));
+ float v_2 = asfloat(positions.Load((0u + (uint(((3u * vertexIndex) + 1u)) * 4u))));
+ float3 position = float3(v_1, v_2, asfloat(positions.Load((0u + (uint(((3u * vertexIndex) + 2u)) * 4u)))));
return position;
}
void doIgnore() {
uint g42 = uniforms[0u].x;
uint kj6 = dbg.Load(20u);
- uint v_14 = 0u;
- counters.InterlockedOr(uint(0u), 0u, v_14);
- uint b53 = v_14;
+ uint v_3 = 0u;
+ counters.InterlockedOr(uint(0u), 0u, v_3);
+ uint b53 = v_3;
uint rwg = indices.Load(0u);
float rb5 = asfloat(positions.Load(0u));
- int v_15 = int(0);
- LUT.InterlockedOr(int(0u), int(0), v_15);
- int g55 = v_15;
+ int v_4 = int(0);
+ LUT.InterlockedOr(int(0u), int(0), v_4);
+ int g55 = v_4;
}
void main_count_inner(uint3 GlobalInvocationID) {
@@ -102,9 +91,9 @@
float3 center = (((p0 + p1) + p2) / 3.0f);
float3 voxelPos = toVoxelPos(center);
uint voxelIndex = toIndex1D(uniforms[0u].y, voxelPos);
- uint v_16 = 0u;
- counters.InterlockedAdd(uint((0u + (uint(voxelIndex) * 4u))), 1u, v_16);
- uint acefg = v_16;
+ uint v_5 = 0u;
+ counters.InterlockedAdd(uint((0u + (uint(voxelIndex) * 4u))), 1u, v_5);
+ uint acefg = v_5;
if ((triangleIndex == 0u)) {
dbg.Store(16u, uniforms[0u].y);
dbg.Store(32u, asuint(center.x));
@@ -120,20 +109,20 @@
if ((voxelIndex >= maxVoxels)) {
return;
}
- uint v_17 = 0u;
- counters.InterlockedOr(uint((0u + (uint(voxelIndex) * 4u))), 0u, v_17);
- uint numTriangles = v_17;
+ uint v_6 = 0u;
+ counters.InterlockedOr(uint((0u + (uint(voxelIndex) * 4u))), 0u, v_6);
+ uint numTriangles = v_6;
int offset = int(-1);
if ((numTriangles > 0u)) {
- uint v_18 = numTriangles;
- uint v_19 = 0u;
- dbg.InterlockedAdd(uint(0u), v_18, v_19);
- offset = int(v_19);
+ uint v_7 = numTriangles;
+ uint v_8 = 0u;
+ dbg.InterlockedAdd(uint(0u), v_7, v_8);
+ offset = int(v_8);
}
- uint v_20 = (uint(voxelIndex) * 4u);
- int v_21 = offset;
- int v_22 = int(0);
- LUT.InterlockedExchange(int((0u + v_20)), v_21, v_22);
+ uint v_9 = (uint(voxelIndex) * 4u);
+ int v_10 = offset;
+ int v_11 = int(0);
+ LUT.InterlockedExchange(int((0u + v_9)), v_10, v_11);
}
void main_sort_triangles_inner(uint3 GlobalInvocationID) {
@@ -151,9 +140,9 @@
float3 center = (((p0 + p1) + p2) / 3.0f);
float3 voxelPos = toVoxelPos(center);
uint voxelIndex = toIndex1D(uniforms[0u].y, voxelPos);
- int v_23 = int(0);
- LUT.InterlockedAdd(int((0u + (uint(voxelIndex) * 4u))), int(1), v_23);
- int triangleOffset = v_23;
+ int v_12 = int(0);
+ LUT.InterlockedAdd(int((0u + (uint(voxelIndex) * 4u))), int(1), v_12);
+ int triangleOffset = v_12;
}
[numthreads(128, 1, 1)]
diff --git a/test/tint/bug/tint/1113.wgsl.expected.ir.msl b/test/tint/bug/tint/1113.wgsl.expected.ir.msl
index 2b5b5a8..2190f3c 100644
--- a/test/tint/bug/tint/1113.wgsl.expected.ir.msl
+++ b/test/tint/bug/tint/1113.wgsl.expected.ir.msl
@@ -68,8 +68,7 @@
float3 bbMin = float3((*tint_module_vars.uniforms).bbMin[0u], (*tint_module_vars.uniforms).bbMin[1u], (*tint_module_vars.uniforms).bbMin[2u]);
float3 bbMax = float3((*tint_module_vars.uniforms).bbMax[0u], (*tint_module_vars.uniforms).bbMax[1u], (*tint_module_vars.uniforms).bbMax[2u]);
float3 bbSize = (bbMax - bbMin);
- float const v = max(bbSize[0u], bbSize[1u]);
- float cubeSize = max(v, bbSize[2u]);
+ float cubeSize = max(max(bbSize[0u], bbSize[1u]), bbSize[2u]);
float gridSize = float((*tint_module_vars.uniforms).gridSize);
float gx = ((gridSize * (position[0u] - (*tint_module_vars.uniforms).bbMin[0u])) / cubeSize);
float gy = ((gridSize * (position[1u] - (*tint_module_vars.uniforms).bbMin[1u])) / cubeSize);
@@ -87,8 +86,7 @@
}
uint tint_mod_u32(uint lhs, uint rhs) {
- uint const v_1 = select(rhs, 1u, (rhs == 0u));
- return (lhs - ((lhs / v_1) * v_1));
+ return (lhs - ((lhs / select(rhs, 1u, (rhs == 0u))) * select(rhs, 1u, (rhs == 0u))));
}
uint tint_div_u32(uint lhs, uint rhs) {
diff --git a/test/tint/bug/tint/1118.wgsl.expected.glsl b/test/tint/bug/tint/1118.wgsl.expected.glsl
index 599df31..efa68ed 100644
--- a/test/tint/bug/tint/1118.wgsl.expected.glsl
+++ b/test/tint/bug/tint/1118.wgsl.expected.glsl
@@ -97,16 +97,15 @@
vec3 x_99 = emissiveColor;
vec3 x_103 = v_1.inner.vAmbientColor;
vec4 x_108 = baseColor;
- vec3 v_4 = clamp((((x_96 * x_97) + x_99) + x_103), vec3(0.0f), vec3(1.0f));
- finalDiffuse = (v_4 * vec3(x_108[0u], x_108[1u], x_108[2u]));
+ finalDiffuse = (clamp((((x_96 * x_97) + x_99) + x_103), vec3(0.0f), vec3(1.0f)) * vec3(x_108[0u], x_108[1u], x_108[2u]));
finalSpecular = vec3(0.0f);
vec3 x_113 = finalDiffuse;
vec3 x_114 = baseAmbientColor;
vec3 x_116 = finalSpecular;
vec4 x_118 = reflectionColor;
vec4 x_121 = refractionColor;
- vec3 v_5 = (((x_113 * x_114) + x_116) + vec3(x_118[0u], x_118[1u], x_118[2u]));
- vec3 x_123 = (v_5 + vec3(x_121[0u], x_121[1u], x_121[2u]));
+ vec3 v_4 = (((x_113 * x_114) + x_116) + vec3(x_118[0u], x_118[1u], x_118[2u]));
+ vec3 x_123 = (v_4 + vec3(x_121[0u], x_121[1u], x_121[2u]));
float x_124 = alpha;
color = vec4(x_123[0u], x_123[1u], x_123[2u], x_124);
vec4 x_129 = color;
@@ -123,11 +122,11 @@
fClipDistance3 = fClipDistance3_param;
fClipDistance4 = fClipDistance4_param;
main_1();
- main_out v_6 = main_out(glFragColor);
+ main_out v_5 = main_out(glFragColor);
if (!(continue_execution)) {
discard;
}
- return v_6;
+ return v_5;
}
void main() {
tint_symbol_loc0_Output = tint_symbol_inner(tint_symbol_loc2_Input, tint_symbol_loc3_Input).glFragColor_1;
diff --git a/test/tint/bug/tint/1118.wgsl.expected.ir.dxc.hlsl b/test/tint/bug/tint/1118.wgsl.expected.ir.dxc.hlsl
index f2148c0..a11bf46 100644
--- a/test/tint/bug/tint/1118.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/bug/tint/1118.wgsl.expected.ir.dxc.hlsl
@@ -80,16 +80,15 @@
float3 x_99 = emissiveColor;
float3 x_103 = asfloat(x_49[1u].xyz);
float4 x_108 = baseColor;
- float3 v_1 = clamp((((x_96 * x_97) + x_99) + x_103), (0.0f).xxx, (1.0f).xxx);
- finalDiffuse = (v_1 * float3(x_108.x, x_108.y, x_108.z));
+ finalDiffuse = (clamp((((x_96 * x_97) + x_99) + x_103), (0.0f).xxx, (1.0f).xxx) * float3(x_108.x, x_108.y, x_108.z));
finalSpecular = (0.0f).xxx;
float3 x_113 = finalDiffuse;
float3 x_114 = baseAmbientColor;
float3 x_116 = finalSpecular;
float4 x_118 = reflectionColor;
float4 x_121 = refractionColor;
- float3 v_2 = (((x_113 * x_114) + x_116) + float3(x_118.x, x_118.y, x_118.z));
- float3 x_123 = (v_2 + float3(x_121.x, x_121.y, x_121.z));
+ float3 v_1 = (((x_113 * x_114) + x_116) + float3(x_118.x, x_118.y, x_118.z));
+ float3 x_123 = (v_1 + float3(x_121.x, x_121.y, x_121.z));
float x_124 = alpha;
color = float4(x_123.x, x_123.y, x_123.z, x_124);
float4 x_129 = color;
@@ -107,16 +106,16 @@
fClipDistance3 = fClipDistance3_param;
fClipDistance4 = fClipDistance4_param;
main_1();
- main_out v_3 = {glFragColor};
- return v_3;
+ main_out v_2 = {glFragColor};
+ return v_2;
}
main_outputs main(main_inputs inputs) {
- main_out v_4 = main_inner(inputs.fClipDistance3_param, inputs.fClipDistance4_param);
- main_outputs v_5 = {v_4.glFragColor_1};
+ main_out v_3 = main_inner(inputs.fClipDistance3_param, inputs.fClipDistance4_param);
+ main_outputs v_4 = {v_3.glFragColor_1};
if (!(continue_execution)) {
discard;
}
- return v_5;
+ return v_4;
}
diff --git a/test/tint/bug/tint/1118.wgsl.expected.ir.fxc.hlsl b/test/tint/bug/tint/1118.wgsl.expected.ir.fxc.hlsl
index f2148c0..a11bf46 100644
--- a/test/tint/bug/tint/1118.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/bug/tint/1118.wgsl.expected.ir.fxc.hlsl
@@ -80,16 +80,15 @@
float3 x_99 = emissiveColor;
float3 x_103 = asfloat(x_49[1u].xyz);
float4 x_108 = baseColor;
- float3 v_1 = clamp((((x_96 * x_97) + x_99) + x_103), (0.0f).xxx, (1.0f).xxx);
- finalDiffuse = (v_1 * float3(x_108.x, x_108.y, x_108.z));
+ finalDiffuse = (clamp((((x_96 * x_97) + x_99) + x_103), (0.0f).xxx, (1.0f).xxx) * float3(x_108.x, x_108.y, x_108.z));
finalSpecular = (0.0f).xxx;
float3 x_113 = finalDiffuse;
float3 x_114 = baseAmbientColor;
float3 x_116 = finalSpecular;
float4 x_118 = reflectionColor;
float4 x_121 = refractionColor;
- float3 v_2 = (((x_113 * x_114) + x_116) + float3(x_118.x, x_118.y, x_118.z));
- float3 x_123 = (v_2 + float3(x_121.x, x_121.y, x_121.z));
+ float3 v_1 = (((x_113 * x_114) + x_116) + float3(x_118.x, x_118.y, x_118.z));
+ float3 x_123 = (v_1 + float3(x_121.x, x_121.y, x_121.z));
float x_124 = alpha;
color = float4(x_123.x, x_123.y, x_123.z, x_124);
float4 x_129 = color;
@@ -107,16 +106,16 @@
fClipDistance3 = fClipDistance3_param;
fClipDistance4 = fClipDistance4_param;
main_1();
- main_out v_3 = {glFragColor};
- return v_3;
+ main_out v_2 = {glFragColor};
+ return v_2;
}
main_outputs main(main_inputs inputs) {
- main_out v_4 = main_inner(inputs.fClipDistance3_param, inputs.fClipDistance4_param);
- main_outputs v_5 = {v_4.glFragColor_1};
+ main_out v_3 = main_inner(inputs.fClipDistance3_param, inputs.fClipDistance4_param);
+ main_outputs v_4 = {v_3.glFragColor_1};
if (!(continue_execution)) {
discard;
}
- return v_5;
+ return v_4;
}
diff --git a/test/tint/bug/tint/1118.wgsl.expected.ir.msl b/test/tint/bug/tint/1118.wgsl.expected.ir.msl
index e363ffd..53d4770 100644
--- a/test/tint/bug/tint/1118.wgsl.expected.ir.msl
+++ b/test/tint/bug/tint/1118.wgsl.expected.ir.msl
@@ -95,16 +95,15 @@
float3 const x_99 = emissiveColor;
float3 const x_103 = float3((*tint_module_vars.x_49).vAmbientColor);
float4 const x_108 = baseColor;
- float3 const v_1 = clamp((((x_96 * x_97) + x_99) + x_103), float3(0.0f), float3(1.0f));
- finalDiffuse = (v_1 * float3(x_108[0u], x_108[1u], x_108[2u]));
+ finalDiffuse = (clamp((((x_96 * x_97) + x_99) + x_103), float3(0.0f), float3(1.0f)) * float3(x_108[0u], x_108[1u], x_108[2u]));
finalSpecular = float3(0.0f);
float3 const x_113 = finalDiffuse;
float3 const x_114 = baseAmbientColor;
float3 const x_116 = finalSpecular;
float4 const x_118 = reflectionColor;
float4 const x_121 = refractionColor;
- float3 const v_2 = (((x_113 * x_114) + x_116) + float3(x_118[0u], x_118[1u], x_118[2u]));
- float3 const x_123 = (v_2 + float3(x_121[0u], x_121[1u], x_121[2u]));
+ float3 const v_1 = (((x_113 * x_114) + x_116) + float3(x_118[0u], x_118[1u], x_118[2u]));
+ float3 const x_123 = (v_1 + float3(x_121[0u], x_121[1u], x_121[2u]));
float const x_124 = alpha;
color = float4(x_123[0u], x_123[1u], x_123[2u], x_124);
float4 const x_129 = color;
@@ -122,11 +121,11 @@
(*tint_module_vars.fClipDistance3) = fClipDistance3_param;
(*tint_module_vars.fClipDistance4) = fClipDistance4_param;
main_1(tint_module_vars);
- main_out const v_3 = main_out{.glFragColor_1=(*tint_module_vars.glFragColor)};
+ main_out const v_2 = main_out{.glFragColor_1=(*tint_module_vars.glFragColor)};
if (!((*tint_module_vars.continue_execution))) {
discard_fragment();
}
- return v_3;
+ return v_2;
}
fragment tint_symbol_outputs tint_symbol(tint_symbol_inputs inputs [[stage_in]], const constant Scene* x_29 [[buffer(0)]], const constant Material_packed_vec3* x_49 [[buffer(1)]], const constant Mesh* x_137 [[buffer(2)]]) {
diff --git a/test/tint/bug/tint/1121.wgsl.expected.ir.dxc.hlsl b/test/tint/bug/tint/1121.wgsl.expected.ir.dxc.hlsl
index 50c0383..4c3ac9e 100644
--- a/test/tint/bug/tint/1121.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/bug/tint/1121.wgsl.expected.ir.dxc.hlsl
@@ -12,10 +12,7 @@
uint4 uniforms[11];
};
float4x4 v(uint start_byte_offset) {
- float4 v_1 = asfloat(uniforms[(start_byte_offset / 16u)]);
- float4 v_2 = asfloat(uniforms[((16u + start_byte_offset) / 16u)]);
- float4 v_3 = asfloat(uniforms[((32u + start_byte_offset) / 16u)]);
- return float4x4(v_1, v_2, v_3, asfloat(uniforms[((48u + start_byte_offset) / 16u)]));
+ return float4x4(asfloat(uniforms[(start_byte_offset / 16u)]), asfloat(uniforms[((16u + start_byte_offset) / 16u)]), asfloat(uniforms[((32u + start_byte_offset) / 16u)]), asfloat(uniforms[((48u + start_byte_offset) / 16u)]));
}
void main_inner(uint3 GlobalInvocationID) {
@@ -23,27 +20,27 @@
if ((index >= config[0u].x)) {
return;
}
- uint v_4 = (uint(index) * 32u);
- float v_5 = (asfloat(lightsBuffer.Load((4u + (uint(index) * 32u)))) - 0.10000000149011611938f);
- float v_6 = float(index);
- lightsBuffer.Store((4u + v_4), asuint((v_5 + (0.00100000004749745131f * (v_6 - (64.0f * floor((float(index) / 64.0f))))))));
- float v_7 = asfloat(lightsBuffer.Load((4u + (uint(index) * 32u))));
- if ((v_7 < asfloat(uniforms[0u].y))) {
- uint v_8 = (uint(index) * 32u);
- lightsBuffer.Store((4u + v_8), asuint(asfloat(uniforms[1u].y)));
+ uint v_1 = (uint(index) * 32u);
+ float v_2 = (asfloat(lightsBuffer.Load((4u + (uint(index) * 32u)))) - 0.10000000149011611938f);
+ float v_3 = float(index);
+ lightsBuffer.Store((4u + v_1), asuint((v_2 + (0.00100000004749745131f * (v_3 - (64.0f * floor((float(index) / 64.0f))))))));
+ float v_4 = asfloat(lightsBuffer.Load((4u + (uint(index) * 32u))));
+ if ((v_4 < asfloat(uniforms[0u].y))) {
+ uint v_5 = (uint(index) * 32u);
+ lightsBuffer.Store((4u + v_5), asuint(asfloat(uniforms[1u].y)));
}
float4x4 M = v(96u);
float viewNear = (-(M[int(3)].z) / (-1.0f + M[int(2)].z));
float viewFar = (-(M[int(3)].z) / (1.0f + M[int(2)].z));
float4 lightPos = asfloat(lightsBuffer.Load4((0u + (uint(index) * 32u))));
- float4x4 v_9 = v(32u);
- lightPos = mul(lightPos, v_9);
+ float4x4 v_6 = v(32u);
+ lightPos = mul(lightPos, v_6);
lightPos = (lightPos / lightPos.w);
float lightRadius = asfloat(lightsBuffer.Load((28u + (uint(index) * 32u))));
- float4 v_10 = lightPos;
- float4 boxMin = (v_10 - float4(float3((lightRadius).xxx), 0.0f));
- float4 v_11 = lightPos;
- float4 boxMax = (v_11 + float4(float3((lightRadius).xxx), 0.0f));
+ float4 v_7 = lightPos;
+ float4 boxMin = (v_7 - float4(float3((lightRadius).xxx), 0.0f));
+ float4 v_8 = lightPos;
+ float4 boxMax = (v_8 + float4(float3((lightRadius).xxx), 0.0f));
float4 frustumPlanes[6] = (float4[6])0;
frustumPlanes[int(4)] = float4(0.0f, 0.0f, -1.0f, viewNear);
frustumPlanes[int(5)] = float4(0.0f, 0.0f, 1.0f, -(viewFar));
@@ -65,11 +62,11 @@
break;
}
int2 tilePixel0Idx = int2((x * TILE_SIZE), (y * TILE_SIZE));
- float2 v_12 = (2.0f * float2(tilePixel0Idx));
- float2 floorCoord = ((v_12 / asfloat(uniforms[10u]).xy) - (1.0f).xx);
- int2 v_13 = tilePixel0Idx;
- float2 v_14 = (2.0f * float2((v_13 + int2((TILE_SIZE).xx))));
- float2 ceilCoord = ((v_14 / asfloat(uniforms[10u]).xy) - (1.0f).xx);
+ float2 v_9 = (2.0f * float2(tilePixel0Idx));
+ float2 floorCoord = ((v_9 / asfloat(uniforms[10u]).xy) - (1.0f).xx);
+ int2 v_10 = tilePixel0Idx;
+ float2 v_11 = (2.0f * float2((v_10 + int2((TILE_SIZE).xx))));
+ float2 ceilCoord = ((v_11 / asfloat(uniforms[10u]).xy) - (1.0f).xx);
float2 viewFloorCoord = float2((((-(viewNear) * floorCoord.x) - (M[int(2)].x * viewNear)) / M[int(0)].x), (((-(viewNear) * floorCoord.y) - (M[int(2)].y * viewNear)) / M[int(1)].y));
float2 viewCeilCoord = float2((((-(viewNear) * ceilCoord.x) - (M[int(2)].x * viewNear)) / M[int(0)].x), (((-(viewNear) * ceilCoord.y) - (M[int(2)].y * viewNear)) / M[int(1)].y));
frustumPlanes[int(0)] = float4(1.0f, 0.0f, (-(viewFloorCoord.x) / viewNear), 0.0f);
@@ -85,29 +82,29 @@
break;
}
float4 p = (0.0f).xxxx;
- uint v_15 = i;
- if ((frustumPlanes[v_15].x > 0.0f)) {
+ uint v_12 = i;
+ if ((frustumPlanes[v_12].x > 0.0f)) {
p.x = boxMax.x;
} else {
p.x = boxMin.x;
}
- uint v_16 = i;
- if ((frustumPlanes[v_16].y > 0.0f)) {
+ uint v_13 = i;
+ if ((frustumPlanes[v_13].y > 0.0f)) {
p.y = boxMax.y;
} else {
p.y = boxMin.y;
}
- uint v_17 = i;
- if ((frustumPlanes[v_17].z > 0.0f)) {
+ uint v_14 = i;
+ if ((frustumPlanes[v_14].z > 0.0f)) {
p.z = boxMax.z;
} else {
p.z = boxMin.z;
}
p.w = 1.0f;
- float v_18 = dp;
- float4 v_19 = p;
- uint v_20 = i;
- dp = (v_18 + min(0.0f, dot(v_19, frustumPlanes[v_20])));
+ float v_15 = dp;
+ float4 v_16 = p;
+ uint v_17 = i;
+ dp = (v_15 + min(0.0f, dot(v_16, frustumPlanes[v_17])));
{
i = (i + 1u);
}
@@ -116,30 +113,30 @@
}
if ((dp >= 0.0f)) {
uint tileId = uint((x + (y * TILE_COUNT_X)));
- bool v_21 = false;
+ bool v_18 = false;
if ((tileId < 0u)) {
- v_21 = true;
+ v_18 = true;
} else {
- v_21 = (tileId >= config[0u].y);
+ v_18 = (tileId >= config[0u].y);
}
- if (v_21) {
+ if (v_18) {
{
x = (x + int(1));
}
continue;
}
- uint v_22 = 0u;
- tileLightId.InterlockedAdd(uint((0u + (uint(tileId) * 260u))), 1u, v_22);
- uint offset = v_22;
+ uint v_19 = 0u;
+ tileLightId.InterlockedAdd(uint((0u + (uint(tileId) * 260u))), 1u, v_19);
+ uint offset = v_19;
if ((offset >= config[1u].x)) {
{
x = (x + int(1));
}
continue;
}
- uint v_23 = offset;
- uint v_24 = (uint(tileId) * 260u);
- tileLightId.Store(((4u + v_24) + (uint(v_23) * 4u)), GlobalInvocationID.x);
+ uint v_20 = offset;
+ uint v_21 = (uint(tileId) * 260u);
+ tileLightId.Store(((4u + v_21) + (uint(v_20) * 4u)), GlobalInvocationID.x);
}
{
x = (x + int(1));
diff --git a/test/tint/bug/tint/1121.wgsl.expected.ir.fxc.hlsl b/test/tint/bug/tint/1121.wgsl.expected.ir.fxc.hlsl
index 50c0383..4c3ac9e 100644
--- a/test/tint/bug/tint/1121.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/bug/tint/1121.wgsl.expected.ir.fxc.hlsl
@@ -12,10 +12,7 @@
uint4 uniforms[11];
};
float4x4 v(uint start_byte_offset) {
- float4 v_1 = asfloat(uniforms[(start_byte_offset / 16u)]);
- float4 v_2 = asfloat(uniforms[((16u + start_byte_offset) / 16u)]);
- float4 v_3 = asfloat(uniforms[((32u + start_byte_offset) / 16u)]);
- return float4x4(v_1, v_2, v_3, asfloat(uniforms[((48u + start_byte_offset) / 16u)]));
+ return float4x4(asfloat(uniforms[(start_byte_offset / 16u)]), asfloat(uniforms[((16u + start_byte_offset) / 16u)]), asfloat(uniforms[((32u + start_byte_offset) / 16u)]), asfloat(uniforms[((48u + start_byte_offset) / 16u)]));
}
void main_inner(uint3 GlobalInvocationID) {
@@ -23,27 +20,27 @@
if ((index >= config[0u].x)) {
return;
}
- uint v_4 = (uint(index) * 32u);
- float v_5 = (asfloat(lightsBuffer.Load((4u + (uint(index) * 32u)))) - 0.10000000149011611938f);
- float v_6 = float(index);
- lightsBuffer.Store((4u + v_4), asuint((v_5 + (0.00100000004749745131f * (v_6 - (64.0f * floor((float(index) / 64.0f))))))));
- float v_7 = asfloat(lightsBuffer.Load((4u + (uint(index) * 32u))));
- if ((v_7 < asfloat(uniforms[0u].y))) {
- uint v_8 = (uint(index) * 32u);
- lightsBuffer.Store((4u + v_8), asuint(asfloat(uniforms[1u].y)));
+ uint v_1 = (uint(index) * 32u);
+ float v_2 = (asfloat(lightsBuffer.Load((4u + (uint(index) * 32u)))) - 0.10000000149011611938f);
+ float v_3 = float(index);
+ lightsBuffer.Store((4u + v_1), asuint((v_2 + (0.00100000004749745131f * (v_3 - (64.0f * floor((float(index) / 64.0f))))))));
+ float v_4 = asfloat(lightsBuffer.Load((4u + (uint(index) * 32u))));
+ if ((v_4 < asfloat(uniforms[0u].y))) {
+ uint v_5 = (uint(index) * 32u);
+ lightsBuffer.Store((4u + v_5), asuint(asfloat(uniforms[1u].y)));
}
float4x4 M = v(96u);
float viewNear = (-(M[int(3)].z) / (-1.0f + M[int(2)].z));
float viewFar = (-(M[int(3)].z) / (1.0f + M[int(2)].z));
float4 lightPos = asfloat(lightsBuffer.Load4((0u + (uint(index) * 32u))));
- float4x4 v_9 = v(32u);
- lightPos = mul(lightPos, v_9);
+ float4x4 v_6 = v(32u);
+ lightPos = mul(lightPos, v_6);
lightPos = (lightPos / lightPos.w);
float lightRadius = asfloat(lightsBuffer.Load((28u + (uint(index) * 32u))));
- float4 v_10 = lightPos;
- float4 boxMin = (v_10 - float4(float3((lightRadius).xxx), 0.0f));
- float4 v_11 = lightPos;
- float4 boxMax = (v_11 + float4(float3((lightRadius).xxx), 0.0f));
+ float4 v_7 = lightPos;
+ float4 boxMin = (v_7 - float4(float3((lightRadius).xxx), 0.0f));
+ float4 v_8 = lightPos;
+ float4 boxMax = (v_8 + float4(float3((lightRadius).xxx), 0.0f));
float4 frustumPlanes[6] = (float4[6])0;
frustumPlanes[int(4)] = float4(0.0f, 0.0f, -1.0f, viewNear);
frustumPlanes[int(5)] = float4(0.0f, 0.0f, 1.0f, -(viewFar));
@@ -65,11 +62,11 @@
break;
}
int2 tilePixel0Idx = int2((x * TILE_SIZE), (y * TILE_SIZE));
- float2 v_12 = (2.0f * float2(tilePixel0Idx));
- float2 floorCoord = ((v_12 / asfloat(uniforms[10u]).xy) - (1.0f).xx);
- int2 v_13 = tilePixel0Idx;
- float2 v_14 = (2.0f * float2((v_13 + int2((TILE_SIZE).xx))));
- float2 ceilCoord = ((v_14 / asfloat(uniforms[10u]).xy) - (1.0f).xx);
+ float2 v_9 = (2.0f * float2(tilePixel0Idx));
+ float2 floorCoord = ((v_9 / asfloat(uniforms[10u]).xy) - (1.0f).xx);
+ int2 v_10 = tilePixel0Idx;
+ float2 v_11 = (2.0f * float2((v_10 + int2((TILE_SIZE).xx))));
+ float2 ceilCoord = ((v_11 / asfloat(uniforms[10u]).xy) - (1.0f).xx);
float2 viewFloorCoord = float2((((-(viewNear) * floorCoord.x) - (M[int(2)].x * viewNear)) / M[int(0)].x), (((-(viewNear) * floorCoord.y) - (M[int(2)].y * viewNear)) / M[int(1)].y));
float2 viewCeilCoord = float2((((-(viewNear) * ceilCoord.x) - (M[int(2)].x * viewNear)) / M[int(0)].x), (((-(viewNear) * ceilCoord.y) - (M[int(2)].y * viewNear)) / M[int(1)].y));
frustumPlanes[int(0)] = float4(1.0f, 0.0f, (-(viewFloorCoord.x) / viewNear), 0.0f);
@@ -85,29 +82,29 @@
break;
}
float4 p = (0.0f).xxxx;
- uint v_15 = i;
- if ((frustumPlanes[v_15].x > 0.0f)) {
+ uint v_12 = i;
+ if ((frustumPlanes[v_12].x > 0.0f)) {
p.x = boxMax.x;
} else {
p.x = boxMin.x;
}
- uint v_16 = i;
- if ((frustumPlanes[v_16].y > 0.0f)) {
+ uint v_13 = i;
+ if ((frustumPlanes[v_13].y > 0.0f)) {
p.y = boxMax.y;
} else {
p.y = boxMin.y;
}
- uint v_17 = i;
- if ((frustumPlanes[v_17].z > 0.0f)) {
+ uint v_14 = i;
+ if ((frustumPlanes[v_14].z > 0.0f)) {
p.z = boxMax.z;
} else {
p.z = boxMin.z;
}
p.w = 1.0f;
- float v_18 = dp;
- float4 v_19 = p;
- uint v_20 = i;
- dp = (v_18 + min(0.0f, dot(v_19, frustumPlanes[v_20])));
+ float v_15 = dp;
+ float4 v_16 = p;
+ uint v_17 = i;
+ dp = (v_15 + min(0.0f, dot(v_16, frustumPlanes[v_17])));
{
i = (i + 1u);
}
@@ -116,30 +113,30 @@
}
if ((dp >= 0.0f)) {
uint tileId = uint((x + (y * TILE_COUNT_X)));
- bool v_21 = false;
+ bool v_18 = false;
if ((tileId < 0u)) {
- v_21 = true;
+ v_18 = true;
} else {
- v_21 = (tileId >= config[0u].y);
+ v_18 = (tileId >= config[0u].y);
}
- if (v_21) {
+ if (v_18) {
{
x = (x + int(1));
}
continue;
}
- uint v_22 = 0u;
- tileLightId.InterlockedAdd(uint((0u + (uint(tileId) * 260u))), 1u, v_22);
- uint offset = v_22;
+ uint v_19 = 0u;
+ tileLightId.InterlockedAdd(uint((0u + (uint(tileId) * 260u))), 1u, v_19);
+ uint offset = v_19;
if ((offset >= config[1u].x)) {
{
x = (x + int(1));
}
continue;
}
- uint v_23 = offset;
- uint v_24 = (uint(tileId) * 260u);
- tileLightId.Store(((4u + v_24) + (uint(v_23) * 4u)), GlobalInvocationID.x);
+ uint v_20 = offset;
+ uint v_21 = (uint(tileId) * 260u);
+ tileLightId.Store(((4u + v_21) + (uint(v_20) * 4u)), GlobalInvocationID.x);
}
{
x = (x + int(1));
diff --git a/test/tint/bug/tint/1121.wgsl.expected.ir.msl b/test/tint/bug/tint/1121.wgsl.expected.ir.msl
index 9c99a38..d52571f 100644
--- a/test/tint/bug/tint/1121.wgsl.expected.ir.msl
+++ b/test/tint/bug/tint/1121.wgsl.expected.ir.msl
@@ -142,8 +142,7 @@
p[2u] = boxMin[2u];
}
p[3u] = 1.0f;
- float const v_8 = dp;
- dp = (v_8 + min(0.0f, dot(p, frustumPlanes[i])));
+ dp = (dp + min(0.0f, dot(p, frustumPlanes[i])));
{
i = (i + 1u);
}
@@ -152,13 +151,13 @@
}
if ((dp >= 0.0f)) {
uint tileId = uint(as_type<int>((as_type<uint>(x) + as_type<uint>(as_type<int>((as_type<uint>(y) * as_type<uint>(TILE_COUNT_X)))))));
- bool v_9 = false;
+ bool v_8 = false;
if ((tileId < 0u)) {
- v_9 = true;
+ v_8 = true;
} else {
- v_9 = (tileId >= (*tint_module_vars.config).numTiles);
+ v_8 = (tileId >= (*tint_module_vars.config).numTiles);
}
- if (v_9) {
+ if (v_8) {
{
x = as_type<int>((as_type<uint>(x) + as_type<uint>(1)));
}
diff --git a/test/tint/bug/tint/1520.spvasm.expected.glsl b/test/tint/bug/tint/1520.spvasm.expected.glsl
index 991e403..68db01e 100644
--- a/test/tint/bug/tint/1520.spvasm.expected.glsl
+++ b/test/tint/bug/tint/1520.spvasm.expected.glsl
@@ -36,13 +36,10 @@
layout(location = 0) in vec4 tint_symbol_loc0_Input;
layout(location = 0) out vec4 tint_symbol_loc0_Output;
ivec4 tint_div_v4i32(ivec4 lhs, ivec4 rhs) {
- bvec4 v_1 = equal(rhs, ivec4(0));
- bvec4 v_2 = equal(lhs, ivec4((-2147483647 - 1)));
- bvec4 v_3 = equal(rhs, ivec4(-1));
- uvec4 v_4 = uvec4(v_2);
- bvec4 v_5 = bvec4((v_4 & uvec4(v_3)));
- uvec4 v_6 = uvec4(v_1);
- return (lhs / mix(rhs, ivec4(1), bvec4((v_6 | uvec4(v_5)))));
+ uvec4 v_1 = uvec4(equal(lhs, ivec4((-2147483647 - 1))));
+ bvec4 v_2 = bvec4((v_1 & uvec4(equal(rhs, ivec4(-1)))));
+ uvec4 v_3 = uvec4(equal(rhs, ivec4(0)));
+ return (lhs / mix(rhs, ivec4(1), bvec4((v_3 | uvec4(v_2)))));
}
int tint_f32_to_i32(float value) {
return mix(2147483647, mix((-2147483647 - 1), int(value), (value >= -2147483648.0f)), (value <= 2147483520.0f));
diff --git a/test/tint/bug/tint/1605.wgsl.expected.ir.dxc.hlsl b/test/tint/bug/tint/1605.wgsl.expected.ir.dxc.hlsl
index bc6bb83..04cdf4e 100644
--- a/test/tint/bug/tint/1605.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/bug/tint/1605.wgsl.expected.ir.dxc.hlsl
@@ -6,8 +6,7 @@
{
int i = int(0);
while(true) {
- int v = i;
- if ((v < asint(b[0u].x))) {
+ if ((i < asint(b[0u].x))) {
} else {
break;
}
diff --git a/test/tint/bug/tint/1605.wgsl.expected.ir.fxc.hlsl b/test/tint/bug/tint/1605.wgsl.expected.ir.fxc.hlsl
index bc6bb83..04cdf4e 100644
--- a/test/tint/bug/tint/1605.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/bug/tint/1605.wgsl.expected.ir.fxc.hlsl
@@ -6,8 +6,7 @@
{
int i = int(0);
while(true) {
- int v = i;
- if ((v < asint(b[0u].x))) {
+ if ((i < asint(b[0u].x))) {
} else {
break;
}
diff --git a/test/tint/bug/tint/1739.wgsl.expected.glsl b/test/tint/bug/tint/1739.wgsl.expected.glsl
index 7f0cda8..90d8bc2 100644
--- a/test/tint/bug/tint/1739.wgsl.expected.glsl
+++ b/test/tint/bug/tint/1739.wgsl.expected.glsl
@@ -66,49 +66,45 @@
uniform highp sampler2D t_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(t_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(t_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(t_plane0, v_13, int(0u))[0u];
- ivec2 v_15 = ivec2(uvec2((v_7 * params.plane1CoordFactor)));
- v_9 = (vec4(v_14, texelFetch(t_plane1, v_15, int(0u)).xy, 1.0f) * params.yuvToRgbConversionMatrix);
- v_10 = 1.0f;
+ ivec2 v_9 = ivec2(v_4);
+ float v_10 = texelFetch(t_plane0, v_9, int(0u))[0u];
+ ivec2 v_11 = ivec2(uvec2((v_3 * params.plane1CoordFactor)));
+ v_5 = (vec4(v_10, texelFetch(t_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);
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_ExternalTextureParams v_20 = tint_convert_tint_ExternalTextureParams(v_1.inner);
- vec4 red = tint_TextureLoadExternal(v_20, min(uvec2(ivec2(10)), ((v_20.visibleSize + uvec2(1u)) - uvec2(1u))));
+ tint_ExternalTextureParams v_16 = tint_convert_tint_ExternalTextureParams(v_1.inner);
+ vec4 red = tint_TextureLoadExternal(v_16, min(uvec2(ivec2(10)), ((v_16.visibleSize + uvec2(1u)) - uvec2(1u))));
imageStore(outImage, ivec2(0), red);
- tint_ExternalTextureParams v_21 = tint_convert_tint_ExternalTextureParams(v_1.inner);
- vec4 green = tint_TextureLoadExternal(v_21, min(uvec2(ivec2(70, 118)), ((v_21.visibleSize + uvec2(1u)) - uvec2(1u))));
+ tint_ExternalTextureParams v_17 = tint_convert_tint_ExternalTextureParams(v_1.inner);
+ vec4 green = tint_TextureLoadExternal(v_17, min(uvec2(ivec2(70, 118)), ((v_17.visibleSize + uvec2(1u)) - uvec2(1u))));
imageStore(outImage, ivec2(1, 0), green);
}
diff --git a/test/tint/bug/tint/1739.wgsl.expected.ir.dxc.hlsl b/test/tint/bug/tint/1739.wgsl.expected.ir.dxc.hlsl
index a4693c7..52a840e 100644
--- a/test/tint/bug/tint/1739.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/bug/tint/1739.wgsl.expected.ir.dxc.hlsl
@@ -40,120 +40,105 @@
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)) {
+ uint3 v_8 = (0u).xxx;
+ plane_0.GetDimensions(0u, v_8.x, v_8.y, v_8.z);
uint3 v_9 = (0u).xxx;
- plane_0.GetDimensions(0u, v_9.x, v_9.y, v_9.z);
- uint v_10 = min(0u, (v_9.z - 1u));
- uint3 v_11 = (0u).xxx;
- plane_0.GetDimensions(uint(v_10), v_11.x, v_11.y, v_11.z);
- int2 v_12 = int2(min(v_6, (v_11.xy - (1u).xx)));
- float4 v_13 = float4(plane_0.Load(int3(v_12, int(v_10))));
- v_7 = v_13.xyz;
- v_8 = v_13.w;
+ plane_0.GetDimensions(uint(min(0u, (v_8.z - 1u))), v_9.x, v_9.y, v_9.z);
+ int2 v_10 = int2(min(v_5, (v_9.xy - (1u).xx)));
+ float4 v_11 = float4(plane_0.Load(int3(v_10, int(min(0u, (v_8.z - 1u))))));
+ v_6 = v_11.xyz;
+ v_7 = v_11.w;
} else {
- uint3 v_14 = (0u).xxx;
- plane_0.GetDimensions(0u, v_14.x, v_14.y, v_14.z);
- uint v_15 = min(0u, (v_14.z - 1u));
- uint3 v_16 = (0u).xxx;
- plane_0.GetDimensions(uint(v_15), v_16.x, v_16.y, v_16.z);
- int2 v_17 = int2(min(v_6, (v_16.xy - (1u).xx)));
- float v_18 = float4(plane_0.Load(int3(v_17, int(v_15)))).x;
- uint2 v_19 = tint_v2f32_to_v2u32((v_5 * params.plane1CoordFactor));
- uint3 v_20 = (0u).xxx;
- plane_1.GetDimensions(0u, v_20.x, v_20.y, v_20.z);
- uint v_21 = min(0u, (v_20.z - 1u));
- uint3 v_22 = (0u).xxx;
- plane_1.GetDimensions(uint(v_21), v_22.x, v_22.y, v_22.z);
- int2 v_23 = int2(min(v_19, (v_22.xy - (1u).xx)));
- v_7 = mul(params.yuvToRgbConversionMatrix, float4(v_18, float4(plane_1.Load(int3(v_23, int(v_21)))).xy, 1.0f));
- v_8 = 1.0f;
+ uint3 v_12 = (0u).xxx;
+ plane_0.GetDimensions(0u, v_12.x, v_12.y, v_12.z);
+ uint3 v_13 = (0u).xxx;
+ plane_0.GetDimensions(uint(min(0u, (v_12.z - 1u))), v_13.x, v_13.y, v_13.z);
+ int2 v_14 = int2(min(v_5, (v_13.xy - (1u).xx)));
+ float v_15 = float4(plane_0.Load(int3(v_14, int(min(0u, (v_12.z - 1u)))))).x;
+ uint2 v_16 = tint_v2f32_to_v2u32((v_4 * params.plane1CoordFactor));
+ uint3 v_17 = (0u).xxx;
+ plane_1.GetDimensions(0u, v_17.x, v_17.y, v_17.z);
+ uint3 v_18 = (0u).xxx;
+ plane_1.GetDimensions(uint(min(0u, (v_17.z - 1u))), v_18.x, v_18.y, v_18.z);
+ int2 v_19 = int2(min(v_16, (v_18.xy - (1u).xx)));
+ v_6 = mul(params.yuvToRgbConversionMatrix, float4(v_15, float4(plane_1.Load(int3(v_19, int(min(0u, (v_17.z - 1u)))))).xy, 1.0f));
+ v_7 = 1.0f;
}
- float3 v_24 = v_7;
- float3 v_25 = (0.0f).xxx;
+ float3 v_20 = v_6;
+ float3 v_21 = (0.0f).xxx;
if ((params.doYuvToRgbConversionOnly == 0u)) {
- tint_GammaTransferParams v_26 = params.gammaDecodeParams;
- tint_GammaTransferParams v_27 = params.gammaEncodeParams;
- v_25 = tint_GammaCorrection(mul(tint_GammaCorrection(v_24, v_26), params.gamutConversionMatrix), v_27);
+ tint_GammaTransferParams v_22 = params.gammaDecodeParams;
+ tint_GammaTransferParams v_23 = params.gammaEncodeParams;
+ v_21 = tint_GammaCorrection(mul(tint_GammaCorrection(v_20, v_22), params.gamutConversionMatrix), v_23);
} else {
- v_25 = v_24;
+ v_21 = v_20;
}
- return float4(v_25, v_8);
+ return float4(v_21, v_7);
}
-float3x2 v_28(uint start_byte_offset) {
- uint4 v_29 = t_params[(start_byte_offset / 16u)];
- float2 v_30 = asfloat((((((start_byte_offset % 16u) / 4u) == 2u)) ? (v_29.zw) : (v_29.xy)));
- uint4 v_31 = t_params[((8u + start_byte_offset) / 16u)];
- float2 v_32 = asfloat(((((((8u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_31.zw) : (v_31.xy)));
- uint4 v_33 = t_params[((16u + start_byte_offset) / 16u)];
- return float3x2(v_30, v_32, asfloat(((((((16u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_33.zw) : (v_33.xy))));
+float3x2 v_24(uint start_byte_offset) {
+ uint4 v_25 = t_params[(start_byte_offset / 16u)];
+ float2 v_26 = asfloat((((((start_byte_offset % 16u) / 4u) == 2u)) ? (v_25.zw) : (v_25.xy)));
+ uint4 v_27 = t_params[((8u + start_byte_offset) / 16u)];
+ float2 v_28 = asfloat(((((((8u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_27.zw) : (v_27.xy)));
+ uint4 v_29 = t_params[((16u + start_byte_offset) / 16u)];
+ return float3x2(v_26, v_28, asfloat(((((((16u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_29.zw) : (v_29.xy))));
}
-float3x3 v_34(uint start_byte_offset) {
- float3 v_35 = asfloat(t_params[(start_byte_offset / 16u)].xyz);
- float3 v_36 = asfloat(t_params[((16u + start_byte_offset) / 16u)].xyz);
- return float3x3(v_35, v_36, asfloat(t_params[((32u + start_byte_offset) / 16u)].xyz));
+float3x3 v_30(uint start_byte_offset) {
+ return float3x3(asfloat(t_params[(start_byte_offset / 16u)].xyz), asfloat(t_params[((16u + start_byte_offset) / 16u)].xyz), asfloat(t_params[((32u + start_byte_offset) / 16u)].xyz));
}
-tint_GammaTransferParams v_37(uint start_byte_offset) {
- float v_38 = asfloat(t_params[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]);
- float v_39 = asfloat(t_params[((4u + start_byte_offset) / 16u)][(((4u + start_byte_offset) % 16u) / 4u)]);
- float v_40 = asfloat(t_params[((8u + start_byte_offset) / 16u)][(((8u + start_byte_offset) % 16u) / 4u)]);
- float v_41 = asfloat(t_params[((12u + start_byte_offset) / 16u)][(((12u + start_byte_offset) % 16u) / 4u)]);
- float v_42 = asfloat(t_params[((16u + start_byte_offset) / 16u)][(((16u + start_byte_offset) % 16u) / 4u)]);
- float v_43 = asfloat(t_params[((20u + start_byte_offset) / 16u)][(((20u + start_byte_offset) % 16u) / 4u)]);
- float v_44 = asfloat(t_params[((24u + start_byte_offset) / 16u)][(((24u + start_byte_offset) % 16u) / 4u)]);
- tint_GammaTransferParams v_45 = {v_38, v_39, v_40, v_41, v_42, v_43, v_44, t_params[((28u + start_byte_offset) / 16u)][(((28u + start_byte_offset) % 16u) / 4u)]};
- return v_45;
+tint_GammaTransferParams v_31(uint start_byte_offset) {
+ tint_GammaTransferParams v_32 = {asfloat(t_params[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]), asfloat(t_params[((4u + start_byte_offset) / 16u)][(((4u + start_byte_offset) % 16u) / 4u)]), asfloat(t_params[((8u + start_byte_offset) / 16u)][(((8u + start_byte_offset) % 16u) / 4u)]), asfloat(t_params[((12u + start_byte_offset) / 16u)][(((12u + start_byte_offset) % 16u) / 4u)]), asfloat(t_params[((16u + start_byte_offset) / 16u)][(((16u + start_byte_offset) % 16u) / 4u)]), asfloat(t_params[((20u + start_byte_offset) / 16u)][(((20u + start_byte_offset) % 16u) / 4u)]), asfloat(t_params[((24u + start_byte_offset) / 16u)][(((24u + start_byte_offset) % 16u) / 4u)]), t_params[((28u + start_byte_offset) / 16u)][(((28u + start_byte_offset) % 16u) / 4u)]};
+ return v_32;
}
-float3x4 v_46(uint start_byte_offset) {
- float4 v_47 = asfloat(t_params[(start_byte_offset / 16u)]);
- float4 v_48 = asfloat(t_params[((16u + start_byte_offset) / 16u)]);
- return float3x4(v_47, v_48, asfloat(t_params[((32u + start_byte_offset) / 16u)]));
+float3x4 v_33(uint start_byte_offset) {
+ return float3x4(asfloat(t_params[(start_byte_offset / 16u)]), asfloat(t_params[((16u + start_byte_offset) / 16u)]), asfloat(t_params[((32u + start_byte_offset) / 16u)]));
}
-tint_ExternalTextureParams v_49(uint start_byte_offset) {
- uint v_50 = t_params[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)];
- uint v_51 = t_params[((4u + start_byte_offset) / 16u)][(((4u + start_byte_offset) % 16u) / 4u)];
- float3x4 v_52 = v_46((16u + start_byte_offset));
- tint_GammaTransferParams v_53 = v_37((64u + start_byte_offset));
- tint_GammaTransferParams v_54 = v_37((96u + start_byte_offset));
- float3x3 v_55 = v_34((128u + start_byte_offset));
- float3x2 v_56 = v_28((176u + start_byte_offset));
- float3x2 v_57 = v_28((200u + start_byte_offset));
- uint4 v_58 = t_params[((224u + start_byte_offset) / 16u)];
- float2 v_59 = asfloat(((((((224u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_58.zw) : (v_58.xy)));
- uint4 v_60 = t_params[((232u + start_byte_offset) / 16u)];
- float2 v_61 = asfloat(((((((232u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_60.zw) : (v_60.xy)));
- uint4 v_62 = t_params[((240u + start_byte_offset) / 16u)];
- float2 v_63 = asfloat(((((((240u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_62.zw) : (v_62.xy)));
- uint4 v_64 = t_params[((248u + start_byte_offset) / 16u)];
- float2 v_65 = asfloat(((((((248u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_64.zw) : (v_64.xy)));
- uint4 v_66 = t_params[((256u + start_byte_offset) / 16u)];
- uint2 v_67 = ((((((256u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_66.zw) : (v_66.xy));
- uint4 v_68 = t_params[((264u + start_byte_offset) / 16u)];
- tint_ExternalTextureParams v_69 = {v_50, v_51, v_52, v_53, v_54, v_55, v_56, v_57, v_59, v_61, v_63, v_65, v_67, asfloat(((((((264u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_68.zw) : (v_68.xy)))};
- return v_69;
+tint_ExternalTextureParams v_34(uint start_byte_offset) {
+ uint v_35 = t_params[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)];
+ uint v_36 = t_params[((4u + start_byte_offset) / 16u)][(((4u + start_byte_offset) % 16u) / 4u)];
+ float3x4 v_37 = v_33((16u + start_byte_offset));
+ tint_GammaTransferParams v_38 = v_31((64u + start_byte_offset));
+ tint_GammaTransferParams v_39 = v_31((96u + start_byte_offset));
+ float3x3 v_40 = v_30((128u + start_byte_offset));
+ float3x2 v_41 = v_24((176u + start_byte_offset));
+ float3x2 v_42 = v_24((200u + start_byte_offset));
+ uint4 v_43 = t_params[((224u + start_byte_offset) / 16u)];
+ float2 v_44 = asfloat(((((((224u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_43.zw) : (v_43.xy)));
+ uint4 v_45 = t_params[((232u + start_byte_offset) / 16u)];
+ float2 v_46 = asfloat(((((((232u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_45.zw) : (v_45.xy)));
+ uint4 v_47 = t_params[((240u + start_byte_offset) / 16u)];
+ float2 v_48 = asfloat(((((((240u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_47.zw) : (v_47.xy)));
+ uint4 v_49 = t_params[((248u + start_byte_offset) / 16u)];
+ float2 v_50 = asfloat(((((((248u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_49.zw) : (v_49.xy)));
+ uint4 v_51 = t_params[((256u + start_byte_offset) / 16u)];
+ uint2 v_52 = ((((((256u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_51.zw) : (v_51.xy));
+ uint4 v_53 = t_params[((264u + start_byte_offset) / 16u)];
+ tint_ExternalTextureParams v_54 = {v_35, v_36, v_37, v_38, v_39, v_40, v_41, v_42, v_44, v_46, v_48, v_50, v_52, asfloat(((((((264u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_53.zw) : (v_53.xy)))};
+ return v_54;
}
[numthreads(1, 1, 1)]
void main() {
- tint_ExternalTextureParams v_70 = v_49(0u);
- float4 red = tint_TextureLoadExternal(t_plane0, t_plane1, v_70, uint2((int(10)).xx));
+ tint_ExternalTextureParams v_55 = v_34(0u);
+ float4 red = tint_TextureLoadExternal(t_plane0, t_plane1, v_55, uint2((int(10)).xx));
outImage[(int(0)).xx] = red;
- tint_ExternalTextureParams v_71 = v_49(0u);
- float4 green = tint_TextureLoadExternal(t_plane0, t_plane1, v_71, uint2(int2(int(70), int(118))));
+ tint_ExternalTextureParams v_56 = v_34(0u);
+ float4 green = tint_TextureLoadExternal(t_plane0, t_plane1, v_56, uint2(int2(int(70), int(118))));
outImage[int2(int(1), int(0))] = green;
}
diff --git a/test/tint/bug/tint/1739.wgsl.expected.ir.fxc.hlsl b/test/tint/bug/tint/1739.wgsl.expected.ir.fxc.hlsl
index a4693c7..52a840e 100644
--- a/test/tint/bug/tint/1739.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/bug/tint/1739.wgsl.expected.ir.fxc.hlsl
@@ -40,120 +40,105 @@
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)) {
+ uint3 v_8 = (0u).xxx;
+ plane_0.GetDimensions(0u, v_8.x, v_8.y, v_8.z);
uint3 v_9 = (0u).xxx;
- plane_0.GetDimensions(0u, v_9.x, v_9.y, v_9.z);
- uint v_10 = min(0u, (v_9.z - 1u));
- uint3 v_11 = (0u).xxx;
- plane_0.GetDimensions(uint(v_10), v_11.x, v_11.y, v_11.z);
- int2 v_12 = int2(min(v_6, (v_11.xy - (1u).xx)));
- float4 v_13 = float4(plane_0.Load(int3(v_12, int(v_10))));
- v_7 = v_13.xyz;
- v_8 = v_13.w;
+ plane_0.GetDimensions(uint(min(0u, (v_8.z - 1u))), v_9.x, v_9.y, v_9.z);
+ int2 v_10 = int2(min(v_5, (v_9.xy - (1u).xx)));
+ float4 v_11 = float4(plane_0.Load(int3(v_10, int(min(0u, (v_8.z - 1u))))));
+ v_6 = v_11.xyz;
+ v_7 = v_11.w;
} else {
- uint3 v_14 = (0u).xxx;
- plane_0.GetDimensions(0u, v_14.x, v_14.y, v_14.z);
- uint v_15 = min(0u, (v_14.z - 1u));
- uint3 v_16 = (0u).xxx;
- plane_0.GetDimensions(uint(v_15), v_16.x, v_16.y, v_16.z);
- int2 v_17 = int2(min(v_6, (v_16.xy - (1u).xx)));
- float v_18 = float4(plane_0.Load(int3(v_17, int(v_15)))).x;
- uint2 v_19 = tint_v2f32_to_v2u32((v_5 * params.plane1CoordFactor));
- uint3 v_20 = (0u).xxx;
- plane_1.GetDimensions(0u, v_20.x, v_20.y, v_20.z);
- uint v_21 = min(0u, (v_20.z - 1u));
- uint3 v_22 = (0u).xxx;
- plane_1.GetDimensions(uint(v_21), v_22.x, v_22.y, v_22.z);
- int2 v_23 = int2(min(v_19, (v_22.xy - (1u).xx)));
- v_7 = mul(params.yuvToRgbConversionMatrix, float4(v_18, float4(plane_1.Load(int3(v_23, int(v_21)))).xy, 1.0f));
- v_8 = 1.0f;
+ uint3 v_12 = (0u).xxx;
+ plane_0.GetDimensions(0u, v_12.x, v_12.y, v_12.z);
+ uint3 v_13 = (0u).xxx;
+ plane_0.GetDimensions(uint(min(0u, (v_12.z - 1u))), v_13.x, v_13.y, v_13.z);
+ int2 v_14 = int2(min(v_5, (v_13.xy - (1u).xx)));
+ float v_15 = float4(plane_0.Load(int3(v_14, int(min(0u, (v_12.z - 1u)))))).x;
+ uint2 v_16 = tint_v2f32_to_v2u32((v_4 * params.plane1CoordFactor));
+ uint3 v_17 = (0u).xxx;
+ plane_1.GetDimensions(0u, v_17.x, v_17.y, v_17.z);
+ uint3 v_18 = (0u).xxx;
+ plane_1.GetDimensions(uint(min(0u, (v_17.z - 1u))), v_18.x, v_18.y, v_18.z);
+ int2 v_19 = int2(min(v_16, (v_18.xy - (1u).xx)));
+ v_6 = mul(params.yuvToRgbConversionMatrix, float4(v_15, float4(plane_1.Load(int3(v_19, int(min(0u, (v_17.z - 1u)))))).xy, 1.0f));
+ v_7 = 1.0f;
}
- float3 v_24 = v_7;
- float3 v_25 = (0.0f).xxx;
+ float3 v_20 = v_6;
+ float3 v_21 = (0.0f).xxx;
if ((params.doYuvToRgbConversionOnly == 0u)) {
- tint_GammaTransferParams v_26 = params.gammaDecodeParams;
- tint_GammaTransferParams v_27 = params.gammaEncodeParams;
- v_25 = tint_GammaCorrection(mul(tint_GammaCorrection(v_24, v_26), params.gamutConversionMatrix), v_27);
+ tint_GammaTransferParams v_22 = params.gammaDecodeParams;
+ tint_GammaTransferParams v_23 = params.gammaEncodeParams;
+ v_21 = tint_GammaCorrection(mul(tint_GammaCorrection(v_20, v_22), params.gamutConversionMatrix), v_23);
} else {
- v_25 = v_24;
+ v_21 = v_20;
}
- return float4(v_25, v_8);
+ return float4(v_21, v_7);
}
-float3x2 v_28(uint start_byte_offset) {
- uint4 v_29 = t_params[(start_byte_offset / 16u)];
- float2 v_30 = asfloat((((((start_byte_offset % 16u) / 4u) == 2u)) ? (v_29.zw) : (v_29.xy)));
- uint4 v_31 = t_params[((8u + start_byte_offset) / 16u)];
- float2 v_32 = asfloat(((((((8u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_31.zw) : (v_31.xy)));
- uint4 v_33 = t_params[((16u + start_byte_offset) / 16u)];
- return float3x2(v_30, v_32, asfloat(((((((16u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_33.zw) : (v_33.xy))));
+float3x2 v_24(uint start_byte_offset) {
+ uint4 v_25 = t_params[(start_byte_offset / 16u)];
+ float2 v_26 = asfloat((((((start_byte_offset % 16u) / 4u) == 2u)) ? (v_25.zw) : (v_25.xy)));
+ uint4 v_27 = t_params[((8u + start_byte_offset) / 16u)];
+ float2 v_28 = asfloat(((((((8u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_27.zw) : (v_27.xy)));
+ uint4 v_29 = t_params[((16u + start_byte_offset) / 16u)];
+ return float3x2(v_26, v_28, asfloat(((((((16u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_29.zw) : (v_29.xy))));
}
-float3x3 v_34(uint start_byte_offset) {
- float3 v_35 = asfloat(t_params[(start_byte_offset / 16u)].xyz);
- float3 v_36 = asfloat(t_params[((16u + start_byte_offset) / 16u)].xyz);
- return float3x3(v_35, v_36, asfloat(t_params[((32u + start_byte_offset) / 16u)].xyz));
+float3x3 v_30(uint start_byte_offset) {
+ return float3x3(asfloat(t_params[(start_byte_offset / 16u)].xyz), asfloat(t_params[((16u + start_byte_offset) / 16u)].xyz), asfloat(t_params[((32u + start_byte_offset) / 16u)].xyz));
}
-tint_GammaTransferParams v_37(uint start_byte_offset) {
- float v_38 = asfloat(t_params[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]);
- float v_39 = asfloat(t_params[((4u + start_byte_offset) / 16u)][(((4u + start_byte_offset) % 16u) / 4u)]);
- float v_40 = asfloat(t_params[((8u + start_byte_offset) / 16u)][(((8u + start_byte_offset) % 16u) / 4u)]);
- float v_41 = asfloat(t_params[((12u + start_byte_offset) / 16u)][(((12u + start_byte_offset) % 16u) / 4u)]);
- float v_42 = asfloat(t_params[((16u + start_byte_offset) / 16u)][(((16u + start_byte_offset) % 16u) / 4u)]);
- float v_43 = asfloat(t_params[((20u + start_byte_offset) / 16u)][(((20u + start_byte_offset) % 16u) / 4u)]);
- float v_44 = asfloat(t_params[((24u + start_byte_offset) / 16u)][(((24u + start_byte_offset) % 16u) / 4u)]);
- tint_GammaTransferParams v_45 = {v_38, v_39, v_40, v_41, v_42, v_43, v_44, t_params[((28u + start_byte_offset) / 16u)][(((28u + start_byte_offset) % 16u) / 4u)]};
- return v_45;
+tint_GammaTransferParams v_31(uint start_byte_offset) {
+ tint_GammaTransferParams v_32 = {asfloat(t_params[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]), asfloat(t_params[((4u + start_byte_offset) / 16u)][(((4u + start_byte_offset) % 16u) / 4u)]), asfloat(t_params[((8u + start_byte_offset) / 16u)][(((8u + start_byte_offset) % 16u) / 4u)]), asfloat(t_params[((12u + start_byte_offset) / 16u)][(((12u + start_byte_offset) % 16u) / 4u)]), asfloat(t_params[((16u + start_byte_offset) / 16u)][(((16u + start_byte_offset) % 16u) / 4u)]), asfloat(t_params[((20u + start_byte_offset) / 16u)][(((20u + start_byte_offset) % 16u) / 4u)]), asfloat(t_params[((24u + start_byte_offset) / 16u)][(((24u + start_byte_offset) % 16u) / 4u)]), t_params[((28u + start_byte_offset) / 16u)][(((28u + start_byte_offset) % 16u) / 4u)]};
+ return v_32;
}
-float3x4 v_46(uint start_byte_offset) {
- float4 v_47 = asfloat(t_params[(start_byte_offset / 16u)]);
- float4 v_48 = asfloat(t_params[((16u + start_byte_offset) / 16u)]);
- return float3x4(v_47, v_48, asfloat(t_params[((32u + start_byte_offset) / 16u)]));
+float3x4 v_33(uint start_byte_offset) {
+ return float3x4(asfloat(t_params[(start_byte_offset / 16u)]), asfloat(t_params[((16u + start_byte_offset) / 16u)]), asfloat(t_params[((32u + start_byte_offset) / 16u)]));
}
-tint_ExternalTextureParams v_49(uint start_byte_offset) {
- uint v_50 = t_params[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)];
- uint v_51 = t_params[((4u + start_byte_offset) / 16u)][(((4u + start_byte_offset) % 16u) / 4u)];
- float3x4 v_52 = v_46((16u + start_byte_offset));
- tint_GammaTransferParams v_53 = v_37((64u + start_byte_offset));
- tint_GammaTransferParams v_54 = v_37((96u + start_byte_offset));
- float3x3 v_55 = v_34((128u + start_byte_offset));
- float3x2 v_56 = v_28((176u + start_byte_offset));
- float3x2 v_57 = v_28((200u + start_byte_offset));
- uint4 v_58 = t_params[((224u + start_byte_offset) / 16u)];
- float2 v_59 = asfloat(((((((224u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_58.zw) : (v_58.xy)));
- uint4 v_60 = t_params[((232u + start_byte_offset) / 16u)];
- float2 v_61 = asfloat(((((((232u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_60.zw) : (v_60.xy)));
- uint4 v_62 = t_params[((240u + start_byte_offset) / 16u)];
- float2 v_63 = asfloat(((((((240u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_62.zw) : (v_62.xy)));
- uint4 v_64 = t_params[((248u + start_byte_offset) / 16u)];
- float2 v_65 = asfloat(((((((248u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_64.zw) : (v_64.xy)));
- uint4 v_66 = t_params[((256u + start_byte_offset) / 16u)];
- uint2 v_67 = ((((((256u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_66.zw) : (v_66.xy));
- uint4 v_68 = t_params[((264u + start_byte_offset) / 16u)];
- tint_ExternalTextureParams v_69 = {v_50, v_51, v_52, v_53, v_54, v_55, v_56, v_57, v_59, v_61, v_63, v_65, v_67, asfloat(((((((264u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_68.zw) : (v_68.xy)))};
- return v_69;
+tint_ExternalTextureParams v_34(uint start_byte_offset) {
+ uint v_35 = t_params[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)];
+ uint v_36 = t_params[((4u + start_byte_offset) / 16u)][(((4u + start_byte_offset) % 16u) / 4u)];
+ float3x4 v_37 = v_33((16u + start_byte_offset));
+ tint_GammaTransferParams v_38 = v_31((64u + start_byte_offset));
+ tint_GammaTransferParams v_39 = v_31((96u + start_byte_offset));
+ float3x3 v_40 = v_30((128u + start_byte_offset));
+ float3x2 v_41 = v_24((176u + start_byte_offset));
+ float3x2 v_42 = v_24((200u + start_byte_offset));
+ uint4 v_43 = t_params[((224u + start_byte_offset) / 16u)];
+ float2 v_44 = asfloat(((((((224u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_43.zw) : (v_43.xy)));
+ uint4 v_45 = t_params[((232u + start_byte_offset) / 16u)];
+ float2 v_46 = asfloat(((((((232u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_45.zw) : (v_45.xy)));
+ uint4 v_47 = t_params[((240u + start_byte_offset) / 16u)];
+ float2 v_48 = asfloat(((((((240u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_47.zw) : (v_47.xy)));
+ uint4 v_49 = t_params[((248u + start_byte_offset) / 16u)];
+ float2 v_50 = asfloat(((((((248u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_49.zw) : (v_49.xy)));
+ uint4 v_51 = t_params[((256u + start_byte_offset) / 16u)];
+ uint2 v_52 = ((((((256u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_51.zw) : (v_51.xy));
+ uint4 v_53 = t_params[((264u + start_byte_offset) / 16u)];
+ tint_ExternalTextureParams v_54 = {v_35, v_36, v_37, v_38, v_39, v_40, v_41, v_42, v_44, v_46, v_48, v_50, v_52, asfloat(((((((264u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_53.zw) : (v_53.xy)))};
+ return v_54;
}
[numthreads(1, 1, 1)]
void main() {
- tint_ExternalTextureParams v_70 = v_49(0u);
- float4 red = tint_TextureLoadExternal(t_plane0, t_plane1, v_70, uint2((int(10)).xx));
+ tint_ExternalTextureParams v_55 = v_34(0u);
+ float4 red = tint_TextureLoadExternal(t_plane0, t_plane1, v_55, uint2((int(10)).xx));
outImage[(int(0)).xx] = red;
- tint_ExternalTextureParams v_71 = v_49(0u);
- float4 green = tint_TextureLoadExternal(t_plane0, t_plane1, v_71, uint2(int2(int(70), int(118))));
+ tint_ExternalTextureParams v_56 = v_34(0u);
+ float4 green = tint_TextureLoadExternal(t_plane0, t_plane1, v_56, uint2(int2(int(70), int(118))));
outImage[int2(int(1), int(0))] = green;
}
diff --git a/test/tint/bug/tint/1739.wgsl.expected.ir.msl b/test/tint/bug/tint/1739.wgsl.expected.ir.msl
index 816b2a4..632afd9 100644
--- a/test/tint/bug/tint/1739.wgsl.expected.ir.msl
+++ b/test/tint/bug/tint/1739.wgsl.expected.ir.msl
@@ -73,57 +73,54 @@
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};
}
kernel void tint_symbol(texture2d<float, access::sample> t_plane0 [[texture(1)]], texture2d<float, access::sample> t_plane1 [[texture(2)]], const constant tint_ExternalTextureParams_packed_vec3* t_params [[buffer(3)]], texture2d<float, access::write> outImage [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.t_plane0=t_plane0, .t_plane1=t_plane1, .t_params=t_params, .outImage=outImage};
- tint_ExternalTextureParams const v_22 = tint_load_struct_packed_vec3(tint_module_vars.t_params);
- float4 red = tint_TextureLoadExternal(tint_module_vars.t_plane0, tint_module_vars.t_plane1, v_22, min(uint2(int2(10)), ((v_22.visibleSize + uint2(1u)) - uint2(1u))));
- float4 const v_23 = red;
- tint_module_vars.outImage.write(v_23, uint2(int2(0)));
- tint_ExternalTextureParams const v_24 = tint_load_struct_packed_vec3(tint_module_vars.t_params);
- float4 green = tint_TextureLoadExternal(tint_module_vars.t_plane0, tint_module_vars.t_plane1, v_24, min(uint2(int2(70, 118)), ((v_24.visibleSize + uint2(1u)) - uint2(1u))));
- float4 const v_25 = green;
- tint_module_vars.outImage.write(v_25, uint2(int2(1, 0)));
+ tint_ExternalTextureParams const v_19 = tint_load_struct_packed_vec3(tint_module_vars.t_params);
+ float4 red = tint_TextureLoadExternal(tint_module_vars.t_plane0, tint_module_vars.t_plane1, v_19, min(uint2(int2(10)), ((v_19.visibleSize + uint2(1u)) - uint2(1u))));
+ float4 const v_20 = red;
+ tint_module_vars.outImage.write(v_20, uint2(int2(0)));
+ tint_ExternalTextureParams const v_21 = tint_load_struct_packed_vec3(tint_module_vars.t_params);
+ float4 green = tint_TextureLoadExternal(tint_module_vars.t_plane0, tint_module_vars.t_plane1, v_21, min(uint2(int2(70, 118)), ((v_21.visibleSize + uint2(1u)) - uint2(1u))));
+ float4 const v_22 = green;
+ tint_module_vars.outImage.write(v_22, uint2(int2(1, 0)));
}
diff --git a/test/tint/bug/tint/1776.spvasm.expected.ir.dxc.hlsl b/test/tint/bug/tint/1776.spvasm.expected.ir.dxc.hlsl
index 9f5363e..57e36ca 100644
--- a/test/tint/bug/tint/1776.spvasm.expected.ir.dxc.hlsl
+++ b/test/tint/bug/tint/1776.spvasm.expected.ir.dxc.hlsl
@@ -6,9 +6,8 @@
ByteAddressBuffer sb : register(t0);
S v(uint offset) {
- float4 v_1 = asfloat(sb.Load4((offset + 0u)));
- S v_2 = {v_1, asint(sb.Load((offset + 16u)))};
- return v_2;
+ S v_1 = {asfloat(sb.Load4((offset + 0u))), asint(sb.Load((offset + 16u)))};
+ return v_1;
}
void main_1() {
diff --git a/test/tint/bug/tint/1776.spvasm.expected.ir.fxc.hlsl b/test/tint/bug/tint/1776.spvasm.expected.ir.fxc.hlsl
index 9f5363e..57e36ca 100644
--- a/test/tint/bug/tint/1776.spvasm.expected.ir.fxc.hlsl
+++ b/test/tint/bug/tint/1776.spvasm.expected.ir.fxc.hlsl
@@ -6,9 +6,8 @@
ByteAddressBuffer sb : register(t0);
S v(uint offset) {
- float4 v_1 = asfloat(sb.Load4((offset + 0u)));
- S v_2 = {v_1, asint(sb.Load((offset + 16u)))};
- return v_2;
+ S v_1 = {asfloat(sb.Load4((offset + 0u))), asint(sb.Load((offset + 16u)))};
+ return v_1;
}
void main_1() {
diff --git a/test/tint/bug/tint/1776.wgsl.expected.ir.dxc.hlsl b/test/tint/bug/tint/1776.wgsl.expected.ir.dxc.hlsl
index 15d2fb9..4cbf0db 100644
--- a/test/tint/bug/tint/1776.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/bug/tint/1776.wgsl.expected.ir.dxc.hlsl
@@ -6,9 +6,8 @@
ByteAddressBuffer sb : register(t0);
S v(uint offset) {
- float4 v_1 = asfloat(sb.Load4((offset + 0u)));
- S v_2 = {v_1, asint(sb.Load((offset + 16u)))};
- return v_2;
+ S v_1 = {asfloat(sb.Load4((offset + 0u))), asint(sb.Load((offset + 16u)))};
+ return v_1;
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/bug/tint/1776.wgsl.expected.ir.fxc.hlsl b/test/tint/bug/tint/1776.wgsl.expected.ir.fxc.hlsl
index 15d2fb9..4cbf0db 100644
--- a/test/tint/bug/tint/1776.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/bug/tint/1776.wgsl.expected.ir.fxc.hlsl
@@ -6,9 +6,8 @@
ByteAddressBuffer sb : register(t0);
S v(uint offset) {
- float4 v_1 = asfloat(sb.Load4((offset + 0u)));
- S v_2 = {v_1, asint(sb.Load((offset + 16u)))};
- return v_2;
+ S v_1 = {asfloat(sb.Load4((offset + 0u))), asint(sb.Load((offset + 16u)))};
+ return v_1;
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/bug/tint/2010.spvasm.expected.ir.msl b/test/tint/bug/tint/2010.spvasm.expected.ir.msl
index 51fd847..9fabccb 100644
--- a/test/tint/bug/tint/2010.spvasm.expected.ir.msl
+++ b/test/tint/bug/tint/2010.spvasm.expected.ir.msl
@@ -142,10 +142,7 @@
uint const x_120 = atomic_fetch_max_explicit(tint_module_vars.x_36, as_type<uint>(x_85[2u]), memory_order_relaxed);
uint const x_123 = atomic_fetch_max_explicit(tint_module_vars.x_37, as_type<uint>(x_85[3u]), memory_order_relaxed);
threadgroup_barrier(mem_flags::mem_threadgroup);
- float const v = as_type<float>(atomic_load_explicit(tint_module_vars.x_34, memory_order_relaxed));
- float const v_1 = as_type<float>(atomic_load_explicit(tint_module_vars.x_35, memory_order_relaxed));
- float const v_2 = as_type<float>(atomic_load_explicit(tint_module_vars.x_36, memory_order_relaxed));
- (*tint_module_vars.x_12).field0[0] = float4(v, v_1, v_2, as_type<float>(atomic_load_explicit(tint_module_vars.x_37, memory_order_relaxed)));
+ (*tint_module_vars.x_12).field0[0] = float4(as_type<float>(atomic_load_explicit(tint_module_vars.x_34, memory_order_relaxed)), as_type<float>(atomic_load_explicit(tint_module_vars.x_35, memory_order_relaxed)), as_type<float>(atomic_load_explicit(tint_module_vars.x_36, memory_order_relaxed)), as_type<float>(atomic_load_explicit(tint_module_vars.x_37, memory_order_relaxed)));
}
void tint_symbol_inner(uint3 x_3_param, uint tint_local_index, tint_module_vars_struct tint_module_vars) {
@@ -156,17 +153,17 @@
atomic_store_explicit(tint_module_vars.x_37, 0u, memory_order_relaxed);
}
{
- uint v_3 = 0u;
- v_3 = tint_local_index;
+ uint v = 0u;
+ v = tint_local_index;
while(true) {
TINT_ISOLATE_UB(tint_volatile_false_2)
- uint const v_4 = v_3;
- if ((v_4 >= 4096u)) {
+ uint const v_1 = v;
+ if ((v_1 >= 4096u)) {
break;
}
- (*tint_module_vars.x_28)[v_4] = S{};
+ (*tint_module_vars.x_28)[v_1] = S{};
{
- v_3 = (v_4 + 32u);
+ v = (v_1 + 32u);
}
continue;
}
@@ -176,8 +173,8 @@
main_1(tint_module_vars);
}
-kernel void tint_symbol(uint3 x_3_param [[thread_position_in_threadgroup]], uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_6* v_5 [[threadgroup(0)]], const constant S_2* x_6 [[buffer(0)]], const device S_3* x_9 [[buffer(2)]], device S_4* x_12 [[buffer(1)]]) {
+kernel void tint_symbol(uint3 x_3_param [[thread_position_in_threadgroup]], uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_6* v_2 [[threadgroup(0)]], const constant S_2* x_6 [[buffer(0)]], const device S_3* x_9 [[buffer(2)]], device S_4* x_12 [[buffer(1)]]) {
thread uint3 x_3 = 0u;
- tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.x_28=(&(*v_5).tint_symbol_1), .x_34=(&(*v_5).tint_symbol_2), .x_35=(&(*v_5).tint_symbol_3), .x_36=(&(*v_5).tint_symbol_4), .x_37=(&(*v_5).tint_symbol_5), .x_3=(&x_3), .x_6=x_6, .x_9=x_9, .x_12=x_12};
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.x_28=(&(*v_2).tint_symbol_1), .x_34=(&(*v_2).tint_symbol_2), .x_35=(&(*v_2).tint_symbol_3), .x_36=(&(*v_2).tint_symbol_4), .x_37=(&(*v_2).tint_symbol_5), .x_3=(&x_3), .x_6=x_6, .x_9=x_9, .x_12=x_12};
tint_symbol_inner(x_3_param, tint_local_index, tint_module_vars);
}
diff --git a/test/tint/bug/tint/221.wgsl.expected.glsl b/test/tint/bug/tint/221.wgsl.expected.glsl
index 9ad023b..c8a8fc2 100644
--- a/test/tint/bug/tint/221.wgsl.expected.glsl
+++ b/test/tint/bug/tint/221.wgsl.expected.glsl
@@ -11,8 +11,7 @@
Buf inner;
} v;
uint tint_mod_u32(uint lhs, uint rhs) {
- uint v_1 = mix(rhs, 1u, (rhs == 0u));
- return (lhs - ((lhs / v_1) * v_1));
+ return (lhs - ((lhs / mix(rhs, 1u, (rhs == 0u))) * mix(rhs, 1u, (rhs == 0u))));
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
@@ -22,17 +21,17 @@
if ((i >= v.inner.count)) {
break;
}
- uint v_2 = i;
+ uint v_1 = i;
if ((tint_mod_u32(i, 2u) == 0u)) {
{
- v.inner.data[v_2] = (v.inner.data[v_2] * 2u);
+ v.inner.data[v_1] = (v.inner.data[v_1] * 2u);
i = (i + 1u);
}
continue;
}
- v.inner.data[v_2] = 0u;
+ v.inner.data[v_1] = 0u;
{
- v.inner.data[v_2] = (v.inner.data[v_2] * 2u);
+ v.inner.data[v_1] = (v.inner.data[v_1] * 2u);
i = (i + 1u);
}
continue;
diff --git a/test/tint/bug/tint/221.wgsl.expected.ir.dxc.hlsl b/test/tint/bug/tint/221.wgsl.expected.ir.dxc.hlsl
index 4c6e085..f6f046e 100644
--- a/test/tint/bug/tint/221.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/bug/tint/221.wgsl.expected.ir.dxc.hlsl
@@ -10,21 +10,20 @@
uint i = 0u;
{
while(true) {
- uint v_1 = i;
- if ((v_1 >= b.Load(0u))) {
+ if ((i >= b.Load(0u))) {
break;
}
- uint v_2 = (uint(i) * 4u);
+ uint v_1 = (uint(i) * 4u);
if ((tint_mod_u32(i, 2u) == 0u)) {
{
- b.Store((4u + v_2), (b.Load((4u + v_2)) * 2u));
+ b.Store((4u + v_1), (b.Load((4u + v_1)) * 2u));
i = (i + 1u);
}
continue;
}
- b.Store((4u + v_2), 0u);
+ b.Store((4u + v_1), 0u);
{
- b.Store((4u + v_2), (b.Load((4u + v_2)) * 2u));
+ b.Store((4u + v_1), (b.Load((4u + v_1)) * 2u));
i = (i + 1u);
}
continue;
diff --git a/test/tint/bug/tint/221.wgsl.expected.ir.fxc.hlsl b/test/tint/bug/tint/221.wgsl.expected.ir.fxc.hlsl
index 4c6e085..f6f046e 100644
--- a/test/tint/bug/tint/221.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/bug/tint/221.wgsl.expected.ir.fxc.hlsl
@@ -10,21 +10,20 @@
uint i = 0u;
{
while(true) {
- uint v_1 = i;
- if ((v_1 >= b.Load(0u))) {
+ if ((i >= b.Load(0u))) {
break;
}
- uint v_2 = (uint(i) * 4u);
+ uint v_1 = (uint(i) * 4u);
if ((tint_mod_u32(i, 2u) == 0u)) {
{
- b.Store((4u + v_2), (b.Load((4u + v_2)) * 2u));
+ b.Store((4u + v_1), (b.Load((4u + v_1)) * 2u));
i = (i + 1u);
}
continue;
}
- b.Store((4u + v_2), 0u);
+ b.Store((4u + v_1), 0u);
{
- b.Store((4u + v_2), (b.Load((4u + v_2)) * 2u));
+ b.Store((4u + v_1), (b.Load((4u + v_1)) * 2u));
i = (i + 1u);
}
continue;
diff --git a/test/tint/bug/tint/221.wgsl.expected.ir.msl b/test/tint/bug/tint/221.wgsl.expected.ir.msl
index 0025dd0..bbafffd 100644
--- a/test/tint/bug/tint/221.wgsl.expected.ir.msl
+++ b/test/tint/bug/tint/221.wgsl.expected.ir.msl
@@ -26,8 +26,7 @@
{volatile bool VOLATILE_NAME = false; if (VOLATILE_NAME) break;}
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))));
}
kernel void tint_symbol(device Buf* b [[buffer(0)]]) {
diff --git a/test/tint/bug/tint/349310442.wgsl.expected.glsl b/test/tint/bug/tint/349310442.wgsl.expected.glsl
index d32fc53..4aa5aa3 100644
--- a/test/tint/bug/tint/349310442.wgsl.expected.glsl
+++ b/test/tint/bug/tint/349310442.wgsl.expected.glsl
@@ -65,45 +65,41 @@
uniform highp sampler2D t_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(t_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(t_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(t_plane0, v_13, int(0u))[0u];
- ivec2 v_15 = ivec2(uvec2((v_7 * params.plane1CoordFactor)));
- v_9 = (vec4(v_14, texelFetch(t_plane1, v_15, int(0u)).xy, 1.0f) * params.yuvToRgbConversionMatrix);
- v_10 = 1.0f;
+ ivec2 v_9 = ivec2(v_4);
+ float v_10 = texelFetch(t_plane0, v_9, int(0u))[0u];
+ ivec2 v_11 = ivec2(uvec2((v_3 * params.plane1CoordFactor)));
+ v_5 = (vec4(v_10, texelFetch(t_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);
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_ExternalTextureParams v_20 = tint_convert_tint_ExternalTextureParams(v_1.inner);
- vec4 r = tint_TextureLoadExternal(v_20, uvec2(ivec2(0)));
+ tint_ExternalTextureParams v_16 = tint_convert_tint_ExternalTextureParams(v_1.inner);
+ vec4 r = tint_TextureLoadExternal(v_16, uvec2(ivec2(0)));
}
diff --git a/test/tint/bug/tint/349310442.wgsl.expected.ir.dxc.hlsl b/test/tint/bug/tint/349310442.wgsl.expected.ir.dxc.hlsl
index 87d308a..5045bd3 100644
--- a/test/tint/bug/tint/349310442.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/bug/tint/349310442.wgsl.expected.ir.dxc.hlsl
@@ -39,100 +39,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 = t_params[(start_byte_offset / 16u)];
- float2 v_20 = asfloat((((((start_byte_offset % 16u) / 4u) == 2u)) ? (v_19.zw) : (v_19.xy)));
- uint4 v_21 = t_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 = t_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 = t_params[(start_byte_offset / 16u)];
+ float2 v_19 = asfloat((((((start_byte_offset % 16u) / 4u) == 2u)) ? (v_18.zw) : (v_18.xy)));
+ uint4 v_20 = t_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 = t_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(t_params[(start_byte_offset / 16u)].xyz);
- float3 v_26 = asfloat(t_params[((16u + start_byte_offset) / 16u)].xyz);
- return float3x3(v_25, v_26, asfloat(t_params[((32u + start_byte_offset) / 16u)].xyz));
+float3x3 v_23(uint start_byte_offset) {
+ return float3x3(asfloat(t_params[(start_byte_offset / 16u)].xyz), asfloat(t_params[((16u + start_byte_offset) / 16u)].xyz), asfloat(t_params[((32u + start_byte_offset) / 16u)].xyz));
}
-tint_GammaTransferParams v_27(uint start_byte_offset) {
- float v_28 = asfloat(t_params[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]);
- float v_29 = asfloat(t_params[((4u + start_byte_offset) / 16u)][(((4u + start_byte_offset) % 16u) / 4u)]);
- float v_30 = asfloat(t_params[((8u + start_byte_offset) / 16u)][(((8u + start_byte_offset) % 16u) / 4u)]);
- float v_31 = asfloat(t_params[((12u + start_byte_offset) / 16u)][(((12u + start_byte_offset) % 16u) / 4u)]);
- float v_32 = asfloat(t_params[((16u + start_byte_offset) / 16u)][(((16u + start_byte_offset) % 16u) / 4u)]);
- float v_33 = asfloat(t_params[((20u + start_byte_offset) / 16u)][(((20u + start_byte_offset) % 16u) / 4u)]);
- float v_34 = asfloat(t_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, t_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(t_params[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]), asfloat(t_params[((4u + start_byte_offset) / 16u)][(((4u + start_byte_offset) % 16u) / 4u)]), asfloat(t_params[((8u + start_byte_offset) / 16u)][(((8u + start_byte_offset) % 16u) / 4u)]), asfloat(t_params[((12u + start_byte_offset) / 16u)][(((12u + start_byte_offset) % 16u) / 4u)]), asfloat(t_params[((16u + start_byte_offset) / 16u)][(((16u + start_byte_offset) % 16u) / 4u)]), asfloat(t_params[((20u + start_byte_offset) / 16u)][(((20u + start_byte_offset) % 16u) / 4u)]), asfloat(t_params[((24u + start_byte_offset) / 16u)][(((24u + start_byte_offset) % 16u) / 4u)]), t_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(t_params[(start_byte_offset / 16u)]);
- float4 v_38 = asfloat(t_params[((16u + start_byte_offset) / 16u)]);
- return float3x4(v_37, v_38, asfloat(t_params[((32u + start_byte_offset) / 16u)]));
+float3x4 v_26(uint start_byte_offset) {
+ return float3x4(asfloat(t_params[(start_byte_offset / 16u)]), asfloat(t_params[((16u + start_byte_offset) / 16u)]), asfloat(t_params[((32u + start_byte_offset) / 16u)]));
}
-tint_ExternalTextureParams v_39(uint start_byte_offset) {
- uint v_40 = t_params[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)];
- uint v_41 = t_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 = t_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 = t_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 = t_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 = t_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 = t_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 = t_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 = t_params[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)];
+ uint v_29 = t_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 = t_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 = t_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 = t_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 = t_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 = t_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 = t_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;
}
[numthreads(1, 1, 1)]
void i() {
- tint_ExternalTextureParams v_60 = v_39(0u);
- float4 r = tint_TextureLoadExternal(t_plane0, t_plane1, v_60, uint2((int(0)).xx));
+ tint_ExternalTextureParams v_48 = v_27(0u);
+ float4 r = tint_TextureLoadExternal(t_plane0, t_plane1, v_48, uint2((int(0)).xx));
}
diff --git a/test/tint/bug/tint/349310442.wgsl.expected.ir.fxc.hlsl b/test/tint/bug/tint/349310442.wgsl.expected.ir.fxc.hlsl
index 87d308a..5045bd3 100644
--- a/test/tint/bug/tint/349310442.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/bug/tint/349310442.wgsl.expected.ir.fxc.hlsl
@@ -39,100 +39,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 = t_params[(start_byte_offset / 16u)];
- float2 v_20 = asfloat((((((start_byte_offset % 16u) / 4u) == 2u)) ? (v_19.zw) : (v_19.xy)));
- uint4 v_21 = t_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 = t_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 = t_params[(start_byte_offset / 16u)];
+ float2 v_19 = asfloat((((((start_byte_offset % 16u) / 4u) == 2u)) ? (v_18.zw) : (v_18.xy)));
+ uint4 v_20 = t_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 = t_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(t_params[(start_byte_offset / 16u)].xyz);
- float3 v_26 = asfloat(t_params[((16u + start_byte_offset) / 16u)].xyz);
- return float3x3(v_25, v_26, asfloat(t_params[((32u + start_byte_offset) / 16u)].xyz));
+float3x3 v_23(uint start_byte_offset) {
+ return float3x3(asfloat(t_params[(start_byte_offset / 16u)].xyz), asfloat(t_params[((16u + start_byte_offset) / 16u)].xyz), asfloat(t_params[((32u + start_byte_offset) / 16u)].xyz));
}
-tint_GammaTransferParams v_27(uint start_byte_offset) {
- float v_28 = asfloat(t_params[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]);
- float v_29 = asfloat(t_params[((4u + start_byte_offset) / 16u)][(((4u + start_byte_offset) % 16u) / 4u)]);
- float v_30 = asfloat(t_params[((8u + start_byte_offset) / 16u)][(((8u + start_byte_offset) % 16u) / 4u)]);
- float v_31 = asfloat(t_params[((12u + start_byte_offset) / 16u)][(((12u + start_byte_offset) % 16u) / 4u)]);
- float v_32 = asfloat(t_params[((16u + start_byte_offset) / 16u)][(((16u + start_byte_offset) % 16u) / 4u)]);
- float v_33 = asfloat(t_params[((20u + start_byte_offset) / 16u)][(((20u + start_byte_offset) % 16u) / 4u)]);
- float v_34 = asfloat(t_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, t_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(t_params[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)]), asfloat(t_params[((4u + start_byte_offset) / 16u)][(((4u + start_byte_offset) % 16u) / 4u)]), asfloat(t_params[((8u + start_byte_offset) / 16u)][(((8u + start_byte_offset) % 16u) / 4u)]), asfloat(t_params[((12u + start_byte_offset) / 16u)][(((12u + start_byte_offset) % 16u) / 4u)]), asfloat(t_params[((16u + start_byte_offset) / 16u)][(((16u + start_byte_offset) % 16u) / 4u)]), asfloat(t_params[((20u + start_byte_offset) / 16u)][(((20u + start_byte_offset) % 16u) / 4u)]), asfloat(t_params[((24u + start_byte_offset) / 16u)][(((24u + start_byte_offset) % 16u) / 4u)]), t_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(t_params[(start_byte_offset / 16u)]);
- float4 v_38 = asfloat(t_params[((16u + start_byte_offset) / 16u)]);
- return float3x4(v_37, v_38, asfloat(t_params[((32u + start_byte_offset) / 16u)]));
+float3x4 v_26(uint start_byte_offset) {
+ return float3x4(asfloat(t_params[(start_byte_offset / 16u)]), asfloat(t_params[((16u + start_byte_offset) / 16u)]), asfloat(t_params[((32u + start_byte_offset) / 16u)]));
}
-tint_ExternalTextureParams v_39(uint start_byte_offset) {
- uint v_40 = t_params[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)];
- uint v_41 = t_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 = t_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 = t_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 = t_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 = t_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 = t_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 = t_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 = t_params[(start_byte_offset / 16u)][((start_byte_offset % 16u) / 4u)];
+ uint v_29 = t_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 = t_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 = t_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 = t_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 = t_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 = t_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 = t_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;
}
[numthreads(1, 1, 1)]
void i() {
- tint_ExternalTextureParams v_60 = v_39(0u);
- float4 r = tint_TextureLoadExternal(t_plane0, t_plane1, v_60, uint2((int(0)).xx));
+ tint_ExternalTextureParams v_48 = v_27(0u);
+ float4 r = tint_TextureLoadExternal(t_plane0, t_plane1, v_48, uint2((int(0)).xx));
}
diff --git a/test/tint/bug/tint/349310442.wgsl.expected.ir.msl b/test/tint/bug/tint/349310442.wgsl.expected.ir.msl
index 8abe4e5..a096ee6 100644
--- a/test/tint/bug/tint/349310442.wgsl.expected.ir.msl
+++ b/test/tint/bug/tint/349310442.wgsl.expected.ir.msl
@@ -72,51 +72,48 @@
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};
}
kernel void i(texture2d<float, access::sample> t_plane0 [[texture(0)]], texture2d<float, access::sample> t_plane1 [[texture(1)]], const constant tint_ExternalTextureParams_packed_vec3* t_params [[buffer(2)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.t_plane0=t_plane0, .t_plane1=t_plane1, .t_params=t_params};
- tint_ExternalTextureParams const v_22 = tint_load_struct_packed_vec3(tint_module_vars.t_params);
- float4 r = tint_TextureLoadExternal(tint_module_vars.t_plane0, tint_module_vars.t_plane1, v_22, uint2(int2(0)));
+ tint_ExternalTextureParams const v_19 = tint_load_struct_packed_vec3(tint_module_vars.t_params);
+ float4 r = tint_TextureLoadExternal(tint_module_vars.t_plane0, tint_module_vars.t_plane1, v_19, uint2(int2(0)));
}
diff --git a/test/tint/bug/tint/379127084.wgsl.expected.glsl b/test/tint/bug/tint/379127084.wgsl.expected.glsl
index 04a1123..5edc0b3 100644
--- a/test/tint/bug/tint/379127084.wgsl.expected.glsl
+++ b/test/tint/bug/tint/379127084.wgsl.expected.glsl
@@ -62,10 +62,8 @@
vec4 _skTemp3 = step(_59_m.xyxy, _62_f);
_62_f = (_62_f - (_skTemp3 * _59_m.xyxy));
}
- vec2 v_6 = vec2(vec2(((_62_f.x + 0.5f) * 0.00390625f), 0.5f));
- float _63_g = texture(permutationsSampler_1_Texture_permutationsSampler_1_Sampler, v_6, clamp(-0.47499999403953552246f, -16.0f, 15.9899997711181640625f))[0u];
- vec2 v_7 = vec2(vec2(((_62_f.z + 0.5f) * 0.00390625f), 0.5f));
- float _64_h = texture(permutationsSampler_1_Texture_permutationsSampler_1_Sampler, v_7, clamp(-0.47499999403953552246f, -16.0f, 15.9899997711181640625f))[0u];
+ float _63_g = texture(permutationsSampler_1_Texture_permutationsSampler_1_Sampler, vec2(vec2(((_62_f.x + 0.5f) * 0.00390625f), 0.5f)), clamp(-0.47499999403953552246f, -16.0f, 15.9899997711181640625f))[0u];
+ float _64_h = texture(permutationsSampler_1_Texture_permutationsSampler_1_Sampler, vec2(vec2(((_62_f.z + 0.5f) * 0.00390625f), 0.5f)), clamp(-0.47499999403953552246f, -16.0f, 15.9899997711181640625f))[0u];
vec2 _65_i = vec2(_63_g, _64_h);
if (false) {
vec2 _skTemp4 = floor(((_65_i * vec2(255.0f)) + vec2(0.5f)));
@@ -83,18 +81,14 @@
{
while(true) {
float _73_i = ((float(_72_h) + 0.5f) * 0.25f);
- float v_8 = float(_67_p[0u]);
- vec2 v_9 = vec2(v_8, float(_73_i));
- vec4 _74_j = texture(noiseSampler_1_Texture_noiseSampler_1_Sampler, v_9, clamp(-0.47499999403953552246f, -16.0f, 15.9899997711181640625f));
- float v_10 = float(_67_p[1u]);
- vec2 v_11 = vec2(v_10, float(_73_i));
- vec4 _75_k = texture(noiseSampler_1_Texture_noiseSampler_1_Sampler, v_11, clamp(-0.47499999403953552246f, -16.0f, 15.9899997711181640625f));
- float v_12 = float(_67_p[3u]);
- vec2 v_13 = vec2(v_12, float(_73_i));
- vec4 _76_l = texture(noiseSampler_1_Texture_noiseSampler_1_Sampler, v_13, clamp(-0.47499999403953552246f, -16.0f, 15.9899997711181640625f));
- float v_14 = float(_67_p[2u]);
- vec2 v_15 = vec2(v_14, float(_73_i));
- vec4 _77_m = texture(noiseSampler_1_Texture_noiseSampler_1_Sampler, v_15, clamp(-0.47499999403953552246f, -16.0f, 15.9899997711181640625f));
+ float v_6 = float(_67_p[0u]);
+ vec4 _74_j = texture(noiseSampler_1_Texture_noiseSampler_1_Sampler, vec2(v_6, float(_73_i)), clamp(-0.47499999403953552246f, -16.0f, 15.9899997711181640625f));
+ float v_7 = float(_67_p[1u]);
+ vec4 _75_k = texture(noiseSampler_1_Texture_noiseSampler_1_Sampler, vec2(v_7, float(_73_i)), clamp(-0.47499999403953552246f, -16.0f, 15.9899997711181640625f));
+ float v_8 = float(_67_p[3u]);
+ vec4 _76_l = texture(noiseSampler_1_Texture_noiseSampler_1_Sampler, vec2(v_8, float(_73_i)), clamp(-0.47499999403953552246f, -16.0f, 15.9899997711181640625f));
+ float v_9 = float(_67_p[2u]);
+ vec4 _77_m = texture(noiseSampler_1_Texture_noiseSampler_1_Sampler, vec2(v_9, float(_73_i)), clamp(-0.47499999403953552246f, -16.0f, 15.9899997711181640625f));
vec2 _78_n = _68_d;
float _skTemp7 = dot((((_74_j.yw + (_74_j.xz * 0.00390625f)) * 2.0f) - 1.0f), _78_n);
float _79_o = _skTemp7;
@@ -143,13 +137,13 @@
}
vec4 _skTemp15 = clamp(_58_l, vec4(0.0f), vec4(1.0f));
_58_l = _skTemp15;
- vec3 v_16 = vec3(_58_l.xyz);
- vec3 v_17 = vec3((v_16 * float(_58_l.w)));
- float _skTemp16 = dot(vec3(0.21259999275207519531f, 0.71520000696182250977f, 0.07220000028610229492f), vec4(v_17, float(float(_58_l.w))).xyz);
+ vec3 v_10 = vec3(_58_l.xyz);
+ vec3 v_11 = vec3((v_10 * float(_58_l.w)));
+ float _skTemp16 = dot(vec3(0.21259999275207519531f, 0.71520000696182250977f, 0.07220000028610229492f), vec4(v_11, float(float(_58_l.w))).xyz);
float _skTemp17 = clamp(_skTemp16, 0.0f, 1.0f);
vec4 _84_a = vec4(0.0f, 0.0f, 0.0f, _skTemp17);
- uint v_18 = shadingSsboIndex;
- int _85_d = _storage1.fsUniformData[v_18].inHSL_4;
+ uint v_12 = shadingSsboIndex;
+ int _85_d = _storage1.fsUniformData[v_12].inHSL_4;
if (bool(_85_d)) {
vec4 _skTemp18 = vec4(0.0f);
if ((_84_a.y < _84_a.z)) {
@@ -179,11 +173,11 @@
float _skTemp23 = max(_84_a.w, 0.00009999999747378752f);
_84_a = vec4((_84_a.xyz / _skTemp23), _84_a.w);
}
- uint v_19 = shadingSsboIndex;
- mat4 v_20 = _storage1.fsUniformData[v_19].matrix_4;
- vec4 v_21 = (v_20 * vec4(_84_a));
- uint v_22 = shadingSsboIndex;
- vec4 _94_f = vec4((v_21 + _storage1.fsUniformData[v_22].translate_4));
+ uint v_13 = shadingSsboIndex;
+ mat4 v_14 = _storage1.fsUniformData[v_13].matrix_4;
+ vec4 v_15 = (v_14 * vec4(_84_a));
+ uint v_16 = shadingSsboIndex;
+ vec4 _94_f = vec4((v_15 + _storage1.fsUniformData[v_16].translate_4));
if (bool(_85_d)) {
float _skTemp24 = abs(((2.0f * _94_f.z) - 1.0f));
float _95_b = ((1.0f - _skTemp24) * _94_f.y);
@@ -195,8 +189,8 @@
vec4 _skTemp28 = clamp(vec4(((((_97_d - 0.5f) * _95_b) + _94_f.z) * _94_f.w), _94_f.w), vec4(0.0f), vec4(1.0f));
_94_f = _skTemp28;
} else {
- uint v_23 = shadingSsboIndex;
- if (bool(_storage1.fsUniformData[v_23].clampRGB_4)) {
+ uint v_17 = shadingSsboIndex;
+ if (bool(_storage1.fsUniformData[v_17].clampRGB_4)) {
vec4 _skTemp29 = clamp(_94_f, vec4(0.0f), vec4(1.0f));
_94_f = _skTemp29;
} else {
diff --git a/test/tint/bug/tint/379127084.wgsl.expected.ir.dxc.hlsl b/test/tint/bug/tint/379127084.wgsl.expected.ir.dxc.hlsl
index 08846db..2dee3e0 100644
--- a/test/tint/bug/tint/379127084.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/bug/tint/379127084.wgsl.expected.ir.dxc.hlsl
@@ -27,10 +27,7 @@
SamplerState noiseSampler_1_Sampler : register(s2, space1);
Texture2D<float4> noiseSampler_1_Texture : register(t3, space1);
float4x4 v(uint offset) {
- float4 v_1 = asfloat(_storage1.Load4((offset + 0u)));
- float4 v_2 = asfloat(_storage1.Load4((offset + 16u)));
- float4 v_3 = asfloat(_storage1.Load4((offset + 32u)));
- return float4x4(v_1, v_2, v_3, asfloat(_storage1.Load4((offset + 48u))));
+ return float4x4(asfloat(_storage1.Load4((offset + 0u))), asfloat(_storage1.Load4((offset + 16u))), asfloat(_storage1.Load4((offset + 32u))), asfloat(_storage1.Load4((offset + 48u))));
}
void _skslMain(FSIn _stageIn, inout FSOut _stageOut) {
@@ -43,8 +40,8 @@
int _61_o = int(0);
{
while(true) {
- int v_4 = _61_o;
- if ((v_4 < asint(_storage1.Load((20u + (uint(shadingSsboIndex) * 128u)))))) {
+ int v_1 = _61_o;
+ if ((v_1 < asint(_storage1.Load((20u + (uint(shadingSsboIndex) * 128u)))))) {
float4 _62_f = (0.0f).xxxx;
float2 _skTemp2 = floor(_57_k);
_62_f = float4(_skTemp2, _62_f.zw);
@@ -53,10 +50,8 @@
float4 _skTemp3 = step(_59_m.xyxy, _62_f);
_62_f = (_62_f - (_skTemp3 * _59_m.xyxy));
}
- float2 v_5 = float2(float2(((_62_f.x + 0.5f) * 0.00390625f), 0.5f));
- float _63_g = permutationsSampler_1_Texture.SampleBias(permutationsSampler_1_Sampler, v_5, clamp(-0.47499999403953552246f, -16.0f, 15.9899997711181640625f)).x;
- float2 v_6 = float2(float2(((_62_f.z + 0.5f) * 0.00390625f), 0.5f));
- float _64_h = permutationsSampler_1_Texture.SampleBias(permutationsSampler_1_Sampler, v_6, clamp(-0.47499999403953552246f, -16.0f, 15.9899997711181640625f)).x;
+ float _63_g = permutationsSampler_1_Texture.SampleBias(permutationsSampler_1_Sampler, float2(float2(((_62_f.x + 0.5f) * 0.00390625f), 0.5f)), clamp(-0.47499999403953552246f, -16.0f, 15.9899997711181640625f)).x;
+ float _64_h = permutationsSampler_1_Texture.SampleBias(permutationsSampler_1_Sampler, float2(float2(((_62_f.z + 0.5f) * 0.00390625f), 0.5f)), clamp(-0.47499999403953552246f, -16.0f, 15.9899997711181640625f)).x;
float2 _65_i = float2(_63_g, _64_h);
if (false) {
float2 _skTemp4 = floor(((_65_i * (255.0f).xx) + (0.5f).xx));
@@ -74,18 +69,14 @@
{
while(true) {
float _73_i = ((float(_72_h) + 0.5f) * 0.25f);
- float v_7 = float(_67_p.x);
- float2 v_8 = float2(v_7, float(_73_i));
- float4 _74_j = noiseSampler_1_Texture.SampleBias(noiseSampler_1_Sampler, v_8, clamp(-0.47499999403953552246f, -16.0f, 15.9899997711181640625f));
- float v_9 = float(_67_p.y);
- float2 v_10 = float2(v_9, float(_73_i));
- float4 _75_k = noiseSampler_1_Texture.SampleBias(noiseSampler_1_Sampler, v_10, clamp(-0.47499999403953552246f, -16.0f, 15.9899997711181640625f));
- float v_11 = float(_67_p.w);
- float2 v_12 = float2(v_11, float(_73_i));
- float4 _76_l = noiseSampler_1_Texture.SampleBias(noiseSampler_1_Sampler, v_12, clamp(-0.47499999403953552246f, -16.0f, 15.9899997711181640625f));
- float v_13 = float(_67_p.z);
- float2 v_14 = float2(v_13, float(_73_i));
- float4 _77_m = noiseSampler_1_Texture.SampleBias(noiseSampler_1_Sampler, v_14, clamp(-0.47499999403953552246f, -16.0f, 15.9899997711181640625f));
+ float v_2 = float(_67_p.x);
+ float4 _74_j = noiseSampler_1_Texture.SampleBias(noiseSampler_1_Sampler, float2(v_2, float(_73_i)), clamp(-0.47499999403953552246f, -16.0f, 15.9899997711181640625f));
+ float v_3 = float(_67_p.y);
+ float4 _75_k = noiseSampler_1_Texture.SampleBias(noiseSampler_1_Sampler, float2(v_3, float(_73_i)), clamp(-0.47499999403953552246f, -16.0f, 15.9899997711181640625f));
+ float v_4 = float(_67_p.w);
+ float4 _76_l = noiseSampler_1_Texture.SampleBias(noiseSampler_1_Sampler, float2(v_4, float(_73_i)), clamp(-0.47499999403953552246f, -16.0f, 15.9899997711181640625f));
+ float v_5 = float(_67_p.z);
+ float4 _77_m = noiseSampler_1_Texture.SampleBias(noiseSampler_1_Sampler, float2(v_5, float(_73_i)), clamp(-0.47499999403953552246f, -16.0f, 15.9899997711181640625f));
float2 _78_n = _68_d;
float _skTemp7 = dot((((_74_j.yw + (_74_j.xz * 0.00390625f)) * 2.0f) - 1.0f), _78_n);
float _79_o = _skTemp7;
@@ -134,9 +125,9 @@
}
float4 _skTemp15 = saturate(_58_l);
_58_l = _skTemp15;
- float3 v_15 = float3(_58_l.xyz);
- float3 v_16 = float3((v_15 * float(_58_l.w)));
- float _skTemp16 = dot(float3(0.21259999275207519531f, 0.71520000696182250977f, 0.07220000028610229492f), float4(v_16, float(float(_58_l.w))).xyz);
+ float3 v_6 = float3(_58_l.xyz);
+ float3 v_7 = float3((v_6 * float(_58_l.w)));
+ float _skTemp16 = dot(float3(0.21259999275207519531f, 0.71520000696182250977f, 0.07220000028610229492f), float4(v_7, float(float(_58_l.w))).xyz);
float _skTemp17 = saturate(_skTemp16);
float4 _84_a = float4(0.0f, 0.0f, 0.0f, _skTemp17);
int _85_d = asint(_storage1.Load((112u + (uint(shadingSsboIndex) * 128u))));
@@ -169,9 +160,9 @@
float _skTemp23 = max(_84_a.w, 0.00009999999747378752f);
_84_a = float4((_84_a.xyz / _skTemp23), _84_a.w);
}
- float4x4 v_17 = v((32u + (uint(shadingSsboIndex) * 128u)));
- float4 v_18 = mul(float4(_84_a), v_17);
- float4 _94_f = float4((v_18 + asfloat(_storage1.Load4((96u + (uint(shadingSsboIndex) * 128u))))));
+ float4x4 v_8 = v((32u + (uint(shadingSsboIndex) * 128u)));
+ float4 v_9 = mul(float4(_84_a), v_8);
+ float4 _94_f = float4((v_9 + asfloat(_storage1.Load4((96u + (uint(shadingSsboIndex) * 128u))))));
if (bool(_85_d)) {
float _skTemp24 = abs(((2.0f * _94_f.z) - 1.0f));
float _95_b = ((1.0f - _skTemp24) * _94_f.y);
@@ -199,14 +190,14 @@
FSOut main_inner(FSIn _stageIn) {
FSOut _stageOut = (FSOut)0;
_skslMain(_stageIn, _stageOut);
- FSOut v_19 = _stageOut;
- return v_19;
+ FSOut v_10 = _stageOut;
+ return v_10;
}
main_outputs main(main_inputs inputs) {
- FSIn v_20 = {inputs.FSIn_ssboIndicesVar, inputs.FSIn_localCoordsVar};
- FSOut v_21 = main_inner(v_20);
- main_outputs v_22 = {v_21.sk_FragColor};
- return v_22;
+ FSIn v_11 = {inputs.FSIn_ssboIndicesVar, inputs.FSIn_localCoordsVar};
+ FSOut v_12 = main_inner(v_11);
+ main_outputs v_13 = {v_12.sk_FragColor};
+ return v_13;
}
diff --git a/test/tint/bug/tint/379127084.wgsl.expected.ir.fxc.hlsl b/test/tint/bug/tint/379127084.wgsl.expected.ir.fxc.hlsl
index 1b73032..2dd9723 100644
--- a/test/tint/bug/tint/379127084.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/bug/tint/379127084.wgsl.expected.ir.fxc.hlsl
@@ -27,10 +27,7 @@
SamplerState noiseSampler_1_Sampler : register(s2, space1);
Texture2D<float4> noiseSampler_1_Texture : register(t3, space1);
float4x4 v(uint offset) {
- float4 v_1 = asfloat(_storage1.Load4((offset + 0u)));
- float4 v_2 = asfloat(_storage1.Load4((offset + 16u)));
- float4 v_3 = asfloat(_storage1.Load4((offset + 32u)));
- return float4x4(v_1, v_2, v_3, asfloat(_storage1.Load4((offset + 48u))));
+ return float4x4(asfloat(_storage1.Load4((offset + 0u))), asfloat(_storage1.Load4((offset + 16u))), asfloat(_storage1.Load4((offset + 32u))), asfloat(_storage1.Load4((offset + 48u))));
}
void _skslMain(FSIn _stageIn, inout FSOut _stageOut) {
@@ -43,8 +40,8 @@
int _61_o = int(0);
{
while(true) {
- int v_4 = _61_o;
- if ((v_4 < asint(_storage1.Load((20u + (uint(shadingSsboIndex) * 128u)))))) {
+ int v_1 = _61_o;
+ if ((v_1 < asint(_storage1.Load((20u + (uint(shadingSsboIndex) * 128u)))))) {
float4 _62_f = (0.0f).xxxx;
float2 _skTemp2 = floor(_57_k);
_62_f = float4(_skTemp2, _62_f.zw);
@@ -53,10 +50,8 @@
float4 _skTemp3 = step(_59_m.xyxy, _62_f);
_62_f = (_62_f - (_skTemp3 * _59_m.xyxy));
}
- float2 v_5 = float2(float2(((_62_f.x + 0.5f) * 0.00390625f), 0.5f));
- float _63_g = permutationsSampler_1_Texture.SampleBias(permutationsSampler_1_Sampler, v_5, clamp(-0.47499999403953552246f, -16.0f, 15.9899997711181640625f)).x;
- float2 v_6 = float2(float2(((_62_f.z + 0.5f) * 0.00390625f), 0.5f));
- float _64_h = permutationsSampler_1_Texture.SampleBias(permutationsSampler_1_Sampler, v_6, clamp(-0.47499999403953552246f, -16.0f, 15.9899997711181640625f)).x;
+ float _63_g = permutationsSampler_1_Texture.SampleBias(permutationsSampler_1_Sampler, float2(float2(((_62_f.x + 0.5f) * 0.00390625f), 0.5f)), clamp(-0.47499999403953552246f, -16.0f, 15.9899997711181640625f)).x;
+ float _64_h = permutationsSampler_1_Texture.SampleBias(permutationsSampler_1_Sampler, float2(float2(((_62_f.z + 0.5f) * 0.00390625f), 0.5f)), clamp(-0.47499999403953552246f, -16.0f, 15.9899997711181640625f)).x;
float2 _65_i = float2(_63_g, _64_h);
if (false) {
float2 _skTemp4 = floor(((_65_i * (255.0f).xx) + (0.5f).xx));
@@ -74,18 +69,14 @@
{
while(true) {
float _73_i = ((float(_72_h) + 0.5f) * 0.25f);
- float v_7 = float(_67_p.x);
- float2 v_8 = float2(v_7, float(_73_i));
- float4 _74_j = noiseSampler_1_Texture.SampleBias(noiseSampler_1_Sampler, v_8, clamp(-0.47499999403953552246f, -16.0f, 15.9899997711181640625f));
- float v_9 = float(_67_p.y);
- float2 v_10 = float2(v_9, float(_73_i));
- float4 _75_k = noiseSampler_1_Texture.SampleBias(noiseSampler_1_Sampler, v_10, clamp(-0.47499999403953552246f, -16.0f, 15.9899997711181640625f));
- float v_11 = float(_67_p.w);
- float2 v_12 = float2(v_11, float(_73_i));
- float4 _76_l = noiseSampler_1_Texture.SampleBias(noiseSampler_1_Sampler, v_12, clamp(-0.47499999403953552246f, -16.0f, 15.9899997711181640625f));
- float v_13 = float(_67_p.z);
- float2 v_14 = float2(v_13, float(_73_i));
- float4 _77_m = noiseSampler_1_Texture.SampleBias(noiseSampler_1_Sampler, v_14, clamp(-0.47499999403953552246f, -16.0f, 15.9899997711181640625f));
+ float v_2 = float(_67_p.x);
+ float4 _74_j = noiseSampler_1_Texture.SampleBias(noiseSampler_1_Sampler, float2(v_2, float(_73_i)), clamp(-0.47499999403953552246f, -16.0f, 15.9899997711181640625f));
+ float v_3 = float(_67_p.y);
+ float4 _75_k = noiseSampler_1_Texture.SampleBias(noiseSampler_1_Sampler, float2(v_3, float(_73_i)), clamp(-0.47499999403953552246f, -16.0f, 15.9899997711181640625f));
+ float v_4 = float(_67_p.w);
+ float4 _76_l = noiseSampler_1_Texture.SampleBias(noiseSampler_1_Sampler, float2(v_4, float(_73_i)), clamp(-0.47499999403953552246f, -16.0f, 15.9899997711181640625f));
+ float v_5 = float(_67_p.z);
+ float4 _77_m = noiseSampler_1_Texture.SampleBias(noiseSampler_1_Sampler, float2(v_5, float(_73_i)), clamp(-0.47499999403953552246f, -16.0f, 15.9899997711181640625f));
float2 _78_n = _68_d;
float _skTemp7 = dot((((_74_j.yw + (_74_j.xz * 0.00390625f)) * 2.0f) - 1.0f), _78_n);
float _79_o = _skTemp7;
@@ -103,9 +94,9 @@
float _skTemp12 = lerp(_79_o, _80_p, _69_e.x);
float _82_r = _skTemp12;
float _skTemp13 = lerp(_81_q, _82_r, _69_e.y);
- float4 v_15 = _71_g;
- float4 v_16 = _72_h.xxxx;
- _71_g = (((v_16 == float4(int(0), int(1), int(2), int(3)))) ? (_skTemp13.xxxx) : (v_15));
+ float4 v_6 = _71_g;
+ float4 v_7 = _72_h.xxxx;
+ _71_g = (((v_7 == float4(int(0), int(1), int(2), int(3)))) ? (_skTemp13.xxxx) : (v_6));
{
_72_h = (_72_h + int(1));
if ((_72_h >= int(4))) { break; }
@@ -136,9 +127,9 @@
}
float4 _skTemp15 = saturate(_58_l);
_58_l = _skTemp15;
- float3 v_17 = float3(_58_l.xyz);
- float3 v_18 = float3((v_17 * float(_58_l.w)));
- float _skTemp16 = dot(float3(0.21259999275207519531f, 0.71520000696182250977f, 0.07220000028610229492f), float4(v_18, float(float(_58_l.w))).xyz);
+ float3 v_8 = float3(_58_l.xyz);
+ float3 v_9 = float3((v_8 * float(_58_l.w)));
+ float _skTemp16 = dot(float3(0.21259999275207519531f, 0.71520000696182250977f, 0.07220000028610229492f), float4(v_9, float(float(_58_l.w))).xyz);
float _skTemp17 = saturate(_skTemp16);
float4 _84_a = float4(0.0f, 0.0f, 0.0f, _skTemp17);
int _85_d = asint(_storage1.Load((112u + (uint(shadingSsboIndex) * 128u))));
@@ -171,9 +162,9 @@
float _skTemp23 = max(_84_a.w, 0.00009999999747378752f);
_84_a = float4((_84_a.xyz / _skTemp23), _84_a.w);
}
- float4x4 v_19 = v((32u + (uint(shadingSsboIndex) * 128u)));
- float4 v_20 = mul(float4(_84_a), v_19);
- float4 _94_f = float4((v_20 + asfloat(_storage1.Load4((96u + (uint(shadingSsboIndex) * 128u))))));
+ float4x4 v_10 = v((32u + (uint(shadingSsboIndex) * 128u)));
+ float4 v_11 = mul(float4(_84_a), v_10);
+ float4 _94_f = float4((v_11 + asfloat(_storage1.Load4((96u + (uint(shadingSsboIndex) * 128u))))));
if (bool(_85_d)) {
float _skTemp24 = abs(((2.0f * _94_f.z) - 1.0f));
float _95_b = ((1.0f - _skTemp24) * _94_f.y);
@@ -201,14 +192,14 @@
FSOut main_inner(FSIn _stageIn) {
FSOut _stageOut = (FSOut)0;
_skslMain(_stageIn, _stageOut);
- FSOut v_21 = _stageOut;
- return v_21;
+ FSOut v_12 = _stageOut;
+ return v_12;
}
main_outputs main(main_inputs inputs) {
- FSIn v_22 = {inputs.FSIn_ssboIndicesVar, inputs.FSIn_localCoordsVar};
- FSOut v_23 = main_inner(v_22);
- main_outputs v_24 = {v_23.sk_FragColor};
- return v_24;
+ FSIn v_13 = {inputs.FSIn_ssboIndicesVar, inputs.FSIn_localCoordsVar};
+ FSOut v_14 = main_inner(v_13);
+ main_outputs v_15 = {v_14.sk_FragColor};
+ return v_15;
}
diff --git a/test/tint/bug/tint/379684039.wgsl b/test/tint/bug/tint/379684039.wgsl
new file mode 100644
index 0000000..42039bd
--- /dev/null
+++ b/test/tint/bug/tint/379684039.wgsl
@@ -0,0 +1,14 @@
+@group(0) @binding(2) var<storage, read> _storage : vec2<i32>;
+
+fn main() {
+ var vec: vec2<i32> = vec2<i32>(0);
+ loop {
+ if vec.y >= _storage.y { // vec.y to let
+ break;
+ }
+
+ if vec.y >= 0 { // vec.y inlined
+ break;
+ }
+ }
+}
diff --git a/test/tint/bug/tint/379684039.wgsl.expected.dxc.hlsl b/test/tint/bug/tint/379684039.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..642f3d6
--- /dev/null
+++ b/test/tint/bug/tint/379684039.wgsl.expected.dxc.hlsl
@@ -0,0 +1,18 @@
+[numthreads(1, 1, 1)]
+void unused_entry_point() {
+ return;
+}
+
+ByteAddressBuffer _storage : register(t2);
+
+void main() {
+ int2 vec = (0).xx;
+ while (true) {
+ if ((vec.y >= asint(_storage.Load(4u)))) {
+ break;
+ }
+ if ((vec.y >= 0)) {
+ break;
+ }
+ }
+}
diff --git a/test/tint/bug/tint/379684039.wgsl.expected.fxc.hlsl b/test/tint/bug/tint/379684039.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..642f3d6
--- /dev/null
+++ b/test/tint/bug/tint/379684039.wgsl.expected.fxc.hlsl
@@ -0,0 +1,18 @@
+[numthreads(1, 1, 1)]
+void unused_entry_point() {
+ return;
+}
+
+ByteAddressBuffer _storage : register(t2);
+
+void main() {
+ int2 vec = (0).xx;
+ while (true) {
+ if ((vec.y >= asint(_storage.Load(4u)))) {
+ break;
+ }
+ if ((vec.y >= 0)) {
+ break;
+ }
+ }
+}
diff --git a/test/tint/bug/tint/379684039.wgsl.expected.glsl b/test/tint/bug/tint/379684039.wgsl.expected.glsl
new file mode 100644
index 0000000..aa02f70
--- /dev/null
+++ b/test/tint/bug/tint/379684039.wgsl.expected.glsl
@@ -0,0 +1,25 @@
+#version 310 es
+
+layout(binding = 2, std430)
+buffer _storage_block_1_ssbo {
+ ivec2 inner;
+} v;
+void tint_symbol() {
+ ivec2 vec = ivec2(0);
+ {
+ while(true) {
+ if ((vec.y >= v.inner.y)) {
+ break;
+ }
+ if ((vec.y >= 0)) {
+ break;
+ }
+ {
+ }
+ continue;
+ }
+ }
+}
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+}
diff --git a/test/tint/bug/tint/379684039.wgsl.expected.ir.dxc.hlsl b/test/tint/bug/tint/379684039.wgsl.expected.ir.dxc.hlsl
new file mode 100644
index 0000000..13bf43c
--- /dev/null
+++ b/test/tint/bug/tint/379684039.wgsl.expected.ir.dxc.hlsl
@@ -0,0 +1,23 @@
+
+ByteAddressBuffer _storage : register(t2);
+void main() {
+ int2 vec = (int(0)).xx;
+ {
+ while(true) {
+ if ((vec.y >= asint(_storage.Load(4u)))) {
+ break;
+ }
+ if ((vec.y >= int(0))) {
+ break;
+ }
+ {
+ }
+ continue;
+ }
+ }
+}
+
+[numthreads(1, 1, 1)]
+void unused_entry_point() {
+}
+
diff --git a/test/tint/bug/tint/379684039.wgsl.expected.ir.fxc.hlsl b/test/tint/bug/tint/379684039.wgsl.expected.ir.fxc.hlsl
new file mode 100644
index 0000000..13bf43c
--- /dev/null
+++ b/test/tint/bug/tint/379684039.wgsl.expected.ir.fxc.hlsl
@@ -0,0 +1,23 @@
+
+ByteAddressBuffer _storage : register(t2);
+void main() {
+ int2 vec = (int(0)).xx;
+ {
+ while(true) {
+ if ((vec.y >= asint(_storage.Load(4u)))) {
+ break;
+ }
+ if ((vec.y >= int(0))) {
+ break;
+ }
+ {
+ }
+ continue;
+ }
+ }
+}
+
+[numthreads(1, 1, 1)]
+void unused_entry_point() {
+}
+
diff --git a/test/tint/bug/tint/379684039.wgsl.expected.ir.msl b/test/tint/bug/tint/379684039.wgsl.expected.ir.msl
new file mode 100644
index 0000000..1c42658
--- /dev/null
+++ b/test/tint/bug/tint/379684039.wgsl.expected.ir.msl
@@ -0,0 +1,27 @@
+#include <metal_stdlib>
+using namespace metal;
+
+struct tint_module_vars_struct {
+ const device int2* _storage;
+};
+
+#define TINT_ISOLATE_UB(VOLATILE_NAME) \
+ {volatile bool VOLATILE_NAME = false; if (VOLATILE_NAME) break;}
+
+void tint_symbol(tint_module_vars_struct tint_module_vars) {
+ int2 tint_symbol_1 = int2(0);
+ {
+ while(true) {
+ TINT_ISOLATE_UB(tint_volatile_false)
+ if ((tint_symbol_1[1u] >= (*tint_module_vars._storage)[1u])) {
+ break;
+ }
+ if ((tint_symbol_1[1u] >= 0)) {
+ break;
+ }
+ {
+ }
+ continue;
+ }
+ }
+}
diff --git a/test/tint/bug/tint/379684039.wgsl.expected.msl b/test/tint/bug/tint/379684039.wgsl.expected.msl
new file mode 100644
index 0000000..37a6707
--- /dev/null
+++ b/test/tint/bug/tint/379684039.wgsl.expected.msl
@@ -0,0 +1,20 @@
+#include <metal_stdlib>
+
+using namespace metal;
+
+#define TINT_ISOLATE_UB(VOLATILE_NAME) \
+ {volatile bool VOLATILE_NAME = false; if (VOLATILE_NAME) break;}
+
+void tint_symbol(const device int2* const tint_symbol_2) {
+ int2 tint_symbol_1 = int2(0);
+ while(true) {
+ TINT_ISOLATE_UB(tint_volatile_false);
+ if ((tint_symbol_1[1] >= (*(tint_symbol_2))[1])) {
+ break;
+ }
+ if ((tint_symbol_1[1] >= 0)) {
+ break;
+ }
+ }
+}
+
diff --git a/test/tint/bug/tint/379684039.wgsl.expected.spvasm b/test/tint/bug/tint/379684039.wgsl.expected.spvasm
new file mode 100644
index 0000000..c18946b
--- /dev/null
+++ b/test/tint/bug/tint/379684039.wgsl.expected.spvasm
@@ -0,0 +1,74 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 1
+; Bound: 40
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint GLCompute %unused_entry_point "unused_entry_point"
+ OpExecutionMode %unused_entry_point LocalSize 1 1 1
+ OpMemberName %_storage_block 0 "inner"
+ OpName %_storage_block "_storage_block"
+ OpName %main "main"
+ OpName %vec "vec"
+ OpName %unused_entry_point "unused_entry_point"
+ OpMemberDecorate %_storage_block 0 Offset 0
+ OpDecorate %_storage_block Block
+ OpDecorate %1 DescriptorSet 0
+ OpDecorate %1 Binding 2
+ OpDecorate %1 NonWritable
+ %int = OpTypeInt 32 1
+ %v2int = OpTypeVector %int 2
+%_storage_block = OpTypeStruct %v2int
+%_ptr_StorageBuffer__storage_block = OpTypePointer StorageBuffer %_storage_block
+ %1 = OpVariable %_ptr_StorageBuffer__storage_block StorageBuffer
+ %void = OpTypeVoid
+ %8 = OpTypeFunction %void
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+ %12 = OpConstantNull %v2int
+%_ptr_Function_int = OpTypePointer Function %int
+ %uint = OpTypeInt 32 0
+ %uint_1 = OpConstant %uint 1
+%_ptr_StorageBuffer_v2int = OpTypePointer StorageBuffer %v2int
+ %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_int = OpTypePointer StorageBuffer %int
+ %bool = OpTypeBool
+ %int_0 = OpConstant %int 0
+ %main = OpFunction %void None %8
+ %9 = OpLabel
+ %vec = OpVariable %_ptr_Function_v2int Function
+ OpStore %vec %12
+ OpBranch %15
+ %15 = OpLabel
+ OpLoopMerge %16 %14 None
+ OpBranch %13
+ %13 = OpLabel
+ %17 = OpAccessChain %_ptr_Function_int %vec %uint_1
+ %21 = OpLoad %int %17 None
+ %22 = OpAccessChain %_ptr_StorageBuffer_v2int %1 %uint_0
+ %25 = OpAccessChain %_ptr_StorageBuffer_int %22 %uint_1
+ %27 = OpLoad %int %25 None
+ %28 = OpSGreaterThanEqual %bool %21 %27
+ OpSelectionMerge %30 None
+ OpBranchConditional %28 %31 %30
+ %31 = OpLabel
+ OpBranch %16
+ %30 = OpLabel
+ %32 = OpAccessChain %_ptr_Function_int %vec %uint_1
+ %33 = OpLoad %int %32 None
+ %34 = OpSGreaterThanEqual %bool %33 %int_0
+ OpSelectionMerge %36 None
+ OpBranchConditional %34 %37 %36
+ %37 = OpLabel
+ OpBranch %16
+ %36 = OpLabel
+ OpBranch %14
+ %14 = OpLabel
+ OpBranch %15
+ %16 = OpLabel
+ OpReturn
+ OpFunctionEnd
+%unused_entry_point = OpFunction %void None %8
+ %39 = OpLabel
+ OpReturn
+ OpFunctionEnd
diff --git a/test/tint/bug/tint/379684039.wgsl.expected.wgsl b/test/tint/bug/tint/379684039.wgsl.expected.wgsl
new file mode 100644
index 0000000..5799dae
--- /dev/null
+++ b/test/tint/bug/tint/379684039.wgsl.expected.wgsl
@@ -0,0 +1,13 @@
+@group(0) @binding(2) var<storage, read> _storage : vec2<i32>;
+
+fn main() {
+ var vec : vec2<i32> = vec2<i32>(0);
+ loop {
+ if ((vec.y >= _storage.y)) {
+ break;
+ }
+ if ((vec.y >= 0)) {
+ break;
+ }
+ }
+}
diff --git a/test/tint/bug/tint/534.wgsl.expected.glsl b/test/tint/bug/tint/534.wgsl.expected.glsl
index 889e76c..e7a81fb 100644
--- a/test/tint/bug/tint/534.wgsl.expected.glsl
+++ b/test/tint/bug/tint/534.wgsl.expected.glsl
@@ -22,9 +22,7 @@
return 1u;
}
uvec4 tint_v4f32_to_v4u32(vec4 value) {
- uvec4 v_1 = uvec4(value);
- uvec4 v_2 = mix(uvec4(0u), v_1, greaterThanEqual(value, vec4(0.0f)));
- return mix(uvec4(4294967295u), v_2, lessThanEqual(value, vec4(4294967040.0f)));
+ return mix(uvec4(4294967295u), mix(uvec4(0u), uvec4(value), greaterThanEqual(value, vec4(0.0f))), lessThanEqual(value, vec4(4294967040.0f)));
}
void tint_symbol_1_inner(uvec3 GlobalInvocationID) {
uvec2 size = uvec2(textureSize(src, 0));
@@ -33,10 +31,10 @@
if ((v.inner.dstTextureFlipY == 1u)) {
srcTexCoord[1u] = ((size.y - dstTexCoord.y) - 1u);
}
- ivec2 v_3 = ivec2(srcTexCoord);
- vec4 srcColor = texelFetch(src, v_3, int(0));
- ivec2 v_4 = ivec2(dstTexCoord);
- vec4 dstColor = texelFetch(dst, v_4, int(0));
+ ivec2 v_1 = ivec2(srcTexCoord);
+ vec4 srcColor = texelFetch(src, v_1, int(0));
+ ivec2 v_2 = ivec2(dstTexCoord);
+ vec4 dstColor = texelFetch(dst, v_2, int(0));
bool success = true;
uvec4 srcColorBits = uvec4(0u);
uvec4 dstColorBits = tint_v4f32_to_v4u32(dstColor);
@@ -47,15 +45,15 @@
} else {
break;
}
- uint v_5 = i;
- srcColorBits[v_5] = ConvertToFp16FloatValue(srcColor[i]);
- bool v_6 = false;
+ uint v_3 = i;
+ srcColorBits[v_3] = ConvertToFp16FloatValue(srcColor[i]);
+ bool v_4 = false;
if (success) {
- v_6 = (srcColorBits[i] == dstColorBits[i]);
+ v_4 = (srcColorBits[i] == dstColorBits[i]);
} else {
- v_6 = false;
+ v_4 = false;
}
- success = v_6;
+ success = v_4;
{
i = (i + 1u);
}
@@ -64,11 +62,11 @@
}
uint outputIndex = ((GlobalInvocationID[1u] * uint(size.x)) + GlobalInvocationID[0u]);
if (success) {
- uint v_7 = outputIndex;
- tint_symbol.result[v_7] = 1u;
+ uint v_5 = outputIndex;
+ tint_symbol.result[v_5] = 1u;
} else {
- uint v_8 = outputIndex;
- tint_symbol.result[v_8] = 0u;
+ uint v_6 = outputIndex;
+ tint_symbol.result[v_6] = 0u;
}
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
diff --git a/test/tint/bug/tint/534.wgsl.expected.ir.msl b/test/tint/bug/tint/534.wgsl.expected.ir.msl
index 270c65a..c1e14ec 100644
--- a/test/tint/bug/tint/534.wgsl.expected.ir.msl
+++ b/test/tint/bug/tint/534.wgsl.expected.ir.msl
@@ -43,8 +43,7 @@
}
void tint_symbol_inner(uint3 GlobalInvocationID, tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.src.get_width(0u);
- uint2 size = uint2(v, tint_module_vars.src.get_height(0u));
+ uint2 size = uint2(tint_module_vars.src.get_width(0u), tint_module_vars.src.get_height(0u));
uint2 dstTexCoord = GlobalInvocationID.xy;
uint2 srcTexCoord = dstTexCoord;
if (((*tint_module_vars.uniforms).dstTextureFlipY == 1u)) {
@@ -63,15 +62,15 @@
} else {
break;
}
- uint const v_1 = i;
- srcColorBits[v_1] = ConvertToFp16FloatValue(srcColor[i]);
- bool v_2 = false;
+ uint const v = i;
+ srcColorBits[v] = ConvertToFp16FloatValue(srcColor[i]);
+ bool v_1 = false;
if (success) {
- v_2 = (srcColorBits[i] == dstColorBits[i]);
+ v_1 = (srcColorBits[i] == dstColorBits[i]);
} else {
- v_2 = false;
+ v_1 = false;
}
- success = v_2;
+ success = v_1;
{
i = (i + 1u);
}
diff --git a/test/tint/bug/tint/913.wgsl.expected.ir.msl b/test/tint/bug/tint/913.wgsl.expected.ir.msl
index ca655b5..08531cf 100644
--- a/test/tint/bug/tint/913.wgsl.expected.ir.msl
+++ b/test/tint/bug/tint/913.wgsl.expected.ir.msl
@@ -37,39 +37,37 @@
}
void tint_symbol_inner(uint3 GlobalInvocationID, tint_module_vars_struct tint_module_vars) {
- uint const v = tint_module_vars.src.get_width(0u);
- uint2 const srcSize = uint2(v, tint_module_vars.src.get_height(0u));
- uint const v_1 = tint_module_vars.dst.get_width(0u);
- uint2 const dstSize = uint2(v_1, tint_module_vars.dst.get_height(0u));
+ uint2 const srcSize = uint2(tint_module_vars.src.get_width(0u), tint_module_vars.src.get_height(0u));
+ uint2 const dstSize = uint2(tint_module_vars.dst.get_width(0u), tint_module_vars.dst.get_height(0u));
uint2 const dstTexCoord = uint2(GlobalInvocationID.xy);
float4 const nonCoveredColor = float4(0.0f, 1.0f, 0.0f, 1.0f);
bool success = true;
- bool v_2 = false;
+ bool v = false;
if ((dstTexCoord[0u] < (*tint_module_vars.uniforms).dstCopyOrigin[0u])) {
+ v = true;
+ } else {
+ v = (dstTexCoord[1u] < (*tint_module_vars.uniforms).dstCopyOrigin[1u]);
+ }
+ bool v_1 = false;
+ if (v) {
+ v_1 = true;
+ } else {
+ v_1 = (dstTexCoord[0u] >= ((*tint_module_vars.uniforms).dstCopyOrigin[0u] + (*tint_module_vars.uniforms).copySize[0u]));
+ }
+ bool v_2 = false;
+ if (v_1) {
v_2 = true;
} else {
- v_2 = (dstTexCoord[1u] < (*tint_module_vars.uniforms).dstCopyOrigin[1u]);
+ v_2 = (dstTexCoord[1u] >= ((*tint_module_vars.uniforms).dstCopyOrigin[1u] + (*tint_module_vars.uniforms).copySize[1u]));
}
- bool v_3 = false;
if (v_2) {
- v_3 = true;
- } else {
- v_3 = (dstTexCoord[0u] >= ((*tint_module_vars.uniforms).dstCopyOrigin[0u] + (*tint_module_vars.uniforms).copySize[0u]));
- }
- bool v_4 = false;
- if (v_3) {
- v_4 = true;
- } else {
- v_4 = (dstTexCoord[1u] >= ((*tint_module_vars.uniforms).dstCopyOrigin[1u] + (*tint_module_vars.uniforms).copySize[1u]));
- }
- if (v_4) {
- bool v_5 = false;
+ bool v_3 = false;
if (success) {
- v_5 = all((tint_module_vars.dst.read(uint2(int2(dstTexCoord)), 0) == nonCoveredColor));
+ v_3 = all((tint_module_vars.dst.read(uint2(int2(dstTexCoord)), 0) == nonCoveredColor));
} else {
- v_5 = false;
+ v_3 = false;
}
- success = v_5;
+ success = v_3;
} else {
uint2 srcTexCoord = ((dstTexCoord - (*tint_module_vars.uniforms).dstCopyOrigin) + (*tint_module_vars.uniforms).srcCopyOrigin);
if (((*tint_module_vars.uniforms).dstTextureFlipY == 1u)) {
@@ -78,6 +76,20 @@
float4 const srcColor = tint_module_vars.src.read(uint2(int2(srcTexCoord)), 0);
float4 const dstColor = tint_module_vars.dst.read(uint2(int2(dstTexCoord)), 0);
if (((*tint_module_vars.uniforms).channelCount == 2u)) {
+ bool v_4 = false;
+ if (success) {
+ v_4 = aboutEqual(dstColor[0u], srcColor[0u]);
+ } else {
+ v_4 = false;
+ }
+ bool v_5 = false;
+ if (v_4) {
+ v_5 = aboutEqual(dstColor[1u], srcColor[1u]);
+ } else {
+ v_5 = false;
+ }
+ success = v_5;
+ } else {
bool v_6 = false;
if (success) {
v_6 = aboutEqual(dstColor[0u], srcColor[0u]);
@@ -90,33 +102,19 @@
} else {
v_7 = false;
}
- success = v_7;
- } else {
bool v_8 = false;
- if (success) {
- v_8 = aboutEqual(dstColor[0u], srcColor[0u]);
+ if (v_7) {
+ v_8 = aboutEqual(dstColor[2u], srcColor[2u]);
} else {
v_8 = false;
}
bool v_9 = false;
if (v_8) {
- v_9 = aboutEqual(dstColor[1u], srcColor[1u]);
+ v_9 = aboutEqual(dstColor[3u], srcColor[3u]);
} else {
v_9 = false;
}
- bool v_10 = false;
- if (v_9) {
- v_10 = aboutEqual(dstColor[2u], srcColor[2u]);
- } else {
- v_10 = false;
- }
- bool v_11 = false;
- if (v_10) {
- v_11 = aboutEqual(dstColor[3u], srcColor[3u]);
- } else {
- v_11 = false;
- }
- success = v_11;
+ success = v_9;
}
}
uint const outputIndex = ((GlobalInvocationID[1u] * dstSize[0u]) + GlobalInvocationID[0u]);
diff --git a/test/tint/bug/tint/914.wgsl.expected.ir.dxc.hlsl b/test/tint/bug/tint/914.wgsl.expected.ir.dxc.hlsl
index 00878bc..f6e006c 100644
--- a/test/tint/bug/tint/914.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/bug/tint/914.wgsl.expected.ir.dxc.hlsl
@@ -50,8 +50,7 @@
}
if (v_2) {
uint index = (col + (row * uniforms[0u].z));
- uint v_3 = (0u + (uint(index) * 4u));
- resultMatrix.Store(v_3, asuint(value));
+ resultMatrix.Store((0u + (uint(index) * 4u)), asuint(value));
}
}
@@ -61,17 +60,17 @@
void main_inner(uint3 local_id, uint3 global_id, uint tint_local_index) {
{
- uint v_4 = 0u;
- v_4 = tint_local_index;
+ uint v_3 = 0u;
+ v_3 = tint_local_index;
while(true) {
- uint v_5 = v_4;
- if ((v_5 >= 4096u)) {
+ uint v_4 = v_3;
+ if ((v_4 >= 4096u)) {
break;
}
- mm_Asub[(v_5 / 64u)][(v_5 % 64u)] = 0.0f;
- mm_Bsub[(v_5 / 64u)][(v_5 % 64u)] = 0.0f;
+ mm_Asub[(v_4 / 64u)][(v_4 % 64u)] = 0.0f;
+ mm_Bsub[(v_4 / 64u)][(v_4 % 64u)] = 0.0f;
{
- v_4 = (v_5 + 256u);
+ v_3 = (v_4 + 256u);
}
continue;
}
@@ -92,8 +91,8 @@
} else {
break;
}
- uint v_6 = index;
- acc[v_6] = 0.0f;
+ uint v_5 = index;
+ acc[v_5] = 0.0f;
{
index = (index + 1u);
}
@@ -156,8 +155,8 @@
}
uint inputRow = (tileRowB + innerRow);
uint inputCol = (tileCol + innerCol);
- uint v_7 = innerCol;
- mm_Bsub[v_7][inputCol] = mm_readB(((t * 64u) + inputRow), (globalCol + innerCol));
+ uint v_6 = innerCol;
+ mm_Bsub[v_6][inputCol] = mm_readB(((t * 64u) + inputRow), (globalCol + innerCol));
{
innerCol = (innerCol + 1u);
}
@@ -185,10 +184,10 @@
} else {
break;
}
- uint v_8 = inner;
- uint v_9 = k;
- uint v_10 = (tileCol + inner);
- BCached[v_8] = mm_Bsub[v_9][v_10];
+ uint v_7 = inner;
+ uint v_8 = k;
+ uint v_9 = (tileCol + inner);
+ BCached[v_7] = mm_Bsub[v_8][v_9];
{
inner = (inner + 1u);
}
@@ -202,9 +201,9 @@
} else {
break;
}
- uint v_11 = (tileRow + innerRow);
- uint v_12 = k;
- ACached = mm_Asub[v_11][v_12];
+ uint v_10 = (tileRow + innerRow);
+ uint v_11 = k;
+ ACached = mm_Asub[v_10][v_11];
{
uint innerCol = 0u;
while(true) {
@@ -213,10 +212,10 @@
break;
}
uint index = ((innerRow * 4u) + innerCol);
- float v_13 = acc[index];
- float v_14 = ACached;
- uint v_15 = innerCol;
- acc[index] = (v_13 + (v_14 * BCached[v_15]));
+ float v_12 = acc[index];
+ float v_13 = ACached;
+ uint v_14 = innerCol;
+ acc[index] = (v_12 + (v_13 * BCached[v_14]));
{
innerCol = (innerCol + 1u);
}
diff --git a/test/tint/bug/tint/914.wgsl.expected.ir.fxc.hlsl b/test/tint/bug/tint/914.wgsl.expected.ir.fxc.hlsl
index 00878bc..f6e006c 100644
--- a/test/tint/bug/tint/914.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/bug/tint/914.wgsl.expected.ir.fxc.hlsl
@@ -50,8 +50,7 @@
}
if (v_2) {
uint index = (col + (row * uniforms[0u].z));
- uint v_3 = (0u + (uint(index) * 4u));
- resultMatrix.Store(v_3, asuint(value));
+ resultMatrix.Store((0u + (uint(index) * 4u)), asuint(value));
}
}
@@ -61,17 +60,17 @@
void main_inner(uint3 local_id, uint3 global_id, uint tint_local_index) {
{
- uint v_4 = 0u;
- v_4 = tint_local_index;
+ uint v_3 = 0u;
+ v_3 = tint_local_index;
while(true) {
- uint v_5 = v_4;
- if ((v_5 >= 4096u)) {
+ uint v_4 = v_3;
+ if ((v_4 >= 4096u)) {
break;
}
- mm_Asub[(v_5 / 64u)][(v_5 % 64u)] = 0.0f;
- mm_Bsub[(v_5 / 64u)][(v_5 % 64u)] = 0.0f;
+ mm_Asub[(v_4 / 64u)][(v_4 % 64u)] = 0.0f;
+ mm_Bsub[(v_4 / 64u)][(v_4 % 64u)] = 0.0f;
{
- v_4 = (v_5 + 256u);
+ v_3 = (v_4 + 256u);
}
continue;
}
@@ -92,8 +91,8 @@
} else {
break;
}
- uint v_6 = index;
- acc[v_6] = 0.0f;
+ uint v_5 = index;
+ acc[v_5] = 0.0f;
{
index = (index + 1u);
}
@@ -156,8 +155,8 @@
}
uint inputRow = (tileRowB + innerRow);
uint inputCol = (tileCol + innerCol);
- uint v_7 = innerCol;
- mm_Bsub[v_7][inputCol] = mm_readB(((t * 64u) + inputRow), (globalCol + innerCol));
+ uint v_6 = innerCol;
+ mm_Bsub[v_6][inputCol] = mm_readB(((t * 64u) + inputRow), (globalCol + innerCol));
{
innerCol = (innerCol + 1u);
}
@@ -185,10 +184,10 @@
} else {
break;
}
- uint v_8 = inner;
- uint v_9 = k;
- uint v_10 = (tileCol + inner);
- BCached[v_8] = mm_Bsub[v_9][v_10];
+ uint v_7 = inner;
+ uint v_8 = k;
+ uint v_9 = (tileCol + inner);
+ BCached[v_7] = mm_Bsub[v_8][v_9];
{
inner = (inner + 1u);
}
@@ -202,9 +201,9 @@
} else {
break;
}
- uint v_11 = (tileRow + innerRow);
- uint v_12 = k;
- ACached = mm_Asub[v_11][v_12];
+ uint v_10 = (tileRow + innerRow);
+ uint v_11 = k;
+ ACached = mm_Asub[v_10][v_11];
{
uint innerCol = 0u;
while(true) {
@@ -213,10 +212,10 @@
break;
}
uint index = ((innerRow * 4u) + innerCol);
- float v_13 = acc[index];
- float v_14 = ACached;
- uint v_15 = innerCol;
- acc[index] = (v_13 + (v_14 * BCached[v_15]));
+ float v_12 = acc[index];
+ float v_13 = ACached;
+ uint v_14 = innerCol;
+ acc[index] = (v_12 + (v_13 * BCached[v_14]));
{
innerCol = (innerCol + 1u);
}
diff --git a/test/tint/bug/tint/922.wgsl.expected.glsl b/test/tint/bug/tint/922.wgsl.expected.glsl
index 5833ed7..f89e5ed 100644
--- a/test/tint/bug/tint/922.wgsl.expected.glsl
+++ b/test/tint/bug/tint/922.wgsl.expected.glsl
@@ -78,10 +78,7 @@
vec4 x_e14 = v1;
Mat4x4_ x_e16 = m9;
vec4 x_e18 = v1;
- float v_4 = dot(x_e4.mx, x_e6);
- float v_5 = dot(x_e8.my, x_e10);
- float v_6 = dot(x_e12.mz, x_e14);
- return vec4(v_4, v_5, v_6, dot(x_e16.mw, x_e18));
+ return vec4(dot(x_e4.mx, x_e6), dot(x_e8.my, x_e10), dot(x_e12.mz, x_e14), dot(x_e16.mw, x_e18));
}
vec2 Mul2(Mat4x2_ m12, vec4 v4) {
Mat4x2_ m13 = Mat4x2_(vec4(0.0f), vec4(0.0f));
@@ -92,8 +89,7 @@
vec4 x_e6 = v5;
Mat4x2_ x_e8 = m13;
vec4 x_e10 = v5;
- float v_7 = dot(x_e4.mx, x_e6);
- return vec2(v_7, dot(x_e8.my, x_e10));
+ return vec2(dot(x_e4.mx, x_e6), dot(x_e8.my, x_e10));
}
Mat4x4_ x_Mat4x4_(float n) {
float n1 = 0.0f;
@@ -132,8 +128,8 @@
Mat4x3_ t_PosMtx = Mat4x3_(vec4(0.0f), vec4(0.0f), vec4(0.0f));
vec2 t_TexSpaceCoord = vec2(0.0f);
float x_e15 = a_PosMtxIdx1;
- int v_8 = tint_f32_to_i32(x_e15);
- Mat4x3_ x_e18 = v_3.inner.u_PosMtx[v_8];
+ int v_4 = tint_f32_to_i32(x_e15);
+ Mat4x3_ x_e18 = v_3.inner.u_PosMtx[v_4];
t_PosMtx = x_e18;
Mat4x3_ x_e23 = t_PosMtx;
Mat4x4_ x_e24 = x_Mat4x4_1(x_e23);
@@ -185,10 +181,10 @@
return VertexOutput(x_e11, x_e13, x_e15);
}
void main() {
- VertexOutput v_9 = tint_symbol_1_inner(tint_symbol_1_loc0_Input, tint_symbol_1_loc1_Input, tint_symbol_1_loc2_Input, tint_symbol_1_loc3_Input, tint_symbol_1_loc4_Input);
- tint_symbol_1_loc0_Output = v_9.v_Color;
- tint_symbol_1_loc1_Output = v_9.v_TexCoord;
- gl_Position = v_9.member;
+ VertexOutput v_5 = tint_symbol_1_inner(tint_symbol_1_loc0_Input, tint_symbol_1_loc1_Input, tint_symbol_1_loc2_Input, tint_symbol_1_loc3_Input, tint_symbol_1_loc4_Input);
+ tint_symbol_1_loc0_Output = v_5.v_Color;
+ tint_symbol_1_loc1_Output = v_5.v_TexCoord;
+ gl_Position = v_5.member;
gl_Position[1u] = -(gl_Position.y);
gl_Position[2u] = ((2.0f * gl_Position.z) - gl_Position.w);
gl_PointSize = 1.0f;
diff --git a/test/tint/bug/tint/922.wgsl.expected.ir.dxc.hlsl b/test/tint/bug/tint/922.wgsl.expected.ir.dxc.hlsl
index 6bc2a18..8c06533 100644
--- a/test/tint/bug/tint/922.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/bug/tint/922.wgsl.expected.ir.dxc.hlsl
@@ -103,10 +103,7 @@
float4 x_e14 = v1;
Mat4x4_ x_e16 = m9;
float4 x_e18 = v1;
- float v_1 = dot(x_e4.mx, x_e6);
- float v_2 = dot(x_e8.my, x_e10);
- float v_3 = dot(x_e12.mz, x_e14);
- return float4(v_1, v_2, v_3, dot(x_e16.mw, x_e18));
+ return float4(dot(x_e4.mx, x_e6), dot(x_e8.my, x_e10), dot(x_e12.mz, x_e14), dot(x_e16.mw, x_e18));
}
float3 Mul1(Mat4x3_ m10, float4 v2) {
@@ -120,9 +117,7 @@
float4 x_e10 = v3;
Mat4x3_ x_e12 = m11;
float4 x_e14 = v3;
- float v_4 = dot(x_e4.mx, x_e6);
- float v_5 = dot(x_e8.my, x_e10);
- return float3(v_4, v_5, dot(x_e12.mz, x_e14));
+ return float3(dot(x_e4.mx, x_e6), dot(x_e8.my, x_e10), dot(x_e12.mz, x_e14));
}
float2 Mul2(Mat4x2_ m12, float4 v4) {
@@ -134,8 +129,7 @@
float4 x_e6 = v5;
Mat4x2_ x_e8 = m13;
float4 x_e10 = v5;
- float v_6 = dot(x_e4.mx, x_e6);
- return float2(v_6, dot(x_e8.my, x_e10));
+ return float2(dot(x_e4.mx, x_e6), dot(x_e8.my, x_e10));
}
float4 Mul3(float3 v6, Mat4x3_ m14) {
@@ -155,10 +149,7 @@
Mat4x3_ x_e20 = m15;
float3 x_e21 = Mat4x3GetCol3_(x_e20);
float3 x_e22 = v7;
- float v_7 = dot(x_e6, x_e7);
- float v_8 = dot(x_e11, x_e12);
- float v_9 = dot(x_e16, x_e17);
- return float4(v_7, v_8, v_9, dot(x_e21, x_e22));
+ return float4(dot(x_e6, x_e7), dot(x_e11, x_e12), dot(x_e16, x_e17), dot(x_e21, x_e22));
}
Mat4x4_ x_Mat4x4_(float n) {
@@ -235,25 +226,19 @@
return x_e12;
}
-Mat4x2_ v_10(uint start_byte_offset) {
- float4 v_11 = asfloat(global1[(start_byte_offset / 16u)]);
- Mat4x2_ v_12 = {v_11, asfloat(global1[((16u + start_byte_offset) / 16u)])};
- return v_12;
+Mat4x2_ v_1(uint start_byte_offset) {
+ Mat4x2_ v_2 = {asfloat(global1[(start_byte_offset / 16u)]), asfloat(global1[((16u + start_byte_offset) / 16u)])};
+ return v_2;
}
-Mat4x4_ v_13(uint start_byte_offset) {
- float4 v_14 = asfloat(global[(start_byte_offset / 16u)]);
- float4 v_15 = asfloat(global[((16u + start_byte_offset) / 16u)]);
- float4 v_16 = asfloat(global[((32u + start_byte_offset) / 16u)]);
- Mat4x4_ v_17 = {v_14, v_15, v_16, asfloat(global[((48u + start_byte_offset) / 16u)])};
- return v_17;
+Mat4x4_ v_3(uint start_byte_offset) {
+ Mat4x4_ v_4 = {asfloat(global[(start_byte_offset / 16u)]), asfloat(global[((16u + start_byte_offset) / 16u)]), asfloat(global[((32u + start_byte_offset) / 16u)]), asfloat(global[((48u + start_byte_offset) / 16u)])};
+ return v_4;
}
-Mat4x3_ v_18(uint start_byte_offset) {
- float4 v_19 = asfloat(global2[(start_byte_offset / 16u)]);
- float4 v_20 = asfloat(global2[((16u + start_byte_offset) / 16u)]);
- Mat4x3_ v_21 = {v_19, v_20, asfloat(global2[((32u + start_byte_offset) / 16u)])};
- return v_21;
+Mat4x3_ v_5(uint start_byte_offset) {
+ Mat4x3_ v_6 = {asfloat(global2[(start_byte_offset / 16u)]), asfloat(global2[((16u + start_byte_offset) / 16u)]), asfloat(global2[((32u + start_byte_offset) / 16u)])};
+ return v_6;
}
int tint_f32_to_i32(float value) {
@@ -264,7 +249,7 @@
Mat4x3_ t_PosMtx = (Mat4x3_)0;
float2 t_TexSpaceCoord = (0.0f).xx;
float x_e15 = a_PosMtxIdx1;
- Mat4x3_ x_e18 = v_18((48u * uint(tint_f32_to_i32(x_e15))));
+ Mat4x3_ x_e18 = v_5((48u * uint(tint_f32_to_i32(x_e15))));
t_PosMtx = x_e18;
Mat4x3_ x_e23 = t_PosMtx;
Mat4x4_ x_e24 = x_Mat4x4_1(x_e23);
@@ -273,7 +258,7 @@
Mat4x4_ x_e30 = x_Mat4x4_1(x_e29);
float3 x_e31 = a_Position1;
float4 x_e34 = Mul(x_e30, float4(x_e31, 1.0f));
- Mat4x4_ x_e35 = v_13(0u);
+ Mat4x4_ x_e35 = v_3(0u);
Mat4x3_ x_e37 = t_PosMtx;
Mat4x4_ x_e38 = x_Mat4x4_1(x_e37);
float3 x_e39 = a_Position1;
@@ -288,14 +273,14 @@
float4 x_e52 = asfloat(global1[2u]);
if ((x_e52.x == 2.0f)) {
float3 x_e59 = a_Normal1;
- Mat4x2_ x_e64 = v_10(0u);
+ Mat4x2_ x_e64 = v_1(0u);
float3 x_e65 = a_Normal1;
float2 x_e68 = Mul2(x_e64, float4(x_e65, 1.0f));
v_TexCoord = x_e68.xy;
return;
} else {
float2 x_e73 = a_UV1;
- Mat4x2_ x_e79 = v_10(0u);
+ Mat4x2_ x_e79 = v_1(0u);
float2 x_e80 = a_UV1;
float2 x_e84 = Mul2(x_e79, float4(x_e80, 1.0f, 1.0f));
v_TexCoord = x_e84.xy;
@@ -314,13 +299,13 @@
float4 x_e11 = v_Color;
float2 x_e13 = v_TexCoord;
float4 x_e15 = gl_Position;
- VertexOutput v_22 = {x_e11, x_e13, x_e15};
- return v_22;
+ VertexOutput v_7 = {x_e11, x_e13, x_e15};
+ return v_7;
}
main_outputs main(main_inputs inputs) {
- VertexOutput v_23 = main_inner(inputs.a_Position, inputs.a_UV, inputs.a_Color, inputs.a_Normal, inputs.a_PosMtxIdx);
- main_outputs v_24 = {v_23.v_Color, v_23.v_TexCoord, v_23.member};
- return v_24;
+ VertexOutput v_8 = main_inner(inputs.a_Position, inputs.a_UV, inputs.a_Color, inputs.a_Normal, inputs.a_PosMtxIdx);
+ main_outputs v_9 = {v_8.v_Color, v_8.v_TexCoord, v_8.member};
+ return v_9;
}
diff --git a/test/tint/bug/tint/922.wgsl.expected.ir.fxc.hlsl b/test/tint/bug/tint/922.wgsl.expected.ir.fxc.hlsl
index 6bc2a18..8c06533 100644
--- a/test/tint/bug/tint/922.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/bug/tint/922.wgsl.expected.ir.fxc.hlsl
@@ -103,10 +103,7 @@
float4 x_e14 = v1;
Mat4x4_ x_e16 = m9;
float4 x_e18 = v1;
- float v_1 = dot(x_e4.mx, x_e6);
- float v_2 = dot(x_e8.my, x_e10);
- float v_3 = dot(x_e12.mz, x_e14);
- return float4(v_1, v_2, v_3, dot(x_e16.mw, x_e18));
+ return float4(dot(x_e4.mx, x_e6), dot(x_e8.my, x_e10), dot(x_e12.mz, x_e14), dot(x_e16.mw, x_e18));
}
float3 Mul1(Mat4x3_ m10, float4 v2) {
@@ -120,9 +117,7 @@
float4 x_e10 = v3;
Mat4x3_ x_e12 = m11;
float4 x_e14 = v3;
- float v_4 = dot(x_e4.mx, x_e6);
- float v_5 = dot(x_e8.my, x_e10);
- return float3(v_4, v_5, dot(x_e12.mz, x_e14));
+ return float3(dot(x_e4.mx, x_e6), dot(x_e8.my, x_e10), dot(x_e12.mz, x_e14));
}
float2 Mul2(Mat4x2_ m12, float4 v4) {
@@ -134,8 +129,7 @@
float4 x_e6 = v5;
Mat4x2_ x_e8 = m13;
float4 x_e10 = v5;
- float v_6 = dot(x_e4.mx, x_e6);
- return float2(v_6, dot(x_e8.my, x_e10));
+ return float2(dot(x_e4.mx, x_e6), dot(x_e8.my, x_e10));
}
float4 Mul3(float3 v6, Mat4x3_ m14) {
@@ -155,10 +149,7 @@
Mat4x3_ x_e20 = m15;
float3 x_e21 = Mat4x3GetCol3_(x_e20);
float3 x_e22 = v7;
- float v_7 = dot(x_e6, x_e7);
- float v_8 = dot(x_e11, x_e12);
- float v_9 = dot(x_e16, x_e17);
- return float4(v_7, v_8, v_9, dot(x_e21, x_e22));
+ return float4(dot(x_e6, x_e7), dot(x_e11, x_e12), dot(x_e16, x_e17), dot(x_e21, x_e22));
}
Mat4x4_ x_Mat4x4_(float n) {
@@ -235,25 +226,19 @@
return x_e12;
}
-Mat4x2_ v_10(uint start_byte_offset) {
- float4 v_11 = asfloat(global1[(start_byte_offset / 16u)]);
- Mat4x2_ v_12 = {v_11, asfloat(global1[((16u + start_byte_offset) / 16u)])};
- return v_12;
+Mat4x2_ v_1(uint start_byte_offset) {
+ Mat4x2_ v_2 = {asfloat(global1[(start_byte_offset / 16u)]), asfloat(global1[((16u + start_byte_offset) / 16u)])};
+ return v_2;
}
-Mat4x4_ v_13(uint start_byte_offset) {
- float4 v_14 = asfloat(global[(start_byte_offset / 16u)]);
- float4 v_15 = asfloat(global[((16u + start_byte_offset) / 16u)]);
- float4 v_16 = asfloat(global[((32u + start_byte_offset) / 16u)]);
- Mat4x4_ v_17 = {v_14, v_15, v_16, asfloat(global[((48u + start_byte_offset) / 16u)])};
- return v_17;
+Mat4x4_ v_3(uint start_byte_offset) {
+ Mat4x4_ v_4 = {asfloat(global[(start_byte_offset / 16u)]), asfloat(global[((16u + start_byte_offset) / 16u)]), asfloat(global[((32u + start_byte_offset) / 16u)]), asfloat(global[((48u + start_byte_offset) / 16u)])};
+ return v_4;
}
-Mat4x3_ v_18(uint start_byte_offset) {
- float4 v_19 = asfloat(global2[(start_byte_offset / 16u)]);
- float4 v_20 = asfloat(global2[((16u + start_byte_offset) / 16u)]);
- Mat4x3_ v_21 = {v_19, v_20, asfloat(global2[((32u + start_byte_offset) / 16u)])};
- return v_21;
+Mat4x3_ v_5(uint start_byte_offset) {
+ Mat4x3_ v_6 = {asfloat(global2[(start_byte_offset / 16u)]), asfloat(global2[((16u + start_byte_offset) / 16u)]), asfloat(global2[((32u + start_byte_offset) / 16u)])};
+ return v_6;
}
int tint_f32_to_i32(float value) {
@@ -264,7 +249,7 @@
Mat4x3_ t_PosMtx = (Mat4x3_)0;
float2 t_TexSpaceCoord = (0.0f).xx;
float x_e15 = a_PosMtxIdx1;
- Mat4x3_ x_e18 = v_18((48u * uint(tint_f32_to_i32(x_e15))));
+ Mat4x3_ x_e18 = v_5((48u * uint(tint_f32_to_i32(x_e15))));
t_PosMtx = x_e18;
Mat4x3_ x_e23 = t_PosMtx;
Mat4x4_ x_e24 = x_Mat4x4_1(x_e23);
@@ -273,7 +258,7 @@
Mat4x4_ x_e30 = x_Mat4x4_1(x_e29);
float3 x_e31 = a_Position1;
float4 x_e34 = Mul(x_e30, float4(x_e31, 1.0f));
- Mat4x4_ x_e35 = v_13(0u);
+ Mat4x4_ x_e35 = v_3(0u);
Mat4x3_ x_e37 = t_PosMtx;
Mat4x4_ x_e38 = x_Mat4x4_1(x_e37);
float3 x_e39 = a_Position1;
@@ -288,14 +273,14 @@
float4 x_e52 = asfloat(global1[2u]);
if ((x_e52.x == 2.0f)) {
float3 x_e59 = a_Normal1;
- Mat4x2_ x_e64 = v_10(0u);
+ Mat4x2_ x_e64 = v_1(0u);
float3 x_e65 = a_Normal1;
float2 x_e68 = Mul2(x_e64, float4(x_e65, 1.0f));
v_TexCoord = x_e68.xy;
return;
} else {
float2 x_e73 = a_UV1;
- Mat4x2_ x_e79 = v_10(0u);
+ Mat4x2_ x_e79 = v_1(0u);
float2 x_e80 = a_UV1;
float2 x_e84 = Mul2(x_e79, float4(x_e80, 1.0f, 1.0f));
v_TexCoord = x_e84.xy;
@@ -314,13 +299,13 @@
float4 x_e11 = v_Color;
float2 x_e13 = v_TexCoord;
float4 x_e15 = gl_Position;
- VertexOutput v_22 = {x_e11, x_e13, x_e15};
- return v_22;
+ VertexOutput v_7 = {x_e11, x_e13, x_e15};
+ return v_7;
}
main_outputs main(main_inputs inputs) {
- VertexOutput v_23 = main_inner(inputs.a_Position, inputs.a_UV, inputs.a_Color, inputs.a_Normal, inputs.a_PosMtxIdx);
- main_outputs v_24 = {v_23.v_Color, v_23.v_TexCoord, v_23.member};
- return v_24;
+ VertexOutput v_8 = main_inner(inputs.a_Position, inputs.a_UV, inputs.a_Color, inputs.a_Normal, inputs.a_PosMtxIdx);
+ main_outputs v_9 = {v_8.v_Color, v_8.v_TexCoord, v_8.member};
+ return v_9;
}
diff --git a/test/tint/bug/tint/922.wgsl.expected.ir.msl b/test/tint/bug/tint/922.wgsl.expected.ir.msl
index ab2f736..8e1b919 100644
--- a/test/tint/bug/tint/922.wgsl.expected.ir.msl
+++ b/test/tint/bug/tint/922.wgsl.expected.ir.msl
@@ -127,10 +127,7 @@
float4 const x_e14 = v1;
Mat4x4_ const x_e16 = m9;
float4 const x_e18 = v1;
- float const v_1 = dot(x_e4.mx, x_e6);
- float const v_2 = dot(x_e8.my, x_e10);
- float const v_3 = dot(x_e12.mz, x_e14);
- return float4(v_1, v_2, v_3, dot(x_e16.mw, x_e18));
+ return float4(dot(x_e4.mx, x_e6), dot(x_e8.my, x_e10), dot(x_e12.mz, x_e14), dot(x_e16.mw, x_e18));
}
float3 Mul1(Mat4x3_ m10, float4 v2) {
@@ -144,9 +141,7 @@
float4 const x_e10 = v3;
Mat4x3_ const x_e12 = m11;
float4 const x_e14 = v3;
- float const v_4 = dot(x_e4.mx, x_e6);
- float const v_5 = dot(x_e8.my, x_e10);
- return float3(v_4, v_5, dot(x_e12.mz, x_e14));
+ return float3(dot(x_e4.mx, x_e6), dot(x_e8.my, x_e10), dot(x_e12.mz, x_e14));
}
float2 Mul2(Mat4x2_ m12, float4 v4) {
@@ -158,8 +153,7 @@
float4 const x_e6 = v5;
Mat4x2_ const x_e8 = m13;
float4 const x_e10 = v5;
- float const v_6 = dot(x_e4.mx, x_e6);
- return float2(v_6, dot(x_e8.my, x_e10));
+ return float2(dot(x_e4.mx, x_e6), dot(x_e8.my, x_e10));
}
float4 Mul3(float3 v6, Mat4x3_ m14) {
@@ -179,10 +173,7 @@
Mat4x3_ const x_e20 = m15;
float3 const x_e21 = Mat4x3GetCol3_(x_e20);
float3 const x_e22 = v7;
- float const v_7 = dot(x_e6, x_e7);
- float const v_8 = dot(x_e11, x_e12);
- float const v_9 = dot(x_e16, x_e17);
- return float4(v_7, v_8, v_9, dot(x_e21, x_e22));
+ return float4(dot(x_e6, x_e7), dot(x_e11, x_e12), dot(x_e16, x_e17), dot(x_e21, x_e22));
}
Mat4x4_ x_Mat4x4_(float n) {
@@ -330,10 +321,10 @@
thread float2 v_TexCoord = 0.0f;
thread float4 gl_Position = 0.0f;
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.global=global, .global1=global1, .global2=global2, .a_Position1=(&a_Position1), .a_UV1=(&a_UV1), .a_Color1=(&a_Color1), .a_Normal1=(&a_Normal1), .a_PosMtxIdx1=(&a_PosMtxIdx1), .v_Color=(&v_Color), .v_TexCoord=(&v_TexCoord), .gl_Position=(&gl_Position)};
- VertexOutput const v_10 = tint_symbol_inner(inputs.a_Position, inputs.a_UV, inputs.a_Color, inputs.a_Normal, inputs.a_PosMtxIdx, tint_module_vars);
+ VertexOutput const v_1 = tint_symbol_inner(inputs.a_Position, inputs.a_UV, inputs.a_Color, inputs.a_Normal, inputs.a_PosMtxIdx, tint_module_vars);
tint_symbol_outputs tint_wrapper_result = {};
- tint_wrapper_result.VertexOutput_v_Color = v_10.v_Color;
- tint_wrapper_result.VertexOutput_v_TexCoord = v_10.v_TexCoord;
- tint_wrapper_result.VertexOutput_member = v_10.member;
+ tint_wrapper_result.VertexOutput_v_Color = v_1.v_Color;
+ tint_wrapper_result.VertexOutput_v_TexCoord = v_1.v_TexCoord;
+ tint_wrapper_result.VertexOutput_member = v_1.member;
return tint_wrapper_result;
}
diff --git a/test/tint/bug/tint/942.wgsl.expected.ir.msl b/test/tint/bug/tint/942.wgsl.expected.ir.msl
index 998db89..348fa9a 100644
--- a/test/tint/bug/tint/942.wgsl.expected.ir.msl
+++ b/test/tint/bug/tint/942.wgsl.expected.ir.msl
@@ -66,10 +66,9 @@
threadgroup_barrier(mem_flags::mem_threadgroup);
uint const filterOffset = tint_div_u32(((*tint_module_vars.params).filterDim - 1u), 2u);
uint const v_2 = uint(0);
- uint const v_3 = tint_module_vars.inputTex.get_width(v_2);
- uint2 const dims = uint2(v_3, tint_module_vars.inputTex.get_height(v_2));
- uint2 const v_4 = ((WorkGroupID.xy * uint2((*tint_module_vars.params).blockDim, 4u)) + (LocalInvocationID.xy * uint2(4u, 1u)));
- uint2 const baseIndex = (v_4 - uint2(filterOffset, 0u));
+ uint2 const dims = uint2(tint_module_vars.inputTex.get_width(v_2), tint_module_vars.inputTex.get_height(v_2));
+ uint2 const v_3 = ((WorkGroupID.xy * uint2((*tint_module_vars.params).blockDim, 4u)) + (LocalInvocationID.xy * uint2(4u, 1u)));
+ uint2 const baseIndex = (v_3 - uint2(filterOffset, 0u));
{
uint r = 0u;
while(true) {
@@ -90,10 +89,10 @@
if (((*tint_module_vars.flip).value != 0u)) {
loadIndex = loadIndex.yx;
}
- threadgroup packed_float3* const v_5 = (&(*tint_module_vars.tile)[r][((4u * LocalInvocationID[0u]) + c)].packed);
- float2 const v_6 = (float2(loadIndex) + float2(0.25f));
- float2 const v_7 = (v_6 / float2(dims));
- (*v_5) = packed_float3(tint_module_vars.inputTex.sample(tint_module_vars.samp, v_7, level(0.0f)).xyz);
+ threadgroup packed_float3* const v_4 = (&(*tint_module_vars.tile)[r][((4u * LocalInvocationID[0u]) + c)].packed);
+ float2 const v_5 = (float2(loadIndex) + float2(0.25f));
+ float2 const v_6 = (v_5 / float2(dims));
+ (*v_4) = packed_float3(tint_module_vars.inputTex.sample(tint_module_vars.samp, v_6, level(0.0f)).xyz);
{
c = (c + 1u);
}
@@ -128,19 +127,19 @@
writeIndex = writeIndex.yx;
}
uint const center = ((4u * LocalInvocationID[0u]) + c);
- bool v_8 = false;
+ bool v_7 = false;
if ((center >= filterOffset)) {
- v_8 = (center < (256u - filterOffset));
+ v_7 = (center < (256u - filterOffset));
+ } else {
+ v_7 = false;
+ }
+ bool v_8 = false;
+ if (v_7) {
+ v_8 = all((writeIndex < dims));
} else {
v_8 = false;
}
- bool v_9 = false;
if (v_8) {
- v_9 = all((writeIndex < dims));
- } else {
- v_9 = false;
- }
- if (v_9) {
float3 acc = float3(0.0f);
{
uint f = 0u;
@@ -151,17 +150,17 @@
break;
}
uint i = ((center + f) - filterOffset);
- float3 const v_10 = acc;
- float const v_11 = (1.0f / float((*tint_module_vars.params).filterDim));
- acc = (v_10 + (v_11 * float3((*tint_module_vars.tile)[r][i].packed)));
+ float3 const v_9 = acc;
+ float const v_10 = (1.0f / float((*tint_module_vars.params).filterDim));
+ acc = (v_9 + (v_10 * float3((*tint_module_vars.tile)[r][i].packed)));
{
f = (f + 1u);
}
continue;
}
}
- uint2 const v_12 = writeIndex;
- tint_module_vars.outputTex.write(float4(acc, 1.0f), v_12);
+ uint2 const v_11 = writeIndex;
+ tint_module_vars.outputTex.write(float4(acc, 1.0f), v_11);
}
{
c = (c + 1u);
@@ -177,7 +176,7 @@
}
}
-kernel void tint_symbol(uint3 WorkGroupID [[threadgroup_position_in_grid]], uint3 LocalInvocationID [[thread_position_in_threadgroup]], uint tint_local_index [[thread_index_in_threadgroup]], sampler samp [[sampler(0)]], const constant Params* params [[buffer(0)]], texture2d<float, access::sample> inputTex [[texture(0)]], texture2d<float, access::write> outputTex [[texture(1)]], const constant Flip* flip [[buffer(1)]], threadgroup tint_symbol_2* v_13 [[threadgroup(0)]]) {
- tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.samp=samp, .params=params, .inputTex=inputTex, .outputTex=outputTex, .flip=flip, .tile=(&(*v_13).tint_symbol_1)};
+kernel void tint_symbol(uint3 WorkGroupID [[threadgroup_position_in_grid]], uint3 LocalInvocationID [[thread_position_in_threadgroup]], uint tint_local_index [[thread_index_in_threadgroup]], sampler samp [[sampler(0)]], const constant Params* params [[buffer(0)]], texture2d<float, access::sample> inputTex [[texture(0)]], texture2d<float, access::write> outputTex [[texture(1)]], const constant Flip* flip [[buffer(1)]], threadgroup tint_symbol_2* v_12 [[threadgroup(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.samp=samp, .params=params, .inputTex=inputTex, .outputTex=outputTex, .flip=flip, .tile=(&(*v_12).tint_symbol_1)};
tint_symbol_inner(WorkGroupID, LocalInvocationID, tint_local_index, tint_module_vars);
}
diff --git a/test/tint/bug/tint/948.wgsl.expected.glsl b/test/tint/bug/tint/948.wgsl.expected.glsl
index 0ba58c7..b6c9dd3 100644
--- a/test/tint/bug/tint/948.wgsl.expected.glsl
+++ b/test/tint/bug/tint/948.wgsl.expected.glsl
@@ -52,17 +52,14 @@
float x_25 = v.inner.spriteCount;
fX = (x_15 / x_25);
float x_37 = fX;
- vec2 v_1 = vec2(x_37, 0.0f);
- vec4 x_40 = texture(frameMapTexture_frameMapSampler, v_1, clamp(0.0f, -16.0f, 15.9899997711181640625f));
+ vec4 x_40 = texture(frameMapTexture_frameMapSampler, vec2(x_37, 0.0f), clamp(0.0f, -16.0f, 15.9899997711181640625f));
float x_44 = fX;
- vec2 v_2 = vec2(x_44, 0.25f);
- vec4 x_47 = texture(frameMapTexture_frameMapSampler, v_2, clamp(0.0f, -16.0f, 15.9899997711181640625f));
+ vec4 x_47 = texture(frameMapTexture_frameMapSampler, vec2(x_44, 0.25f), clamp(0.0f, -16.0f, 15.9899997711181640625f));
float x_51 = fX;
- vec2 v_3 = vec2(x_51, 0.5f);
- vec4 x_54 = texture(frameMapTexture_frameMapSampler, v_3, clamp(0.0f, -16.0f, 15.9899997711181640625f));
- vec4 v_4 = vec4(x_40[0u], x_40[1u], x_40[2u], x_40[3u]);
- vec4 v_5 = vec4(x_47[0u], x_47[1u], x_47[2u], x_47[3u]);
- return mat4(v_4, v_5, vec4(x_54[0u], x_54[1u], x_54[2u], x_54[3u]), vec4(0.0f));
+ vec4 x_54 = texture(frameMapTexture_frameMapSampler, vec2(x_51, 0.5f), clamp(0.0f, -16.0f, 15.9899997711181640625f));
+ vec4 v_1 = vec4(x_40[0u], x_40[1u], x_40[2u], x_40[3u]);
+ vec4 v_2 = vec4(x_47[0u], x_47[1u], x_47[2u], x_47[3u]);
+ return mat4(v_1, v_2, vec4(x_54[0u], x_54[1u], x_54[2u], x_54[3u]), vec4(0.0f));
}
float tint_float_modulo(float x, float y) {
return (x - (y * trunc((x / y))));
@@ -132,8 +129,7 @@
}
float x_166 = frameID_1;
float x_169 = v.inner.spriteCount;
- vec2 v_6 = vec2(((x_166 + 0.5f) / x_169), 0.0f);
- vec4 x_172 = texture(animationMapTexture_animationMapSampler, v_6, clamp(0.0f, -16.0f, 15.9899997711181640625f));
+ vec4 x_172 = texture(animationMapTexture_animationMapSampler, vec2(((x_166 + 0.5f) / x_169), 0.0f), clamp(0.0f, -16.0f, 15.9899997711181640625f));
animationData = x_172;
float x_174 = animationData.y;
if ((x_174 > 0.0f)) {
@@ -180,8 +176,8 @@
offset_1 = (vec2(x_235[0u], x_235[1u]) * x_237);
vec4 x_241 = frameData[2];
vec4 x_244 = frameData[0];
- vec2 v_7 = vec2(x_241[0u], x_241[1u]);
- ratio = (v_7 / vec2(x_244[3u], x_244[2u]));
+ vec2 v_3 = vec2(x_241[0u], x_241[1u]);
+ ratio = (v_3 / vec2(x_244[3u], x_244[2u]));
float x_248 = frameData[2].z;
if ((x_248 == 1.0f)) {
vec2 x_252 = tileUV;
@@ -206,9 +202,9 @@
vec4 x_290 = color;
vec4 x_292 = nc;
float x_295 = nc.w;
- vec3 v_8 = vec3(x_290[0u], x_290[1u], x_290[2u]);
- vec3 v_9 = vec3(x_292[0u], x_292[1u], x_292[2u]);
- mixed = mix(v_8, v_9, vec3(x_295, x_295, x_295));
+ vec3 v_4 = vec3(x_290[0u], x_290[1u], x_290[2u]);
+ vec3 v_5 = vec3(x_292[0u], x_292[1u], x_292[2u]);
+ mixed = mix(v_4, v_5, vec3(x_295, x_295, x_295));
vec3 x_298 = mixed;
float x_299 = alpha;
color = vec4(x_298[0u], x_298[1u], x_298[2u], x_299);
diff --git a/test/tint/bug/tint/948.wgsl.expected.ir.dxc.hlsl b/test/tint/bug/tint/948.wgsl.expected.ir.dxc.hlsl
index 7cbc04c..a053f0b 100644
--- a/test/tint/bug/tint/948.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/bug/tint/948.wgsl.expected.ir.dxc.hlsl
@@ -42,17 +42,14 @@
float x_25 = asfloat(x_20[6u].w);
fX = (x_15 / x_25);
float x_37 = fX;
- float2 v = float2(x_37, 0.0f);
- float4 x_40 = frameMapTexture.SampleBias(frameMapSampler, v, clamp(0.0f, -16.0f, 15.9899997711181640625f));
+ float4 x_40 = frameMapTexture.SampleBias(frameMapSampler, float2(x_37, 0.0f), clamp(0.0f, -16.0f, 15.9899997711181640625f));
float x_44 = fX;
- float2 v_1 = float2(x_44, 0.25f);
- float4 x_47 = frameMapTexture.SampleBias(frameMapSampler, v_1, clamp(0.0f, -16.0f, 15.9899997711181640625f));
+ float4 x_47 = frameMapTexture.SampleBias(frameMapSampler, float2(x_44, 0.25f), clamp(0.0f, -16.0f, 15.9899997711181640625f));
float x_51 = fX;
- float2 v_2 = float2(x_51, 0.5f);
- float4 x_54 = frameMapTexture.SampleBias(frameMapSampler, v_2, clamp(0.0f, -16.0f, 15.9899997711181640625f));
- float4 v_3 = float4(x_40.x, x_40.y, x_40.z, x_40.w);
- float4 v_4 = float4(x_47.x, x_47.y, x_47.z, x_47.w);
- return float4x4(v_3, v_4, float4(x_54.x, x_54.y, x_54.z, x_54.w), (0.0f).xxxx);
+ float4 x_54 = frameMapTexture.SampleBias(frameMapSampler, float2(x_51, 0.5f), clamp(0.0f, -16.0f, 15.9899997711181640625f));
+ float4 v = float4(x_40.x, x_40.y, x_40.z, x_40.w);
+ float4 v_1 = float4(x_47.x, x_47.y, x_47.z, x_47.w);
+ return float4x4(v, v_1, float4(x_54.x, x_54.y, x_54.z, x_54.w), (0.0f).xxxx);
}
void main_1() {
@@ -120,16 +117,14 @@
}
float x_166 = frameID_1;
float x_169 = asfloat(x_20[6u].w);
- float2 v_5 = float2(((x_166 + 0.5f) / x_169), 0.0f);
- float4 x_172 = animationMapTexture.SampleBias(animationMapSampler, v_5, clamp(0.0f, -16.0f, 15.9899997711181640625f));
+ float4 x_172 = animationMapTexture.SampleBias(animationMapSampler, float2(((x_166 + 0.5f) / x_169), 0.0f), clamp(0.0f, -16.0f, 15.9899997711181640625f));
animationData = x_172;
float x_174 = animationData.y;
if ((x_174 > 0.0f)) {
float x_181 = asfloat(x_20[0u].x);
float x_184 = animationData.z;
- float v_6 = ((x_181 * x_184) / 1.0f);
- float v_7 = floor(v_6);
- mt = ((x_181 * x_184) - ((((v_6 < 0.0f)) ? (ceil(v_6)) : (v_7)) * 1.0f));
+ float v_2 = ((x_181 * x_184) / 1.0f);
+ mt = ((x_181 * x_184) - ((((v_2 < 0.0f)) ? (ceil(v_2)) : (floor(v_2))) * 1.0f));
f = 0.0f;
{
while(true) {
@@ -170,8 +165,8 @@
offset_1 = (float2(x_235.x, x_235.y) * x_237);
float4 x_241 = frameData[int(2)];
float4 x_244 = frameData[int(0)];
- float2 v_8 = float2(x_241.x, x_241.y);
- ratio = (v_8 / float2(x_244.w, x_244.z));
+ float2 v_3 = float2(x_241.x, x_241.y);
+ ratio = (v_3 / float2(x_244.w, x_244.z));
float x_248 = frameData[int(2)].z;
if ((x_248 == 1.0f)) {
float2 x_252 = tileUV;
@@ -196,9 +191,9 @@
float4 x_290 = color;
float4 x_292 = nc;
float x_295 = nc.w;
- float3 v_9 = float3(x_290.x, x_290.y, x_290.z);
- float3 v_10 = float3(x_292.x, x_292.y, x_292.z);
- mixed = lerp(v_9, v_10, float3(x_295, x_295, x_295));
+ float3 v_4 = float3(x_290.x, x_290.y, x_290.z);
+ float3 v_5 = float3(x_292.x, x_292.y, x_292.z);
+ mixed = lerp(v_4, v_5, float3(x_295, x_295, x_295));
float3 x_298 = mixed;
float x_299 = alpha;
color = float4(x_298.x, x_298.y, x_298.z, x_299);
@@ -227,13 +222,13 @@
vPosition = vPosition_param;
vUV = vUV_param;
main_1();
- main_out v_11 = {glFragColor};
- return v_11;
+ main_out v_6 = {glFragColor};
+ return v_6;
}
main_outputs main(main_inputs inputs) {
- main_out v_12 = main_inner(inputs.tUV_param, inputs.tileID_1_param, inputs.levelUnits_param, inputs.stageUnits_1_param, inputs.vPosition_param, inputs.vUV_param);
- main_outputs v_13 = {v_12.glFragColor_1};
- return v_13;
+ main_out v_7 = main_inner(inputs.tUV_param, inputs.tileID_1_param, inputs.levelUnits_param, inputs.stageUnits_1_param, inputs.vPosition_param, inputs.vUV_param);
+ main_outputs v_8 = {v_7.glFragColor_1};
+ return v_8;
}
diff --git a/test/tint/bug/tint/948.wgsl.expected.ir.fxc.hlsl b/test/tint/bug/tint/948.wgsl.expected.ir.fxc.hlsl
index 7cbc04c..a053f0b 100644
--- a/test/tint/bug/tint/948.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/bug/tint/948.wgsl.expected.ir.fxc.hlsl
@@ -42,17 +42,14 @@
float x_25 = asfloat(x_20[6u].w);
fX = (x_15 / x_25);
float x_37 = fX;
- float2 v = float2(x_37, 0.0f);
- float4 x_40 = frameMapTexture.SampleBias(frameMapSampler, v, clamp(0.0f, -16.0f, 15.9899997711181640625f));
+ float4 x_40 = frameMapTexture.SampleBias(frameMapSampler, float2(x_37, 0.0f), clamp(0.0f, -16.0f, 15.9899997711181640625f));
float x_44 = fX;
- float2 v_1 = float2(x_44, 0.25f);
- float4 x_47 = frameMapTexture.SampleBias(frameMapSampler, v_1, clamp(0.0f, -16.0f, 15.9899997711181640625f));
+ float4 x_47 = frameMapTexture.SampleBias(frameMapSampler, float2(x_44, 0.25f), clamp(0.0f, -16.0f, 15.9899997711181640625f));
float x_51 = fX;
- float2 v_2 = float2(x_51, 0.5f);
- float4 x_54 = frameMapTexture.SampleBias(frameMapSampler, v_2, clamp(0.0f, -16.0f, 15.9899997711181640625f));
- float4 v_3 = float4(x_40.x, x_40.y, x_40.z, x_40.w);
- float4 v_4 = float4(x_47.x, x_47.y, x_47.z, x_47.w);
- return float4x4(v_3, v_4, float4(x_54.x, x_54.y, x_54.z, x_54.w), (0.0f).xxxx);
+ float4 x_54 = frameMapTexture.SampleBias(frameMapSampler, float2(x_51, 0.5f), clamp(0.0f, -16.0f, 15.9899997711181640625f));
+ float4 v = float4(x_40.x, x_40.y, x_40.z, x_40.w);
+ float4 v_1 = float4(x_47.x, x_47.y, x_47.z, x_47.w);
+ return float4x4(v, v_1, float4(x_54.x, x_54.y, x_54.z, x_54.w), (0.0f).xxxx);
}
void main_1() {
@@ -120,16 +117,14 @@
}
float x_166 = frameID_1;
float x_169 = asfloat(x_20[6u].w);
- float2 v_5 = float2(((x_166 + 0.5f) / x_169), 0.0f);
- float4 x_172 = animationMapTexture.SampleBias(animationMapSampler, v_5, clamp(0.0f, -16.0f, 15.9899997711181640625f));
+ float4 x_172 = animationMapTexture.SampleBias(animationMapSampler, float2(((x_166 + 0.5f) / x_169), 0.0f), clamp(0.0f, -16.0f, 15.9899997711181640625f));
animationData = x_172;
float x_174 = animationData.y;
if ((x_174 > 0.0f)) {
float x_181 = asfloat(x_20[0u].x);
float x_184 = animationData.z;
- float v_6 = ((x_181 * x_184) / 1.0f);
- float v_7 = floor(v_6);
- mt = ((x_181 * x_184) - ((((v_6 < 0.0f)) ? (ceil(v_6)) : (v_7)) * 1.0f));
+ float v_2 = ((x_181 * x_184) / 1.0f);
+ mt = ((x_181 * x_184) - ((((v_2 < 0.0f)) ? (ceil(v_2)) : (floor(v_2))) * 1.0f));
f = 0.0f;
{
while(true) {
@@ -170,8 +165,8 @@
offset_1 = (float2(x_235.x, x_235.y) * x_237);
float4 x_241 = frameData[int(2)];
float4 x_244 = frameData[int(0)];
- float2 v_8 = float2(x_241.x, x_241.y);
- ratio = (v_8 / float2(x_244.w, x_244.z));
+ float2 v_3 = float2(x_241.x, x_241.y);
+ ratio = (v_3 / float2(x_244.w, x_244.z));
float x_248 = frameData[int(2)].z;
if ((x_248 == 1.0f)) {
float2 x_252 = tileUV;
@@ -196,9 +191,9 @@
float4 x_290 = color;
float4 x_292 = nc;
float x_295 = nc.w;
- float3 v_9 = float3(x_290.x, x_290.y, x_290.z);
- float3 v_10 = float3(x_292.x, x_292.y, x_292.z);
- mixed = lerp(v_9, v_10, float3(x_295, x_295, x_295));
+ float3 v_4 = float3(x_290.x, x_290.y, x_290.z);
+ float3 v_5 = float3(x_292.x, x_292.y, x_292.z);
+ mixed = lerp(v_4, v_5, float3(x_295, x_295, x_295));
float3 x_298 = mixed;
float x_299 = alpha;
color = float4(x_298.x, x_298.y, x_298.z, x_299);
@@ -227,13 +222,13 @@
vPosition = vPosition_param;
vUV = vUV_param;
main_1();
- main_out v_11 = {glFragColor};
- return v_11;
+ main_out v_6 = {glFragColor};
+ return v_6;
}
main_outputs main(main_inputs inputs) {
- main_out v_12 = main_inner(inputs.tUV_param, inputs.tileID_1_param, inputs.levelUnits_param, inputs.stageUnits_1_param, inputs.vPosition_param, inputs.vUV_param);
- main_outputs v_13 = {v_12.glFragColor_1};
- return v_13;
+ main_out v_7 = main_inner(inputs.tUV_param, inputs.tileID_1_param, inputs.levelUnits_param, inputs.stageUnits_1_param, inputs.vPosition_param, inputs.vUV_param);
+ main_outputs v_8 = {v_7.glFragColor_1};
+ return v_8;
}
diff --git a/test/tint/bug/tint/949.wgsl.expected.glsl b/test/tint/bug/tint/949.wgsl.expected.glsl
index 85167ba..38ede54 100644
--- a/test/tint/bug/tint/949.wgsl.expected.glsl
+++ b/test/tint/bug/tint/949.wgsl.expected.glsl
@@ -105,8 +105,7 @@
vec3 x_182 = tangent;
vec3 x_184 = bitangent;
vec3 x_185 = bitangent;
- float v_2 = dot(x_181, x_182);
- invmax = inversesqrt(max(v_2, dot(x_184, x_185)));
+ invmax = inversesqrt(max(dot(x_181, x_182), dot(x_184, x_185)));
vec3 x_189 = tangent;
float x_190 = invmax;
vec3 x_191 = (x_189 * x_190);
@@ -114,9 +113,9 @@
float x_193 = invmax;
vec3 x_194 = (x_192 * x_193);
vec3 x_195 = normal_1;
- vec3 v_3 = vec3(x_191[0u], x_191[1u], x_191[2u]);
- vec3 v_4 = vec3(x_194[0u], x_194[1u], x_194[2u]);
- return mat3(v_3, v_4, vec3(x_195[0u], x_195[1u], x_195[2u]));
+ vec3 v_2 = vec3(x_191[0u], x_191[1u], x_191[2u]);
+ vec3 v_3 = vec3(x_194[0u], x_194[1u], x_194[2u]);
+ return mat3(v_2, v_3, vec3(x_195[0u], x_195[1u], x_195[2u]));
}
mat3 transposeMat3_mf33_(inout mat3 inMatrix) {
vec3 i0 = vec3(0.0f);
@@ -141,9 +140,9 @@
float x_91 = i1.z;
float x_93 = i2.z;
vec3 x_94 = vec3(x_89, x_91, x_93);
- vec3 v_5 = vec3(x_78[0u], x_78[1u], x_78[2u]);
- vec3 v_6 = vec3(x_86[0u], x_86[1u], x_86[2u]);
- outMatrix = mat3(v_5, v_6, vec3(x_94[0u], x_94[1u], x_94[2u]));
+ vec3 v_4 = vec3(x_78[0u], x_78[1u], x_78[2u]);
+ vec3 v_5 = vec3(x_86[0u], x_86[1u], x_86[2u]);
+ outMatrix = mat3(v_4, v_5, vec3(x_94[0u], x_94[1u], x_94[2u]));
mat3 x_110 = outMatrix;
return x_110;
}
diff --git a/test/tint/bug/tint/949.wgsl.expected.ir.dxc.hlsl b/test/tint/bug/tint/949.wgsl.expected.ir.dxc.hlsl
index d6bfb00..250e00b 100644
--- a/test/tint/bug/tint/949.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/bug/tint/949.wgsl.expected.ir.dxc.hlsl
@@ -84,8 +84,7 @@
float3 x_182 = tangent;
float3 x_184 = bitangent;
float3 x_185 = bitangent;
- float v = dot(x_181, x_182);
- invmax = rsqrt(max(v, dot(x_184, x_185)));
+ invmax = rsqrt(max(dot(x_181, x_182), dot(x_184, x_185)));
float3 x_189 = tangent;
float x_190 = invmax;
float3 x_191 = (x_189 * x_190);
@@ -93,9 +92,9 @@
float x_193 = invmax;
float3 x_194 = (x_192 * x_193);
float3 x_195 = normal_1;
- float3 v_1 = float3(x_191.x, x_191.y, x_191.z);
- float3 v_2 = float3(x_194.x, x_194.y, x_194.z);
- return float3x3(v_1, v_2, float3(x_195.x, x_195.y, x_195.z));
+ float3 v = float3(x_191.x, x_191.y, x_191.z);
+ float3 v_1 = float3(x_194.x, x_194.y, x_194.z);
+ return float3x3(v, v_1, float3(x_195.x, x_195.y, x_195.z));
}
float3x3 transposeMat3_mf33_(inout float3x3 inMatrix) {
@@ -121,9 +120,9 @@
float x_91 = i1.z;
float x_93 = i2.z;
float3 x_94 = float3(x_89, x_91, x_93);
- float3 v_3 = float3(x_78.x, x_78.y, x_78.z);
- float3 v_4 = float3(x_86.x, x_86.y, x_86.z);
- outMatrix = float3x3(v_3, v_4, float3(x_94.x, x_94.y, x_94.z));
+ float3 v_2 = float3(x_78.x, x_78.y, x_78.z);
+ float3 v_3 = float3(x_86.x, x_86.y, x_86.z);
+ outMatrix = float3x3(v_2, v_3, float3(x_94.x, x_94.y, x_94.z));
float3x3 x_110 = outMatrix;
return x_110;
}
@@ -275,8 +274,7 @@
float3 x_334 = mul(-(x_332), x_331);
float3x3 x_337 = invTBN;
float3 x_338 = output5;
- float v_5 = length(float2(x_334.x, x_334.y));
- parallaxLimit = (v_5 / mul(-(x_338), x_337).z);
+ parallaxLimit = (length(float2(x_334.x, x_334.y)) / mul(-(x_338), x_337).z);
float x_345 = asfloat(x_269[9u].w);
float x_346 = parallaxLimit;
parallaxLimit = (x_346 * x_345);
@@ -291,8 +289,7 @@
float3 x_362 = output5;
float3x3 x_365 = invTBN;
float4 x_366 = v_output2;
- float3 v_6 = mul(-(x_362), x_361);
- numSamples = (15.0f + (dot(v_6, mul(float3(x_366.x, x_366.y, x_366.z), x_365)) * -11.0f));
+ numSamples = (15.0f + (dot(mul(-(x_362), x_361), mul(float3(x_366.x, x_366.y, x_366.z), x_365)) * -11.0f));
float x_374 = numSamples;
stepSize = (1.0f / x_374);
currRayHeight = 1.0f;
@@ -430,13 +427,13 @@
v_uv = v_uv_param;
v_output2 = v_output2_param;
main_1();
- main_out v_7 = {glFragColor};
- return v_7;
+ main_out v_4 = {glFragColor};
+ return v_4;
}
main_outputs main(main_inputs inputs) {
- main_out v_8 = main_inner(inputs.vMainuv_param, inputs.v_output1_param, inputs.gl_FrontFacing_param, inputs.v_uv_param, inputs.v_output2_param);
- main_outputs v_9 = {v_8.glFragColor_1};
- return v_9;
+ main_out v_5 = main_inner(inputs.vMainuv_param, inputs.v_output1_param, inputs.gl_FrontFacing_param, inputs.v_uv_param, inputs.v_output2_param);
+ main_outputs v_6 = {v_5.glFragColor_1};
+ return v_6;
}
diff --git a/test/tint/bug/tint/949.wgsl.expected.ir.fxc.hlsl b/test/tint/bug/tint/949.wgsl.expected.ir.fxc.hlsl
index d6bfb00..250e00b 100644
--- a/test/tint/bug/tint/949.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/bug/tint/949.wgsl.expected.ir.fxc.hlsl
@@ -84,8 +84,7 @@
float3 x_182 = tangent;
float3 x_184 = bitangent;
float3 x_185 = bitangent;
- float v = dot(x_181, x_182);
- invmax = rsqrt(max(v, dot(x_184, x_185)));
+ invmax = rsqrt(max(dot(x_181, x_182), dot(x_184, x_185)));
float3 x_189 = tangent;
float x_190 = invmax;
float3 x_191 = (x_189 * x_190);
@@ -93,9 +92,9 @@
float x_193 = invmax;
float3 x_194 = (x_192 * x_193);
float3 x_195 = normal_1;
- float3 v_1 = float3(x_191.x, x_191.y, x_191.z);
- float3 v_2 = float3(x_194.x, x_194.y, x_194.z);
- return float3x3(v_1, v_2, float3(x_195.x, x_195.y, x_195.z));
+ float3 v = float3(x_191.x, x_191.y, x_191.z);
+ float3 v_1 = float3(x_194.x, x_194.y, x_194.z);
+ return float3x3(v, v_1, float3(x_195.x, x_195.y, x_195.z));
}
float3x3 transposeMat3_mf33_(inout float3x3 inMatrix) {
@@ -121,9 +120,9 @@
float x_91 = i1.z;
float x_93 = i2.z;
float3 x_94 = float3(x_89, x_91, x_93);
- float3 v_3 = float3(x_78.x, x_78.y, x_78.z);
- float3 v_4 = float3(x_86.x, x_86.y, x_86.z);
- outMatrix = float3x3(v_3, v_4, float3(x_94.x, x_94.y, x_94.z));
+ float3 v_2 = float3(x_78.x, x_78.y, x_78.z);
+ float3 v_3 = float3(x_86.x, x_86.y, x_86.z);
+ outMatrix = float3x3(v_2, v_3, float3(x_94.x, x_94.y, x_94.z));
float3x3 x_110 = outMatrix;
return x_110;
}
@@ -275,8 +274,7 @@
float3 x_334 = mul(-(x_332), x_331);
float3x3 x_337 = invTBN;
float3 x_338 = output5;
- float v_5 = length(float2(x_334.x, x_334.y));
- parallaxLimit = (v_5 / mul(-(x_338), x_337).z);
+ parallaxLimit = (length(float2(x_334.x, x_334.y)) / mul(-(x_338), x_337).z);
float x_345 = asfloat(x_269[9u].w);
float x_346 = parallaxLimit;
parallaxLimit = (x_346 * x_345);
@@ -291,8 +289,7 @@
float3 x_362 = output5;
float3x3 x_365 = invTBN;
float4 x_366 = v_output2;
- float3 v_6 = mul(-(x_362), x_361);
- numSamples = (15.0f + (dot(v_6, mul(float3(x_366.x, x_366.y, x_366.z), x_365)) * -11.0f));
+ numSamples = (15.0f + (dot(mul(-(x_362), x_361), mul(float3(x_366.x, x_366.y, x_366.z), x_365)) * -11.0f));
float x_374 = numSamples;
stepSize = (1.0f / x_374);
currRayHeight = 1.0f;
@@ -430,13 +427,13 @@
v_uv = v_uv_param;
v_output2 = v_output2_param;
main_1();
- main_out v_7 = {glFragColor};
- return v_7;
+ main_out v_4 = {glFragColor};
+ return v_4;
}
main_outputs main(main_inputs inputs) {
- main_out v_8 = main_inner(inputs.vMainuv_param, inputs.v_output1_param, inputs.gl_FrontFacing_param, inputs.v_uv_param, inputs.v_output2_param);
- main_outputs v_9 = {v_8.glFragColor_1};
- return v_9;
+ main_out v_5 = main_inner(inputs.vMainuv_param, inputs.v_output1_param, inputs.gl_FrontFacing_param, inputs.v_uv_param, inputs.v_output2_param);
+ main_outputs v_6 = {v_5.glFragColor_1};
+ return v_6;
}
diff --git a/test/tint/bug/tint/949.wgsl.expected.ir.msl b/test/tint/bug/tint/949.wgsl.expected.ir.msl
index 10f6032..bfb0275 100644
--- a/test/tint/bug/tint/949.wgsl.expected.ir.msl
+++ b/test/tint/bug/tint/949.wgsl.expected.ir.msl
@@ -123,8 +123,7 @@
float3 const x_182 = tangent;
float3 const x_184 = bitangent;
float3 const x_185 = bitangent;
- float const v = dot(x_181, x_182);
- invmax = rsqrt(max(v, dot(x_184, x_185)));
+ invmax = rsqrt(max(dot(x_181, x_182), dot(x_184, x_185)));
float3 const x_189 = tangent;
float const x_190 = invmax;
float3 const x_191 = (x_189 * x_190);
@@ -132,9 +131,9 @@
float const x_193 = invmax;
float3 const x_194 = (x_192 * x_193);
float3 const x_195 = (*normal_1);
- float3 const v_1 = float3(x_191[0u], x_191[1u], x_191[2u]);
- float3 const v_2 = float3(x_194[0u], x_194[1u], x_194[2u]);
- return float3x3(v_1, v_2, float3(x_195[0u], x_195[1u], x_195[2u]));
+ float3 const v = float3(x_191[0u], x_191[1u], x_191[2u]);
+ float3 const v_1 = float3(x_194[0u], x_194[1u], x_194[2u]);
+ return float3x3(v, v_1, float3(x_195[0u], x_195[1u], x_195[2u]));
}
float3x3 transposeMat3_mf33_(thread float3x3* const inMatrix) {
@@ -160,9 +159,9 @@
float const x_91 = i1[2u];
float const x_93 = i2[2u];
float3 const x_94 = float3(x_89, x_91, x_93);
- float3 const v_3 = float3(x_78[0u], x_78[1u], x_78[2u]);
- float3 const v_4 = float3(x_86[0u], x_86[1u], x_86[2u]);
- outMatrix = float3x3(v_3, v_4, float3(x_94[0u], x_94[1u], x_94[2u]));
+ float3 const v_2 = float3(x_78[0u], x_78[1u], x_78[2u]);
+ float3 const v_3 = float3(x_86[0u], x_86[1u], x_86[2u]);
+ outMatrix = float3x3(v_2, v_3, float3(x_94[0u], x_94[1u], x_94[2u]));
float3x3 const x_110 = outMatrix;
return x_110;
}
diff --git a/test/tint/bug/tint/977.spvasm.expected.glsl b/test/tint/bug/tint/977.spvasm.expected.glsl
index 25b32c0..33a6a83 100644
--- a/test/tint/bug/tint/977.spvasm.expected.glsl
+++ b/test/tint/bug/tint/977.spvasm.expected.glsl
@@ -12,12 +12,9 @@
}
float x_21 = b;
if (!((round((x_21 - (2.0f * floor((x_21 / 2.0f))))) == 1.0f))) {
- float v = abs(a);
- x_26 = pow(v, b);
+ x_26 = pow(abs(a), b);
} else {
- float v_1 = sign(a);
- float v_2 = abs(a);
- x_26 = (v_1 * pow(v_2, b));
+ x_26 = (sign(a) * pow(abs(a), b));
}
float x_41 = x_26;
return x_41;
diff --git a/test/tint/bug/tint/977.spvasm.expected.ir.dxc.hlsl b/test/tint/bug/tint/977.spvasm.expected.ir.dxc.hlsl
index 6ceaa6c..815c7e4 100644
--- a/test/tint/bug/tint/977.spvasm.expected.ir.dxc.hlsl
+++ b/test/tint/bug/tint/977.spvasm.expected.ir.dxc.hlsl
@@ -17,12 +17,10 @@
}
float x_21 = b;
if (!((round((x_21 - (2.0f * floor((x_21 / 2.0f))))) == 1.0f))) {
- float v = abs(a);
- x_26 = pow(v, b);
+ x_26 = pow(abs(a), b);
} else {
- float v_1 = float(sign(a));
- float v_2 = abs(a);
- x_26 = (v_1 * pow(v_2, b));
+ float v = float(sign(a));
+ x_26 = (v * pow(abs(a), b));
}
float x_41 = x_26;
return x_41;
@@ -39,8 +37,7 @@
param = -4.0f;
param_1 = -3.0f;
float x_68 = binaryOperation_f1_f1_(param, param_1);
- uint v_3 = (0u + (uint(x_63) * 4u));
- resultMatrix.Store(v_3, asuint(x_68));
+ resultMatrix.Store((0u + (uint(x_63) * 4u)), asuint(x_68));
}
void main_inner(uint3 gl_GlobalInvocationID_param) {
diff --git a/test/tint/bug/tint/977.spvasm.expected.ir.fxc.hlsl b/test/tint/bug/tint/977.spvasm.expected.ir.fxc.hlsl
index 6ceaa6c..815c7e4 100644
--- a/test/tint/bug/tint/977.spvasm.expected.ir.fxc.hlsl
+++ b/test/tint/bug/tint/977.spvasm.expected.ir.fxc.hlsl
@@ -17,12 +17,10 @@
}
float x_21 = b;
if (!((round((x_21 - (2.0f * floor((x_21 / 2.0f))))) == 1.0f))) {
- float v = abs(a);
- x_26 = pow(v, b);
+ x_26 = pow(abs(a), b);
} else {
- float v_1 = float(sign(a));
- float v_2 = abs(a);
- x_26 = (v_1 * pow(v_2, b));
+ float v = float(sign(a));
+ x_26 = (v * pow(abs(a), b));
}
float x_41 = x_26;
return x_41;
@@ -39,8 +37,7 @@
param = -4.0f;
param_1 = -3.0f;
float x_68 = binaryOperation_f1_f1_(param, param_1);
- uint v_3 = (0u + (uint(x_63) * 4u));
- resultMatrix.Store(v_3, asuint(x_68));
+ resultMatrix.Store((0u + (uint(x_63) * 4u)), asuint(x_68));
}
void main_inner(uint3 gl_GlobalInvocationID_param) {
diff --git a/test/tint/bug/tint/977.spvasm.expected.ir.msl b/test/tint/bug/tint/977.spvasm.expected.ir.msl
index b5381ce..cf6dd98 100644
--- a/test/tint/bug/tint/977.spvasm.expected.ir.msl
+++ b/test/tint/bug/tint/977.spvasm.expected.ir.msl
@@ -46,12 +46,9 @@
}
float const x_21 = (*b);
if (!((rint((x_21 - (2.0f * floor((x_21 / 2.0f))))) == 1.0f))) {
- float const v = abs((*a));
- x_26 = powr(v, (*b));
+ x_26 = powr(abs((*a)), (*b));
} else {
- float const v_1 = sign((*a));
- float const v_2 = abs((*a));
- x_26 = (v_1 * powr(v_2, (*b)));
+ x_26 = (sign((*a)) * powr(abs((*a)), (*b)));
}
float const x_41 = x_26;
return x_41;
diff --git a/test/tint/bug/tint/980.wgsl.expected.ir.dxc.hlsl b/test/tint/bug/tint/980.wgsl.expected.ir.dxc.hlsl
index 0c22216..a4c4706 100644
--- a/test/tint/bug/tint/980.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/bug/tint/980.wgsl.expected.ir.dxc.hlsl
@@ -11,8 +11,7 @@
}
void main_inner(uint idx) {
- uint v_1 = io.Load(12u);
- io.Store3(0u, asuint(Bad(v_1, asfloat(io.Load3(0u)))));
+ io.Store3(0u, asuint(Bad(io.Load(12u), asfloat(io.Load3(0u)))));
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/bug/tint/980.wgsl.expected.ir.fxc.hlsl b/test/tint/bug/tint/980.wgsl.expected.ir.fxc.hlsl
index e5d0c5d..85f7ef2 100644
--- a/test/tint/bug/tint/980.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/bug/tint/980.wgsl.expected.ir.fxc.hlsl
@@ -13,8 +13,7 @@
}
void main_inner(uint idx) {
- uint v_3 = io.Load(12u);
- io.Store3(0u, asuint(Bad(v_3, asfloat(io.Load3(0u)))));
+ io.Store3(0u, asuint(Bad(io.Load(12u), asfloat(io.Load3(0u)))));
}
[numthreads(1, 1, 1)]
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) {
diff --git a/test/tint/expressions/binary/div/scalar-vec3/i32.wgsl.expected.glsl b/test/tint/expressions/binary/div/scalar-vec3/i32.wgsl.expected.glsl
index d0e4b40..5a3b068 100644
--- a/test/tint/expressions/binary/div/scalar-vec3/i32.wgsl.expected.glsl
+++ b/test/tint/expressions/binary/div/scalar-vec3/i32.wgsl.expected.glsl
@@ -1,13 +1,10 @@
#version 310 es
ivec3 tint_div_v3i32(ivec3 lhs, ivec3 rhs) {
- bvec3 v = equal(rhs, ivec3(0));
- bvec3 v_1 = equal(lhs, ivec3((-2147483647 - 1)));
- bvec3 v_2 = equal(rhs, ivec3(-1));
- uvec3 v_3 = uvec3(v_1);
- bvec3 v_4 = bvec3((v_3 & uvec3(v_2)));
- uvec3 v_5 = uvec3(v);
- return (lhs / mix(rhs, ivec3(1), bvec3((v_5 | uvec3(v_4)))));
+ uvec3 v = uvec3(equal(lhs, ivec3((-2147483647 - 1))));
+ bvec3 v_1 = bvec3((v & uvec3(equal(rhs, ivec3(-1)))));
+ uvec3 v_2 = uvec3(equal(rhs, ivec3(0)));
+ return (lhs / mix(rhs, ivec3(1), bvec3((v_2 | uvec3(v_1)))));
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
diff --git a/test/tint/expressions/binary/div/vec3-scalar/i32.wgsl.expected.glsl b/test/tint/expressions/binary/div/vec3-scalar/i32.wgsl.expected.glsl
index 9e76e23..74fe4b9 100644
--- a/test/tint/expressions/binary/div/vec3-scalar/i32.wgsl.expected.glsl
+++ b/test/tint/expressions/binary/div/vec3-scalar/i32.wgsl.expected.glsl
@@ -1,13 +1,10 @@
#version 310 es
ivec3 tint_div_v3i32(ivec3 lhs, ivec3 rhs) {
- bvec3 v = equal(rhs, ivec3(0));
- bvec3 v_1 = equal(lhs, ivec3((-2147483647 - 1)));
- bvec3 v_2 = equal(rhs, ivec3(-1));
- uvec3 v_3 = uvec3(v_1);
- bvec3 v_4 = bvec3((v_3 & uvec3(v_2)));
- uvec3 v_5 = uvec3(v);
- return (lhs / mix(rhs, ivec3(1), bvec3((v_5 | uvec3(v_4)))));
+ uvec3 v = uvec3(equal(lhs, ivec3((-2147483647 - 1))));
+ bvec3 v_1 = bvec3((v & uvec3(equal(rhs, ivec3(-1)))));
+ uvec3 v_2 = uvec3(equal(rhs, ivec3(0)));
+ return (lhs / mix(rhs, ivec3(1), bvec3((v_2 | uvec3(v_1)))));
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
diff --git a/test/tint/expressions/binary/div/vec3-vec3/i32.wgsl.expected.glsl b/test/tint/expressions/binary/div/vec3-vec3/i32.wgsl.expected.glsl
index ffa17bd..5c69146 100644
--- a/test/tint/expressions/binary/div/vec3-vec3/i32.wgsl.expected.glsl
+++ b/test/tint/expressions/binary/div/vec3-vec3/i32.wgsl.expected.glsl
@@ -1,13 +1,10 @@
#version 310 es
ivec3 tint_div_v3i32(ivec3 lhs, ivec3 rhs) {
- bvec3 v = equal(rhs, ivec3(0));
- bvec3 v_1 = equal(lhs, ivec3((-2147483647 - 1)));
- bvec3 v_2 = equal(rhs, ivec3(-1));
- uvec3 v_3 = uvec3(v_1);
- bvec3 v_4 = bvec3((v_3 & uvec3(v_2)));
- uvec3 v_5 = uvec3(v);
- return (lhs / mix(rhs, ivec3(1), bvec3((v_5 | uvec3(v_4)))));
+ uvec3 v = uvec3(equal(lhs, ivec3((-2147483647 - 1))));
+ bvec3 v_1 = bvec3((v & uvec3(equal(rhs, ivec3(-1)))));
+ uvec3 v_2 = uvec3(equal(rhs, ivec3(0)));
+ return (lhs / mix(rhs, ivec3(1), bvec3((v_2 | uvec3(v_1)))));
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
diff --git a/test/tint/expressions/binary/div_by_zero/by_constant/scalar-vec3/i32.wgsl.expected.glsl b/test/tint/expressions/binary/div_by_zero/by_constant/scalar-vec3/i32.wgsl.expected.glsl
index 9396632..d3eb8bc 100644
--- a/test/tint/expressions/binary/div_by_zero/by_constant/scalar-vec3/i32.wgsl.expected.glsl
+++ b/test/tint/expressions/binary/div_by_zero/by_constant/scalar-vec3/i32.wgsl.expected.glsl
@@ -1,13 +1,10 @@
#version 310 es
ivec3 tint_div_v3i32(ivec3 lhs, ivec3 rhs) {
- bvec3 v = equal(rhs, ivec3(0));
- bvec3 v_1 = equal(lhs, ivec3((-2147483647 - 1)));
- bvec3 v_2 = equal(rhs, ivec3(-1));
- uvec3 v_3 = uvec3(v_1);
- bvec3 v_4 = bvec3((v_3 & uvec3(v_2)));
- uvec3 v_5 = uvec3(v);
- return (lhs / mix(rhs, ivec3(1), bvec3((v_5 | uvec3(v_4)))));
+ uvec3 v = uvec3(equal(lhs, ivec3((-2147483647 - 1))));
+ bvec3 v_1 = bvec3((v & uvec3(equal(rhs, ivec3(-1)))));
+ uvec3 v_2 = uvec3(equal(rhs, ivec3(0)));
+ return (lhs / mix(rhs, ivec3(1), bvec3((v_2 | uvec3(v_1)))));
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
diff --git a/test/tint/expressions/binary/div_by_zero/by_constant/vec3-scalar/i32.wgsl.expected.glsl b/test/tint/expressions/binary/div_by_zero/by_constant/vec3-scalar/i32.wgsl.expected.glsl
index 6254c79..e4d6340 100644
--- a/test/tint/expressions/binary/div_by_zero/by_constant/vec3-scalar/i32.wgsl.expected.glsl
+++ b/test/tint/expressions/binary/div_by_zero/by_constant/vec3-scalar/i32.wgsl.expected.glsl
@@ -1,13 +1,10 @@
#version 310 es
ivec3 tint_div_v3i32(ivec3 lhs, ivec3 rhs) {
- bvec3 v = equal(rhs, ivec3(0));
- bvec3 v_1 = equal(lhs, ivec3((-2147483647 - 1)));
- bvec3 v_2 = equal(rhs, ivec3(-1));
- uvec3 v_3 = uvec3(v_1);
- bvec3 v_4 = bvec3((v_3 & uvec3(v_2)));
- uvec3 v_5 = uvec3(v);
- return (lhs / mix(rhs, ivec3(1), bvec3((v_5 | uvec3(v_4)))));
+ uvec3 v = uvec3(equal(lhs, ivec3((-2147483647 - 1))));
+ bvec3 v_1 = bvec3((v & uvec3(equal(rhs, ivec3(-1)))));
+ uvec3 v_2 = uvec3(equal(rhs, ivec3(0)));
+ return (lhs / mix(rhs, ivec3(1), bvec3((v_2 | uvec3(v_1)))));
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
diff --git a/test/tint/expressions/binary/div_by_zero/by_constant/vec3-vec3/i32.wgsl.expected.glsl b/test/tint/expressions/binary/div_by_zero/by_constant/vec3-vec3/i32.wgsl.expected.glsl
index c2f75b1..dc25051 100644
--- a/test/tint/expressions/binary/div_by_zero/by_constant/vec3-vec3/i32.wgsl.expected.glsl
+++ b/test/tint/expressions/binary/div_by_zero/by_constant/vec3-vec3/i32.wgsl.expected.glsl
@@ -1,13 +1,10 @@
#version 310 es
ivec3 tint_div_v3i32(ivec3 lhs, ivec3 rhs) {
- bvec3 v = equal(rhs, ivec3(0));
- bvec3 v_1 = equal(lhs, ivec3((-2147483647 - 1)));
- bvec3 v_2 = equal(rhs, ivec3(-1));
- uvec3 v_3 = uvec3(v_1);
- bvec3 v_4 = bvec3((v_3 & uvec3(v_2)));
- uvec3 v_5 = uvec3(v);
- return (lhs / mix(rhs, ivec3(1), bvec3((v_5 | uvec3(v_4)))));
+ uvec3 v = uvec3(equal(lhs, ivec3((-2147483647 - 1))));
+ bvec3 v_1 = bvec3((v & uvec3(equal(rhs, ivec3(-1)))));
+ uvec3 v_2 = uvec3(equal(rhs, ivec3(0)));
+ return (lhs / mix(rhs, ivec3(1), bvec3((v_2 | uvec3(v_1)))));
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
diff --git a/test/tint/expressions/binary/div_by_zero/by_expression/scalar-vec3/i32.wgsl.expected.glsl b/test/tint/expressions/binary/div_by_zero/by_expression/scalar-vec3/i32.wgsl.expected.glsl
index 2f64a9a..545b393 100644
--- a/test/tint/expressions/binary/div_by_zero/by_expression/scalar-vec3/i32.wgsl.expected.glsl
+++ b/test/tint/expressions/binary/div_by_zero/by_expression/scalar-vec3/i32.wgsl.expected.glsl
@@ -1,18 +1,15 @@
#version 310 es
ivec3 tint_div_v3i32(ivec3 lhs, ivec3 rhs) {
- bvec3 v = equal(rhs, ivec3(0));
- bvec3 v_1 = equal(lhs, ivec3((-2147483647 - 1)));
- bvec3 v_2 = equal(rhs, ivec3(-1));
- uvec3 v_3 = uvec3(v_1);
- bvec3 v_4 = bvec3((v_3 & uvec3(v_2)));
- uvec3 v_5 = uvec3(v);
- return (lhs / mix(rhs, ivec3(1), bvec3((v_5 | uvec3(v_4)))));
+ uvec3 v = uvec3(equal(lhs, ivec3((-2147483647 - 1))));
+ bvec3 v_1 = bvec3((v & uvec3(equal(rhs, ivec3(-1)))));
+ uvec3 v_2 = uvec3(equal(rhs, ivec3(0)));
+ return (lhs / mix(rhs, ivec3(1), bvec3((v_2 | uvec3(v_1)))));
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
int a = 4;
ivec3 b = ivec3(0, 2, 0);
- ivec3 v_6 = (b + b);
- ivec3 r = tint_div_v3i32(ivec3(a), v_6);
+ ivec3 v_3 = (b + b);
+ ivec3 r = tint_div_v3i32(ivec3(a), v_3);
}
diff --git a/test/tint/expressions/binary/div_by_zero/by_expression/vec3-scalar/i32.wgsl.expected.glsl b/test/tint/expressions/binary/div_by_zero/by_expression/vec3-scalar/i32.wgsl.expected.glsl
index 8f2b359..4bb5cc0 100644
--- a/test/tint/expressions/binary/div_by_zero/by_expression/vec3-scalar/i32.wgsl.expected.glsl
+++ b/test/tint/expressions/binary/div_by_zero/by_expression/vec3-scalar/i32.wgsl.expected.glsl
@@ -1,18 +1,15 @@
#version 310 es
ivec3 tint_div_v3i32(ivec3 lhs, ivec3 rhs) {
- bvec3 v = equal(rhs, ivec3(0));
- bvec3 v_1 = equal(lhs, ivec3((-2147483647 - 1)));
- bvec3 v_2 = equal(rhs, ivec3(-1));
- uvec3 v_3 = uvec3(v_1);
- bvec3 v_4 = bvec3((v_3 & uvec3(v_2)));
- uvec3 v_5 = uvec3(v);
- return (lhs / mix(rhs, ivec3(1), bvec3((v_5 | uvec3(v_4)))));
+ uvec3 v = uvec3(equal(lhs, ivec3((-2147483647 - 1))));
+ bvec3 v_1 = bvec3((v & uvec3(equal(rhs, ivec3(-1)))));
+ uvec3 v_2 = uvec3(equal(rhs, ivec3(0)));
+ return (lhs / mix(rhs, ivec3(1), bvec3((v_2 | uvec3(v_1)))));
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
ivec3 a = ivec3(1, 2, 3);
int b = 0;
- ivec3 v_6 = a;
- ivec3 r = tint_div_v3i32(v_6, ivec3((b + b)));
+ ivec3 v_3 = a;
+ ivec3 r = tint_div_v3i32(v_3, ivec3((b + b)));
}
diff --git a/test/tint/expressions/binary/div_by_zero/by_expression/vec3-vec3/i32.wgsl.expected.glsl b/test/tint/expressions/binary/div_by_zero/by_expression/vec3-vec3/i32.wgsl.expected.glsl
index 32fa59e..50c8c1d 100644
--- a/test/tint/expressions/binary/div_by_zero/by_expression/vec3-vec3/i32.wgsl.expected.glsl
+++ b/test/tint/expressions/binary/div_by_zero/by_expression/vec3-vec3/i32.wgsl.expected.glsl
@@ -1,13 +1,10 @@
#version 310 es
ivec3 tint_div_v3i32(ivec3 lhs, ivec3 rhs) {
- bvec3 v = equal(rhs, ivec3(0));
- bvec3 v_1 = equal(lhs, ivec3((-2147483647 - 1)));
- bvec3 v_2 = equal(rhs, ivec3(-1));
- uvec3 v_3 = uvec3(v_1);
- bvec3 v_4 = bvec3((v_3 & uvec3(v_2)));
- uvec3 v_5 = uvec3(v);
- return (lhs / mix(rhs, ivec3(1), bvec3((v_5 | uvec3(v_4)))));
+ uvec3 v = uvec3(equal(lhs, ivec3((-2147483647 - 1))));
+ bvec3 v_1 = bvec3((v & uvec3(equal(rhs, ivec3(-1)))));
+ uvec3 v_2 = uvec3(equal(rhs, ivec3(0)));
+ return (lhs / mix(rhs, ivec3(1), bvec3((v_2 | uvec3(v_1)))));
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
diff --git a/test/tint/expressions/binary/div_by_zero/by_identifier/scalar-vec3/i32.wgsl.expected.glsl b/test/tint/expressions/binary/div_by_zero/by_identifier/scalar-vec3/i32.wgsl.expected.glsl
index fb95fe6..c8e04a8 100644
--- a/test/tint/expressions/binary/div_by_zero/by_identifier/scalar-vec3/i32.wgsl.expected.glsl
+++ b/test/tint/expressions/binary/div_by_zero/by_identifier/scalar-vec3/i32.wgsl.expected.glsl
@@ -1,18 +1,15 @@
#version 310 es
ivec3 tint_div_v3i32(ivec3 lhs, ivec3 rhs) {
- bvec3 v = equal(rhs, ivec3(0));
- bvec3 v_1 = equal(lhs, ivec3((-2147483647 - 1)));
- bvec3 v_2 = equal(rhs, ivec3(-1));
- uvec3 v_3 = uvec3(v_1);
- bvec3 v_4 = bvec3((v_3 & uvec3(v_2)));
- uvec3 v_5 = uvec3(v);
- return (lhs / mix(rhs, ivec3(1), bvec3((v_5 | uvec3(v_4)))));
+ uvec3 v = uvec3(equal(lhs, ivec3((-2147483647 - 1))));
+ bvec3 v_1 = bvec3((v & uvec3(equal(rhs, ivec3(-1)))));
+ uvec3 v_2 = uvec3(equal(rhs, ivec3(0)));
+ return (lhs / mix(rhs, ivec3(1), bvec3((v_2 | uvec3(v_1)))));
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
int a = 4;
ivec3 b = ivec3(0, 2, 0);
- ivec3 v_6 = b;
- ivec3 r = tint_div_v3i32(ivec3(a), v_6);
+ ivec3 v_3 = b;
+ ivec3 r = tint_div_v3i32(ivec3(a), v_3);
}
diff --git a/test/tint/expressions/binary/div_by_zero/by_identifier/vec3-scalar/i32.wgsl.expected.glsl b/test/tint/expressions/binary/div_by_zero/by_identifier/vec3-scalar/i32.wgsl.expected.glsl
index 73bbb0b..a7bc346 100644
--- a/test/tint/expressions/binary/div_by_zero/by_identifier/vec3-scalar/i32.wgsl.expected.glsl
+++ b/test/tint/expressions/binary/div_by_zero/by_identifier/vec3-scalar/i32.wgsl.expected.glsl
@@ -1,18 +1,15 @@
#version 310 es
ivec3 tint_div_v3i32(ivec3 lhs, ivec3 rhs) {
- bvec3 v = equal(rhs, ivec3(0));
- bvec3 v_1 = equal(lhs, ivec3((-2147483647 - 1)));
- bvec3 v_2 = equal(rhs, ivec3(-1));
- uvec3 v_3 = uvec3(v_1);
- bvec3 v_4 = bvec3((v_3 & uvec3(v_2)));
- uvec3 v_5 = uvec3(v);
- return (lhs / mix(rhs, ivec3(1), bvec3((v_5 | uvec3(v_4)))));
+ uvec3 v = uvec3(equal(lhs, ivec3((-2147483647 - 1))));
+ bvec3 v_1 = bvec3((v & uvec3(equal(rhs, ivec3(-1)))));
+ uvec3 v_2 = uvec3(equal(rhs, ivec3(0)));
+ return (lhs / mix(rhs, ivec3(1), bvec3((v_2 | uvec3(v_1)))));
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
ivec3 a = ivec3(1, 2, 3);
int b = 0;
- ivec3 v_6 = a;
- ivec3 r = tint_div_v3i32(v_6, ivec3(b));
+ ivec3 v_3 = a;
+ ivec3 r = tint_div_v3i32(v_3, ivec3(b));
}
diff --git a/test/tint/expressions/binary/div_by_zero/by_identifier/vec3-vec3/i32.wgsl.expected.glsl b/test/tint/expressions/binary/div_by_zero/by_identifier/vec3-vec3/i32.wgsl.expected.glsl
index c2f75b1..dc25051 100644
--- a/test/tint/expressions/binary/div_by_zero/by_identifier/vec3-vec3/i32.wgsl.expected.glsl
+++ b/test/tint/expressions/binary/div_by_zero/by_identifier/vec3-vec3/i32.wgsl.expected.glsl
@@ -1,13 +1,10 @@
#version 310 es
ivec3 tint_div_v3i32(ivec3 lhs, ivec3 rhs) {
- bvec3 v = equal(rhs, ivec3(0));
- bvec3 v_1 = equal(lhs, ivec3((-2147483647 - 1)));
- bvec3 v_2 = equal(rhs, ivec3(-1));
- uvec3 v_3 = uvec3(v_1);
- bvec3 v_4 = bvec3((v_3 & uvec3(v_2)));
- uvec3 v_5 = uvec3(v);
- return (lhs / mix(rhs, ivec3(1), bvec3((v_5 | uvec3(v_4)))));
+ uvec3 v = uvec3(equal(lhs, ivec3((-2147483647 - 1))));
+ bvec3 v_1 = bvec3((v & uvec3(equal(rhs, ivec3(-1)))));
+ uvec3 v_2 = uvec3(equal(rhs, ivec3(0)));
+ return (lhs / mix(rhs, ivec3(1), bvec3((v_2 | uvec3(v_1)))));
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
diff --git a/test/tint/expressions/binary/mod/scalar-scalar/f16.wgsl.expected.ir.dxc.hlsl b/test/tint/expressions/binary/mod/scalar-scalar/f16.wgsl.expected.ir.dxc.hlsl
index bc69276..0375cc8 100644
--- a/test/tint/expressions/binary/mod/scalar-scalar/f16.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/expressions/binary/mod/scalar-scalar/f16.wgsl.expected.ir.dxc.hlsl
@@ -4,7 +4,6 @@
float16_t a = float16_t(1.0h);
float16_t b = float16_t(2.0h);
float16_t v = (a / b);
- float16_t v_1 = floor(v);
- float16_t r = (a - ((((v < float16_t(0.0h))) ? (ceil(v)) : (v_1)) * b));
+ float16_t r = (a - ((((v < float16_t(0.0h))) ? (ceil(v)) : (floor(v))) * b));
}
diff --git a/test/tint/expressions/binary/mod/scalar-scalar/f32.wgsl.expected.ir.dxc.hlsl b/test/tint/expressions/binary/mod/scalar-scalar/f32.wgsl.expected.ir.dxc.hlsl
index 9908ad0..1be3b5d 100644
--- a/test/tint/expressions/binary/mod/scalar-scalar/f32.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/expressions/binary/mod/scalar-scalar/f32.wgsl.expected.ir.dxc.hlsl
@@ -4,7 +4,6 @@
float a = 1.0f;
float b = 2.0f;
float v = (a / b);
- float v_1 = floor(v);
- float r = (a - ((((v < 0.0f)) ? (ceil(v)) : (v_1)) * b));
+ float r = (a - ((((v < 0.0f)) ? (ceil(v)) : (floor(v))) * b));
}
diff --git a/test/tint/expressions/binary/mod/scalar-scalar/f32.wgsl.expected.ir.fxc.hlsl b/test/tint/expressions/binary/mod/scalar-scalar/f32.wgsl.expected.ir.fxc.hlsl
index 9908ad0..1be3b5d 100644
--- a/test/tint/expressions/binary/mod/scalar-scalar/f32.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/expressions/binary/mod/scalar-scalar/f32.wgsl.expected.ir.fxc.hlsl
@@ -4,7 +4,6 @@
float a = 1.0f;
float b = 2.0f;
float v = (a / b);
- float v_1 = floor(v);
- float r = (a - ((((v < 0.0f)) ? (ceil(v)) : (v_1)) * b));
+ float r = (a - ((((v < 0.0f)) ? (ceil(v)) : (floor(v))) * b));
}
diff --git a/test/tint/expressions/binary/mod/scalar-scalar/u32.wgsl.expected.glsl b/test/tint/expressions/binary/mod/scalar-scalar/u32.wgsl.expected.glsl
index 77e1eaf..9b57021 100644
--- a/test/tint/expressions/binary/mod/scalar-scalar/u32.wgsl.expected.glsl
+++ b/test/tint/expressions/binary/mod/scalar-scalar/u32.wgsl.expected.glsl
@@ -1,8 +1,7 @@
#version 310 es
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))));
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
diff --git a/test/tint/expressions/binary/mod/scalar-scalar/u32.wgsl.expected.ir.msl b/test/tint/expressions/binary/mod/scalar-scalar/u32.wgsl.expected.ir.msl
index ab0060a..70dc5fe 100644
--- a/test/tint/expressions/binary/mod/scalar-scalar/u32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/binary/mod/scalar-scalar/u32.wgsl.expected.ir.msl
@@ -2,8 +2,7 @@
using namespace metal;
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))));
}
kernel void f() {
diff --git a/test/tint/expressions/binary/mod/scalar-vec3/f16.wgsl.expected.ir.dxc.hlsl b/test/tint/expressions/binary/mod/scalar-vec3/f16.wgsl.expected.ir.dxc.hlsl
index df780c0..f4f9781 100644
--- a/test/tint/expressions/binary/mod/scalar-vec3/f16.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/expressions/binary/mod/scalar-vec3/f16.wgsl.expected.ir.dxc.hlsl
@@ -4,7 +4,6 @@
float16_t a = float16_t(4.0h);
vector<float16_t, 3> b = vector<float16_t, 3>(float16_t(1.0h), float16_t(2.0h), float16_t(3.0h));
vector<float16_t, 3> v = (a / b);
- vector<float16_t, 3> v_1 = floor(v);
- vector<float16_t, 3> r = (a - ((((v < (float16_t(0.0h)).xxx)) ? (ceil(v)) : (v_1)) * b));
+ vector<float16_t, 3> r = (a - ((((v < (float16_t(0.0h)).xxx)) ? (ceil(v)) : (floor(v))) * b));
}
diff --git a/test/tint/expressions/binary/mod/scalar-vec3/f32.wgsl.expected.ir.dxc.hlsl b/test/tint/expressions/binary/mod/scalar-vec3/f32.wgsl.expected.ir.dxc.hlsl
index cfc737a..0a76ed1 100644
--- a/test/tint/expressions/binary/mod/scalar-vec3/f32.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/expressions/binary/mod/scalar-vec3/f32.wgsl.expected.ir.dxc.hlsl
@@ -4,7 +4,6 @@
float a = 4.0f;
float3 b = float3(1.0f, 2.0f, 3.0f);
float3 v = (a / b);
- float3 v_1 = floor(v);
- float3 r = (a - ((((v < (0.0f).xxx)) ? (ceil(v)) : (v_1)) * b));
+ float3 r = (a - ((((v < (0.0f).xxx)) ? (ceil(v)) : (floor(v))) * b));
}
diff --git a/test/tint/expressions/binary/mod/scalar-vec3/f32.wgsl.expected.ir.fxc.hlsl b/test/tint/expressions/binary/mod/scalar-vec3/f32.wgsl.expected.ir.fxc.hlsl
index cfc737a..0a76ed1 100644
--- a/test/tint/expressions/binary/mod/scalar-vec3/f32.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/expressions/binary/mod/scalar-vec3/f32.wgsl.expected.ir.fxc.hlsl
@@ -4,7 +4,6 @@
float a = 4.0f;
float3 b = float3(1.0f, 2.0f, 3.0f);
float3 v = (a / b);
- float3 v_1 = floor(v);
- float3 r = (a - ((((v < (0.0f).xxx)) ? (ceil(v)) : (v_1)) * b));
+ float3 r = (a - ((((v < (0.0f).xxx)) ? (ceil(v)) : (floor(v))) * b));
}
diff --git a/test/tint/expressions/binary/mod/scalar-vec3/i32.wgsl.expected.glsl b/test/tint/expressions/binary/mod/scalar-vec3/i32.wgsl.expected.glsl
index ba8d945..719ca0b 100644
--- a/test/tint/expressions/binary/mod/scalar-vec3/i32.wgsl.expected.glsl
+++ b/test/tint/expressions/binary/mod/scalar-vec3/i32.wgsl.expected.glsl
@@ -1,14 +1,11 @@
#version 310 es
ivec3 tint_mod_v3i32(ivec3 lhs, ivec3 rhs) {
- bvec3 v = equal(rhs, ivec3(0));
- bvec3 v_1 = equal(lhs, ivec3((-2147483647 - 1)));
- bvec3 v_2 = equal(rhs, ivec3(-1));
- uvec3 v_3 = uvec3(v_1);
- bvec3 v_4 = bvec3((v_3 & uvec3(v_2)));
- uvec3 v_5 = uvec3(v);
- ivec3 v_6 = mix(rhs, ivec3(1), bvec3((v_5 | uvec3(v_4))));
- return (lhs - ((lhs / v_6) * v_6));
+ uvec3 v = uvec3(equal(lhs, ivec3((-2147483647 - 1))));
+ bvec3 v_1 = bvec3((v & uvec3(equal(rhs, ivec3(-1)))));
+ uvec3 v_2 = uvec3(equal(rhs, ivec3(0)));
+ ivec3 v_3 = mix(rhs, ivec3(1), bvec3((v_2 | uvec3(v_1))));
+ return (lhs - ((lhs / v_3) * v_3));
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
diff --git a/test/tint/expressions/binary/mod/scalar-vec3/u32.wgsl.expected.glsl b/test/tint/expressions/binary/mod/scalar-vec3/u32.wgsl.expected.glsl
index b42dbc6..57fdc04 100644
--- a/test/tint/expressions/binary/mod/scalar-vec3/u32.wgsl.expected.glsl
+++ b/test/tint/expressions/binary/mod/scalar-vec3/u32.wgsl.expected.glsl
@@ -1,8 +1,7 @@
#version 310 es
uvec3 tint_mod_v3u32(uvec3 lhs, uvec3 rhs) {
- uvec3 v = mix(rhs, uvec3(1u), equal(rhs, uvec3(0u)));
- return (lhs - ((lhs / v) * v));
+ return (lhs - ((lhs / mix(rhs, uvec3(1u), equal(rhs, uvec3(0u)))) * mix(rhs, uvec3(1u), equal(rhs, uvec3(0u)))));
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
diff --git a/test/tint/expressions/binary/mod/scalar-vec3/u32.wgsl.expected.ir.msl b/test/tint/expressions/binary/mod/scalar-vec3/u32.wgsl.expected.ir.msl
index b7c9923..9cba8d9 100644
--- a/test/tint/expressions/binary/mod/scalar-vec3/u32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/binary/mod/scalar-vec3/u32.wgsl.expected.ir.msl
@@ -2,8 +2,7 @@
using namespace metal;
uint3 tint_mod_v3u32(uint3 lhs, uint3 rhs) {
- uint3 const v = select(rhs, uint3(1u), (rhs == uint3(0u)));
- return (lhs - ((lhs / v) * v));
+ return (lhs - ((lhs / select(rhs, uint3(1u), (rhs == uint3(0u)))) * select(rhs, uint3(1u), (rhs == uint3(0u)))));
}
kernel void f() {
diff --git a/test/tint/expressions/binary/mod/vec3-scalar/f16.wgsl.expected.ir.dxc.hlsl b/test/tint/expressions/binary/mod/vec3-scalar/f16.wgsl.expected.ir.dxc.hlsl
index 71d6dba..df64e59 100644
--- a/test/tint/expressions/binary/mod/vec3-scalar/f16.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/expressions/binary/mod/vec3-scalar/f16.wgsl.expected.ir.dxc.hlsl
@@ -4,7 +4,6 @@
vector<float16_t, 3> a = vector<float16_t, 3>(float16_t(1.0h), float16_t(2.0h), float16_t(3.0h));
float16_t b = float16_t(4.0h);
vector<float16_t, 3> v = (a / b);
- vector<float16_t, 3> v_1 = floor(v);
- vector<float16_t, 3> r = (a - ((((v < (float16_t(0.0h)).xxx)) ? (ceil(v)) : (v_1)) * b));
+ vector<float16_t, 3> r = (a - ((((v < (float16_t(0.0h)).xxx)) ? (ceil(v)) : (floor(v))) * b));
}
diff --git a/test/tint/expressions/binary/mod/vec3-scalar/f32.wgsl.expected.ir.dxc.hlsl b/test/tint/expressions/binary/mod/vec3-scalar/f32.wgsl.expected.ir.dxc.hlsl
index 7646188..1a144aac 100644
--- a/test/tint/expressions/binary/mod/vec3-scalar/f32.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/expressions/binary/mod/vec3-scalar/f32.wgsl.expected.ir.dxc.hlsl
@@ -4,7 +4,6 @@
float3 a = float3(1.0f, 2.0f, 3.0f);
float b = 4.0f;
float3 v = (a / b);
- float3 v_1 = floor(v);
- float3 r = (a - ((((v < (0.0f).xxx)) ? (ceil(v)) : (v_1)) * b));
+ float3 r = (a - ((((v < (0.0f).xxx)) ? (ceil(v)) : (floor(v))) * b));
}
diff --git a/test/tint/expressions/binary/mod/vec3-scalar/f32.wgsl.expected.ir.fxc.hlsl b/test/tint/expressions/binary/mod/vec3-scalar/f32.wgsl.expected.ir.fxc.hlsl
index 7646188..1a144aac 100644
--- a/test/tint/expressions/binary/mod/vec3-scalar/f32.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/expressions/binary/mod/vec3-scalar/f32.wgsl.expected.ir.fxc.hlsl
@@ -4,7 +4,6 @@
float3 a = float3(1.0f, 2.0f, 3.0f);
float b = 4.0f;
float3 v = (a / b);
- float3 v_1 = floor(v);
- float3 r = (a - ((((v < (0.0f).xxx)) ? (ceil(v)) : (v_1)) * b));
+ float3 r = (a - ((((v < (0.0f).xxx)) ? (ceil(v)) : (floor(v))) * b));
}
diff --git a/test/tint/expressions/binary/mod/vec3-scalar/i32.wgsl.expected.glsl b/test/tint/expressions/binary/mod/vec3-scalar/i32.wgsl.expected.glsl
index fd63379..58899e5 100644
--- a/test/tint/expressions/binary/mod/vec3-scalar/i32.wgsl.expected.glsl
+++ b/test/tint/expressions/binary/mod/vec3-scalar/i32.wgsl.expected.glsl
@@ -1,14 +1,11 @@
#version 310 es
ivec3 tint_mod_v3i32(ivec3 lhs, ivec3 rhs) {
- bvec3 v = equal(rhs, ivec3(0));
- bvec3 v_1 = equal(lhs, ivec3((-2147483647 - 1)));
- bvec3 v_2 = equal(rhs, ivec3(-1));
- uvec3 v_3 = uvec3(v_1);
- bvec3 v_4 = bvec3((v_3 & uvec3(v_2)));
- uvec3 v_5 = uvec3(v);
- ivec3 v_6 = mix(rhs, ivec3(1), bvec3((v_5 | uvec3(v_4))));
- return (lhs - ((lhs / v_6) * v_6));
+ uvec3 v = uvec3(equal(lhs, ivec3((-2147483647 - 1))));
+ bvec3 v_1 = bvec3((v & uvec3(equal(rhs, ivec3(-1)))));
+ uvec3 v_2 = uvec3(equal(rhs, ivec3(0)));
+ ivec3 v_3 = mix(rhs, ivec3(1), bvec3((v_2 | uvec3(v_1))));
+ return (lhs - ((lhs / v_3) * v_3));
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
diff --git a/test/tint/expressions/binary/mod/vec3-scalar/u32.wgsl.expected.glsl b/test/tint/expressions/binary/mod/vec3-scalar/u32.wgsl.expected.glsl
index 665d699..75168348 100644
--- a/test/tint/expressions/binary/mod/vec3-scalar/u32.wgsl.expected.glsl
+++ b/test/tint/expressions/binary/mod/vec3-scalar/u32.wgsl.expected.glsl
@@ -1,8 +1,7 @@
#version 310 es
uvec3 tint_mod_v3u32(uvec3 lhs, uvec3 rhs) {
- uvec3 v = mix(rhs, uvec3(1u), equal(rhs, uvec3(0u)));
- return (lhs - ((lhs / v) * v));
+ return (lhs - ((lhs / mix(rhs, uvec3(1u), equal(rhs, uvec3(0u)))) * mix(rhs, uvec3(1u), equal(rhs, uvec3(0u)))));
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
diff --git a/test/tint/expressions/binary/mod/vec3-scalar/u32.wgsl.expected.ir.msl b/test/tint/expressions/binary/mod/vec3-scalar/u32.wgsl.expected.ir.msl
index 125e9a3..66e7a78 100644
--- a/test/tint/expressions/binary/mod/vec3-scalar/u32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/binary/mod/vec3-scalar/u32.wgsl.expected.ir.msl
@@ -2,8 +2,7 @@
using namespace metal;
uint3 tint_mod_v3u32(uint3 lhs, uint3 rhs) {
- uint3 const v = select(rhs, uint3(1u), (rhs == uint3(0u)));
- return (lhs - ((lhs / v) * v));
+ return (lhs - ((lhs / select(rhs, uint3(1u), (rhs == uint3(0u)))) * select(rhs, uint3(1u), (rhs == uint3(0u)))));
}
kernel void f() {
diff --git a/test/tint/expressions/binary/mod/vec3-vec3/f16.wgsl.expected.ir.dxc.hlsl b/test/tint/expressions/binary/mod/vec3-vec3/f16.wgsl.expected.ir.dxc.hlsl
index aa56681..d6cc966 100644
--- a/test/tint/expressions/binary/mod/vec3-vec3/f16.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/expressions/binary/mod/vec3-vec3/f16.wgsl.expected.ir.dxc.hlsl
@@ -4,7 +4,6 @@
vector<float16_t, 3> a = vector<float16_t, 3>(float16_t(1.0h), float16_t(2.0h), float16_t(3.0h));
vector<float16_t, 3> b = vector<float16_t, 3>(float16_t(4.0h), float16_t(5.0h), float16_t(6.0h));
vector<float16_t, 3> v = (a / b);
- vector<float16_t, 3> v_1 = floor(v);
- vector<float16_t, 3> r = (a - ((((v < (float16_t(0.0h)).xxx)) ? (ceil(v)) : (v_1)) * b));
+ vector<float16_t, 3> r = (a - ((((v < (float16_t(0.0h)).xxx)) ? (ceil(v)) : (floor(v))) * b));
}
diff --git a/test/tint/expressions/binary/mod/vec3-vec3/f32.wgsl.expected.ir.dxc.hlsl b/test/tint/expressions/binary/mod/vec3-vec3/f32.wgsl.expected.ir.dxc.hlsl
index 58e0cfb..cea9617 100644
--- a/test/tint/expressions/binary/mod/vec3-vec3/f32.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/expressions/binary/mod/vec3-vec3/f32.wgsl.expected.ir.dxc.hlsl
@@ -4,7 +4,6 @@
float3 a = float3(1.0f, 2.0f, 3.0f);
float3 b = float3(4.0f, 5.0f, 6.0f);
float3 v = (a / b);
- float3 v_1 = floor(v);
- float3 r = (a - ((((v < (0.0f).xxx)) ? (ceil(v)) : (v_1)) * b));
+ float3 r = (a - ((((v < (0.0f).xxx)) ? (ceil(v)) : (floor(v))) * b));
}
diff --git a/test/tint/expressions/binary/mod/vec3-vec3/f32.wgsl.expected.ir.fxc.hlsl b/test/tint/expressions/binary/mod/vec3-vec3/f32.wgsl.expected.ir.fxc.hlsl
index 58e0cfb..cea9617 100644
--- a/test/tint/expressions/binary/mod/vec3-vec3/f32.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/expressions/binary/mod/vec3-vec3/f32.wgsl.expected.ir.fxc.hlsl
@@ -4,7 +4,6 @@
float3 a = float3(1.0f, 2.0f, 3.0f);
float3 b = float3(4.0f, 5.0f, 6.0f);
float3 v = (a / b);
- float3 v_1 = floor(v);
- float3 r = (a - ((((v < (0.0f).xxx)) ? (ceil(v)) : (v_1)) * b));
+ float3 r = (a - ((((v < (0.0f).xxx)) ? (ceil(v)) : (floor(v))) * b));
}
diff --git a/test/tint/expressions/binary/mod/vec3-vec3/i32.wgsl.expected.glsl b/test/tint/expressions/binary/mod/vec3-vec3/i32.wgsl.expected.glsl
index 5710ecc..df1cb0e 100644
--- a/test/tint/expressions/binary/mod/vec3-vec3/i32.wgsl.expected.glsl
+++ b/test/tint/expressions/binary/mod/vec3-vec3/i32.wgsl.expected.glsl
@@ -1,14 +1,11 @@
#version 310 es
ivec3 tint_mod_v3i32(ivec3 lhs, ivec3 rhs) {
- bvec3 v = equal(rhs, ivec3(0));
- bvec3 v_1 = equal(lhs, ivec3((-2147483647 - 1)));
- bvec3 v_2 = equal(rhs, ivec3(-1));
- uvec3 v_3 = uvec3(v_1);
- bvec3 v_4 = bvec3((v_3 & uvec3(v_2)));
- uvec3 v_5 = uvec3(v);
- ivec3 v_6 = mix(rhs, ivec3(1), bvec3((v_5 | uvec3(v_4))));
- return (lhs - ((lhs / v_6) * v_6));
+ uvec3 v = uvec3(equal(lhs, ivec3((-2147483647 - 1))));
+ bvec3 v_1 = bvec3((v & uvec3(equal(rhs, ivec3(-1)))));
+ uvec3 v_2 = uvec3(equal(rhs, ivec3(0)));
+ ivec3 v_3 = mix(rhs, ivec3(1), bvec3((v_2 | uvec3(v_1))));
+ return (lhs - ((lhs / v_3) * v_3));
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
diff --git a/test/tint/expressions/binary/mod/vec3-vec3/u32.wgsl.expected.glsl b/test/tint/expressions/binary/mod/vec3-vec3/u32.wgsl.expected.glsl
index 91eb4ca..9c9bca1 100644
--- a/test/tint/expressions/binary/mod/vec3-vec3/u32.wgsl.expected.glsl
+++ b/test/tint/expressions/binary/mod/vec3-vec3/u32.wgsl.expected.glsl
@@ -1,8 +1,7 @@
#version 310 es
uvec3 tint_mod_v3u32(uvec3 lhs, uvec3 rhs) {
- uvec3 v = mix(rhs, uvec3(1u), equal(rhs, uvec3(0u)));
- return (lhs - ((lhs / v) * v));
+ return (lhs - ((lhs / mix(rhs, uvec3(1u), equal(rhs, uvec3(0u)))) * mix(rhs, uvec3(1u), equal(rhs, uvec3(0u)))));
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
diff --git a/test/tint/expressions/binary/mod/vec3-vec3/u32.wgsl.expected.ir.msl b/test/tint/expressions/binary/mod/vec3-vec3/u32.wgsl.expected.ir.msl
index dce0067..79eeff2 100644
--- a/test/tint/expressions/binary/mod/vec3-vec3/u32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/binary/mod/vec3-vec3/u32.wgsl.expected.ir.msl
@@ -2,8 +2,7 @@
using namespace metal;
uint3 tint_mod_v3u32(uint3 lhs, uint3 rhs) {
- uint3 const v = select(rhs, uint3(1u), (rhs == uint3(0u)));
- return (lhs - ((lhs / v) * v));
+ return (lhs - ((lhs / select(rhs, uint3(1u), (rhs == uint3(0u)))) * select(rhs, uint3(1u), (rhs == uint3(0u)))));
}
kernel void f() {
diff --git a/test/tint/expressions/binary/mod_by_zero/by_constant/scalar-scalar/f16.wgsl.expected.ir.dxc.hlsl b/test/tint/expressions/binary/mod_by_zero/by_constant/scalar-scalar/f16.wgsl.expected.ir.dxc.hlsl
index c2043dc..8d3a714 100644
--- a/test/tint/expressions/binary/mod_by_zero/by_constant/scalar-scalar/f16.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/expressions/binary/mod_by_zero/by_constant/scalar-scalar/f16.wgsl.expected.ir.dxc.hlsl
@@ -4,7 +4,6 @@
float16_t a = float16_t(1.0h);
float16_t b = float16_t(0.0h);
float16_t v = (a / b);
- float16_t v_1 = floor(v);
- float16_t r = (a - ((((v < float16_t(0.0h))) ? (ceil(v)) : (v_1)) * b));
+ float16_t r = (a - ((((v < float16_t(0.0h))) ? (ceil(v)) : (floor(v))) * b));
}
diff --git a/test/tint/expressions/binary/mod_by_zero/by_constant/scalar-scalar/f32.wgsl.expected.ir.dxc.hlsl b/test/tint/expressions/binary/mod_by_zero/by_constant/scalar-scalar/f32.wgsl.expected.ir.dxc.hlsl
index b27bda8..50356c0 100644
--- a/test/tint/expressions/binary/mod_by_zero/by_constant/scalar-scalar/f32.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/expressions/binary/mod_by_zero/by_constant/scalar-scalar/f32.wgsl.expected.ir.dxc.hlsl
@@ -4,7 +4,6 @@
float a = 1.0f;
float b = 0.0f;
float v = (a / b);
- float v_1 = floor(v);
- float r = (a - ((((v < 0.0f)) ? (ceil(v)) : (v_1)) * b));
+ float r = (a - ((((v < 0.0f)) ? (ceil(v)) : (floor(v))) * b));
}
diff --git a/test/tint/expressions/binary/mod_by_zero/by_constant/scalar-scalar/f32.wgsl.expected.ir.fxc.hlsl b/test/tint/expressions/binary/mod_by_zero/by_constant/scalar-scalar/f32.wgsl.expected.ir.fxc.hlsl
index b27bda8..50356c0 100644
--- a/test/tint/expressions/binary/mod_by_zero/by_constant/scalar-scalar/f32.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/expressions/binary/mod_by_zero/by_constant/scalar-scalar/f32.wgsl.expected.ir.fxc.hlsl
@@ -4,7 +4,6 @@
float a = 1.0f;
float b = 0.0f;
float v = (a / b);
- float v_1 = floor(v);
- float r = (a - ((((v < 0.0f)) ? (ceil(v)) : (v_1)) * b));
+ float r = (a - ((((v < 0.0f)) ? (ceil(v)) : (floor(v))) * b));
}
diff --git a/test/tint/expressions/binary/mod_by_zero/by_constant/scalar-scalar/u32.wgsl.expected.glsl b/test/tint/expressions/binary/mod_by_zero/by_constant/scalar-scalar/u32.wgsl.expected.glsl
index 9359385..5ea5571 100644
--- a/test/tint/expressions/binary/mod_by_zero/by_constant/scalar-scalar/u32.wgsl.expected.glsl
+++ b/test/tint/expressions/binary/mod_by_zero/by_constant/scalar-scalar/u32.wgsl.expected.glsl
@@ -1,8 +1,7 @@
#version 310 es
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))));
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
diff --git a/test/tint/expressions/binary/mod_by_zero/by_constant/scalar-scalar/u32.wgsl.expected.ir.msl b/test/tint/expressions/binary/mod_by_zero/by_constant/scalar-scalar/u32.wgsl.expected.ir.msl
index bf03829..fa48f2e 100644
--- a/test/tint/expressions/binary/mod_by_zero/by_constant/scalar-scalar/u32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/binary/mod_by_zero/by_constant/scalar-scalar/u32.wgsl.expected.ir.msl
@@ -2,8 +2,7 @@
using namespace metal;
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))));
}
kernel void f() {
diff --git a/test/tint/expressions/binary/mod_by_zero/by_constant/scalar-vec3/i32.wgsl.expected.glsl b/test/tint/expressions/binary/mod_by_zero/by_constant/scalar-vec3/i32.wgsl.expected.glsl
index 7880479..d05c957 100644
--- a/test/tint/expressions/binary/mod_by_zero/by_constant/scalar-vec3/i32.wgsl.expected.glsl
+++ b/test/tint/expressions/binary/mod_by_zero/by_constant/scalar-vec3/i32.wgsl.expected.glsl
@@ -1,14 +1,11 @@
#version 310 es
ivec3 tint_mod_v3i32(ivec3 lhs, ivec3 rhs) {
- bvec3 v = equal(rhs, ivec3(0));
- bvec3 v_1 = equal(lhs, ivec3((-2147483647 - 1)));
- bvec3 v_2 = equal(rhs, ivec3(-1));
- uvec3 v_3 = uvec3(v_1);
- bvec3 v_4 = bvec3((v_3 & uvec3(v_2)));
- uvec3 v_5 = uvec3(v);
- ivec3 v_6 = mix(rhs, ivec3(1), bvec3((v_5 | uvec3(v_4))));
- return (lhs - ((lhs / v_6) * v_6));
+ uvec3 v = uvec3(equal(lhs, ivec3((-2147483647 - 1))));
+ bvec3 v_1 = bvec3((v & uvec3(equal(rhs, ivec3(-1)))));
+ uvec3 v_2 = uvec3(equal(rhs, ivec3(0)));
+ ivec3 v_3 = mix(rhs, ivec3(1), bvec3((v_2 | uvec3(v_1))));
+ return (lhs - ((lhs / v_3) * v_3));
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
diff --git a/test/tint/expressions/binary/mod_by_zero/by_constant/scalar-vec3/u32.wgsl.expected.glsl b/test/tint/expressions/binary/mod_by_zero/by_constant/scalar-vec3/u32.wgsl.expected.glsl
index 0d4c587..fda1d6c 100644
--- a/test/tint/expressions/binary/mod_by_zero/by_constant/scalar-vec3/u32.wgsl.expected.glsl
+++ b/test/tint/expressions/binary/mod_by_zero/by_constant/scalar-vec3/u32.wgsl.expected.glsl
@@ -1,8 +1,7 @@
#version 310 es
uvec3 tint_mod_v3u32(uvec3 lhs, uvec3 rhs) {
- uvec3 v = mix(rhs, uvec3(1u), equal(rhs, uvec3(0u)));
- return (lhs - ((lhs / v) * v));
+ return (lhs - ((lhs / mix(rhs, uvec3(1u), equal(rhs, uvec3(0u)))) * mix(rhs, uvec3(1u), equal(rhs, uvec3(0u)))));
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
diff --git a/test/tint/expressions/binary/mod_by_zero/by_constant/scalar-vec3/u32.wgsl.expected.ir.msl b/test/tint/expressions/binary/mod_by_zero/by_constant/scalar-vec3/u32.wgsl.expected.ir.msl
index 0015b9e..0413c4a 100644
--- a/test/tint/expressions/binary/mod_by_zero/by_constant/scalar-vec3/u32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/binary/mod_by_zero/by_constant/scalar-vec3/u32.wgsl.expected.ir.msl
@@ -2,8 +2,7 @@
using namespace metal;
uint3 tint_mod_v3u32(uint3 lhs, uint3 rhs) {
- uint3 const v = select(rhs, uint3(1u), (rhs == uint3(0u)));
- return (lhs - ((lhs / v) * v));
+ return (lhs - ((lhs / select(rhs, uint3(1u), (rhs == uint3(0u)))) * select(rhs, uint3(1u), (rhs == uint3(0u)))));
}
kernel void f() {
diff --git a/test/tint/expressions/binary/mod_by_zero/by_constant/vec3-scalar/i32.wgsl.expected.glsl b/test/tint/expressions/binary/mod_by_zero/by_constant/vec3-scalar/i32.wgsl.expected.glsl
index 91a5159..64f94d7 100644
--- a/test/tint/expressions/binary/mod_by_zero/by_constant/vec3-scalar/i32.wgsl.expected.glsl
+++ b/test/tint/expressions/binary/mod_by_zero/by_constant/vec3-scalar/i32.wgsl.expected.glsl
@@ -1,14 +1,11 @@
#version 310 es
ivec3 tint_mod_v3i32(ivec3 lhs, ivec3 rhs) {
- bvec3 v = equal(rhs, ivec3(0));
- bvec3 v_1 = equal(lhs, ivec3((-2147483647 - 1)));
- bvec3 v_2 = equal(rhs, ivec3(-1));
- uvec3 v_3 = uvec3(v_1);
- bvec3 v_4 = bvec3((v_3 & uvec3(v_2)));
- uvec3 v_5 = uvec3(v);
- ivec3 v_6 = mix(rhs, ivec3(1), bvec3((v_5 | uvec3(v_4))));
- return (lhs - ((lhs / v_6) * v_6));
+ uvec3 v = uvec3(equal(lhs, ivec3((-2147483647 - 1))));
+ bvec3 v_1 = bvec3((v & uvec3(equal(rhs, ivec3(-1)))));
+ uvec3 v_2 = uvec3(equal(rhs, ivec3(0)));
+ ivec3 v_3 = mix(rhs, ivec3(1), bvec3((v_2 | uvec3(v_1))));
+ return (lhs - ((lhs / v_3) * v_3));
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
diff --git a/test/tint/expressions/binary/mod_by_zero/by_constant/vec3-scalar/u32.wgsl.expected.glsl b/test/tint/expressions/binary/mod_by_zero/by_constant/vec3-scalar/u32.wgsl.expected.glsl
index d83b80a..e7b4c47 100644
--- a/test/tint/expressions/binary/mod_by_zero/by_constant/vec3-scalar/u32.wgsl.expected.glsl
+++ b/test/tint/expressions/binary/mod_by_zero/by_constant/vec3-scalar/u32.wgsl.expected.glsl
@@ -1,8 +1,7 @@
#version 310 es
uvec3 tint_mod_v3u32(uvec3 lhs, uvec3 rhs) {
- uvec3 v = mix(rhs, uvec3(1u), equal(rhs, uvec3(0u)));
- return (lhs - ((lhs / v) * v));
+ return (lhs - ((lhs / mix(rhs, uvec3(1u), equal(rhs, uvec3(0u)))) * mix(rhs, uvec3(1u), equal(rhs, uvec3(0u)))));
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
diff --git a/test/tint/expressions/binary/mod_by_zero/by_constant/vec3-scalar/u32.wgsl.expected.ir.msl b/test/tint/expressions/binary/mod_by_zero/by_constant/vec3-scalar/u32.wgsl.expected.ir.msl
index d34635e..2d52352 100644
--- a/test/tint/expressions/binary/mod_by_zero/by_constant/vec3-scalar/u32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/binary/mod_by_zero/by_constant/vec3-scalar/u32.wgsl.expected.ir.msl
@@ -2,8 +2,7 @@
using namespace metal;
uint3 tint_mod_v3u32(uint3 lhs, uint3 rhs) {
- uint3 const v = select(rhs, uint3(1u), (rhs == uint3(0u)));
- return (lhs - ((lhs / v) * v));
+ return (lhs - ((lhs / select(rhs, uint3(1u), (rhs == uint3(0u)))) * select(rhs, uint3(1u), (rhs == uint3(0u)))));
}
kernel void f() {
diff --git a/test/tint/expressions/binary/mod_by_zero/by_constant/vec3-vec3/f16.wgsl.expected.ir.dxc.hlsl b/test/tint/expressions/binary/mod_by_zero/by_constant/vec3-vec3/f16.wgsl.expected.ir.dxc.hlsl
index d3b3de6..4e12273 100644
--- a/test/tint/expressions/binary/mod_by_zero/by_constant/vec3-vec3/f16.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/expressions/binary/mod_by_zero/by_constant/vec3-vec3/f16.wgsl.expected.ir.dxc.hlsl
@@ -4,7 +4,6 @@
vector<float16_t, 3> a = vector<float16_t, 3>(float16_t(1.0h), float16_t(2.0h), float16_t(3.0h));
vector<float16_t, 3> b = vector<float16_t, 3>(float16_t(0.0h), float16_t(5.0h), float16_t(0.0h));
vector<float16_t, 3> v = (a / b);
- vector<float16_t, 3> v_1 = floor(v);
- vector<float16_t, 3> r = (a - ((((v < (float16_t(0.0h)).xxx)) ? (ceil(v)) : (v_1)) * b));
+ vector<float16_t, 3> r = (a - ((((v < (float16_t(0.0h)).xxx)) ? (ceil(v)) : (floor(v))) * b));
}
diff --git a/test/tint/expressions/binary/mod_by_zero/by_constant/vec3-vec3/f32.wgsl.expected.ir.dxc.hlsl b/test/tint/expressions/binary/mod_by_zero/by_constant/vec3-vec3/f32.wgsl.expected.ir.dxc.hlsl
index 84e0f7a..b2b1c4a 100644
--- a/test/tint/expressions/binary/mod_by_zero/by_constant/vec3-vec3/f32.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/expressions/binary/mod_by_zero/by_constant/vec3-vec3/f32.wgsl.expected.ir.dxc.hlsl
@@ -4,7 +4,6 @@
float3 a = float3(1.0f, 2.0f, 3.0f);
float3 b = float3(0.0f, 5.0f, 0.0f);
float3 v = (a / b);
- float3 v_1 = floor(v);
- float3 r = (a - ((((v < (0.0f).xxx)) ? (ceil(v)) : (v_1)) * b));
+ float3 r = (a - ((((v < (0.0f).xxx)) ? (ceil(v)) : (floor(v))) * b));
}
diff --git a/test/tint/expressions/binary/mod_by_zero/by_constant/vec3-vec3/f32.wgsl.expected.ir.fxc.hlsl b/test/tint/expressions/binary/mod_by_zero/by_constant/vec3-vec3/f32.wgsl.expected.ir.fxc.hlsl
index 84e0f7a..b2b1c4a 100644
--- a/test/tint/expressions/binary/mod_by_zero/by_constant/vec3-vec3/f32.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/expressions/binary/mod_by_zero/by_constant/vec3-vec3/f32.wgsl.expected.ir.fxc.hlsl
@@ -4,7 +4,6 @@
float3 a = float3(1.0f, 2.0f, 3.0f);
float3 b = float3(0.0f, 5.0f, 0.0f);
float3 v = (a / b);
- float3 v_1 = floor(v);
- float3 r = (a - ((((v < (0.0f).xxx)) ? (ceil(v)) : (v_1)) * b));
+ float3 r = (a - ((((v < (0.0f).xxx)) ? (ceil(v)) : (floor(v))) * b));
}
diff --git a/test/tint/expressions/binary/mod_by_zero/by_constant/vec3-vec3/i32.wgsl.expected.glsl b/test/tint/expressions/binary/mod_by_zero/by_constant/vec3-vec3/i32.wgsl.expected.glsl
index e49d863..2691a87 100644
--- a/test/tint/expressions/binary/mod_by_zero/by_constant/vec3-vec3/i32.wgsl.expected.glsl
+++ b/test/tint/expressions/binary/mod_by_zero/by_constant/vec3-vec3/i32.wgsl.expected.glsl
@@ -1,14 +1,11 @@
#version 310 es
ivec3 tint_mod_v3i32(ivec3 lhs, ivec3 rhs) {
- bvec3 v = equal(rhs, ivec3(0));
- bvec3 v_1 = equal(lhs, ivec3((-2147483647 - 1)));
- bvec3 v_2 = equal(rhs, ivec3(-1));
- uvec3 v_3 = uvec3(v_1);
- bvec3 v_4 = bvec3((v_3 & uvec3(v_2)));
- uvec3 v_5 = uvec3(v);
- ivec3 v_6 = mix(rhs, ivec3(1), bvec3((v_5 | uvec3(v_4))));
- return (lhs - ((lhs / v_6) * v_6));
+ uvec3 v = uvec3(equal(lhs, ivec3((-2147483647 - 1))));
+ bvec3 v_1 = bvec3((v & uvec3(equal(rhs, ivec3(-1)))));
+ uvec3 v_2 = uvec3(equal(rhs, ivec3(0)));
+ ivec3 v_3 = mix(rhs, ivec3(1), bvec3((v_2 | uvec3(v_1))));
+ return (lhs - ((lhs / v_3) * v_3));
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
diff --git a/test/tint/expressions/binary/mod_by_zero/by_constant/vec3-vec3/u32.wgsl.expected.glsl b/test/tint/expressions/binary/mod_by_zero/by_constant/vec3-vec3/u32.wgsl.expected.glsl
index 3d693fe..9c80506 100644
--- a/test/tint/expressions/binary/mod_by_zero/by_constant/vec3-vec3/u32.wgsl.expected.glsl
+++ b/test/tint/expressions/binary/mod_by_zero/by_constant/vec3-vec3/u32.wgsl.expected.glsl
@@ -1,8 +1,7 @@
#version 310 es
uvec3 tint_mod_v3u32(uvec3 lhs, uvec3 rhs) {
- uvec3 v = mix(rhs, uvec3(1u), equal(rhs, uvec3(0u)));
- return (lhs - ((lhs / v) * v));
+ return (lhs - ((lhs / mix(rhs, uvec3(1u), equal(rhs, uvec3(0u)))) * mix(rhs, uvec3(1u), equal(rhs, uvec3(0u)))));
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
diff --git a/test/tint/expressions/binary/mod_by_zero/by_constant/vec3-vec3/u32.wgsl.expected.ir.msl b/test/tint/expressions/binary/mod_by_zero/by_constant/vec3-vec3/u32.wgsl.expected.ir.msl
index 5225e50..b1cd2c8 100644
--- a/test/tint/expressions/binary/mod_by_zero/by_constant/vec3-vec3/u32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/binary/mod_by_zero/by_constant/vec3-vec3/u32.wgsl.expected.ir.msl
@@ -2,8 +2,7 @@
using namespace metal;
uint3 tint_mod_v3u32(uint3 lhs, uint3 rhs) {
- uint3 const v = select(rhs, uint3(1u), (rhs == uint3(0u)));
- return (lhs - ((lhs / v) * v));
+ return (lhs - ((lhs / select(rhs, uint3(1u), (rhs == uint3(0u)))) * select(rhs, uint3(1u), (rhs == uint3(0u)))));
}
kernel void f() {
diff --git a/test/tint/expressions/binary/mod_by_zero/by_expression/scalar-scalar/f16.wgsl.expected.ir.dxc.hlsl b/test/tint/expressions/binary/mod_by_zero/by_expression/scalar-scalar/f16.wgsl.expected.ir.dxc.hlsl
index b5ab9d7..65b5ad2 100644
--- a/test/tint/expressions/binary/mod_by_zero/by_expression/scalar-scalar/f16.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/expressions/binary/mod_by_zero/by_expression/scalar-scalar/f16.wgsl.expected.ir.dxc.hlsl
@@ -6,7 +6,6 @@
float16_t v = a;
float16_t v_1 = (b + b);
float16_t v_2 = (v / v_1);
- float16_t v_3 = floor(v_2);
- float16_t r = (v - ((((v_2 < float16_t(0.0h))) ? (ceil(v_2)) : (v_3)) * v_1));
+ float16_t r = (v - ((((v_2 < float16_t(0.0h))) ? (ceil(v_2)) : (floor(v_2))) * v_1));
}
diff --git a/test/tint/expressions/binary/mod_by_zero/by_expression/scalar-scalar/f32.wgsl.expected.ir.dxc.hlsl b/test/tint/expressions/binary/mod_by_zero/by_expression/scalar-scalar/f32.wgsl.expected.ir.dxc.hlsl
index df08375..1293614 100644
--- a/test/tint/expressions/binary/mod_by_zero/by_expression/scalar-scalar/f32.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/expressions/binary/mod_by_zero/by_expression/scalar-scalar/f32.wgsl.expected.ir.dxc.hlsl
@@ -6,7 +6,6 @@
float v = a;
float v_1 = (b + b);
float v_2 = (v / v_1);
- float v_3 = floor(v_2);
- float r = (v - ((((v_2 < 0.0f)) ? (ceil(v_2)) : (v_3)) * v_1));
+ float r = (v - ((((v_2 < 0.0f)) ? (ceil(v_2)) : (floor(v_2))) * v_1));
}
diff --git a/test/tint/expressions/binary/mod_by_zero/by_expression/scalar-scalar/f32.wgsl.expected.ir.fxc.hlsl b/test/tint/expressions/binary/mod_by_zero/by_expression/scalar-scalar/f32.wgsl.expected.ir.fxc.hlsl
index df08375..1293614 100644
--- a/test/tint/expressions/binary/mod_by_zero/by_expression/scalar-scalar/f32.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/expressions/binary/mod_by_zero/by_expression/scalar-scalar/f32.wgsl.expected.ir.fxc.hlsl
@@ -6,7 +6,6 @@
float v = a;
float v_1 = (b + b);
float v_2 = (v / v_1);
- float v_3 = floor(v_2);
- float r = (v - ((((v_2 < 0.0f)) ? (ceil(v_2)) : (v_3)) * v_1));
+ float r = (v - ((((v_2 < 0.0f)) ? (ceil(v_2)) : (floor(v_2))) * v_1));
}
diff --git a/test/tint/expressions/binary/mod_by_zero/by_expression/scalar-scalar/u32.wgsl.expected.glsl b/test/tint/expressions/binary/mod_by_zero/by_expression/scalar-scalar/u32.wgsl.expected.glsl
index 00b046e..ece5d3a 100644
--- a/test/tint/expressions/binary/mod_by_zero/by_expression/scalar-scalar/u32.wgsl.expected.glsl
+++ b/test/tint/expressions/binary/mod_by_zero/by_expression/scalar-scalar/u32.wgsl.expected.glsl
@@ -1,8 +1,7 @@
#version 310 es
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))));
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
diff --git a/test/tint/expressions/binary/mod_by_zero/by_expression/scalar-scalar/u32.wgsl.expected.ir.msl b/test/tint/expressions/binary/mod_by_zero/by_expression/scalar-scalar/u32.wgsl.expected.ir.msl
index 1f606c2..2555a49 100644
--- a/test/tint/expressions/binary/mod_by_zero/by_expression/scalar-scalar/u32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/binary/mod_by_zero/by_expression/scalar-scalar/u32.wgsl.expected.ir.msl
@@ -2,8 +2,7 @@
using namespace metal;
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))));
}
kernel void f() {
diff --git a/test/tint/expressions/binary/mod_by_zero/by_expression/scalar-vec3/i32.wgsl.expected.glsl b/test/tint/expressions/binary/mod_by_zero/by_expression/scalar-vec3/i32.wgsl.expected.glsl
index 75899ae..d77248a 100644
--- a/test/tint/expressions/binary/mod_by_zero/by_expression/scalar-vec3/i32.wgsl.expected.glsl
+++ b/test/tint/expressions/binary/mod_by_zero/by_expression/scalar-vec3/i32.wgsl.expected.glsl
@@ -1,19 +1,16 @@
#version 310 es
ivec3 tint_mod_v3i32(ivec3 lhs, ivec3 rhs) {
- bvec3 v = equal(rhs, ivec3(0));
- bvec3 v_1 = equal(lhs, ivec3((-2147483647 - 1)));
- bvec3 v_2 = equal(rhs, ivec3(-1));
- uvec3 v_3 = uvec3(v_1);
- bvec3 v_4 = bvec3((v_3 & uvec3(v_2)));
- uvec3 v_5 = uvec3(v);
- ivec3 v_6 = mix(rhs, ivec3(1), bvec3((v_5 | uvec3(v_4))));
- return (lhs - ((lhs / v_6) * v_6));
+ uvec3 v = uvec3(equal(lhs, ivec3((-2147483647 - 1))));
+ bvec3 v_1 = bvec3((v & uvec3(equal(rhs, ivec3(-1)))));
+ uvec3 v_2 = uvec3(equal(rhs, ivec3(0)));
+ ivec3 v_3 = mix(rhs, ivec3(1), bvec3((v_2 | uvec3(v_1))));
+ return (lhs - ((lhs / v_3) * v_3));
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
int a = 4;
ivec3 b = ivec3(0, 2, 0);
- ivec3 v_7 = (b + b);
- ivec3 r = tint_mod_v3i32(ivec3(a), v_7);
+ ivec3 v_4 = (b + b);
+ ivec3 r = tint_mod_v3i32(ivec3(a), v_4);
}
diff --git a/test/tint/expressions/binary/mod_by_zero/by_expression/scalar-vec3/u32.wgsl.expected.glsl b/test/tint/expressions/binary/mod_by_zero/by_expression/scalar-vec3/u32.wgsl.expected.glsl
index 8f1b407..b7d1673 100644
--- a/test/tint/expressions/binary/mod_by_zero/by_expression/scalar-vec3/u32.wgsl.expected.glsl
+++ b/test/tint/expressions/binary/mod_by_zero/by_expression/scalar-vec3/u32.wgsl.expected.glsl
@@ -1,13 +1,12 @@
#version 310 es
uvec3 tint_mod_v3u32(uvec3 lhs, uvec3 rhs) {
- uvec3 v = mix(rhs, uvec3(1u), equal(rhs, uvec3(0u)));
- return (lhs - ((lhs / v) * v));
+ return (lhs - ((lhs / mix(rhs, uvec3(1u), equal(rhs, uvec3(0u)))) * mix(rhs, uvec3(1u), equal(rhs, uvec3(0u)))));
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
uint a = 4u;
uvec3 b = uvec3(0u, 2u, 0u);
- uvec3 v_1 = (b + b);
- uvec3 r = tint_mod_v3u32(uvec3(a), v_1);
+ uvec3 v = (b + b);
+ uvec3 r = tint_mod_v3u32(uvec3(a), v);
}
diff --git a/test/tint/expressions/binary/mod_by_zero/by_expression/scalar-vec3/u32.wgsl.expected.ir.msl b/test/tint/expressions/binary/mod_by_zero/by_expression/scalar-vec3/u32.wgsl.expected.ir.msl
index 4e3e5ae..debb301 100644
--- a/test/tint/expressions/binary/mod_by_zero/by_expression/scalar-vec3/u32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/binary/mod_by_zero/by_expression/scalar-vec3/u32.wgsl.expected.ir.msl
@@ -2,13 +2,12 @@
using namespace metal;
uint3 tint_mod_v3u32(uint3 lhs, uint3 rhs) {
- uint3 const v = select(rhs, uint3(1u), (rhs == uint3(0u)));
- return (lhs - ((lhs / v) * v));
+ return (lhs - ((lhs / select(rhs, uint3(1u), (rhs == uint3(0u)))) * select(rhs, uint3(1u), (rhs == uint3(0u)))));
}
kernel void f() {
uint a = 4u;
uint3 b = uint3(0u, 2u, 0u);
- uint3 const v_1 = (b + b);
- uint3 const r = tint_mod_v3u32(uint3(a), v_1);
+ uint3 const v = (b + b);
+ uint3 const r = tint_mod_v3u32(uint3(a), v);
}
diff --git a/test/tint/expressions/binary/mod_by_zero/by_expression/vec3-scalar/i32.wgsl.expected.glsl b/test/tint/expressions/binary/mod_by_zero/by_expression/vec3-scalar/i32.wgsl.expected.glsl
index a1e82ba..eaadd55 100644
--- a/test/tint/expressions/binary/mod_by_zero/by_expression/vec3-scalar/i32.wgsl.expected.glsl
+++ b/test/tint/expressions/binary/mod_by_zero/by_expression/vec3-scalar/i32.wgsl.expected.glsl
@@ -1,19 +1,16 @@
#version 310 es
ivec3 tint_mod_v3i32(ivec3 lhs, ivec3 rhs) {
- bvec3 v = equal(rhs, ivec3(0));
- bvec3 v_1 = equal(lhs, ivec3((-2147483647 - 1)));
- bvec3 v_2 = equal(rhs, ivec3(-1));
- uvec3 v_3 = uvec3(v_1);
- bvec3 v_4 = bvec3((v_3 & uvec3(v_2)));
- uvec3 v_5 = uvec3(v);
- ivec3 v_6 = mix(rhs, ivec3(1), bvec3((v_5 | uvec3(v_4))));
- return (lhs - ((lhs / v_6) * v_6));
+ uvec3 v = uvec3(equal(lhs, ivec3((-2147483647 - 1))));
+ bvec3 v_1 = bvec3((v & uvec3(equal(rhs, ivec3(-1)))));
+ uvec3 v_2 = uvec3(equal(rhs, ivec3(0)));
+ ivec3 v_3 = mix(rhs, ivec3(1), bvec3((v_2 | uvec3(v_1))));
+ return (lhs - ((lhs / v_3) * v_3));
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
ivec3 a = ivec3(1, 2, 3);
int b = 0;
- ivec3 v_7 = a;
- ivec3 r = tint_mod_v3i32(v_7, ivec3((b + b)));
+ ivec3 v_4 = a;
+ ivec3 r = tint_mod_v3i32(v_4, ivec3((b + b)));
}
diff --git a/test/tint/expressions/binary/mod_by_zero/by_expression/vec3-scalar/u32.wgsl.expected.glsl b/test/tint/expressions/binary/mod_by_zero/by_expression/vec3-scalar/u32.wgsl.expected.glsl
index f3e20e9..f811e62 100644
--- a/test/tint/expressions/binary/mod_by_zero/by_expression/vec3-scalar/u32.wgsl.expected.glsl
+++ b/test/tint/expressions/binary/mod_by_zero/by_expression/vec3-scalar/u32.wgsl.expected.glsl
@@ -1,13 +1,12 @@
#version 310 es
uvec3 tint_mod_v3u32(uvec3 lhs, uvec3 rhs) {
- uvec3 v = mix(rhs, uvec3(1u), equal(rhs, uvec3(0u)));
- return (lhs - ((lhs / v) * v));
+ return (lhs - ((lhs / mix(rhs, uvec3(1u), equal(rhs, uvec3(0u)))) * mix(rhs, uvec3(1u), equal(rhs, uvec3(0u)))));
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
uvec3 a = uvec3(1u, 2u, 3u);
uint b = 0u;
- uvec3 v_1 = a;
- uvec3 r = tint_mod_v3u32(v_1, uvec3((b + b)));
+ uvec3 v = a;
+ uvec3 r = tint_mod_v3u32(v, uvec3((b + b)));
}
diff --git a/test/tint/expressions/binary/mod_by_zero/by_expression/vec3-scalar/u32.wgsl.expected.ir.msl b/test/tint/expressions/binary/mod_by_zero/by_expression/vec3-scalar/u32.wgsl.expected.ir.msl
index e692206..e880836 100644
--- a/test/tint/expressions/binary/mod_by_zero/by_expression/vec3-scalar/u32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/binary/mod_by_zero/by_expression/vec3-scalar/u32.wgsl.expected.ir.msl
@@ -2,13 +2,12 @@
using namespace metal;
uint3 tint_mod_v3u32(uint3 lhs, uint3 rhs) {
- uint3 const v = select(rhs, uint3(1u), (rhs == uint3(0u)));
- return (lhs - ((lhs / v) * v));
+ return (lhs - ((lhs / select(rhs, uint3(1u), (rhs == uint3(0u)))) * select(rhs, uint3(1u), (rhs == uint3(0u)))));
}
kernel void f() {
uint3 a = uint3(1u, 2u, 3u);
uint b = 0u;
- uint3 const v_1 = a;
- uint3 const r = tint_mod_v3u32(v_1, uint3((b + b)));
+ uint3 const v = a;
+ uint3 const r = tint_mod_v3u32(v, uint3((b + b)));
}
diff --git a/test/tint/expressions/binary/mod_by_zero/by_expression/vec3-vec3/f16.wgsl.expected.ir.dxc.hlsl b/test/tint/expressions/binary/mod_by_zero/by_expression/vec3-vec3/f16.wgsl.expected.ir.dxc.hlsl
index cec938d..7a16bc0 100644
--- a/test/tint/expressions/binary/mod_by_zero/by_expression/vec3-vec3/f16.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/expressions/binary/mod_by_zero/by_expression/vec3-vec3/f16.wgsl.expected.ir.dxc.hlsl
@@ -6,7 +6,6 @@
vector<float16_t, 3> v = a;
vector<float16_t, 3> v_1 = (b + b);
vector<float16_t, 3> v_2 = (v / v_1);
- vector<float16_t, 3> v_3 = floor(v_2);
- vector<float16_t, 3> r = (v - ((((v_2 < (float16_t(0.0h)).xxx)) ? (ceil(v_2)) : (v_3)) * v_1));
+ vector<float16_t, 3> r = (v - ((((v_2 < (float16_t(0.0h)).xxx)) ? (ceil(v_2)) : (floor(v_2))) * v_1));
}
diff --git a/test/tint/expressions/binary/mod_by_zero/by_expression/vec3-vec3/f32.wgsl.expected.ir.dxc.hlsl b/test/tint/expressions/binary/mod_by_zero/by_expression/vec3-vec3/f32.wgsl.expected.ir.dxc.hlsl
index b9893a8..b27930c 100644
--- a/test/tint/expressions/binary/mod_by_zero/by_expression/vec3-vec3/f32.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/expressions/binary/mod_by_zero/by_expression/vec3-vec3/f32.wgsl.expected.ir.dxc.hlsl
@@ -6,7 +6,6 @@
float3 v = a;
float3 v_1 = (b + b);
float3 v_2 = (v / v_1);
- float3 v_3 = floor(v_2);
- float3 r = (v - ((((v_2 < (0.0f).xxx)) ? (ceil(v_2)) : (v_3)) * v_1));
+ float3 r = (v - ((((v_2 < (0.0f).xxx)) ? (ceil(v_2)) : (floor(v_2))) * v_1));
}
diff --git a/test/tint/expressions/binary/mod_by_zero/by_expression/vec3-vec3/f32.wgsl.expected.ir.fxc.hlsl b/test/tint/expressions/binary/mod_by_zero/by_expression/vec3-vec3/f32.wgsl.expected.ir.fxc.hlsl
index b9893a8..b27930c 100644
--- a/test/tint/expressions/binary/mod_by_zero/by_expression/vec3-vec3/f32.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/expressions/binary/mod_by_zero/by_expression/vec3-vec3/f32.wgsl.expected.ir.fxc.hlsl
@@ -6,7 +6,6 @@
float3 v = a;
float3 v_1 = (b + b);
float3 v_2 = (v / v_1);
- float3 v_3 = floor(v_2);
- float3 r = (v - ((((v_2 < (0.0f).xxx)) ? (ceil(v_2)) : (v_3)) * v_1));
+ float3 r = (v - ((((v_2 < (0.0f).xxx)) ? (ceil(v_2)) : (floor(v_2))) * v_1));
}
diff --git a/test/tint/expressions/binary/mod_by_zero/by_expression/vec3-vec3/i32.wgsl.expected.glsl b/test/tint/expressions/binary/mod_by_zero/by_expression/vec3-vec3/i32.wgsl.expected.glsl
index 0b5de82..6610ea0 100644
--- a/test/tint/expressions/binary/mod_by_zero/by_expression/vec3-vec3/i32.wgsl.expected.glsl
+++ b/test/tint/expressions/binary/mod_by_zero/by_expression/vec3-vec3/i32.wgsl.expected.glsl
@@ -1,14 +1,11 @@
#version 310 es
ivec3 tint_mod_v3i32(ivec3 lhs, ivec3 rhs) {
- bvec3 v = equal(rhs, ivec3(0));
- bvec3 v_1 = equal(lhs, ivec3((-2147483647 - 1)));
- bvec3 v_2 = equal(rhs, ivec3(-1));
- uvec3 v_3 = uvec3(v_1);
- bvec3 v_4 = bvec3((v_3 & uvec3(v_2)));
- uvec3 v_5 = uvec3(v);
- ivec3 v_6 = mix(rhs, ivec3(1), bvec3((v_5 | uvec3(v_4))));
- return (lhs - ((lhs / v_6) * v_6));
+ uvec3 v = uvec3(equal(lhs, ivec3((-2147483647 - 1))));
+ bvec3 v_1 = bvec3((v & uvec3(equal(rhs, ivec3(-1)))));
+ uvec3 v_2 = uvec3(equal(rhs, ivec3(0)));
+ ivec3 v_3 = mix(rhs, ivec3(1), bvec3((v_2 | uvec3(v_1))));
+ return (lhs - ((lhs / v_3) * v_3));
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
diff --git a/test/tint/expressions/binary/mod_by_zero/by_expression/vec3-vec3/u32.wgsl.expected.glsl b/test/tint/expressions/binary/mod_by_zero/by_expression/vec3-vec3/u32.wgsl.expected.glsl
index 8ad4997..f787918 100644
--- a/test/tint/expressions/binary/mod_by_zero/by_expression/vec3-vec3/u32.wgsl.expected.glsl
+++ b/test/tint/expressions/binary/mod_by_zero/by_expression/vec3-vec3/u32.wgsl.expected.glsl
@@ -1,8 +1,7 @@
#version 310 es
uvec3 tint_mod_v3u32(uvec3 lhs, uvec3 rhs) {
- uvec3 v = mix(rhs, uvec3(1u), equal(rhs, uvec3(0u)));
- return (lhs - ((lhs / v) * v));
+ return (lhs - ((lhs / mix(rhs, uvec3(1u), equal(rhs, uvec3(0u)))) * mix(rhs, uvec3(1u), equal(rhs, uvec3(0u)))));
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
diff --git a/test/tint/expressions/binary/mod_by_zero/by_expression/vec3-vec3/u32.wgsl.expected.ir.msl b/test/tint/expressions/binary/mod_by_zero/by_expression/vec3-vec3/u32.wgsl.expected.ir.msl
index 3430786..f6b729d 100644
--- a/test/tint/expressions/binary/mod_by_zero/by_expression/vec3-vec3/u32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/binary/mod_by_zero/by_expression/vec3-vec3/u32.wgsl.expected.ir.msl
@@ -2,8 +2,7 @@
using namespace metal;
uint3 tint_mod_v3u32(uint3 lhs, uint3 rhs) {
- uint3 const v = select(rhs, uint3(1u), (rhs == uint3(0u)));
- return (lhs - ((lhs / v) * v));
+ return (lhs - ((lhs / select(rhs, uint3(1u), (rhs == uint3(0u)))) * select(rhs, uint3(1u), (rhs == uint3(0u)))));
}
kernel void f() {
diff --git a/test/tint/expressions/binary/mod_by_zero/by_identifier/scalar-scalar/f16.wgsl.expected.ir.dxc.hlsl b/test/tint/expressions/binary/mod_by_zero/by_identifier/scalar-scalar/f16.wgsl.expected.ir.dxc.hlsl
index 4595a76..42ad066 100644
--- a/test/tint/expressions/binary/mod_by_zero/by_identifier/scalar-scalar/f16.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/expressions/binary/mod_by_zero/by_identifier/scalar-scalar/f16.wgsl.expected.ir.dxc.hlsl
@@ -6,7 +6,6 @@
float16_t v = a;
float16_t v_1 = b;
float16_t v_2 = (v / v_1);
- float16_t v_3 = floor(v_2);
- float16_t r = (v - ((((v_2 < float16_t(0.0h))) ? (ceil(v_2)) : (v_3)) * v_1));
+ float16_t r = (v - ((((v_2 < float16_t(0.0h))) ? (ceil(v_2)) : (floor(v_2))) * v_1));
}
diff --git a/test/tint/expressions/binary/mod_by_zero/by_identifier/scalar-scalar/f32.wgsl.expected.ir.dxc.hlsl b/test/tint/expressions/binary/mod_by_zero/by_identifier/scalar-scalar/f32.wgsl.expected.ir.dxc.hlsl
index a1a03b5..f1c6c21 100644
--- a/test/tint/expressions/binary/mod_by_zero/by_identifier/scalar-scalar/f32.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/expressions/binary/mod_by_zero/by_identifier/scalar-scalar/f32.wgsl.expected.ir.dxc.hlsl
@@ -6,7 +6,6 @@
float v = a;
float v_1 = b;
float v_2 = (v / v_1);
- float v_3 = floor(v_2);
- float r = (v - ((((v_2 < 0.0f)) ? (ceil(v_2)) : (v_3)) * v_1));
+ float r = (v - ((((v_2 < 0.0f)) ? (ceil(v_2)) : (floor(v_2))) * v_1));
}
diff --git a/test/tint/expressions/binary/mod_by_zero/by_identifier/scalar-scalar/f32.wgsl.expected.ir.fxc.hlsl b/test/tint/expressions/binary/mod_by_zero/by_identifier/scalar-scalar/f32.wgsl.expected.ir.fxc.hlsl
index a1a03b5..f1c6c21 100644
--- a/test/tint/expressions/binary/mod_by_zero/by_identifier/scalar-scalar/f32.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/expressions/binary/mod_by_zero/by_identifier/scalar-scalar/f32.wgsl.expected.ir.fxc.hlsl
@@ -6,7 +6,6 @@
float v = a;
float v_1 = b;
float v_2 = (v / v_1);
- float v_3 = floor(v_2);
- float r = (v - ((((v_2 < 0.0f)) ? (ceil(v_2)) : (v_3)) * v_1));
+ float r = (v - ((((v_2 < 0.0f)) ? (ceil(v_2)) : (floor(v_2))) * v_1));
}
diff --git a/test/tint/expressions/binary/mod_by_zero/by_identifier/scalar-scalar/u32.wgsl.expected.glsl b/test/tint/expressions/binary/mod_by_zero/by_identifier/scalar-scalar/u32.wgsl.expected.glsl
index 9359385..5ea5571 100644
--- a/test/tint/expressions/binary/mod_by_zero/by_identifier/scalar-scalar/u32.wgsl.expected.glsl
+++ b/test/tint/expressions/binary/mod_by_zero/by_identifier/scalar-scalar/u32.wgsl.expected.glsl
@@ -1,8 +1,7 @@
#version 310 es
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))));
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
diff --git a/test/tint/expressions/binary/mod_by_zero/by_identifier/scalar-scalar/u32.wgsl.expected.ir.msl b/test/tint/expressions/binary/mod_by_zero/by_identifier/scalar-scalar/u32.wgsl.expected.ir.msl
index 76c928d..f071152 100644
--- a/test/tint/expressions/binary/mod_by_zero/by_identifier/scalar-scalar/u32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/binary/mod_by_zero/by_identifier/scalar-scalar/u32.wgsl.expected.ir.msl
@@ -2,8 +2,7 @@
using namespace metal;
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))));
}
kernel void f() {
diff --git a/test/tint/expressions/binary/mod_by_zero/by_identifier/scalar-vec3/i32.wgsl.expected.glsl b/test/tint/expressions/binary/mod_by_zero/by_identifier/scalar-vec3/i32.wgsl.expected.glsl
index 1de7677..b96a4d2 100644
--- a/test/tint/expressions/binary/mod_by_zero/by_identifier/scalar-vec3/i32.wgsl.expected.glsl
+++ b/test/tint/expressions/binary/mod_by_zero/by_identifier/scalar-vec3/i32.wgsl.expected.glsl
@@ -1,19 +1,16 @@
#version 310 es
ivec3 tint_mod_v3i32(ivec3 lhs, ivec3 rhs) {
- bvec3 v = equal(rhs, ivec3(0));
- bvec3 v_1 = equal(lhs, ivec3((-2147483647 - 1)));
- bvec3 v_2 = equal(rhs, ivec3(-1));
- uvec3 v_3 = uvec3(v_1);
- bvec3 v_4 = bvec3((v_3 & uvec3(v_2)));
- uvec3 v_5 = uvec3(v);
- ivec3 v_6 = mix(rhs, ivec3(1), bvec3((v_5 | uvec3(v_4))));
- return (lhs - ((lhs / v_6) * v_6));
+ uvec3 v = uvec3(equal(lhs, ivec3((-2147483647 - 1))));
+ bvec3 v_1 = bvec3((v & uvec3(equal(rhs, ivec3(-1)))));
+ uvec3 v_2 = uvec3(equal(rhs, ivec3(0)));
+ ivec3 v_3 = mix(rhs, ivec3(1), bvec3((v_2 | uvec3(v_1))));
+ return (lhs - ((lhs / v_3) * v_3));
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
int a = 4;
ivec3 b = ivec3(0, 2, 0);
- ivec3 v_7 = b;
- ivec3 r = tint_mod_v3i32(ivec3(a), v_7);
+ ivec3 v_4 = b;
+ ivec3 r = tint_mod_v3i32(ivec3(a), v_4);
}
diff --git a/test/tint/expressions/binary/mod_by_zero/by_identifier/scalar-vec3/u32.wgsl.expected.glsl b/test/tint/expressions/binary/mod_by_zero/by_identifier/scalar-vec3/u32.wgsl.expected.glsl
index 0f743c2..85a58ab 100644
--- a/test/tint/expressions/binary/mod_by_zero/by_identifier/scalar-vec3/u32.wgsl.expected.glsl
+++ b/test/tint/expressions/binary/mod_by_zero/by_identifier/scalar-vec3/u32.wgsl.expected.glsl
@@ -1,13 +1,12 @@
#version 310 es
uvec3 tint_mod_v3u32(uvec3 lhs, uvec3 rhs) {
- uvec3 v = mix(rhs, uvec3(1u), equal(rhs, uvec3(0u)));
- return (lhs - ((lhs / v) * v));
+ return (lhs - ((lhs / mix(rhs, uvec3(1u), equal(rhs, uvec3(0u)))) * mix(rhs, uvec3(1u), equal(rhs, uvec3(0u)))));
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
uint a = 4u;
uvec3 b = uvec3(0u, 2u, 0u);
- uvec3 v_1 = b;
- uvec3 r = tint_mod_v3u32(uvec3(a), v_1);
+ uvec3 v = b;
+ uvec3 r = tint_mod_v3u32(uvec3(a), v);
}
diff --git a/test/tint/expressions/binary/mod_by_zero/by_identifier/scalar-vec3/u32.wgsl.expected.ir.msl b/test/tint/expressions/binary/mod_by_zero/by_identifier/scalar-vec3/u32.wgsl.expected.ir.msl
index 2f2de18..cb86e0d 100644
--- a/test/tint/expressions/binary/mod_by_zero/by_identifier/scalar-vec3/u32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/binary/mod_by_zero/by_identifier/scalar-vec3/u32.wgsl.expected.ir.msl
@@ -2,13 +2,12 @@
using namespace metal;
uint3 tint_mod_v3u32(uint3 lhs, uint3 rhs) {
- uint3 const v = select(rhs, uint3(1u), (rhs == uint3(0u)));
- return (lhs - ((lhs / v) * v));
+ return (lhs - ((lhs / select(rhs, uint3(1u), (rhs == uint3(0u)))) * select(rhs, uint3(1u), (rhs == uint3(0u)))));
}
kernel void f() {
uint a = 4u;
uint3 b = uint3(0u, 2u, 0u);
- uint3 const v_1 = b;
- uint3 const r = tint_mod_v3u32(uint3(a), v_1);
+ uint3 const v = b;
+ uint3 const r = tint_mod_v3u32(uint3(a), v);
}
diff --git a/test/tint/expressions/binary/mod_by_zero/by_identifier/vec3-scalar/i32.wgsl.expected.glsl b/test/tint/expressions/binary/mod_by_zero/by_identifier/vec3-scalar/i32.wgsl.expected.glsl
index 5d42d1f..dc5b400 100644
--- a/test/tint/expressions/binary/mod_by_zero/by_identifier/vec3-scalar/i32.wgsl.expected.glsl
+++ b/test/tint/expressions/binary/mod_by_zero/by_identifier/vec3-scalar/i32.wgsl.expected.glsl
@@ -1,19 +1,16 @@
#version 310 es
ivec3 tint_mod_v3i32(ivec3 lhs, ivec3 rhs) {
- bvec3 v = equal(rhs, ivec3(0));
- bvec3 v_1 = equal(lhs, ivec3((-2147483647 - 1)));
- bvec3 v_2 = equal(rhs, ivec3(-1));
- uvec3 v_3 = uvec3(v_1);
- bvec3 v_4 = bvec3((v_3 & uvec3(v_2)));
- uvec3 v_5 = uvec3(v);
- ivec3 v_6 = mix(rhs, ivec3(1), bvec3((v_5 | uvec3(v_4))));
- return (lhs - ((lhs / v_6) * v_6));
+ uvec3 v = uvec3(equal(lhs, ivec3((-2147483647 - 1))));
+ bvec3 v_1 = bvec3((v & uvec3(equal(rhs, ivec3(-1)))));
+ uvec3 v_2 = uvec3(equal(rhs, ivec3(0)));
+ ivec3 v_3 = mix(rhs, ivec3(1), bvec3((v_2 | uvec3(v_1))));
+ return (lhs - ((lhs / v_3) * v_3));
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
ivec3 a = ivec3(1, 2, 3);
int b = 0;
- ivec3 v_7 = a;
- ivec3 r = tint_mod_v3i32(v_7, ivec3(b));
+ ivec3 v_4 = a;
+ ivec3 r = tint_mod_v3i32(v_4, ivec3(b));
}
diff --git a/test/tint/expressions/binary/mod_by_zero/by_identifier/vec3-scalar/u32.wgsl.expected.glsl b/test/tint/expressions/binary/mod_by_zero/by_identifier/vec3-scalar/u32.wgsl.expected.glsl
index f51167b..6dbb325 100644
--- a/test/tint/expressions/binary/mod_by_zero/by_identifier/vec3-scalar/u32.wgsl.expected.glsl
+++ b/test/tint/expressions/binary/mod_by_zero/by_identifier/vec3-scalar/u32.wgsl.expected.glsl
@@ -1,13 +1,12 @@
#version 310 es
uvec3 tint_mod_v3u32(uvec3 lhs, uvec3 rhs) {
- uvec3 v = mix(rhs, uvec3(1u), equal(rhs, uvec3(0u)));
- return (lhs - ((lhs / v) * v));
+ return (lhs - ((lhs / mix(rhs, uvec3(1u), equal(rhs, uvec3(0u)))) * mix(rhs, uvec3(1u), equal(rhs, uvec3(0u)))));
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
uvec3 a = uvec3(1u, 2u, 3u);
uint b = 0u;
- uvec3 v_1 = a;
- uvec3 r = tint_mod_v3u32(v_1, uvec3(b));
+ uvec3 v = a;
+ uvec3 r = tint_mod_v3u32(v, uvec3(b));
}
diff --git a/test/tint/expressions/binary/mod_by_zero/by_identifier/vec3-scalar/u32.wgsl.expected.ir.msl b/test/tint/expressions/binary/mod_by_zero/by_identifier/vec3-scalar/u32.wgsl.expected.ir.msl
index f36620a..f78e14b 100644
--- a/test/tint/expressions/binary/mod_by_zero/by_identifier/vec3-scalar/u32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/binary/mod_by_zero/by_identifier/vec3-scalar/u32.wgsl.expected.ir.msl
@@ -2,13 +2,12 @@
using namespace metal;
uint3 tint_mod_v3u32(uint3 lhs, uint3 rhs) {
- uint3 const v = select(rhs, uint3(1u), (rhs == uint3(0u)));
- return (lhs - ((lhs / v) * v));
+ return (lhs - ((lhs / select(rhs, uint3(1u), (rhs == uint3(0u)))) * select(rhs, uint3(1u), (rhs == uint3(0u)))));
}
kernel void f() {
uint3 a = uint3(1u, 2u, 3u);
uint b = 0u;
- uint3 const v_1 = a;
- uint3 const r = tint_mod_v3u32(v_1, uint3(b));
+ uint3 const v = a;
+ uint3 const r = tint_mod_v3u32(v, uint3(b));
}
diff --git a/test/tint/expressions/binary/mod_by_zero/by_identifier/vec3-vec3/f16.wgsl.expected.ir.dxc.hlsl b/test/tint/expressions/binary/mod_by_zero/by_identifier/vec3-vec3/f16.wgsl.expected.ir.dxc.hlsl
index 0ef56e6..6ef55ee 100644
--- a/test/tint/expressions/binary/mod_by_zero/by_identifier/vec3-vec3/f16.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/expressions/binary/mod_by_zero/by_identifier/vec3-vec3/f16.wgsl.expected.ir.dxc.hlsl
@@ -6,7 +6,6 @@
vector<float16_t, 3> v = a;
vector<float16_t, 3> v_1 = b;
vector<float16_t, 3> v_2 = (v / v_1);
- vector<float16_t, 3> v_3 = floor(v_2);
- vector<float16_t, 3> r = (v - ((((v_2 < (float16_t(0.0h)).xxx)) ? (ceil(v_2)) : (v_3)) * v_1));
+ vector<float16_t, 3> r = (v - ((((v_2 < (float16_t(0.0h)).xxx)) ? (ceil(v_2)) : (floor(v_2))) * v_1));
}
diff --git a/test/tint/expressions/binary/mod_by_zero/by_identifier/vec3-vec3/f32.wgsl.expected.ir.dxc.hlsl b/test/tint/expressions/binary/mod_by_zero/by_identifier/vec3-vec3/f32.wgsl.expected.ir.dxc.hlsl
index a1e0035..9f88092 100644
--- a/test/tint/expressions/binary/mod_by_zero/by_identifier/vec3-vec3/f32.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/expressions/binary/mod_by_zero/by_identifier/vec3-vec3/f32.wgsl.expected.ir.dxc.hlsl
@@ -6,7 +6,6 @@
float3 v = a;
float3 v_1 = b;
float3 v_2 = (v / v_1);
- float3 v_3 = floor(v_2);
- float3 r = (v - ((((v_2 < (0.0f).xxx)) ? (ceil(v_2)) : (v_3)) * v_1));
+ float3 r = (v - ((((v_2 < (0.0f).xxx)) ? (ceil(v_2)) : (floor(v_2))) * v_1));
}
diff --git a/test/tint/expressions/binary/mod_by_zero/by_identifier/vec3-vec3/f32.wgsl.expected.ir.fxc.hlsl b/test/tint/expressions/binary/mod_by_zero/by_identifier/vec3-vec3/f32.wgsl.expected.ir.fxc.hlsl
index a1e0035..9f88092 100644
--- a/test/tint/expressions/binary/mod_by_zero/by_identifier/vec3-vec3/f32.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/expressions/binary/mod_by_zero/by_identifier/vec3-vec3/f32.wgsl.expected.ir.fxc.hlsl
@@ -6,7 +6,6 @@
float3 v = a;
float3 v_1 = b;
float3 v_2 = (v / v_1);
- float3 v_3 = floor(v_2);
- float3 r = (v - ((((v_2 < (0.0f).xxx)) ? (ceil(v_2)) : (v_3)) * v_1));
+ float3 r = (v - ((((v_2 < (0.0f).xxx)) ? (ceil(v_2)) : (floor(v_2))) * v_1));
}
diff --git a/test/tint/expressions/binary/mod_by_zero/by_identifier/vec3-vec3/i32.wgsl.expected.glsl b/test/tint/expressions/binary/mod_by_zero/by_identifier/vec3-vec3/i32.wgsl.expected.glsl
index e49d863..2691a87 100644
--- a/test/tint/expressions/binary/mod_by_zero/by_identifier/vec3-vec3/i32.wgsl.expected.glsl
+++ b/test/tint/expressions/binary/mod_by_zero/by_identifier/vec3-vec3/i32.wgsl.expected.glsl
@@ -1,14 +1,11 @@
#version 310 es
ivec3 tint_mod_v3i32(ivec3 lhs, ivec3 rhs) {
- bvec3 v = equal(rhs, ivec3(0));
- bvec3 v_1 = equal(lhs, ivec3((-2147483647 - 1)));
- bvec3 v_2 = equal(rhs, ivec3(-1));
- uvec3 v_3 = uvec3(v_1);
- bvec3 v_4 = bvec3((v_3 & uvec3(v_2)));
- uvec3 v_5 = uvec3(v);
- ivec3 v_6 = mix(rhs, ivec3(1), bvec3((v_5 | uvec3(v_4))));
- return (lhs - ((lhs / v_6) * v_6));
+ uvec3 v = uvec3(equal(lhs, ivec3((-2147483647 - 1))));
+ bvec3 v_1 = bvec3((v & uvec3(equal(rhs, ivec3(-1)))));
+ uvec3 v_2 = uvec3(equal(rhs, ivec3(0)));
+ ivec3 v_3 = mix(rhs, ivec3(1), bvec3((v_2 | uvec3(v_1))));
+ return (lhs - ((lhs / v_3) * v_3));
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
diff --git a/test/tint/expressions/binary/mod_by_zero/by_identifier/vec3-vec3/u32.wgsl.expected.glsl b/test/tint/expressions/binary/mod_by_zero/by_identifier/vec3-vec3/u32.wgsl.expected.glsl
index 3d693fe..9c80506 100644
--- a/test/tint/expressions/binary/mod_by_zero/by_identifier/vec3-vec3/u32.wgsl.expected.glsl
+++ b/test/tint/expressions/binary/mod_by_zero/by_identifier/vec3-vec3/u32.wgsl.expected.glsl
@@ -1,8 +1,7 @@
#version 310 es
uvec3 tint_mod_v3u32(uvec3 lhs, uvec3 rhs) {
- uvec3 v = mix(rhs, uvec3(1u), equal(rhs, uvec3(0u)));
- return (lhs - ((lhs / v) * v));
+ return (lhs - ((lhs / mix(rhs, uvec3(1u), equal(rhs, uvec3(0u)))) * mix(rhs, uvec3(1u), equal(rhs, uvec3(0u)))));
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
diff --git a/test/tint/expressions/binary/mod_by_zero/by_identifier/vec3-vec3/u32.wgsl.expected.ir.msl b/test/tint/expressions/binary/mod_by_zero/by_identifier/vec3-vec3/u32.wgsl.expected.ir.msl
index 31479d6..20b681f 100644
--- a/test/tint/expressions/binary/mod_by_zero/by_identifier/vec3-vec3/u32.wgsl.expected.ir.msl
+++ b/test/tint/expressions/binary/mod_by_zero/by_identifier/vec3-vec3/u32.wgsl.expected.ir.msl
@@ -2,8 +2,7 @@
using namespace metal;
uint3 tint_mod_v3u32(uint3 lhs, uint3 rhs) {
- uint3 const v = select(rhs, uint3(1u), (rhs == uint3(0u)));
- return (lhs - ((lhs / v) * v));
+ return (lhs - ((lhs / select(rhs, uint3(1u), (rhs == uint3(0u)))) * select(rhs, uint3(1u), (rhs == uint3(0u)))));
}
kernel void f() {
diff --git a/test/tint/expressions/binary/mul/mat3x3-vec3/f32.wgsl.expected.ir.dxc.hlsl b/test/tint/expressions/binary/mul/mat3x3-vec3/f32.wgsl.expected.ir.dxc.hlsl
index 67866f1..2b2ea1e 100644
--- a/test/tint/expressions/binary/mul/mat3x3-vec3/f32.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/expressions/binary/mul/mat3x3-vec3/f32.wgsl.expected.ir.dxc.hlsl
@@ -3,13 +3,11 @@
uint4 data[4];
};
float3x3 v(uint start_byte_offset) {
- float3 v_1 = asfloat(data[(start_byte_offset / 16u)].xyz);
- float3 v_2 = asfloat(data[((16u + start_byte_offset) / 16u)].xyz);
- return float3x3(v_1, v_2, asfloat(data[((32u + start_byte_offset) / 16u)].xyz));
+ return float3x3(asfloat(data[(start_byte_offset / 16u)].xyz), asfloat(data[((16u + start_byte_offset) / 16u)].xyz), asfloat(data[((32u + start_byte_offset) / 16u)].xyz));
}
void main() {
- float3x3 v_3 = v(0u);
- float3 x = mul(asfloat(data[3u].xyz), v_3);
+ float3x3 v_1 = v(0u);
+ float3 x = mul(asfloat(data[3u].xyz), v_1);
}
diff --git a/test/tint/expressions/binary/mul/mat3x3-vec3/f32.wgsl.expected.ir.fxc.hlsl b/test/tint/expressions/binary/mul/mat3x3-vec3/f32.wgsl.expected.ir.fxc.hlsl
index 67866f1..2b2ea1e 100644
--- a/test/tint/expressions/binary/mul/mat3x3-vec3/f32.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/expressions/binary/mul/mat3x3-vec3/f32.wgsl.expected.ir.fxc.hlsl
@@ -3,13 +3,11 @@
uint4 data[4];
};
float3x3 v(uint start_byte_offset) {
- float3 v_1 = asfloat(data[(start_byte_offset / 16u)].xyz);
- float3 v_2 = asfloat(data[((16u + start_byte_offset) / 16u)].xyz);
- return float3x3(v_1, v_2, asfloat(data[((32u + start_byte_offset) / 16u)].xyz));
+ return float3x3(asfloat(data[(start_byte_offset / 16u)].xyz), asfloat(data[((16u + start_byte_offset) / 16u)].xyz), asfloat(data[((32u + start_byte_offset) / 16u)].xyz));
}
void main() {
- float3x3 v_3 = v(0u);
- float3 x = mul(asfloat(data[3u].xyz), v_3);
+ float3x3 v_1 = v(0u);
+ float3 x = mul(asfloat(data[3u].xyz), v_1);
}
diff --git a/test/tint/expressions/binary/mul/vec3-mat3x3/f32.wgsl.expected.ir.dxc.hlsl b/test/tint/expressions/binary/mul/vec3-mat3x3/f32.wgsl.expected.ir.dxc.hlsl
index 6a477e0..728239a 100644
--- a/test/tint/expressions/binary/mul/vec3-mat3x3/f32.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/expressions/binary/mul/vec3-mat3x3/f32.wgsl.expected.ir.dxc.hlsl
@@ -3,13 +3,11 @@
uint4 data[4];
};
float3x3 v(uint start_byte_offset) {
- float3 v_1 = asfloat(data[(start_byte_offset / 16u)].xyz);
- float3 v_2 = asfloat(data[((16u + start_byte_offset) / 16u)].xyz);
- return float3x3(v_1, v_2, asfloat(data[((32u + start_byte_offset) / 16u)].xyz));
+ return float3x3(asfloat(data[(start_byte_offset / 16u)].xyz), asfloat(data[((16u + start_byte_offset) / 16u)].xyz), asfloat(data[((32u + start_byte_offset) / 16u)].xyz));
}
void main() {
- float3 v_3 = asfloat(data[3u].xyz);
- float3 x = mul(v(0u), v_3);
+ float3 v_1 = asfloat(data[3u].xyz);
+ float3 x = mul(v(0u), v_1);
}
diff --git a/test/tint/expressions/binary/mul/vec3-mat3x3/f32.wgsl.expected.ir.fxc.hlsl b/test/tint/expressions/binary/mul/vec3-mat3x3/f32.wgsl.expected.ir.fxc.hlsl
index 6a477e0..728239a 100644
--- a/test/tint/expressions/binary/mul/vec3-mat3x3/f32.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/expressions/binary/mul/vec3-mat3x3/f32.wgsl.expected.ir.fxc.hlsl
@@ -3,13 +3,11 @@
uint4 data[4];
};
float3x3 v(uint start_byte_offset) {
- float3 v_1 = asfloat(data[(start_byte_offset / 16u)].xyz);
- float3 v_2 = asfloat(data[((16u + start_byte_offset) / 16u)].xyz);
- return float3x3(v_1, v_2, asfloat(data[((32u + start_byte_offset) / 16u)].xyz));
+ return float3x3(asfloat(data[(start_byte_offset / 16u)].xyz), asfloat(data[((16u + start_byte_offset) / 16u)].xyz), asfloat(data[((32u + start_byte_offset) / 16u)].xyz));
}
void main() {
- float3 v_3 = asfloat(data[3u].xyz);
- float3 x = mul(v(0u), v_3);
+ float3 v_1 = asfloat(data[3u].xyz);
+ float3 x = mul(v(0u), v_1);
}
diff --git a/test/tint/expressions/binary/mul/vec3-mat4x3/f32.wgsl.expected.ir.dxc.hlsl b/test/tint/expressions/binary/mul/vec3-mat4x3/f32.wgsl.expected.ir.dxc.hlsl
index 36c7465..a3175f4 100644
--- a/test/tint/expressions/binary/mul/vec3-mat4x3/f32.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/expressions/binary/mul/vec3-mat4x3/f32.wgsl.expected.ir.dxc.hlsl
@@ -3,14 +3,11 @@
uint4 data[5];
};
float4x3 v(uint start_byte_offset) {
- float3 v_1 = asfloat(data[(start_byte_offset / 16u)].xyz);
- float3 v_2 = asfloat(data[((16u + start_byte_offset) / 16u)].xyz);
- float3 v_3 = asfloat(data[((32u + start_byte_offset) / 16u)].xyz);
- return float4x3(v_1, v_2, v_3, asfloat(data[((48u + start_byte_offset) / 16u)].xyz));
+ return float4x3(asfloat(data[(start_byte_offset / 16u)].xyz), asfloat(data[((16u + start_byte_offset) / 16u)].xyz), asfloat(data[((32u + start_byte_offset) / 16u)].xyz), asfloat(data[((48u + start_byte_offset) / 16u)].xyz));
}
void main() {
- float3 v_4 = asfloat(data[4u].xyz);
- float4 x = mul(v(0u), v_4);
+ float3 v_1 = asfloat(data[4u].xyz);
+ float4 x = mul(v(0u), v_1);
}
diff --git a/test/tint/expressions/binary/mul/vec3-mat4x3/f32.wgsl.expected.ir.fxc.hlsl b/test/tint/expressions/binary/mul/vec3-mat4x3/f32.wgsl.expected.ir.fxc.hlsl
index 36c7465..a3175f4 100644
--- a/test/tint/expressions/binary/mul/vec3-mat4x3/f32.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/expressions/binary/mul/vec3-mat4x3/f32.wgsl.expected.ir.fxc.hlsl
@@ -3,14 +3,11 @@
uint4 data[5];
};
float4x3 v(uint start_byte_offset) {
- float3 v_1 = asfloat(data[(start_byte_offset / 16u)].xyz);
- float3 v_2 = asfloat(data[((16u + start_byte_offset) / 16u)].xyz);
- float3 v_3 = asfloat(data[((32u + start_byte_offset) / 16u)].xyz);
- return float4x3(v_1, v_2, v_3, asfloat(data[((48u + start_byte_offset) / 16u)].xyz));
+ return float4x3(asfloat(data[(start_byte_offset / 16u)].xyz), asfloat(data[((16u + start_byte_offset) / 16u)].xyz), asfloat(data[((32u + start_byte_offset) / 16u)].xyz), asfloat(data[((48u + start_byte_offset) / 16u)].xyz));
}
void main() {
- float3 v_4 = asfloat(data[4u].xyz);
- float4 x = mul(v(0u), v_4);
+ float3 v_1 = asfloat(data[4u].xyz);
+ float4 x = mul(v(0u), v_1);
}
diff --git a/test/tint/expressions/bitcast/let/64bit/vec2f32-vec4f16.wgsl.expected.glsl b/test/tint/expressions/bitcast/let/64bit/vec2f32-vec4f16.wgsl.expected.glsl
index 5dfa497..d9320a5 100644
--- a/test/tint/expressions/bitcast/let/64bit/vec2f32-vec4f16.wgsl.expected.glsl
+++ b/test/tint/expressions/bitcast/let/64bit/vec2f32-vec4f16.wgsl.expected.glsl
@@ -2,9 +2,7 @@
#extension GL_AMD_gpu_shader_half_float: require
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));
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
diff --git a/test/tint/expressions/bitcast/let/64bit/vec2i32-vec4f16.wgsl.expected.glsl b/test/tint/expressions/bitcast/let/64bit/vec2i32-vec4f16.wgsl.expected.glsl
index 319c3b4..756e4f4 100644
--- a/test/tint/expressions/bitcast/let/64bit/vec2i32-vec4f16.wgsl.expected.glsl
+++ b/test/tint/expressions/bitcast/let/64bit/vec2i32-vec4f16.wgsl.expected.glsl
@@ -3,8 +3,7 @@
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));
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
diff --git a/test/tint/expressions/bitcast/let/64bit/vec2u32-vec4f16.wgsl.expected.glsl b/test/tint/expressions/bitcast/let/64bit/vec2u32-vec4f16.wgsl.expected.glsl
index 93bb97a..13a3cff 100644
--- a/test/tint/expressions/bitcast/let/64bit/vec2u32-vec4f16.wgsl.expected.glsl
+++ b/test/tint/expressions/bitcast/let/64bit/vec2u32-vec4f16.wgsl.expected.glsl
@@ -3,8 +3,7 @@
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));
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
diff --git a/test/tint/expressions/bitcast/let/64bit/vec4f16-vec2f32.wgsl.expected.glsl b/test/tint/expressions/bitcast/let/64bit/vec4f16-vec2f32.wgsl.expected.glsl
index 526f889..849d7e4 100644
--- a/test/tint/expressions/bitcast/let/64bit/vec4f16-vec2f32.wgsl.expected.glsl
+++ b/test/tint/expressions/bitcast/let/64bit/vec4f16-vec2f32.wgsl.expected.glsl
@@ -2,8 +2,7 @@
#extension GL_AMD_gpu_shader_half_float: require
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)));
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
diff --git a/test/tint/expressions/bitcast/let/64bit/vec4f16-vec2i32.wgsl.expected.glsl b/test/tint/expressions/bitcast/let/64bit/vec4f16-vec2i32.wgsl.expected.glsl
index 4e85030..607f7e3 100644
--- a/test/tint/expressions/bitcast/let/64bit/vec4f16-vec2i32.wgsl.expected.glsl
+++ b/test/tint/expressions/bitcast/let/64bit/vec4f16-vec2i32.wgsl.expected.glsl
@@ -2,8 +2,7 @@
#extension GL_AMD_gpu_shader_half_float: require
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)));
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
diff --git a/test/tint/expressions/bitcast/let/64bit/vec4f16-vec2u32.wgsl.expected.glsl b/test/tint/expressions/bitcast/let/64bit/vec4f16-vec2u32.wgsl.expected.glsl
index 4a24e02..e9f5111 100644
--- a/test/tint/expressions/bitcast/let/64bit/vec4f16-vec2u32.wgsl.expected.glsl
+++ b/test/tint/expressions/bitcast/let/64bit/vec4f16-vec2u32.wgsl.expected.glsl
@@ -2,8 +2,7 @@
#extension GL_AMD_gpu_shader_half_float: require
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)));
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
diff --git a/test/tint/expressions/type_conv/vec2/function/f16-i32.wgsl.expected.glsl b/test/tint/expressions/type_conv/vec2/function/f16-i32.wgsl.expected.glsl
index e02ebfa..a84cf6f 100644
--- a/test/tint/expressions/type_conv/vec2/function/f16-i32.wgsl.expected.glsl
+++ b/test/tint/expressions/type_conv/vec2/function/f16-i32.wgsl.expected.glsl
@@ -7,9 +7,7 @@
return f16vec2(t);
}
ivec2 tint_v2f16_to_v2i32(f16vec2 value) {
- ivec2 v_1 = ivec2(value);
- ivec2 v_2 = mix(ivec2((-2147483647 - 1)), v_1, greaterThanEqual(value, f16vec2(-65504.0hf)));
- return mix(ivec2(2147483647), v_2, lessThanEqual(value, f16vec2(65504.0hf)));
+ return mix(ivec2(2147483647), mix(ivec2((-2147483647 - 1)), ivec2(value), greaterThanEqual(value, f16vec2(-65504.0hf))), lessThanEqual(value, f16vec2(65504.0hf)));
}
void f() {
ivec2 v = tint_v2f16_to_v2i32(m());
diff --git a/test/tint/expressions/type_conv/vec2/function/f16-u32.wgsl.expected.glsl b/test/tint/expressions/type_conv/vec2/function/f16-u32.wgsl.expected.glsl
index 9603b63..882b850 100644
--- a/test/tint/expressions/type_conv/vec2/function/f16-u32.wgsl.expected.glsl
+++ b/test/tint/expressions/type_conv/vec2/function/f16-u32.wgsl.expected.glsl
@@ -7,9 +7,7 @@
return f16vec2(t);
}
uvec2 tint_v2f16_to_v2u32(f16vec2 value) {
- uvec2 v_1 = uvec2(value);
- uvec2 v_2 = mix(uvec2(0u), v_1, greaterThanEqual(value, f16vec2(0.0hf)));
- return mix(uvec2(4294967295u), v_2, lessThanEqual(value, f16vec2(65504.0hf)));
+ return mix(uvec2(4294967295u), mix(uvec2(0u), uvec2(value), greaterThanEqual(value, f16vec2(0.0hf))), lessThanEqual(value, f16vec2(65504.0hf)));
}
void f() {
uvec2 v = tint_v2f16_to_v2u32(m());
diff --git a/test/tint/expressions/type_conv/vec2/function/f32-i32.wgsl.expected.glsl b/test/tint/expressions/type_conv/vec2/function/f32-i32.wgsl.expected.glsl
index dec14f8..ffabbe6 100644
--- a/test/tint/expressions/type_conv/vec2/function/f32-i32.wgsl.expected.glsl
+++ b/test/tint/expressions/type_conv/vec2/function/f32-i32.wgsl.expected.glsl
@@ -6,9 +6,7 @@
return vec2(t);
}
ivec2 tint_v2f32_to_v2i32(vec2 value) {
- ivec2 v_1 = ivec2(value);
- ivec2 v_2 = mix(ivec2((-2147483647 - 1)), v_1, greaterThanEqual(value, vec2(-2147483648.0f)));
- return mix(ivec2(2147483647), v_2, lessThanEqual(value, vec2(2147483520.0f)));
+ return mix(ivec2(2147483647), mix(ivec2((-2147483647 - 1)), ivec2(value), greaterThanEqual(value, vec2(-2147483648.0f))), lessThanEqual(value, vec2(2147483520.0f)));
}
void f() {
ivec2 v = tint_v2f32_to_v2i32(m());
diff --git a/test/tint/expressions/type_conv/vec2/function/f32-u32.wgsl.expected.glsl b/test/tint/expressions/type_conv/vec2/function/f32-u32.wgsl.expected.glsl
index 8184170..4a99532 100644
--- a/test/tint/expressions/type_conv/vec2/function/f32-u32.wgsl.expected.glsl
+++ b/test/tint/expressions/type_conv/vec2/function/f32-u32.wgsl.expected.glsl
@@ -6,9 +6,7 @@
return vec2(t);
}
uvec2 tint_v2f32_to_v2u32(vec2 value) {
- uvec2 v_1 = uvec2(value);
- uvec2 v_2 = mix(uvec2(0u), v_1, greaterThanEqual(value, vec2(0.0f)));
- return mix(uvec2(4294967295u), v_2, lessThanEqual(value, vec2(4294967040.0f)));
+ return mix(uvec2(4294967295u), mix(uvec2(0u), uvec2(value), greaterThanEqual(value, vec2(0.0f))), lessThanEqual(value, vec2(4294967040.0f)));
}
void f() {
uvec2 v = tint_v2f32_to_v2u32(m());
diff --git a/test/tint/expressions/type_conv/vec2/var/f16-i32.wgsl.expected.glsl b/test/tint/expressions/type_conv/vec2/var/f16-i32.wgsl.expected.glsl
index 6154a32..9710709 100644
--- a/test/tint/expressions/type_conv/vec2/var/f16-i32.wgsl.expected.glsl
+++ b/test/tint/expressions/type_conv/vec2/var/f16-i32.wgsl.expected.glsl
@@ -3,9 +3,7 @@
f16vec2 u = f16vec2(1.0hf);
ivec2 tint_v2f16_to_v2i32(f16vec2 value) {
- ivec2 v_1 = ivec2(value);
- ivec2 v_2 = mix(ivec2((-2147483647 - 1)), v_1, greaterThanEqual(value, f16vec2(-65504.0hf)));
- return mix(ivec2(2147483647), v_2, lessThanEqual(value, f16vec2(65504.0hf)));
+ return mix(ivec2(2147483647), mix(ivec2((-2147483647 - 1)), ivec2(value), greaterThanEqual(value, f16vec2(-65504.0hf))), lessThanEqual(value, f16vec2(65504.0hf)));
}
void f() {
ivec2 v = tint_v2f16_to_v2i32(u);
diff --git a/test/tint/expressions/type_conv/vec2/var/f16-u32.wgsl.expected.glsl b/test/tint/expressions/type_conv/vec2/var/f16-u32.wgsl.expected.glsl
index 8de6103..987d321 100644
--- a/test/tint/expressions/type_conv/vec2/var/f16-u32.wgsl.expected.glsl
+++ b/test/tint/expressions/type_conv/vec2/var/f16-u32.wgsl.expected.glsl
@@ -3,9 +3,7 @@
f16vec2 u = f16vec2(1.0hf);
uvec2 tint_v2f16_to_v2u32(f16vec2 value) {
- uvec2 v_1 = uvec2(value);
- uvec2 v_2 = mix(uvec2(0u), v_1, greaterThanEqual(value, f16vec2(0.0hf)));
- return mix(uvec2(4294967295u), v_2, lessThanEqual(value, f16vec2(65504.0hf)));
+ return mix(uvec2(4294967295u), mix(uvec2(0u), uvec2(value), greaterThanEqual(value, f16vec2(0.0hf))), lessThanEqual(value, f16vec2(65504.0hf)));
}
void f() {
uvec2 v = tint_v2f16_to_v2u32(u);
diff --git a/test/tint/expressions/type_conv/vec2/var/f32-i32.wgsl.expected.glsl b/test/tint/expressions/type_conv/vec2/var/f32-i32.wgsl.expected.glsl
index 3f0487c..9191978 100644
--- a/test/tint/expressions/type_conv/vec2/var/f32-i32.wgsl.expected.glsl
+++ b/test/tint/expressions/type_conv/vec2/var/f32-i32.wgsl.expected.glsl
@@ -2,9 +2,7 @@
vec2 u = vec2(1.0f);
ivec2 tint_v2f32_to_v2i32(vec2 value) {
- ivec2 v_1 = ivec2(value);
- ivec2 v_2 = mix(ivec2((-2147483647 - 1)), v_1, greaterThanEqual(value, vec2(-2147483648.0f)));
- return mix(ivec2(2147483647), v_2, lessThanEqual(value, vec2(2147483520.0f)));
+ return mix(ivec2(2147483647), mix(ivec2((-2147483647 - 1)), ivec2(value), greaterThanEqual(value, vec2(-2147483648.0f))), lessThanEqual(value, vec2(2147483520.0f)));
}
void f() {
ivec2 v = tint_v2f32_to_v2i32(u);
diff --git a/test/tint/expressions/type_conv/vec2/var/f32-u32.wgsl.expected.glsl b/test/tint/expressions/type_conv/vec2/var/f32-u32.wgsl.expected.glsl
index 9e1ab48..7173ddd 100644
--- a/test/tint/expressions/type_conv/vec2/var/f32-u32.wgsl.expected.glsl
+++ b/test/tint/expressions/type_conv/vec2/var/f32-u32.wgsl.expected.glsl
@@ -2,9 +2,7 @@
vec2 u = vec2(1.0f);
uvec2 tint_v2f32_to_v2u32(vec2 value) {
- uvec2 v_1 = uvec2(value);
- uvec2 v_2 = mix(uvec2(0u), v_1, greaterThanEqual(value, vec2(0.0f)));
- return mix(uvec2(4294967295u), v_2, lessThanEqual(value, vec2(4294967040.0f)));
+ return mix(uvec2(4294967295u), mix(uvec2(0u), uvec2(value), greaterThanEqual(value, vec2(0.0f))), lessThanEqual(value, vec2(4294967040.0f)));
}
void f() {
uvec2 v = tint_v2f32_to_v2u32(u);
diff --git a/test/tint/expressions/type_conv/vec3/function/f16-i32.wgsl.expected.glsl b/test/tint/expressions/type_conv/vec3/function/f16-i32.wgsl.expected.glsl
index 62cd746..5bbf47e 100644
--- a/test/tint/expressions/type_conv/vec3/function/f16-i32.wgsl.expected.glsl
+++ b/test/tint/expressions/type_conv/vec3/function/f16-i32.wgsl.expected.glsl
@@ -7,9 +7,7 @@
return f16vec3(t);
}
ivec3 tint_v3f16_to_v3i32(f16vec3 value) {
- ivec3 v_1 = ivec3(value);
- ivec3 v_2 = mix(ivec3((-2147483647 - 1)), v_1, greaterThanEqual(value, f16vec3(-65504.0hf)));
- return mix(ivec3(2147483647), v_2, lessThanEqual(value, f16vec3(65504.0hf)));
+ return mix(ivec3(2147483647), mix(ivec3((-2147483647 - 1)), ivec3(value), greaterThanEqual(value, f16vec3(-65504.0hf))), lessThanEqual(value, f16vec3(65504.0hf)));
}
void f() {
ivec3 v = tint_v3f16_to_v3i32(m());
diff --git a/test/tint/expressions/type_conv/vec3/function/f16-u32.wgsl.expected.glsl b/test/tint/expressions/type_conv/vec3/function/f16-u32.wgsl.expected.glsl
index b27838b..850e291 100644
--- a/test/tint/expressions/type_conv/vec3/function/f16-u32.wgsl.expected.glsl
+++ b/test/tint/expressions/type_conv/vec3/function/f16-u32.wgsl.expected.glsl
@@ -7,9 +7,7 @@
return f16vec3(t);
}
uvec3 tint_v3f16_to_v3u32(f16vec3 value) {
- uvec3 v_1 = uvec3(value);
- uvec3 v_2 = mix(uvec3(0u), v_1, greaterThanEqual(value, f16vec3(0.0hf)));
- return mix(uvec3(4294967295u), v_2, lessThanEqual(value, f16vec3(65504.0hf)));
+ return mix(uvec3(4294967295u), mix(uvec3(0u), uvec3(value), greaterThanEqual(value, f16vec3(0.0hf))), lessThanEqual(value, f16vec3(65504.0hf)));
}
void f() {
uvec3 v = tint_v3f16_to_v3u32(m());
diff --git a/test/tint/expressions/type_conv/vec3/function/f32-i32.wgsl.expected.glsl b/test/tint/expressions/type_conv/vec3/function/f32-i32.wgsl.expected.glsl
index 32f8dfd..3618b45 100644
--- a/test/tint/expressions/type_conv/vec3/function/f32-i32.wgsl.expected.glsl
+++ b/test/tint/expressions/type_conv/vec3/function/f32-i32.wgsl.expected.glsl
@@ -6,9 +6,7 @@
return vec3(t);
}
ivec3 tint_v3f32_to_v3i32(vec3 value) {
- ivec3 v_1 = ivec3(value);
- ivec3 v_2 = mix(ivec3((-2147483647 - 1)), v_1, greaterThanEqual(value, vec3(-2147483648.0f)));
- return mix(ivec3(2147483647), v_2, lessThanEqual(value, vec3(2147483520.0f)));
+ return mix(ivec3(2147483647), mix(ivec3((-2147483647 - 1)), ivec3(value), greaterThanEqual(value, vec3(-2147483648.0f))), lessThanEqual(value, vec3(2147483520.0f)));
}
void f() {
ivec3 v = tint_v3f32_to_v3i32(m());
diff --git a/test/tint/expressions/type_conv/vec3/function/f32-u32.wgsl.expected.glsl b/test/tint/expressions/type_conv/vec3/function/f32-u32.wgsl.expected.glsl
index 46e424d..e2e2123 100644
--- a/test/tint/expressions/type_conv/vec3/function/f32-u32.wgsl.expected.glsl
+++ b/test/tint/expressions/type_conv/vec3/function/f32-u32.wgsl.expected.glsl
@@ -6,9 +6,7 @@
return vec3(t);
}
uvec3 tint_v3f32_to_v3u32(vec3 value) {
- uvec3 v_1 = uvec3(value);
- uvec3 v_2 = mix(uvec3(0u), v_1, greaterThanEqual(value, vec3(0.0f)));
- return mix(uvec3(4294967295u), v_2, lessThanEqual(value, vec3(4294967040.0f)));
+ return mix(uvec3(4294967295u), mix(uvec3(0u), uvec3(value), greaterThanEqual(value, vec3(0.0f))), lessThanEqual(value, vec3(4294967040.0f)));
}
void f() {
uvec3 v = tint_v3f32_to_v3u32(m());
diff --git a/test/tint/expressions/type_conv/vec3/var/f16-i32.wgsl.expected.glsl b/test/tint/expressions/type_conv/vec3/var/f16-i32.wgsl.expected.glsl
index 838e0d0..9521a48 100644
--- a/test/tint/expressions/type_conv/vec3/var/f16-i32.wgsl.expected.glsl
+++ b/test/tint/expressions/type_conv/vec3/var/f16-i32.wgsl.expected.glsl
@@ -3,9 +3,7 @@
f16vec3 u = f16vec3(1.0hf);
ivec3 tint_v3f16_to_v3i32(f16vec3 value) {
- ivec3 v_1 = ivec3(value);
- ivec3 v_2 = mix(ivec3((-2147483647 - 1)), v_1, greaterThanEqual(value, f16vec3(-65504.0hf)));
- return mix(ivec3(2147483647), v_2, lessThanEqual(value, f16vec3(65504.0hf)));
+ return mix(ivec3(2147483647), mix(ivec3((-2147483647 - 1)), ivec3(value), greaterThanEqual(value, f16vec3(-65504.0hf))), lessThanEqual(value, f16vec3(65504.0hf)));
}
void f() {
ivec3 v = tint_v3f16_to_v3i32(u);
diff --git a/test/tint/expressions/type_conv/vec3/var/f16-u32.wgsl.expected.glsl b/test/tint/expressions/type_conv/vec3/var/f16-u32.wgsl.expected.glsl
index f400ffc..9378fff 100644
--- a/test/tint/expressions/type_conv/vec3/var/f16-u32.wgsl.expected.glsl
+++ b/test/tint/expressions/type_conv/vec3/var/f16-u32.wgsl.expected.glsl
@@ -3,9 +3,7 @@
f16vec3 u = f16vec3(1.0hf);
uvec3 tint_v3f16_to_v3u32(f16vec3 value) {
- uvec3 v_1 = uvec3(value);
- uvec3 v_2 = mix(uvec3(0u), v_1, greaterThanEqual(value, f16vec3(0.0hf)));
- return mix(uvec3(4294967295u), v_2, lessThanEqual(value, f16vec3(65504.0hf)));
+ return mix(uvec3(4294967295u), mix(uvec3(0u), uvec3(value), greaterThanEqual(value, f16vec3(0.0hf))), lessThanEqual(value, f16vec3(65504.0hf)));
}
void f() {
uvec3 v = tint_v3f16_to_v3u32(u);
diff --git a/test/tint/expressions/type_conv/vec3/var/f32-i32.wgsl.expected.glsl b/test/tint/expressions/type_conv/vec3/var/f32-i32.wgsl.expected.glsl
index c28fbe3..6062f2c 100644
--- a/test/tint/expressions/type_conv/vec3/var/f32-i32.wgsl.expected.glsl
+++ b/test/tint/expressions/type_conv/vec3/var/f32-i32.wgsl.expected.glsl
@@ -2,9 +2,7 @@
vec3 u = vec3(1.0f);
ivec3 tint_v3f32_to_v3i32(vec3 value) {
- ivec3 v_1 = ivec3(value);
- ivec3 v_2 = mix(ivec3((-2147483647 - 1)), v_1, greaterThanEqual(value, vec3(-2147483648.0f)));
- return mix(ivec3(2147483647), v_2, lessThanEqual(value, vec3(2147483520.0f)));
+ return mix(ivec3(2147483647), mix(ivec3((-2147483647 - 1)), ivec3(value), greaterThanEqual(value, vec3(-2147483648.0f))), lessThanEqual(value, vec3(2147483520.0f)));
}
void f() {
ivec3 v = tint_v3f32_to_v3i32(u);
diff --git a/test/tint/expressions/type_conv/vec3/var/f32-u32.wgsl.expected.glsl b/test/tint/expressions/type_conv/vec3/var/f32-u32.wgsl.expected.glsl
index d6305ec..1639d68 100644
--- a/test/tint/expressions/type_conv/vec3/var/f32-u32.wgsl.expected.glsl
+++ b/test/tint/expressions/type_conv/vec3/var/f32-u32.wgsl.expected.glsl
@@ -2,9 +2,7 @@
vec3 u = vec3(1.0f);
uvec3 tint_v3f32_to_v3u32(vec3 value) {
- uvec3 v_1 = uvec3(value);
- uvec3 v_2 = mix(uvec3(0u), v_1, greaterThanEqual(value, vec3(0.0f)));
- return mix(uvec3(4294967295u), v_2, lessThanEqual(value, vec3(4294967040.0f)));
+ return mix(uvec3(4294967295u), mix(uvec3(0u), uvec3(value), greaterThanEqual(value, vec3(0.0f))), lessThanEqual(value, vec3(4294967040.0f)));
}
void f() {
uvec3 v = tint_v3f32_to_v3u32(u);
diff --git a/test/tint/expressions/type_conv/vec4/function/f16-i32.wgsl.expected.glsl b/test/tint/expressions/type_conv/vec4/function/f16-i32.wgsl.expected.glsl
index 75590f6..2e22e79 100644
--- a/test/tint/expressions/type_conv/vec4/function/f16-i32.wgsl.expected.glsl
+++ b/test/tint/expressions/type_conv/vec4/function/f16-i32.wgsl.expected.glsl
@@ -7,9 +7,7 @@
return f16vec4(t);
}
ivec4 tint_v4f16_to_v4i32(f16vec4 value) {
- ivec4 v_1 = ivec4(value);
- ivec4 v_2 = mix(ivec4((-2147483647 - 1)), v_1, greaterThanEqual(value, f16vec4(-65504.0hf)));
- return mix(ivec4(2147483647), v_2, lessThanEqual(value, f16vec4(65504.0hf)));
+ return mix(ivec4(2147483647), mix(ivec4((-2147483647 - 1)), ivec4(value), greaterThanEqual(value, f16vec4(-65504.0hf))), lessThanEqual(value, f16vec4(65504.0hf)));
}
void f() {
ivec4 v = tint_v4f16_to_v4i32(m());
diff --git a/test/tint/expressions/type_conv/vec4/function/f16-u32.wgsl.expected.glsl b/test/tint/expressions/type_conv/vec4/function/f16-u32.wgsl.expected.glsl
index 39ef4d2..501f94a 100644
--- a/test/tint/expressions/type_conv/vec4/function/f16-u32.wgsl.expected.glsl
+++ b/test/tint/expressions/type_conv/vec4/function/f16-u32.wgsl.expected.glsl
@@ -7,9 +7,7 @@
return f16vec4(t);
}
uvec4 tint_v4f16_to_v4u32(f16vec4 value) {
- uvec4 v_1 = uvec4(value);
- uvec4 v_2 = mix(uvec4(0u), v_1, greaterThanEqual(value, f16vec4(0.0hf)));
- return mix(uvec4(4294967295u), v_2, lessThanEqual(value, f16vec4(65504.0hf)));
+ return mix(uvec4(4294967295u), mix(uvec4(0u), uvec4(value), greaterThanEqual(value, f16vec4(0.0hf))), lessThanEqual(value, f16vec4(65504.0hf)));
}
void f() {
uvec4 v = tint_v4f16_to_v4u32(m());
diff --git a/test/tint/expressions/type_conv/vec4/function/f32-i32.wgsl.expected.glsl b/test/tint/expressions/type_conv/vec4/function/f32-i32.wgsl.expected.glsl
index 94aa45e..127dd80 100644
--- a/test/tint/expressions/type_conv/vec4/function/f32-i32.wgsl.expected.glsl
+++ b/test/tint/expressions/type_conv/vec4/function/f32-i32.wgsl.expected.glsl
@@ -6,9 +6,7 @@
return vec4(t);
}
ivec4 tint_v4f32_to_v4i32(vec4 value) {
- ivec4 v_1 = ivec4(value);
- ivec4 v_2 = mix(ivec4((-2147483647 - 1)), v_1, greaterThanEqual(value, vec4(-2147483648.0f)));
- return mix(ivec4(2147483647), v_2, lessThanEqual(value, vec4(2147483520.0f)));
+ return mix(ivec4(2147483647), mix(ivec4((-2147483647 - 1)), ivec4(value), greaterThanEqual(value, vec4(-2147483648.0f))), lessThanEqual(value, vec4(2147483520.0f)));
}
void f() {
ivec4 v = tint_v4f32_to_v4i32(m());
diff --git a/test/tint/expressions/type_conv/vec4/function/f32-u32.wgsl.expected.glsl b/test/tint/expressions/type_conv/vec4/function/f32-u32.wgsl.expected.glsl
index 9bb66ce..a9ef829 100644
--- a/test/tint/expressions/type_conv/vec4/function/f32-u32.wgsl.expected.glsl
+++ b/test/tint/expressions/type_conv/vec4/function/f32-u32.wgsl.expected.glsl
@@ -6,9 +6,7 @@
return vec4(t);
}
uvec4 tint_v4f32_to_v4u32(vec4 value) {
- uvec4 v_1 = uvec4(value);
- uvec4 v_2 = mix(uvec4(0u), v_1, greaterThanEqual(value, vec4(0.0f)));
- return mix(uvec4(4294967295u), v_2, lessThanEqual(value, vec4(4294967040.0f)));
+ return mix(uvec4(4294967295u), mix(uvec4(0u), uvec4(value), greaterThanEqual(value, vec4(0.0f))), lessThanEqual(value, vec4(4294967040.0f)));
}
void f() {
uvec4 v = tint_v4f32_to_v4u32(m());
diff --git a/test/tint/expressions/type_conv/vec4/var/f16-i32.wgsl.expected.glsl b/test/tint/expressions/type_conv/vec4/var/f16-i32.wgsl.expected.glsl
index 4e03cdd..379529f 100644
--- a/test/tint/expressions/type_conv/vec4/var/f16-i32.wgsl.expected.glsl
+++ b/test/tint/expressions/type_conv/vec4/var/f16-i32.wgsl.expected.glsl
@@ -3,9 +3,7 @@
f16vec4 u = f16vec4(1.0hf);
ivec4 tint_v4f16_to_v4i32(f16vec4 value) {
- ivec4 v_1 = ivec4(value);
- ivec4 v_2 = mix(ivec4((-2147483647 - 1)), v_1, greaterThanEqual(value, f16vec4(-65504.0hf)));
- return mix(ivec4(2147483647), v_2, lessThanEqual(value, f16vec4(65504.0hf)));
+ return mix(ivec4(2147483647), mix(ivec4((-2147483647 - 1)), ivec4(value), greaterThanEqual(value, f16vec4(-65504.0hf))), lessThanEqual(value, f16vec4(65504.0hf)));
}
void f() {
ivec4 v = tint_v4f16_to_v4i32(u);
diff --git a/test/tint/expressions/type_conv/vec4/var/f16-u32.wgsl.expected.glsl b/test/tint/expressions/type_conv/vec4/var/f16-u32.wgsl.expected.glsl
index 8137dc0..407e8ac 100644
--- a/test/tint/expressions/type_conv/vec4/var/f16-u32.wgsl.expected.glsl
+++ b/test/tint/expressions/type_conv/vec4/var/f16-u32.wgsl.expected.glsl
@@ -3,9 +3,7 @@
f16vec4 u = f16vec4(1.0hf);
uvec4 tint_v4f16_to_v4u32(f16vec4 value) {
- uvec4 v_1 = uvec4(value);
- uvec4 v_2 = mix(uvec4(0u), v_1, greaterThanEqual(value, f16vec4(0.0hf)));
- return mix(uvec4(4294967295u), v_2, lessThanEqual(value, f16vec4(65504.0hf)));
+ return mix(uvec4(4294967295u), mix(uvec4(0u), uvec4(value), greaterThanEqual(value, f16vec4(0.0hf))), lessThanEqual(value, f16vec4(65504.0hf)));
}
void f() {
uvec4 v = tint_v4f16_to_v4u32(u);
diff --git a/test/tint/expressions/type_conv/vec4/var/f32-i32.wgsl.expected.glsl b/test/tint/expressions/type_conv/vec4/var/f32-i32.wgsl.expected.glsl
index 0879f24..b6a12e2 100644
--- a/test/tint/expressions/type_conv/vec4/var/f32-i32.wgsl.expected.glsl
+++ b/test/tint/expressions/type_conv/vec4/var/f32-i32.wgsl.expected.glsl
@@ -2,9 +2,7 @@
vec4 u = vec4(1.0f);
ivec4 tint_v4f32_to_v4i32(vec4 value) {
- ivec4 v_1 = ivec4(value);
- ivec4 v_2 = mix(ivec4((-2147483647 - 1)), v_1, greaterThanEqual(value, vec4(-2147483648.0f)));
- return mix(ivec4(2147483647), v_2, lessThanEqual(value, vec4(2147483520.0f)));
+ return mix(ivec4(2147483647), mix(ivec4((-2147483647 - 1)), ivec4(value), greaterThanEqual(value, vec4(-2147483648.0f))), lessThanEqual(value, vec4(2147483520.0f)));
}
void f() {
ivec4 v = tint_v4f32_to_v4i32(u);
diff --git a/test/tint/expressions/type_conv/vec4/var/f32-u32.wgsl.expected.glsl b/test/tint/expressions/type_conv/vec4/var/f32-u32.wgsl.expected.glsl
index e0ed36a..8dcfa87 100644
--- a/test/tint/expressions/type_conv/vec4/var/f32-u32.wgsl.expected.glsl
+++ b/test/tint/expressions/type_conv/vec4/var/f32-u32.wgsl.expected.glsl
@@ -2,9 +2,7 @@
vec4 u = vec4(1.0f);
uvec4 tint_v4f32_to_v4u32(vec4 value) {
- uvec4 v_1 = uvec4(value);
- uvec4 v_2 = mix(uvec4(0u), v_1, greaterThanEqual(value, vec4(0.0f)));
- return mix(uvec4(4294967295u), v_2, lessThanEqual(value, vec4(4294967040.0f)));
+ return mix(uvec4(4294967295u), mix(uvec4(0u), uvec4(value), greaterThanEqual(value, vec4(0.0f))), lessThanEqual(value, vec4(4294967040.0f)));
}
void f() {
uvec4 v = tint_v4f32_to_v4u32(u);
diff --git a/test/tint/layout/storage/mat2x2/f32.wgsl.expected.ir.dxc.hlsl b/test/tint/layout/storage/mat2x2/f32.wgsl.expected.ir.dxc.hlsl
index ec5c7a2..152bec3 100644
--- a/test/tint/layout/storage/mat2x2/f32.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/layout/storage/mat2x2/f32.wgsl.expected.ir.dxc.hlsl
@@ -6,8 +6,7 @@
}
float2x2 v_2(uint offset) {
- float2 v_3 = asfloat(ssbo.Load2((offset + 0u)));
- return float2x2(v_3, asfloat(ssbo.Load2((offset + 8u))));
+ return float2x2(asfloat(ssbo.Load2((offset + 0u))), asfloat(ssbo.Load2((offset + 8u))));
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/layout/storage/mat2x2/f32.wgsl.expected.ir.fxc.hlsl b/test/tint/layout/storage/mat2x2/f32.wgsl.expected.ir.fxc.hlsl
index ec5c7a2..152bec3 100644
--- a/test/tint/layout/storage/mat2x2/f32.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/layout/storage/mat2x2/f32.wgsl.expected.ir.fxc.hlsl
@@ -6,8 +6,7 @@
}
float2x2 v_2(uint offset) {
- float2 v_3 = asfloat(ssbo.Load2((offset + 0u)));
- return float2x2(v_3, asfloat(ssbo.Load2((offset + 8u))));
+ return float2x2(asfloat(ssbo.Load2((offset + 0u))), asfloat(ssbo.Load2((offset + 8u))));
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/ptr_ref/store/param/storage/vec2_f32_in_mat2x2.wgsl.expected.ir.dxc.hlsl b/test/tint/ptr_ref/store/param/storage/vec2_f32_in_mat2x2.wgsl.expected.ir.dxc.hlsl
index a233fd6..104d2da 100644
--- a/test/tint/ptr_ref/store/param/storage/vec2_f32_in_mat2x2.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/ptr_ref/store/param/storage/vec2_f32_in_mat2x2.wgsl.expected.ir.dxc.hlsl
@@ -1,13 +1,12 @@
RWByteAddressBuffer S : register(u0);
void func(uint pointer_indices[1]) {
- uint v = (0u + (uint(pointer_indices[0u]) * 8u));
- S.Store2(v, asuint((0.0f).xx));
+ S.Store2((0u + (uint(pointer_indices[0u]) * 8u)), asuint((0.0f).xx));
}
[numthreads(1, 1, 1)]
void main() {
- uint v_1[1] = {uint(int(1))};
- func(v_1);
+ uint v[1] = {uint(int(1))};
+ func(v);
}
diff --git a/test/tint/ptr_ref/store/param/storage/vec2_f32_in_mat2x2.wgsl.expected.ir.fxc.hlsl b/test/tint/ptr_ref/store/param/storage/vec2_f32_in_mat2x2.wgsl.expected.ir.fxc.hlsl
index a233fd6..104d2da 100644
--- a/test/tint/ptr_ref/store/param/storage/vec2_f32_in_mat2x2.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/ptr_ref/store/param/storage/vec2_f32_in_mat2x2.wgsl.expected.ir.fxc.hlsl
@@ -1,13 +1,12 @@
RWByteAddressBuffer S : register(u0);
void func(uint pointer_indices[1]) {
- uint v = (0u + (uint(pointer_indices[0u]) * 8u));
- S.Store2(v, asuint((0.0f).xx));
+ S.Store2((0u + (uint(pointer_indices[0u]) * 8u)), asuint((0.0f).xx));
}
[numthreads(1, 1, 1)]
void main() {
- uint v_1[1] = {uint(int(1))};
- func(v_1);
+ uint v[1] = {uint(int(1))};
+ func(v);
}
diff --git a/test/tint/ptr_ref/store/param/storage/vec4_f32_in_mat2x4.wgsl.expected.ir.dxc.hlsl b/test/tint/ptr_ref/store/param/storage/vec4_f32_in_mat2x4.wgsl.expected.ir.dxc.hlsl
index 5b0e996..114277b 100644
--- a/test/tint/ptr_ref/store/param/storage/vec4_f32_in_mat2x4.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/ptr_ref/store/param/storage/vec4_f32_in_mat2x4.wgsl.expected.ir.dxc.hlsl
@@ -1,13 +1,12 @@
RWByteAddressBuffer S : register(u0);
void func(uint pointer_indices[1]) {
- uint v = (0u + (uint(pointer_indices[0u]) * 16u));
- S.Store4(v, asuint((0.0f).xxxx));
+ S.Store4((0u + (uint(pointer_indices[0u]) * 16u)), asuint((0.0f).xxxx));
}
[numthreads(1, 1, 1)]
void main() {
- uint v_1[1] = {uint(int(1))};
- func(v_1);
+ uint v[1] = {uint(int(1))};
+ func(v);
}
diff --git a/test/tint/ptr_ref/store/param/storage/vec4_f32_in_mat2x4.wgsl.expected.ir.fxc.hlsl b/test/tint/ptr_ref/store/param/storage/vec4_f32_in_mat2x4.wgsl.expected.ir.fxc.hlsl
index 5b0e996..114277b 100644
--- a/test/tint/ptr_ref/store/param/storage/vec4_f32_in_mat2x4.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/ptr_ref/store/param/storage/vec4_f32_in_mat2x4.wgsl.expected.ir.fxc.hlsl
@@ -1,13 +1,12 @@
RWByteAddressBuffer S : register(u0);
void func(uint pointer_indices[1]) {
- uint v = (0u + (uint(pointer_indices[0u]) * 16u));
- S.Store4(v, asuint((0.0f).xxxx));
+ S.Store4((0u + (uint(pointer_indices[0u]) * 16u)), asuint((0.0f).xxxx));
}
[numthreads(1, 1, 1)]
void main() {
- uint v_1[1] = {uint(int(1))};
- func(v_1);
+ uint v[1] = {uint(int(1))};
+ func(v);
}
diff --git a/test/tint/samples/compute_boids.wgsl.expected.glsl b/test/tint/samples/compute_boids.wgsl.expected.glsl
index 9243cd5..bffa33d 100644
--- a/test/tint/samples/compute_boids.wgsl.expected.glsl
+++ b/test/tint/samples/compute_boids.wgsl.expected.glsl
@@ -5,10 +5,7 @@
layout(location = 2) in vec2 vert_main_loc2_Input;
vec4 vert_main_inner(vec2 a_particlePos, vec2 a_particleVel, vec2 a_pos) {
float angle = -(atan(a_particleVel[0u], a_particleVel[1u]));
- float v = (a_pos[0u] * cos(angle));
- float v_1 = (v - (a_pos[1u] * sin(angle)));
- float v_2 = (a_pos[0u] * sin(angle));
- vec2 pos = vec2(v_1, (v_2 + (a_pos[1u] * cos(angle))));
+ vec2 pos = vec2(((a_pos[0u] * cos(angle)) - (a_pos[1u] * sin(angle))), ((a_pos[0u] * sin(angle)) + (a_pos[1u] * cos(angle))));
return vec4((pos + a_particlePos), 0.0f, 1.0f);
}
void main() {
@@ -95,17 +92,14 @@
pos = v_1.inner.particles[v_5].pos.xy;
uint v_6 = i;
vel = v_1.inner.particles[v_6].vel.xy;
- float v_7 = distance(pos, vPos);
- if ((v_7 < v.inner.rule1Distance)) {
+ if ((distance(pos, vPos) < v.inner.rule1Distance)) {
cMass = (cMass + pos);
cMassCount = (cMassCount + 1);
}
- float v_8 = distance(pos, vPos);
- if ((v_8 < v.inner.rule2Distance)) {
+ if ((distance(pos, vPos) < v.inner.rule2Distance)) {
colVel = (colVel - (pos - vPos));
}
- float v_9 = distance(pos, vPos);
- if ((v_9 < v.inner.rule3Distance)) {
+ if ((distance(pos, vPos) < v.inner.rule3Distance)) {
cVel = (cVel + vel);
cVelCount = (cVelCount + 1);
}
@@ -116,19 +110,18 @@
}
}
if ((cMassCount > 0)) {
- vec2 v_10 = cMass;
- float v_11 = float(cMassCount);
- vec2 v_12 = (v_10 / vec2(v_11, float(cMassCount)));
- cMass = (v_12 - vPos);
+ vec2 v_7 = cMass;
+ float v_8 = float(cMassCount);
+ vec2 v_9 = (v_7 / vec2(v_8, float(cMassCount)));
+ cMass = (v_9 - vPos);
}
if ((cVelCount > 0)) {
- vec2 v_13 = cVel;
- float v_14 = float(cVelCount);
- cVel = (v_13 / vec2(v_14, float(cVelCount)));
+ vec2 v_10 = cVel;
+ float v_11 = float(cVelCount);
+ cVel = (v_10 / vec2(v_11, float(cVelCount)));
}
vVel = (((vVel + (cMass * v.inner.rule1Scale)) + (colVel * v.inner.rule2Scale)) + (cVel * v.inner.rule3Scale));
- vec2 v_15 = normalize(vVel);
- vVel = (v_15 * clamp(length(vVel), 0.0f, 0.10000000149011611938f));
+ vVel = (normalize(vVel) * clamp(length(vVel), 0.0f, 0.10000000149011611938f));
vPos = (vPos + (vVel * v.inner.deltaT));
if ((vPos.x < -1.0f)) {
vPos[0u] = 1.0f;
@@ -142,10 +135,10 @@
if ((vPos.y > 1.0f)) {
vPos[1u] = -1.0f;
}
- uint v_16 = index;
- v_2.inner.particles[v_16].pos = vPos;
- uint v_17 = index;
- v_2.inner.particles[v_17].vel = vVel;
+ uint v_12 = index;
+ v_2.inner.particles[v_12].pos = vPos;
+ uint v_13 = index;
+ v_2.inner.particles[v_13].vel = vVel;
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
diff --git a/test/tint/samples/compute_boids.wgsl.expected.ir.dxc.hlsl b/test/tint/samples/compute_boids.wgsl.expected.ir.dxc.hlsl
index 924a182..a9909fb 100644
--- a/test/tint/samples/compute_boids.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/samples/compute_boids.wgsl.expected.ir.dxc.hlsl
@@ -24,10 +24,7 @@
RWByteAddressBuffer particlesB : register(u2);
float4 vert_main_inner(float2 a_particlePos, float2 a_particleVel, float2 a_pos) {
float angle = -(atan2(a_particleVel.x, a_particleVel.y));
- float v = (a_pos.x * cos(angle));
- float v_1 = (v - (a_pos.y * sin(angle)));
- float v_2 = (a_pos.x * sin(angle));
- float2 pos = float2(v_1, (v_2 + (a_pos.y * cos(angle))));
+ float2 pos = float2(((a_pos.x * cos(angle)) - (a_pos.y * sin(angle))), ((a_pos.x * sin(angle)) + (a_pos.y * cos(angle))));
return float4((pos + a_particlePos), 0.0f, 1.0f);
}
@@ -64,17 +61,14 @@
}
pos = asfloat(particlesA.Load2((0u + (uint(i) * 16u)))).xy;
vel = asfloat(particlesA.Load2((8u + (uint(i) * 16u)))).xy;
- float v_3 = distance(pos, vPos);
- if ((v_3 < asfloat(params[0u].y))) {
+ if ((distance(pos, vPos) < asfloat(params[0u].y))) {
cMass = (cMass + pos);
cMassCount = (cMassCount + int(1));
}
- float v_4 = distance(pos, vPos);
- if ((v_4 < asfloat(params[0u].z))) {
+ if ((distance(pos, vPos) < asfloat(params[0u].z))) {
colVel = (colVel - (pos - vPos));
}
- float v_5 = distance(pos, vPos);
- if ((v_5 < asfloat(params[0u].w))) {
+ if ((distance(pos, vPos) < asfloat(params[0u].w))) {
cVel = (cVel + vel);
cVelCount = (cVelCount + int(1));
}
@@ -85,28 +79,19 @@
}
}
if ((cMassCount > int(0))) {
- float2 v_6 = cMass;
- float v_7 = float(cMassCount);
- float2 v_8 = (v_6 / float2(v_7, float(cMassCount)));
- cMass = (v_8 - vPos);
+ float2 v = cMass;
+ float v_1 = float(cMassCount);
+ float2 v_2 = (v / float2(v_1, float(cMassCount)));
+ cMass = (v_2 - vPos);
}
if ((cVelCount > int(0))) {
- float2 v_9 = cVel;
- float v_10 = float(cVelCount);
- cVel = (v_9 / float2(v_10, float(cVelCount)));
+ float2 v_3 = cVel;
+ float v_4 = float(cVelCount);
+ cVel = (v_3 / float2(v_4, float(cVelCount)));
}
- float2 v_11 = vVel;
- float2 v_12 = cMass;
- float2 v_13 = (v_11 + (v_12 * asfloat(params[1u].x)));
- float2 v_14 = colVel;
- float2 v_15 = (v_13 + (v_14 * asfloat(params[1u].y)));
- float2 v_16 = cVel;
- vVel = (v_15 + (v_16 * asfloat(params[1u].z)));
- float2 v_17 = normalize(vVel);
- vVel = (v_17 * clamp(length(vVel), 0.0f, 0.10000000149011611938f));
- float2 v_18 = vPos;
- float2 v_19 = vVel;
- vPos = (v_18 + (v_19 * asfloat(params[0u].x)));
+ vVel = (((vVel + (cMass * asfloat(params[1u].x))) + (colVel * asfloat(params[1u].y))) + (cVel * asfloat(params[1u].z)));
+ vVel = (normalize(vVel) * clamp(length(vVel), 0.0f, 0.10000000149011611938f));
+ vPos = (vPos + (vVel * asfloat(params[0u].x)));
if ((vPos.x < -1.0f)) {
vPos.x = 1.0f;
}
@@ -119,20 +104,20 @@
if ((vPos.y > 1.0f)) {
vPos.y = -1.0f;
}
- uint v_20 = (uint(index) * 16u);
- particlesB.Store2((0u + v_20), asuint(vPos));
- uint v_21 = (uint(index) * 16u);
- particlesB.Store2((8u + v_21), asuint(vVel));
+ uint v_5 = (uint(index) * 16u);
+ particlesB.Store2((0u + v_5), asuint(vPos));
+ uint v_6 = (uint(index) * 16u);
+ particlesB.Store2((8u + v_6), asuint(vVel));
}
vert_main_outputs vert_main(vert_main_inputs inputs) {
- vert_main_outputs v_22 = {vert_main_inner(inputs.a_particlePos, inputs.a_particleVel, inputs.a_pos)};
- return v_22;
+ vert_main_outputs v_7 = {vert_main_inner(inputs.a_particlePos, inputs.a_particleVel, inputs.a_pos)};
+ return v_7;
}
frag_main_outputs frag_main() {
- frag_main_outputs v_23 = {frag_main_inner()};
- return v_23;
+ frag_main_outputs v_8 = {frag_main_inner()};
+ return v_8;
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/samples/compute_boids.wgsl.expected.ir.fxc.hlsl b/test/tint/samples/compute_boids.wgsl.expected.ir.fxc.hlsl
index 924a182..a9909fb 100644
--- a/test/tint/samples/compute_boids.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/samples/compute_boids.wgsl.expected.ir.fxc.hlsl
@@ -24,10 +24,7 @@
RWByteAddressBuffer particlesB : register(u2);
float4 vert_main_inner(float2 a_particlePos, float2 a_particleVel, float2 a_pos) {
float angle = -(atan2(a_particleVel.x, a_particleVel.y));
- float v = (a_pos.x * cos(angle));
- float v_1 = (v - (a_pos.y * sin(angle)));
- float v_2 = (a_pos.x * sin(angle));
- float2 pos = float2(v_1, (v_2 + (a_pos.y * cos(angle))));
+ float2 pos = float2(((a_pos.x * cos(angle)) - (a_pos.y * sin(angle))), ((a_pos.x * sin(angle)) + (a_pos.y * cos(angle))));
return float4((pos + a_particlePos), 0.0f, 1.0f);
}
@@ -64,17 +61,14 @@
}
pos = asfloat(particlesA.Load2((0u + (uint(i) * 16u)))).xy;
vel = asfloat(particlesA.Load2((8u + (uint(i) * 16u)))).xy;
- float v_3 = distance(pos, vPos);
- if ((v_3 < asfloat(params[0u].y))) {
+ if ((distance(pos, vPos) < asfloat(params[0u].y))) {
cMass = (cMass + pos);
cMassCount = (cMassCount + int(1));
}
- float v_4 = distance(pos, vPos);
- if ((v_4 < asfloat(params[0u].z))) {
+ if ((distance(pos, vPos) < asfloat(params[0u].z))) {
colVel = (colVel - (pos - vPos));
}
- float v_5 = distance(pos, vPos);
- if ((v_5 < asfloat(params[0u].w))) {
+ if ((distance(pos, vPos) < asfloat(params[0u].w))) {
cVel = (cVel + vel);
cVelCount = (cVelCount + int(1));
}
@@ -85,28 +79,19 @@
}
}
if ((cMassCount > int(0))) {
- float2 v_6 = cMass;
- float v_7 = float(cMassCount);
- float2 v_8 = (v_6 / float2(v_7, float(cMassCount)));
- cMass = (v_8 - vPos);
+ float2 v = cMass;
+ float v_1 = float(cMassCount);
+ float2 v_2 = (v / float2(v_1, float(cMassCount)));
+ cMass = (v_2 - vPos);
}
if ((cVelCount > int(0))) {
- float2 v_9 = cVel;
- float v_10 = float(cVelCount);
- cVel = (v_9 / float2(v_10, float(cVelCount)));
+ float2 v_3 = cVel;
+ float v_4 = float(cVelCount);
+ cVel = (v_3 / float2(v_4, float(cVelCount)));
}
- float2 v_11 = vVel;
- float2 v_12 = cMass;
- float2 v_13 = (v_11 + (v_12 * asfloat(params[1u].x)));
- float2 v_14 = colVel;
- float2 v_15 = (v_13 + (v_14 * asfloat(params[1u].y)));
- float2 v_16 = cVel;
- vVel = (v_15 + (v_16 * asfloat(params[1u].z)));
- float2 v_17 = normalize(vVel);
- vVel = (v_17 * clamp(length(vVel), 0.0f, 0.10000000149011611938f));
- float2 v_18 = vPos;
- float2 v_19 = vVel;
- vPos = (v_18 + (v_19 * asfloat(params[0u].x)));
+ vVel = (((vVel + (cMass * asfloat(params[1u].x))) + (colVel * asfloat(params[1u].y))) + (cVel * asfloat(params[1u].z)));
+ vVel = (normalize(vVel) * clamp(length(vVel), 0.0f, 0.10000000149011611938f));
+ vPos = (vPos + (vVel * asfloat(params[0u].x)));
if ((vPos.x < -1.0f)) {
vPos.x = 1.0f;
}
@@ -119,20 +104,20 @@
if ((vPos.y > 1.0f)) {
vPos.y = -1.0f;
}
- uint v_20 = (uint(index) * 16u);
- particlesB.Store2((0u + v_20), asuint(vPos));
- uint v_21 = (uint(index) * 16u);
- particlesB.Store2((8u + v_21), asuint(vVel));
+ uint v_5 = (uint(index) * 16u);
+ particlesB.Store2((0u + v_5), asuint(vPos));
+ uint v_6 = (uint(index) * 16u);
+ particlesB.Store2((8u + v_6), asuint(vVel));
}
vert_main_outputs vert_main(vert_main_inputs inputs) {
- vert_main_outputs v_22 = {vert_main_inner(inputs.a_particlePos, inputs.a_particleVel, inputs.a_pos)};
- return v_22;
+ vert_main_outputs v_7 = {vert_main_inner(inputs.a_particlePos, inputs.a_particleVel, inputs.a_pos)};
+ return v_7;
}
frag_main_outputs frag_main() {
- frag_main_outputs v_23 = {frag_main_inner()};
- return v_23;
+ frag_main_outputs v_8 = {frag_main_inner()};
+ return v_8;
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/samples/compute_boids.wgsl.expected.ir.msl b/test/tint/samples/compute_boids.wgsl.expected.ir.msl
index 5144d1b..9d6969f 100644
--- a/test/tint/samples/compute_boids.wgsl.expected.ir.msl
+++ b/test/tint/samples/compute_boids.wgsl.expected.ir.msl
@@ -57,10 +57,7 @@
float4 vert_main_inner(float2 a_particlePos, float2 a_particleVel, float2 a_pos) {
float angle = -(atan2(a_particleVel[0u], a_particleVel[1u]));
- float const v = (a_pos[0u] * cos(angle));
- float const v_1 = (v - (a_pos[1u] * sin(angle)));
- float const v_2 = (a_pos[0u] * sin(angle));
- float2 pos = float2(v_1, (v_2 + (a_pos[1u] * cos(angle))));
+ float2 pos = float2(((a_pos[0u] * cos(angle)) - (a_pos[1u] * sin(angle))), ((a_pos[0u] * sin(angle)) + (a_pos[1u] * cos(angle))));
return float4((pos + a_particlePos), 0.0f, 1.0f);
}
@@ -98,17 +95,14 @@
}
pos = (*tint_module_vars.particlesA).particles[i].pos.xy;
vel = (*tint_module_vars.particlesA).particles[i].vel.xy;
- float const v_3 = distance(pos, vPos);
- if ((v_3 < (*tint_module_vars.params).rule1Distance)) {
+ if ((distance(pos, vPos) < (*tint_module_vars.params).rule1Distance)) {
cMass = (cMass + pos);
cMassCount = as_type<int>((as_type<uint>(cMassCount) + as_type<uint>(1)));
}
- float const v_4 = distance(pos, vPos);
- if ((v_4 < (*tint_module_vars.params).rule2Distance)) {
+ if ((distance(pos, vPos) < (*tint_module_vars.params).rule2Distance)) {
colVel = (colVel - (pos - vPos));
}
- float const v_5 = distance(pos, vPos);
- if ((v_5 < (*tint_module_vars.params).rule3Distance)) {
+ if ((distance(pos, vPos) < (*tint_module_vars.params).rule3Distance)) {
cVel = (cVel + vel);
cVelCount = as_type<int>((as_type<uint>(cVelCount) + as_type<uint>(1)));
}
@@ -119,19 +113,18 @@
}
}
if ((cMassCount > 0)) {
- float2 const v_6 = cMass;
- float const v_7 = float(cMassCount);
- float2 const v_8 = (v_6 / float2(v_7, float(cMassCount)));
- cMass = (v_8 - vPos);
+ float2 const v = cMass;
+ float const v_1 = float(cMassCount);
+ float2 const v_2 = (v / float2(v_1, float(cMassCount)));
+ cMass = (v_2 - vPos);
}
if ((cVelCount > 0)) {
- float2 const v_9 = cVel;
- float const v_10 = float(cVelCount);
- cVel = (v_9 / float2(v_10, float(cVelCount)));
+ float2 const v_3 = cVel;
+ float const v_4 = float(cVelCount);
+ cVel = (v_3 / float2(v_4, float(cVelCount)));
}
vVel = (((vVel + (cMass * (*tint_module_vars.params).rule1Scale)) + (colVel * (*tint_module_vars.params).rule2Scale)) + (cVel * (*tint_module_vars.params).rule3Scale));
- float2 const v_11 = normalize(vVel);
- vVel = (v_11 * clamp(length(vVel), 0.0f, 0.10000000149011611938f));
+ vVel = (normalize(vVel) * clamp(length(vVel), 0.0f, 0.10000000149011611938f));
vPos = (vPos + (vVel * (*tint_module_vars.params).deltaT));
if ((vPos[0u] < -1.0f)) {
vPos[0u] = 1.0f;
diff --git a/test/tint/samples/cube.wgsl.expected.ir.dxc.hlsl b/test/tint/samples/cube.wgsl.expected.ir.dxc.hlsl
index bd056e4..6267bf4 100644
--- a/test/tint/samples/cube.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/samples/cube.wgsl.expected.ir.dxc.hlsl
@@ -31,18 +31,15 @@
uint4 uniforms[4];
};
float4x4 v(uint start_byte_offset) {
- float4 v_1 = asfloat(uniforms[(start_byte_offset / 16u)]);
- float4 v_2 = asfloat(uniforms[((16u + start_byte_offset) / 16u)]);
- float4 v_3 = asfloat(uniforms[((32u + start_byte_offset) / 16u)]);
- return float4x4(v_1, v_2, v_3, asfloat(uniforms[((48u + start_byte_offset) / 16u)]));
+ return float4x4(asfloat(uniforms[(start_byte_offset / 16u)]), asfloat(uniforms[((16u + start_byte_offset) / 16u)]), asfloat(uniforms[((32u + start_byte_offset) / 16u)]), asfloat(uniforms[((48u + start_byte_offset) / 16u)]));
}
VertexOutput vtx_main_inner(VertexInput input) {
VertexOutput output = (VertexOutput)0;
output.Position = mul(input.cur_position, v(0u));
output.vtxFragColor = input.color;
- VertexOutput v_4 = output;
- return v_4;
+ VertexOutput v_1 = output;
+ return v_1;
}
float4 frag_main_inner(float4 fragColor) {
@@ -50,14 +47,14 @@
}
vtx_main_outputs vtx_main(vtx_main_inputs inputs) {
- VertexInput v_5 = {inputs.VertexInput_cur_position, inputs.VertexInput_color};
- VertexOutput v_6 = vtx_main_inner(v_5);
- vtx_main_outputs v_7 = {v_6.vtxFragColor, v_6.Position};
- return v_7;
+ VertexInput v_2 = {inputs.VertexInput_cur_position, inputs.VertexInput_color};
+ VertexOutput v_3 = vtx_main_inner(v_2);
+ vtx_main_outputs v_4 = {v_3.vtxFragColor, v_3.Position};
+ return v_4;
}
frag_main_outputs frag_main(frag_main_inputs inputs) {
- frag_main_outputs v_8 = {frag_main_inner(inputs.fragColor)};
- return v_8;
+ frag_main_outputs v_5 = {frag_main_inner(inputs.fragColor)};
+ return v_5;
}
diff --git a/test/tint/samples/cube.wgsl.expected.ir.fxc.hlsl b/test/tint/samples/cube.wgsl.expected.ir.fxc.hlsl
index bd056e4..6267bf4 100644
--- a/test/tint/samples/cube.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/samples/cube.wgsl.expected.ir.fxc.hlsl
@@ -31,18 +31,15 @@
uint4 uniforms[4];
};
float4x4 v(uint start_byte_offset) {
- float4 v_1 = asfloat(uniforms[(start_byte_offset / 16u)]);
- float4 v_2 = asfloat(uniforms[((16u + start_byte_offset) / 16u)]);
- float4 v_3 = asfloat(uniforms[((32u + start_byte_offset) / 16u)]);
- return float4x4(v_1, v_2, v_3, asfloat(uniforms[((48u + start_byte_offset) / 16u)]));
+ return float4x4(asfloat(uniforms[(start_byte_offset / 16u)]), asfloat(uniforms[((16u + start_byte_offset) / 16u)]), asfloat(uniforms[((32u + start_byte_offset) / 16u)]), asfloat(uniforms[((48u + start_byte_offset) / 16u)]));
}
VertexOutput vtx_main_inner(VertexInput input) {
VertexOutput output = (VertexOutput)0;
output.Position = mul(input.cur_position, v(0u));
output.vtxFragColor = input.color;
- VertexOutput v_4 = output;
- return v_4;
+ VertexOutput v_1 = output;
+ return v_1;
}
float4 frag_main_inner(float4 fragColor) {
@@ -50,14 +47,14 @@
}
vtx_main_outputs vtx_main(vtx_main_inputs inputs) {
- VertexInput v_5 = {inputs.VertexInput_cur_position, inputs.VertexInput_color};
- VertexOutput v_6 = vtx_main_inner(v_5);
- vtx_main_outputs v_7 = {v_6.vtxFragColor, v_6.Position};
- return v_7;
+ VertexInput v_2 = {inputs.VertexInput_cur_position, inputs.VertexInput_color};
+ VertexOutput v_3 = vtx_main_inner(v_2);
+ vtx_main_outputs v_4 = {v_3.vtxFragColor, v_3.Position};
+ return v_4;
}
frag_main_outputs frag_main(frag_main_inputs inputs) {
- frag_main_outputs v_8 = {frag_main_inner(inputs.fragColor)};
- return v_8;
+ frag_main_outputs v_5 = {frag_main_inner(inputs.fragColor)};
+ return v_5;
}
diff --git a/test/tint/statements/compound_assign/divide_by_zero.wgsl.expected.ir.dxc.hlsl b/test/tint/statements/compound_assign/divide_by_zero.wgsl.expected.ir.dxc.hlsl
index fd4a1fc..e92119f 100644
--- a/test/tint/statements/compound_assign/divide_by_zero.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/statements/compound_assign/divide_by_zero.wgsl.expected.ir.dxc.hlsl
@@ -16,15 +16,13 @@
b = (b / 0.0f);
float v_1 = b;
float v_2 = (v_1 / 0.0f);
- float v_3 = floor(v_2);
- b = (v_1 - ((((v_2 < 0.0f)) ? (ceil(v_2)) : (v_3)) * 0.0f));
+ b = (v_1 - ((((v_2 < 0.0f)) ? (ceil(v_2)) : (floor(v_2))) * 0.0f));
+ float v_3 = float(maybe_zero);
+ b = (b / v_3);
float v_4 = float(maybe_zero);
- b = (b / v_4);
- float v_5 = float(maybe_zero);
- float v_6 = b;
- float v_7 = (v_6 / v_5);
- float v_8 = floor(v_7);
- b = (v_6 - ((((v_7 < 0.0f)) ? (ceil(v_7)) : (v_8)) * v_5));
+ float v_5 = b;
+ float v_6 = (v_5 / v_4);
+ b = (v_5 - ((((v_6 < 0.0f)) ? (ceil(v_6)) : (floor(v_6))) * v_4));
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/statements/compound_assign/divide_by_zero.wgsl.expected.ir.fxc.hlsl b/test/tint/statements/compound_assign/divide_by_zero.wgsl.expected.ir.fxc.hlsl
index fd4a1fc..e92119f 100644
--- a/test/tint/statements/compound_assign/divide_by_zero.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/statements/compound_assign/divide_by_zero.wgsl.expected.ir.fxc.hlsl
@@ -16,15 +16,13 @@
b = (b / 0.0f);
float v_1 = b;
float v_2 = (v_1 / 0.0f);
- float v_3 = floor(v_2);
- b = (v_1 - ((((v_2 < 0.0f)) ? (ceil(v_2)) : (v_3)) * 0.0f));
+ b = (v_1 - ((((v_2 < 0.0f)) ? (ceil(v_2)) : (floor(v_2))) * 0.0f));
+ float v_3 = float(maybe_zero);
+ b = (b / v_3);
float v_4 = float(maybe_zero);
- b = (b / v_4);
- float v_5 = float(maybe_zero);
- float v_6 = b;
- float v_7 = (v_6 / v_5);
- float v_8 = floor(v_7);
- b = (v_6 - ((((v_7 < 0.0f)) ? (ceil(v_7)) : (v_8)) * v_5));
+ float v_5 = b;
+ float v_6 = (v_5 / v_4);
+ b = (v_5 - ((((v_6 < 0.0f)) ? (ceil(v_6)) : (floor(v_6))) * v_4));
}
[numthreads(1, 1, 1)]
diff --git a/test/tint/statements/compound_assign/matrix/minus.wgsl.expected.ir.dxc.hlsl b/test/tint/statements/compound_assign/matrix/minus.wgsl.expected.ir.dxc.hlsl
index 6b5f64c..5fa73ad 100644
--- a/test/tint/statements/compound_assign/matrix/minus.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/statements/compound_assign/matrix/minus.wgsl.expected.ir.dxc.hlsl
@@ -8,10 +8,7 @@
}
float4x4 v_2(uint offset) {
- float4 v_3 = asfloat(v.Load4((offset + 0u)));
- float4 v_4 = asfloat(v.Load4((offset + 16u)));
- float4 v_5 = asfloat(v.Load4((offset + 32u)));
- return float4x4(v_3, v_4, v_5, asfloat(v.Load4((offset + 48u))));
+ return float4x4(asfloat(v.Load4((offset + 0u))), asfloat(v.Load4((offset + 16u))), asfloat(v.Load4((offset + 32u))), asfloat(v.Load4((offset + 48u))));
}
void foo() {
diff --git a/test/tint/statements/compound_assign/matrix/minus.wgsl.expected.ir.fxc.hlsl b/test/tint/statements/compound_assign/matrix/minus.wgsl.expected.ir.fxc.hlsl
index 6b5f64c..5fa73ad 100644
--- a/test/tint/statements/compound_assign/matrix/minus.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/statements/compound_assign/matrix/minus.wgsl.expected.ir.fxc.hlsl
@@ -8,10 +8,7 @@
}
float4x4 v_2(uint offset) {
- float4 v_3 = asfloat(v.Load4((offset + 0u)));
- float4 v_4 = asfloat(v.Load4((offset + 16u)));
- float4 v_5 = asfloat(v.Load4((offset + 32u)));
- return float4x4(v_3, v_4, v_5, asfloat(v.Load4((offset + 48u))));
+ return float4x4(asfloat(v.Load4((offset + 0u))), asfloat(v.Load4((offset + 16u))), asfloat(v.Load4((offset + 32u))), asfloat(v.Load4((offset + 48u))));
}
void foo() {
diff --git a/test/tint/statements/compound_assign/matrix/plus.wgsl.expected.ir.dxc.hlsl b/test/tint/statements/compound_assign/matrix/plus.wgsl.expected.ir.dxc.hlsl
index c2f2a60..07809b2 100644
--- a/test/tint/statements/compound_assign/matrix/plus.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/statements/compound_assign/matrix/plus.wgsl.expected.ir.dxc.hlsl
@@ -8,10 +8,7 @@
}
float4x4 v_2(uint offset) {
- float4 v_3 = asfloat(v.Load4((offset + 0u)));
- float4 v_4 = asfloat(v.Load4((offset + 16u)));
- float4 v_5 = asfloat(v.Load4((offset + 32u)));
- return float4x4(v_3, v_4, v_5, asfloat(v.Load4((offset + 48u))));
+ return float4x4(asfloat(v.Load4((offset + 0u))), asfloat(v.Load4((offset + 16u))), asfloat(v.Load4((offset + 32u))), asfloat(v.Load4((offset + 48u))));
}
void foo() {
diff --git a/test/tint/statements/compound_assign/matrix/plus.wgsl.expected.ir.fxc.hlsl b/test/tint/statements/compound_assign/matrix/plus.wgsl.expected.ir.fxc.hlsl
index c2f2a60..07809b2 100644
--- a/test/tint/statements/compound_assign/matrix/plus.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/statements/compound_assign/matrix/plus.wgsl.expected.ir.fxc.hlsl
@@ -8,10 +8,7 @@
}
float4x4 v_2(uint offset) {
- float4 v_3 = asfloat(v.Load4((offset + 0u)));
- float4 v_4 = asfloat(v.Load4((offset + 16u)));
- float4 v_5 = asfloat(v.Load4((offset + 32u)));
- return float4x4(v_3, v_4, v_5, asfloat(v.Load4((offset + 48u))));
+ return float4x4(asfloat(v.Load4((offset + 0u))), asfloat(v.Load4((offset + 16u))), asfloat(v.Load4((offset + 32u))), asfloat(v.Load4((offset + 48u))));
}
void foo() {
diff --git a/test/tint/statements/compound_assign/matrix/times-scalar.wgsl.expected.ir.dxc.hlsl b/test/tint/statements/compound_assign/matrix/times-scalar.wgsl.expected.ir.dxc.hlsl
index 84d297e..c4306f8 100644
--- a/test/tint/statements/compound_assign/matrix/times-scalar.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/statements/compound_assign/matrix/times-scalar.wgsl.expected.ir.dxc.hlsl
@@ -8,10 +8,7 @@
}
float4x4 v_2(uint offset) {
- float4 v_3 = asfloat(v.Load4((offset + 0u)));
- float4 v_4 = asfloat(v.Load4((offset + 16u)));
- float4 v_5 = asfloat(v.Load4((offset + 32u)));
- return float4x4(v_3, v_4, v_5, asfloat(v.Load4((offset + 48u))));
+ return float4x4(asfloat(v.Load4((offset + 0u))), asfloat(v.Load4((offset + 16u))), asfloat(v.Load4((offset + 32u))), asfloat(v.Load4((offset + 48u))));
}
void foo() {
diff --git a/test/tint/statements/compound_assign/matrix/times-scalar.wgsl.expected.ir.fxc.hlsl b/test/tint/statements/compound_assign/matrix/times-scalar.wgsl.expected.ir.fxc.hlsl
index 84d297e..c4306f8 100644
--- a/test/tint/statements/compound_assign/matrix/times-scalar.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/statements/compound_assign/matrix/times-scalar.wgsl.expected.ir.fxc.hlsl
@@ -8,10 +8,7 @@
}
float4x4 v_2(uint offset) {
- float4 v_3 = asfloat(v.Load4((offset + 0u)));
- float4 v_4 = asfloat(v.Load4((offset + 16u)));
- float4 v_5 = asfloat(v.Load4((offset + 32u)));
- return float4x4(v_3, v_4, v_5, asfloat(v.Load4((offset + 48u))));
+ return float4x4(asfloat(v.Load4((offset + 0u))), asfloat(v.Load4((offset + 16u))), asfloat(v.Load4((offset + 32u))), asfloat(v.Load4((offset + 48u))));
}
void foo() {
diff --git a/test/tint/statements/compound_assign/matrix/times.wgsl.expected.ir.dxc.hlsl b/test/tint/statements/compound_assign/matrix/times.wgsl.expected.ir.dxc.hlsl
index 2b4917b..e985bb5 100644
--- a/test/tint/statements/compound_assign/matrix/times.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/statements/compound_assign/matrix/times.wgsl.expected.ir.dxc.hlsl
@@ -8,10 +8,7 @@
}
float4x4 v_2(uint offset) {
- float4 v_3 = asfloat(v.Load4((offset + 0u)));
- float4 v_4 = asfloat(v.Load4((offset + 16u)));
- float4 v_5 = asfloat(v.Load4((offset + 32u)));
- return float4x4(v_3, v_4, v_5, asfloat(v.Load4((offset + 48u))));
+ return float4x4(asfloat(v.Load4((offset + 0u))), asfloat(v.Load4((offset + 16u))), asfloat(v.Load4((offset + 32u))), asfloat(v.Load4((offset + 48u))));
}
void foo() {
diff --git a/test/tint/statements/compound_assign/matrix/times.wgsl.expected.ir.fxc.hlsl b/test/tint/statements/compound_assign/matrix/times.wgsl.expected.ir.fxc.hlsl
index 2b4917b..e985bb5 100644
--- a/test/tint/statements/compound_assign/matrix/times.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/statements/compound_assign/matrix/times.wgsl.expected.ir.fxc.hlsl
@@ -8,10 +8,7 @@
}
float4x4 v_2(uint offset) {
- float4 v_3 = asfloat(v.Load4((offset + 0u)));
- float4 v_4 = asfloat(v.Load4((offset + 16u)));
- float4 v_5 = asfloat(v.Load4((offset + 32u)));
- return float4x4(v_3, v_4, v_5, asfloat(v.Load4((offset + 48u))));
+ return float4x4(asfloat(v.Load4((offset + 0u))), asfloat(v.Load4((offset + 16u))), asfloat(v.Load4((offset + 32u))), asfloat(v.Load4((offset + 48u))));
}
void foo() {
diff --git a/test/tint/statements/compound_assign/vector/divide.wgsl.expected.glsl b/test/tint/statements/compound_assign/vector/divide.wgsl.expected.glsl
index 5939353..847a527 100644
--- a/test/tint/statements/compound_assign/vector/divide.wgsl.expected.glsl
+++ b/test/tint/statements/compound_assign/vector/divide.wgsl.expected.glsl
@@ -10,13 +10,10 @@
S inner;
} v_1;
ivec4 tint_div_v4i32(ivec4 lhs, ivec4 rhs) {
- bvec4 v_2 = equal(rhs, ivec4(0));
- bvec4 v_3 = equal(lhs, ivec4((-2147483647 - 1)));
- bvec4 v_4 = equal(rhs, ivec4(-1));
- uvec4 v_5 = uvec4(v_3);
- bvec4 v_6 = bvec4((v_5 & uvec4(v_4)));
- uvec4 v_7 = uvec4(v_2);
- return (lhs / mix(rhs, ivec4(1), bvec4((v_7 | uvec4(v_6)))));
+ uvec4 v_2 = uvec4(equal(lhs, ivec4((-2147483647 - 1))));
+ bvec4 v_3 = bvec4((v_2 & uvec4(equal(rhs, ivec4(-1)))));
+ uvec4 v_4 = uvec4(equal(rhs, ivec4(0)));
+ return (lhs / mix(rhs, ivec4(1), bvec4((v_4 | uvec4(v_3)))));
}
void foo() {
v_1.inner.a = tint_div_v4i32(v_1.inner.a, ivec4(2));
diff --git a/test/tint/statements/compound_assign/vector/modulo-scalar.wgsl.expected.glsl b/test/tint/statements/compound_assign/vector/modulo-scalar.wgsl.expected.glsl
index ba8547c..9e14fa4 100644
--- a/test/tint/statements/compound_assign/vector/modulo-scalar.wgsl.expected.glsl
+++ b/test/tint/statements/compound_assign/vector/modulo-scalar.wgsl.expected.glsl
@@ -10,18 +10,15 @@
S inner;
} v_1;
ivec4 tint_mod_v4i32(ivec4 lhs, ivec4 rhs) {
- bvec4 v_2 = equal(rhs, ivec4(0));
- bvec4 v_3 = equal(lhs, ivec4((-2147483647 - 1)));
- bvec4 v_4 = equal(rhs, ivec4(-1));
- uvec4 v_5 = uvec4(v_3);
- bvec4 v_6 = bvec4((v_5 & uvec4(v_4)));
- uvec4 v_7 = uvec4(v_2);
- ivec4 v_8 = mix(rhs, ivec4(1), bvec4((v_7 | uvec4(v_6))));
- return (lhs - ((lhs / v_8) * v_8));
+ uvec4 v_2 = uvec4(equal(lhs, ivec4((-2147483647 - 1))));
+ bvec4 v_3 = bvec4((v_2 & uvec4(equal(rhs, ivec4(-1)))));
+ uvec4 v_4 = uvec4(equal(rhs, ivec4(0)));
+ ivec4 v_5 = mix(rhs, ivec4(1), bvec4((v_4 | uvec4(v_3))));
+ return (lhs - ((lhs / v_5) * v_5));
}
void foo() {
- ivec4 v_9 = v_1.inner.a;
- v_1.inner.a = tint_mod_v4i32(v_9, ivec4(2));
+ ivec4 v_6 = v_1.inner.a;
+ v_1.inner.a = tint_mod_v4i32(v_6, ivec4(2));
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
diff --git a/test/tint/statements/compound_assign/vector/modulo.wgsl.expected.glsl b/test/tint/statements/compound_assign/vector/modulo.wgsl.expected.glsl
index 1ee10ee..2c22851 100644
--- a/test/tint/statements/compound_assign/vector/modulo.wgsl.expected.glsl
+++ b/test/tint/statements/compound_assign/vector/modulo.wgsl.expected.glsl
@@ -10,14 +10,11 @@
S inner;
} v_1;
ivec4 tint_mod_v4i32(ivec4 lhs, ivec4 rhs) {
- bvec4 v_2 = equal(rhs, ivec4(0));
- bvec4 v_3 = equal(lhs, ivec4((-2147483647 - 1)));
- bvec4 v_4 = equal(rhs, ivec4(-1));
- uvec4 v_5 = uvec4(v_3);
- bvec4 v_6 = bvec4((v_5 & uvec4(v_4)));
- uvec4 v_7 = uvec4(v_2);
- ivec4 v_8 = mix(rhs, ivec4(1), bvec4((v_7 | uvec4(v_6))));
- return (lhs - ((lhs / v_8) * v_8));
+ uvec4 v_2 = uvec4(equal(lhs, ivec4((-2147483647 - 1))));
+ bvec4 v_3 = bvec4((v_2 & uvec4(equal(rhs, ivec4(-1)))));
+ uvec4 v_4 = uvec4(equal(rhs, ivec4(0)));
+ ivec4 v_5 = mix(rhs, ivec4(1), bvec4((v_4 | uvec4(v_3))));
+ return (lhs - ((lhs / v_5) * v_5));
}
void foo() {
v_1.inner.a = tint_mod_v4i32(v_1.inner.a, ivec4(2));
diff --git a/test/tint/statements/decrement/complex.wgsl.expected.ir.dxc.hlsl b/test/tint/statements/decrement/complex.wgsl.expected.ir.dxc.hlsl
index e082cba..8c8721c 100644
--- a/test/tint/statements/decrement/complex.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/statements/decrement/complex.wgsl.expected.ir.dxc.hlsl
@@ -39,22 +39,20 @@
uint v_4 = (uint(v_2) * 16u);
int v_5 = idx3();
int v_6 = (asint(buffer.Load((((0u + v_3) + v_4) + (uint(v_5) * 4u)))) - int(1));
- uint v_7 = (((0u + v_3) + v_4) + (uint(v_5) * 4u));
- buffer.Store(v_7, asuint(v_6));
+ buffer.Store((((0u + v_3) + v_4) + (uint(v_5) * 4u)), asuint(v_6));
while(true) {
if ((v < 10u)) {
} else {
break;
}
{
- int v_8 = idx4();
- int v_9 = idx5();
- uint v_10 = (uint(v_8) * 64u);
- uint v_11 = (uint(v_9) * 16u);
- int v_12 = idx6();
- int v_13 = (asint(buffer.Load((((0u + v_10) + v_11) + (uint(v_12) * 4u)))) - int(1));
- uint v_14 = (((0u + v_10) + v_11) + (uint(v_12) * 4u));
- buffer.Store(v_14, asuint(v_13));
+ int v_7 = idx4();
+ int v_8 = idx5();
+ uint v_9 = (uint(v_7) * 64u);
+ uint v_10 = (uint(v_8) * 16u);
+ int v_11 = idx6();
+ int v_12 = (asint(buffer.Load((((0u + v_9) + v_10) + (uint(v_11) * 4u)))) - int(1));
+ buffer.Store((((0u + v_9) + v_10) + (uint(v_11) * 4u)), asuint(v_12));
}
continue;
}
diff --git a/test/tint/statements/decrement/complex.wgsl.expected.ir.fxc.hlsl b/test/tint/statements/decrement/complex.wgsl.expected.ir.fxc.hlsl
index e082cba..8c8721c 100644
--- a/test/tint/statements/decrement/complex.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/statements/decrement/complex.wgsl.expected.ir.fxc.hlsl
@@ -39,22 +39,20 @@
uint v_4 = (uint(v_2) * 16u);
int v_5 = idx3();
int v_6 = (asint(buffer.Load((((0u + v_3) + v_4) + (uint(v_5) * 4u)))) - int(1));
- uint v_7 = (((0u + v_3) + v_4) + (uint(v_5) * 4u));
- buffer.Store(v_7, asuint(v_6));
+ buffer.Store((((0u + v_3) + v_4) + (uint(v_5) * 4u)), asuint(v_6));
while(true) {
if ((v < 10u)) {
} else {
break;
}
{
- int v_8 = idx4();
- int v_9 = idx5();
- uint v_10 = (uint(v_8) * 64u);
- uint v_11 = (uint(v_9) * 16u);
- int v_12 = idx6();
- int v_13 = (asint(buffer.Load((((0u + v_10) + v_11) + (uint(v_12) * 4u)))) - int(1));
- uint v_14 = (((0u + v_10) + v_11) + (uint(v_12) * 4u));
- buffer.Store(v_14, asuint(v_13));
+ int v_7 = idx4();
+ int v_8 = idx5();
+ uint v_9 = (uint(v_7) * 64u);
+ uint v_10 = (uint(v_8) * 16u);
+ int v_11 = idx6();
+ int v_12 = (asint(buffer.Load((((0u + v_9) + v_10) + (uint(v_11) * 4u)))) - int(1));
+ buffer.Store((((0u + v_9) + v_10) + (uint(v_11) * 4u)), asuint(v_12));
}
continue;
}
diff --git a/test/tint/statements/increment/complex.wgsl.expected.ir.dxc.hlsl b/test/tint/statements/increment/complex.wgsl.expected.ir.dxc.hlsl
index d3db09c..70a76e9 100644
--- a/test/tint/statements/increment/complex.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/statements/increment/complex.wgsl.expected.ir.dxc.hlsl
@@ -39,22 +39,20 @@
uint v_4 = (uint(v_2) * 16u);
int v_5 = idx3();
int v_6 = (asint(buffer.Load((((0u + v_3) + v_4) + (uint(v_5) * 4u)))) + int(1));
- uint v_7 = (((0u + v_3) + v_4) + (uint(v_5) * 4u));
- buffer.Store(v_7, asuint(v_6));
+ buffer.Store((((0u + v_3) + v_4) + (uint(v_5) * 4u)), asuint(v_6));
while(true) {
if ((v < 10u)) {
} else {
break;
}
{
- int v_8 = idx4();
- int v_9 = idx5();
- uint v_10 = (uint(v_8) * 64u);
- uint v_11 = (uint(v_9) * 16u);
- int v_12 = idx6();
- int v_13 = (asint(buffer.Load((((0u + v_10) + v_11) + (uint(v_12) * 4u)))) + int(1));
- uint v_14 = (((0u + v_10) + v_11) + (uint(v_12) * 4u));
- buffer.Store(v_14, asuint(v_13));
+ int v_7 = idx4();
+ int v_8 = idx5();
+ uint v_9 = (uint(v_7) * 64u);
+ uint v_10 = (uint(v_8) * 16u);
+ int v_11 = idx6();
+ int v_12 = (asint(buffer.Load((((0u + v_9) + v_10) + (uint(v_11) * 4u)))) + int(1));
+ buffer.Store((((0u + v_9) + v_10) + (uint(v_11) * 4u)), asuint(v_12));
}
continue;
}
diff --git a/test/tint/statements/increment/complex.wgsl.expected.ir.fxc.hlsl b/test/tint/statements/increment/complex.wgsl.expected.ir.fxc.hlsl
index d3db09c..70a76e9 100644
--- a/test/tint/statements/increment/complex.wgsl.expected.ir.fxc.hlsl
+++ b/test/tint/statements/increment/complex.wgsl.expected.ir.fxc.hlsl
@@ -39,22 +39,20 @@
uint v_4 = (uint(v_2) * 16u);
int v_5 = idx3();
int v_6 = (asint(buffer.Load((((0u + v_3) + v_4) + (uint(v_5) * 4u)))) + int(1));
- uint v_7 = (((0u + v_3) + v_4) + (uint(v_5) * 4u));
- buffer.Store(v_7, asuint(v_6));
+ buffer.Store((((0u + v_3) + v_4) + (uint(v_5) * 4u)), asuint(v_6));
while(true) {
if ((v < 10u)) {
} else {
break;
}
{
- int v_8 = idx4();
- int v_9 = idx5();
- uint v_10 = (uint(v_8) * 64u);
- uint v_11 = (uint(v_9) * 16u);
- int v_12 = idx6();
- int v_13 = (asint(buffer.Load((((0u + v_10) + v_11) + (uint(v_12) * 4u)))) + int(1));
- uint v_14 = (((0u + v_10) + v_11) + (uint(v_12) * 4u));
- buffer.Store(v_14, asuint(v_13));
+ int v_7 = idx4();
+ int v_8 = idx5();
+ uint v_9 = (uint(v_7) * 64u);
+ uint v_10 = (uint(v_8) * 16u);
+ int v_11 = idx6();
+ int v_12 = (asint(buffer.Load((((0u + v_9) + v_10) + (uint(v_11) * 4u)))) + int(1));
+ buffer.Store((((0u + v_9) + v_10) + (uint(v_11) * 4u)), asuint(v_12));
}
continue;
}
diff --git a/test/tint/types/functions/shader_io/compute_subgroup_builtins.wgsl.expected.ir.dxc.hlsl b/test/tint/types/functions/shader_io/compute_subgroup_builtins.wgsl.expected.ir.dxc.hlsl
index d067fa8..bc15bbd 100644
--- a/test/tint/types/functions/shader_io/compute_subgroup_builtins.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/types/functions/shader_io/compute_subgroup_builtins.wgsl.expected.ir.dxc.hlsl
@@ -6,7 +6,6 @@
[numthreads(1, 1, 1)]
void main() {
- uint v = WaveGetLaneIndex();
- main_inner(v, WaveGetLaneCount());
+ main_inner(WaveGetLaneIndex(), WaveGetLaneCount());
}
diff --git a/test/tint/types/functions/shader_io/compute_subgroup_builtins_struct.wgsl.expected.ir.dxc.hlsl b/test/tint/types/functions/shader_io/compute_subgroup_builtins_struct.wgsl.expected.ir.dxc.hlsl
index 9434039..08784ba 100644
--- a/test/tint/types/functions/shader_io/compute_subgroup_builtins_struct.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/types/functions/shader_io/compute_subgroup_builtins_struct.wgsl.expected.ir.dxc.hlsl
@@ -11,8 +11,7 @@
[numthreads(1, 1, 1)]
void main() {
- uint v = WaveGetLaneIndex();
- ComputeInputs v_1 = {v, WaveGetLaneCount()};
- main_inner(v_1);
+ ComputeInputs v = {WaveGetLaneIndex(), WaveGetLaneCount()};
+ main_inner(v);
}
diff --git a/test/tint/types/functions/shader_io/fragment_subgroup_builtins.wgsl.expected.ir.dxc.hlsl b/test/tint/types/functions/shader_io/fragment_subgroup_builtins.wgsl.expected.ir.dxc.hlsl
index b434635..2deb010 100644
--- a/test/tint/types/functions/shader_io/fragment_subgroup_builtins.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/types/functions/shader_io/fragment_subgroup_builtins.wgsl.expected.ir.dxc.hlsl
@@ -5,7 +5,6 @@
}
void main() {
- uint v = WaveGetLaneIndex();
- main_inner(v, WaveGetLaneCount());
+ main_inner(WaveGetLaneIndex(), WaveGetLaneCount());
}
diff --git a/test/tint/types/functions/shader_io/fragment_subgroup_builtins_struct.wgsl.expected.ir.dxc.hlsl b/test/tint/types/functions/shader_io/fragment_subgroup_builtins_struct.wgsl.expected.ir.dxc.hlsl
index 7c314cd..ad0d324 100644
--- a/test/tint/types/functions/shader_io/fragment_subgroup_builtins_struct.wgsl.expected.ir.dxc.hlsl
+++ b/test/tint/types/functions/shader_io/fragment_subgroup_builtins_struct.wgsl.expected.ir.dxc.hlsl
@@ -10,8 +10,7 @@
}
void main() {
- uint v = WaveGetLaneIndex();
- FragmentInputs v_1 = {v, WaveGetLaneCount()};
- main_inner(v_1);
+ FragmentInputs v = {WaveGetLaneIndex(), WaveGetLaneCount()};
+ main_inner(v);
}
diff --git a/test/tint/types/texture/depth/2d.wgsl.expected.ir.msl b/test/tint/types/texture/depth/2d.wgsl.expected.ir.msl
index ebeb09e..9577975 100644
--- a/test/tint/types/texture/depth/2d.wgsl.expected.ir.msl
+++ b/test/tint/types/texture/depth/2d.wgsl.expected.ir.msl
@@ -8,6 +8,5 @@
kernel void tint_symbol(depth2d<float, access::sample> t_f [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.t_f=t_f};
uint const v = uint(0);
- uint const v_1 = tint_module_vars.t_f.get_width(v);
- uint2 dims = uint2(v_1, tint_module_vars.t_f.get_height(v));
+ uint2 dims = uint2(tint_module_vars.t_f.get_width(v), tint_module_vars.t_f.get_height(v));
}
diff --git a/test/tint/types/texture/depth/2d_array.wgsl.expected.ir.msl b/test/tint/types/texture/depth/2d_array.wgsl.expected.ir.msl
index 1deba75..1e22c6f 100644
--- a/test/tint/types/texture/depth/2d_array.wgsl.expected.ir.msl
+++ b/test/tint/types/texture/depth/2d_array.wgsl.expected.ir.msl
@@ -8,6 +8,5 @@
kernel void tint_symbol(depth2d_array<float, access::sample> t_f [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.t_f=t_f};
uint const v = uint(0);
- uint const v_1 = tint_module_vars.t_f.get_width(v);
- uint2 dims = uint2(v_1, tint_module_vars.t_f.get_height(v));
+ uint2 dims = uint2(tint_module_vars.t_f.get_width(v), tint_module_vars.t_f.get_height(v));
}
diff --git a/test/tint/types/texture/depth/cube.wgsl.expected.ir.msl b/test/tint/types/texture/depth/cube.wgsl.expected.ir.msl
index 1b26387..bc23274 100644
--- a/test/tint/types/texture/depth/cube.wgsl.expected.ir.msl
+++ b/test/tint/types/texture/depth/cube.wgsl.expected.ir.msl
@@ -8,6 +8,5 @@
kernel void tint_symbol(depthcube<float, access::sample> t_f [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.t_f=t_f};
uint const v = uint(0);
- uint const v_1 = tint_module_vars.t_f.get_width(v);
- uint2 dims = uint2(v_1, tint_module_vars.t_f.get_height(v));
+ uint2 dims = uint2(tint_module_vars.t_f.get_width(v), tint_module_vars.t_f.get_height(v));
}
diff --git a/test/tint/types/texture/depth/cube_array.wgsl.expected.ir.msl b/test/tint/types/texture/depth/cube_array.wgsl.expected.ir.msl
index 97f5daf..b6d4451 100644
--- a/test/tint/types/texture/depth/cube_array.wgsl.expected.ir.msl
+++ b/test/tint/types/texture/depth/cube_array.wgsl.expected.ir.msl
@@ -8,6 +8,5 @@
kernel void tint_symbol(depthcube_array<float, access::sample> t_f [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.t_f=t_f};
uint const v = uint(0);
- uint const v_1 = tint_module_vars.t_f.get_width(v);
- uint2 dims = uint2(v_1, tint_module_vars.t_f.get_height(v));
+ uint2 dims = uint2(tint_module_vars.t_f.get_width(v), tint_module_vars.t_f.get_height(v));
}
diff --git a/test/tint/types/texture/multisampled/2d.wgsl.expected.ir.msl b/test/tint/types/texture/multisampled/2d.wgsl.expected.ir.msl
index 1aabad4..0352699 100644
--- a/test/tint/types/texture/multisampled/2d.wgsl.expected.ir.msl
+++ b/test/tint/types/texture/multisampled/2d.wgsl.expected.ir.msl
@@ -9,10 +9,7 @@
kernel void tint_symbol(texture2d_ms<float, access::read> t_f [[texture(0)]], texture2d_ms<int, access::read> t_i [[texture(1)]], texture2d_ms<uint, access::read> t_u [[texture(2)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.t_f=t_f, .t_i=t_i, .t_u=t_u};
- uint const v = tint_module_vars.t_f.get_width();
- uint2 fdims = uint2(v, tint_module_vars.t_f.get_height());
- uint const v_1 = tint_module_vars.t_i.get_width();
- uint2 idims = uint2(v_1, tint_module_vars.t_i.get_height());
- uint const v_2 = tint_module_vars.t_u.get_width();
- uint2 udims = uint2(v_2, tint_module_vars.t_u.get_height());
+ uint2 fdims = uint2(tint_module_vars.t_f.get_width(), tint_module_vars.t_f.get_height());
+ uint2 idims = uint2(tint_module_vars.t_i.get_width(), tint_module_vars.t_i.get_height());
+ uint2 udims = uint2(tint_module_vars.t_u.get_width(), tint_module_vars.t_u.get_height());
}
diff --git a/test/tint/types/texture/sampled/2d.wgsl.expected.ir.msl b/test/tint/types/texture/sampled/2d.wgsl.expected.ir.msl
index a96eb32..25e6c24 100644
--- a/test/tint/types/texture/sampled/2d.wgsl.expected.ir.msl
+++ b/test/tint/types/texture/sampled/2d.wgsl.expected.ir.msl
@@ -10,12 +10,9 @@
kernel void tint_symbol(texture2d<float, access::sample> t_f [[texture(0)]], texture2d<int, access::sample> t_i [[texture(1)]], texture2d<uint, access::sample> t_u [[texture(2)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.t_f=t_f, .t_i=t_i, .t_u=t_u};
uint const v = uint(1);
- uint const v_1 = tint_module_vars.t_f.get_width(v);
- uint2 fdims = uint2(v_1, tint_module_vars.t_f.get_height(v));
+ uint2 fdims = uint2(tint_module_vars.t_f.get_width(v), tint_module_vars.t_f.get_height(v));
+ uint const v_1 = uint(1);
+ uint2 idims = uint2(tint_module_vars.t_i.get_width(v_1), tint_module_vars.t_i.get_height(v_1));
uint const v_2 = uint(1);
- uint const v_3 = tint_module_vars.t_i.get_width(v_2);
- uint2 idims = uint2(v_3, tint_module_vars.t_i.get_height(v_2));
- uint const v_4 = uint(1);
- uint const v_5 = tint_module_vars.t_u.get_width(v_4);
- uint2 udims = uint2(v_5, tint_module_vars.t_u.get_height(v_4));
+ uint2 udims = uint2(tint_module_vars.t_u.get_width(v_2), tint_module_vars.t_u.get_height(v_2));
}
diff --git a/test/tint/types/texture/sampled/2d_array.wgsl.expected.ir.msl b/test/tint/types/texture/sampled/2d_array.wgsl.expected.ir.msl
index c08c2d2..aa0715a 100644
--- a/test/tint/types/texture/sampled/2d_array.wgsl.expected.ir.msl
+++ b/test/tint/types/texture/sampled/2d_array.wgsl.expected.ir.msl
@@ -10,12 +10,9 @@
kernel void tint_symbol(texture2d_array<float, access::sample> t_f [[texture(0)]], texture2d_array<int, access::sample> t_i [[texture(1)]], texture2d_array<uint, access::sample> t_u [[texture(2)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.t_f=t_f, .t_i=t_i, .t_u=t_u};
uint const v = uint(1);
- uint const v_1 = tint_module_vars.t_f.get_width(v);
- uint2 fdims = uint2(v_1, tint_module_vars.t_f.get_height(v));
+ uint2 fdims = uint2(tint_module_vars.t_f.get_width(v), tint_module_vars.t_f.get_height(v));
+ uint const v_1 = uint(1);
+ uint2 idims = uint2(tint_module_vars.t_i.get_width(v_1), tint_module_vars.t_i.get_height(v_1));
uint const v_2 = uint(1);
- uint const v_3 = tint_module_vars.t_i.get_width(v_2);
- uint2 idims = uint2(v_3, tint_module_vars.t_i.get_height(v_2));
- uint const v_4 = uint(1);
- uint const v_5 = tint_module_vars.t_u.get_width(v_4);
- uint2 udims = uint2(v_5, tint_module_vars.t_u.get_height(v_4));
+ uint2 udims = uint2(tint_module_vars.t_u.get_width(v_2), tint_module_vars.t_u.get_height(v_2));
}
diff --git a/test/tint/types/texture/sampled/3d.wgsl.expected.ir.msl b/test/tint/types/texture/sampled/3d.wgsl.expected.ir.msl
index 7c02a53..013a7b7 100644
--- a/test/tint/types/texture/sampled/3d.wgsl.expected.ir.msl
+++ b/test/tint/types/texture/sampled/3d.wgsl.expected.ir.msl
@@ -10,15 +10,9 @@
kernel void tint_symbol(texture3d<float, access::sample> t_f [[texture(0)]], texture3d<int, access::sample> t_i [[texture(1)]], texture3d<uint, access::sample> t_u [[texture(2)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.t_f=t_f, .t_i=t_i, .t_u=t_u};
uint const v = uint(1);
- uint const v_1 = tint_module_vars.t_f.get_width(v);
- uint const v_2 = tint_module_vars.t_f.get_height(v);
- uint3 fdims = uint3(v_1, v_2, tint_module_vars.t_f.get_depth(v));
- uint const v_3 = uint(1);
- uint const v_4 = tint_module_vars.t_i.get_width(v_3);
- uint const v_5 = tint_module_vars.t_i.get_height(v_3);
- uint3 idims = uint3(v_4, v_5, tint_module_vars.t_i.get_depth(v_3));
- uint const v_6 = uint(1);
- uint const v_7 = tint_module_vars.t_u.get_width(v_6);
- uint const v_8 = tint_module_vars.t_u.get_height(v_6);
- uint3 udims = uint3(v_7, v_8, tint_module_vars.t_u.get_depth(v_6));
+ uint3 fdims = uint3(tint_module_vars.t_f.get_width(v), tint_module_vars.t_f.get_height(v), tint_module_vars.t_f.get_depth(v));
+ uint const v_1 = uint(1);
+ uint3 idims = uint3(tint_module_vars.t_i.get_width(v_1), tint_module_vars.t_i.get_height(v_1), tint_module_vars.t_i.get_depth(v_1));
+ uint const v_2 = uint(1);
+ uint3 udims = uint3(tint_module_vars.t_u.get_width(v_2), tint_module_vars.t_u.get_height(v_2), tint_module_vars.t_u.get_depth(v_2));
}
diff --git a/test/tint/types/texture/sampled/cube.wgsl.expected.ir.msl b/test/tint/types/texture/sampled/cube.wgsl.expected.ir.msl
index 6f99ad7..e98ee0a 100644
--- a/test/tint/types/texture/sampled/cube.wgsl.expected.ir.msl
+++ b/test/tint/types/texture/sampled/cube.wgsl.expected.ir.msl
@@ -10,12 +10,9 @@
kernel void tint_symbol(texturecube<float, access::sample> t_f [[texture(0)]], texturecube<int, access::sample> t_i [[texture(1)]], texturecube<uint, access::sample> t_u [[texture(2)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.t_f=t_f, .t_i=t_i, .t_u=t_u};
uint const v = uint(1);
- uint const v_1 = tint_module_vars.t_f.get_width(v);
- uint2 fdims = uint2(v_1, tint_module_vars.t_f.get_height(v));
+ uint2 fdims = uint2(tint_module_vars.t_f.get_width(v), tint_module_vars.t_f.get_height(v));
+ uint const v_1 = uint(1);
+ uint2 idims = uint2(tint_module_vars.t_i.get_width(v_1), tint_module_vars.t_i.get_height(v_1));
uint const v_2 = uint(1);
- uint const v_3 = tint_module_vars.t_i.get_width(v_2);
- uint2 idims = uint2(v_3, tint_module_vars.t_i.get_height(v_2));
- uint const v_4 = uint(1);
- uint const v_5 = tint_module_vars.t_u.get_width(v_4);
- uint2 udims = uint2(v_5, tint_module_vars.t_u.get_height(v_4));
+ uint2 udims = uint2(tint_module_vars.t_u.get_width(v_2), tint_module_vars.t_u.get_height(v_2));
}
diff --git a/test/tint/types/texture/sampled/cube_array.wgsl.expected.ir.msl b/test/tint/types/texture/sampled/cube_array.wgsl.expected.ir.msl
index bbad2d4..8dd4951 100644
--- a/test/tint/types/texture/sampled/cube_array.wgsl.expected.ir.msl
+++ b/test/tint/types/texture/sampled/cube_array.wgsl.expected.ir.msl
@@ -10,12 +10,9 @@
kernel void tint_symbol(texturecube_array<float, access::sample> t_f [[texture(0)]], texturecube_array<int, access::sample> t_i [[texture(1)]], texturecube_array<uint, access::sample> t_u [[texture(2)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.t_f=t_f, .t_i=t_i, .t_u=t_u};
uint const v = uint(1);
- uint const v_1 = tint_module_vars.t_f.get_width(v);
- uint2 fdims = uint2(v_1, tint_module_vars.t_f.get_height(v));
+ uint2 fdims = uint2(tint_module_vars.t_f.get_width(v), tint_module_vars.t_f.get_height(v));
+ uint const v_1 = uint(1);
+ uint2 idims = uint2(tint_module_vars.t_i.get_width(v_1), tint_module_vars.t_i.get_height(v_1));
uint const v_2 = uint(1);
- uint const v_3 = tint_module_vars.t_i.get_width(v_2);
- uint2 idims = uint2(v_3, tint_module_vars.t_i.get_height(v_2));
- uint const v_4 = uint(1);
- uint const v_5 = tint_module_vars.t_u.get_width(v_4);
- uint2 udims = uint2(v_5, tint_module_vars.t_u.get_height(v_4));
+ uint2 udims = uint2(tint_module_vars.t_u.get_width(v_2), tint_module_vars.t_u.get_height(v_2));
}
diff --git a/test/tint/types/texture/storage/2d.wgsl.expected.ir.msl b/test/tint/types/texture/storage/2d.wgsl.expected.ir.msl
index 2aa9cfa..71db1b5 100644
--- a/test/tint/types/texture/storage/2d.wgsl.expected.ir.msl
+++ b/test/tint/types/texture/storage/2d.wgsl.expected.ir.msl
@@ -22,36 +22,20 @@
kernel void tint_symbol(texture2d<float, access::write> t_rgba8unorm [[texture(0)]], texture2d<float, access::write> t_rgba8snorm [[texture(1)]], texture2d<uint, access::write> t_rgba8uint [[texture(2)]], texture2d<int, access::write> t_rgba8sint [[texture(3)]], texture2d<uint, access::write> t_rgba16uint [[texture(4)]], texture2d<int, access::write> t_rgba16sint [[texture(5)]], texture2d<float, access::write> t_rgba16float [[texture(6)]], texture2d<uint, access::write> t_r32uint [[texture(7)]], texture2d<int, access::write> t_r32sint [[texture(8)]], texture2d<float, access::write> t_r32float [[texture(9)]], texture2d<uint, access::write> t_rg32uint [[texture(10)]], texture2d<int, access::write> t_rg32sint [[texture(11)]], texture2d<float, access::write> t_rg32float [[texture(12)]], texture2d<uint, access::write> t_rgba32uint [[texture(13)]], texture2d<int, access::write> t_rgba32sint [[texture(14)]], texture2d<float, access::write> t_rgba32float [[texture(15)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.t_rgba8unorm=t_rgba8unorm, .t_rgba8snorm=t_rgba8snorm, .t_rgba8uint=t_rgba8uint, .t_rgba8sint=t_rgba8sint, .t_rgba16uint=t_rgba16uint, .t_rgba16sint=t_rgba16sint, .t_rgba16float=t_rgba16float, .t_r32uint=t_r32uint, .t_r32sint=t_r32sint, .t_r32float=t_r32float, .t_rg32uint=t_rg32uint, .t_rg32sint=t_rg32sint, .t_rg32float=t_rg32float, .t_rgba32uint=t_rgba32uint, .t_rgba32sint=t_rgba32sint, .t_rgba32float=t_rgba32float};
- uint const v = tint_module_vars.t_rgba8unorm.get_width(0u);
- uint2 dim1 = uint2(v, tint_module_vars.t_rgba8unorm.get_height(0u));
- uint const v_1 = tint_module_vars.t_rgba8snorm.get_width(0u);
- uint2 dim2 = uint2(v_1, tint_module_vars.t_rgba8snorm.get_height(0u));
- uint const v_2 = tint_module_vars.t_rgba8uint.get_width(0u);
- uint2 dim3 = uint2(v_2, tint_module_vars.t_rgba8uint.get_height(0u));
- uint const v_3 = tint_module_vars.t_rgba8sint.get_width(0u);
- uint2 dim4 = uint2(v_3, tint_module_vars.t_rgba8sint.get_height(0u));
- uint const v_4 = tint_module_vars.t_rgba16uint.get_width(0u);
- uint2 dim5 = uint2(v_4, tint_module_vars.t_rgba16uint.get_height(0u));
- uint const v_5 = tint_module_vars.t_rgba16sint.get_width(0u);
- uint2 dim6 = uint2(v_5, tint_module_vars.t_rgba16sint.get_height(0u));
- uint const v_6 = tint_module_vars.t_rgba16float.get_width(0u);
- uint2 dim7 = uint2(v_6, tint_module_vars.t_rgba16float.get_height(0u));
- uint const v_7 = tint_module_vars.t_r32uint.get_width(0u);
- uint2 dim8 = uint2(v_7, tint_module_vars.t_r32uint.get_height(0u));
- uint const v_8 = tint_module_vars.t_r32sint.get_width(0u);
- uint2 dim9 = uint2(v_8, tint_module_vars.t_r32sint.get_height(0u));
- uint const v_9 = tint_module_vars.t_r32float.get_width(0u);
- uint2 dim10 = uint2(v_9, tint_module_vars.t_r32float.get_height(0u));
- uint const v_10 = tint_module_vars.t_rg32uint.get_width(0u);
- uint2 dim11 = uint2(v_10, tint_module_vars.t_rg32uint.get_height(0u));
- uint const v_11 = tint_module_vars.t_rg32sint.get_width(0u);
- uint2 dim12 = uint2(v_11, tint_module_vars.t_rg32sint.get_height(0u));
- uint const v_12 = tint_module_vars.t_rg32float.get_width(0u);
- uint2 dim13 = uint2(v_12, tint_module_vars.t_rg32float.get_height(0u));
- uint const v_13 = tint_module_vars.t_rgba32uint.get_width(0u);
- uint2 dim14 = uint2(v_13, tint_module_vars.t_rgba32uint.get_height(0u));
- uint const v_14 = tint_module_vars.t_rgba32sint.get_width(0u);
- uint2 dim15 = uint2(v_14, tint_module_vars.t_rgba32sint.get_height(0u));
- uint const v_15 = tint_module_vars.t_rgba32float.get_width(0u);
- uint2 dim16 = uint2(v_15, tint_module_vars.t_rgba32float.get_height(0u));
+ uint2 dim1 = uint2(tint_module_vars.t_rgba8unorm.get_width(0u), tint_module_vars.t_rgba8unorm.get_height(0u));
+ uint2 dim2 = uint2(tint_module_vars.t_rgba8snorm.get_width(0u), tint_module_vars.t_rgba8snorm.get_height(0u));
+ uint2 dim3 = uint2(tint_module_vars.t_rgba8uint.get_width(0u), tint_module_vars.t_rgba8uint.get_height(0u));
+ uint2 dim4 = uint2(tint_module_vars.t_rgba8sint.get_width(0u), tint_module_vars.t_rgba8sint.get_height(0u));
+ uint2 dim5 = uint2(tint_module_vars.t_rgba16uint.get_width(0u), tint_module_vars.t_rgba16uint.get_height(0u));
+ uint2 dim6 = uint2(tint_module_vars.t_rgba16sint.get_width(0u), tint_module_vars.t_rgba16sint.get_height(0u));
+ uint2 dim7 = uint2(tint_module_vars.t_rgba16float.get_width(0u), tint_module_vars.t_rgba16float.get_height(0u));
+ uint2 dim8 = uint2(tint_module_vars.t_r32uint.get_width(0u), tint_module_vars.t_r32uint.get_height(0u));
+ uint2 dim9 = uint2(tint_module_vars.t_r32sint.get_width(0u), tint_module_vars.t_r32sint.get_height(0u));
+ uint2 dim10 = uint2(tint_module_vars.t_r32float.get_width(0u), tint_module_vars.t_r32float.get_height(0u));
+ uint2 dim11 = uint2(tint_module_vars.t_rg32uint.get_width(0u), tint_module_vars.t_rg32uint.get_height(0u));
+ uint2 dim12 = uint2(tint_module_vars.t_rg32sint.get_width(0u), tint_module_vars.t_rg32sint.get_height(0u));
+ uint2 dim13 = uint2(tint_module_vars.t_rg32float.get_width(0u), tint_module_vars.t_rg32float.get_height(0u));
+ uint2 dim14 = uint2(tint_module_vars.t_rgba32uint.get_width(0u), tint_module_vars.t_rgba32uint.get_height(0u));
+ uint2 dim15 = uint2(tint_module_vars.t_rgba32sint.get_width(0u), tint_module_vars.t_rgba32sint.get_height(0u));
+ uint2 dim16 = uint2(tint_module_vars.t_rgba32float.get_width(0u), tint_module_vars.t_rgba32float.get_height(0u));
}
diff --git a/test/tint/types/texture/storage/2d_array.wgsl.expected.ir.msl b/test/tint/types/texture/storage/2d_array.wgsl.expected.ir.msl
index 04e5761..0592be4 100644
--- a/test/tint/types/texture/storage/2d_array.wgsl.expected.ir.msl
+++ b/test/tint/types/texture/storage/2d_array.wgsl.expected.ir.msl
@@ -22,36 +22,20 @@
kernel void tint_symbol(texture2d_array<float, access::write> t_rgba8unorm [[texture(0)]], texture2d_array<float, access::write> t_rgba8snorm [[texture(1)]], texture2d_array<uint, access::write> t_rgba8uint [[texture(2)]], texture2d_array<int, access::write> t_rgba8sint [[texture(3)]], texture2d_array<uint, access::write> t_rgba16uint [[texture(4)]], texture2d_array<int, access::write> t_rgba16sint [[texture(5)]], texture2d_array<float, access::write> t_rgba16float [[texture(6)]], texture2d_array<uint, access::write> t_r32uint [[texture(7)]], texture2d_array<int, access::write> t_r32sint [[texture(8)]], texture2d_array<float, access::write> t_r32float [[texture(9)]], texture2d_array<uint, access::write> t_rg32uint [[texture(10)]], texture2d_array<int, access::write> t_rg32sint [[texture(11)]], texture2d_array<float, access::write> t_rg32float [[texture(12)]], texture2d_array<uint, access::write> t_rgba32uint [[texture(13)]], texture2d_array<int, access::write> t_rgba32sint [[texture(14)]], texture2d_array<float, access::write> t_rgba32float [[texture(15)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.t_rgba8unorm=t_rgba8unorm, .t_rgba8snorm=t_rgba8snorm, .t_rgba8uint=t_rgba8uint, .t_rgba8sint=t_rgba8sint, .t_rgba16uint=t_rgba16uint, .t_rgba16sint=t_rgba16sint, .t_rgba16float=t_rgba16float, .t_r32uint=t_r32uint, .t_r32sint=t_r32sint, .t_r32float=t_r32float, .t_rg32uint=t_rg32uint, .t_rg32sint=t_rg32sint, .t_rg32float=t_rg32float, .t_rgba32uint=t_rgba32uint, .t_rgba32sint=t_rgba32sint, .t_rgba32float=t_rgba32float};
- uint const v = tint_module_vars.t_rgba8unorm.get_width(0u);
- uint2 dim1 = uint2(v, tint_module_vars.t_rgba8unorm.get_height(0u));
- uint const v_1 = tint_module_vars.t_rgba8snorm.get_width(0u);
- uint2 dim2 = uint2(v_1, tint_module_vars.t_rgba8snorm.get_height(0u));
- uint const v_2 = tint_module_vars.t_rgba8uint.get_width(0u);
- uint2 dim3 = uint2(v_2, tint_module_vars.t_rgba8uint.get_height(0u));
- uint const v_3 = tint_module_vars.t_rgba8sint.get_width(0u);
- uint2 dim4 = uint2(v_3, tint_module_vars.t_rgba8sint.get_height(0u));
- uint const v_4 = tint_module_vars.t_rgba16uint.get_width(0u);
- uint2 dim5 = uint2(v_4, tint_module_vars.t_rgba16uint.get_height(0u));
- uint const v_5 = tint_module_vars.t_rgba16sint.get_width(0u);
- uint2 dim6 = uint2(v_5, tint_module_vars.t_rgba16sint.get_height(0u));
- uint const v_6 = tint_module_vars.t_rgba16float.get_width(0u);
- uint2 dim7 = uint2(v_6, tint_module_vars.t_rgba16float.get_height(0u));
- uint const v_7 = tint_module_vars.t_r32uint.get_width(0u);
- uint2 dim8 = uint2(v_7, tint_module_vars.t_r32uint.get_height(0u));
- uint const v_8 = tint_module_vars.t_r32sint.get_width(0u);
- uint2 dim9 = uint2(v_8, tint_module_vars.t_r32sint.get_height(0u));
- uint const v_9 = tint_module_vars.t_r32float.get_width(0u);
- uint2 dim10 = uint2(v_9, tint_module_vars.t_r32float.get_height(0u));
- uint const v_10 = tint_module_vars.t_rg32uint.get_width(0u);
- uint2 dim11 = uint2(v_10, tint_module_vars.t_rg32uint.get_height(0u));
- uint const v_11 = tint_module_vars.t_rg32sint.get_width(0u);
- uint2 dim12 = uint2(v_11, tint_module_vars.t_rg32sint.get_height(0u));
- uint const v_12 = tint_module_vars.t_rg32float.get_width(0u);
- uint2 dim13 = uint2(v_12, tint_module_vars.t_rg32float.get_height(0u));
- uint const v_13 = tint_module_vars.t_rgba32uint.get_width(0u);
- uint2 dim14 = uint2(v_13, tint_module_vars.t_rgba32uint.get_height(0u));
- uint const v_14 = tint_module_vars.t_rgba32sint.get_width(0u);
- uint2 dim15 = uint2(v_14, tint_module_vars.t_rgba32sint.get_height(0u));
- uint const v_15 = tint_module_vars.t_rgba32float.get_width(0u);
- uint2 dim16 = uint2(v_15, tint_module_vars.t_rgba32float.get_height(0u));
+ uint2 dim1 = uint2(tint_module_vars.t_rgba8unorm.get_width(0u), tint_module_vars.t_rgba8unorm.get_height(0u));
+ uint2 dim2 = uint2(tint_module_vars.t_rgba8snorm.get_width(0u), tint_module_vars.t_rgba8snorm.get_height(0u));
+ uint2 dim3 = uint2(tint_module_vars.t_rgba8uint.get_width(0u), tint_module_vars.t_rgba8uint.get_height(0u));
+ uint2 dim4 = uint2(tint_module_vars.t_rgba8sint.get_width(0u), tint_module_vars.t_rgba8sint.get_height(0u));
+ uint2 dim5 = uint2(tint_module_vars.t_rgba16uint.get_width(0u), tint_module_vars.t_rgba16uint.get_height(0u));
+ uint2 dim6 = uint2(tint_module_vars.t_rgba16sint.get_width(0u), tint_module_vars.t_rgba16sint.get_height(0u));
+ uint2 dim7 = uint2(tint_module_vars.t_rgba16float.get_width(0u), tint_module_vars.t_rgba16float.get_height(0u));
+ uint2 dim8 = uint2(tint_module_vars.t_r32uint.get_width(0u), tint_module_vars.t_r32uint.get_height(0u));
+ uint2 dim9 = uint2(tint_module_vars.t_r32sint.get_width(0u), tint_module_vars.t_r32sint.get_height(0u));
+ uint2 dim10 = uint2(tint_module_vars.t_r32float.get_width(0u), tint_module_vars.t_r32float.get_height(0u));
+ uint2 dim11 = uint2(tint_module_vars.t_rg32uint.get_width(0u), tint_module_vars.t_rg32uint.get_height(0u));
+ uint2 dim12 = uint2(tint_module_vars.t_rg32sint.get_width(0u), tint_module_vars.t_rg32sint.get_height(0u));
+ uint2 dim13 = uint2(tint_module_vars.t_rg32float.get_width(0u), tint_module_vars.t_rg32float.get_height(0u));
+ uint2 dim14 = uint2(tint_module_vars.t_rgba32uint.get_width(0u), tint_module_vars.t_rgba32uint.get_height(0u));
+ uint2 dim15 = uint2(tint_module_vars.t_rgba32sint.get_width(0u), tint_module_vars.t_rgba32sint.get_height(0u));
+ uint2 dim16 = uint2(tint_module_vars.t_rgba32float.get_width(0u), tint_module_vars.t_rgba32float.get_height(0u));
}
diff --git a/test/tint/types/texture/storage/3d.wgsl.expected.ir.msl b/test/tint/types/texture/storage/3d.wgsl.expected.ir.msl
index d0daea5..28cfe37 100644
--- a/test/tint/types/texture/storage/3d.wgsl.expected.ir.msl
+++ b/test/tint/types/texture/storage/3d.wgsl.expected.ir.msl
@@ -22,52 +22,20 @@
kernel void tint_symbol(texture3d<float, access::write> t_rgba8unorm [[texture(0)]], texture3d<float, access::write> t_rgba8snorm [[texture(1)]], texture3d<uint, access::write> t_rgba8uint [[texture(2)]], texture3d<int, access::write> t_rgba8sint [[texture(3)]], texture3d<uint, access::write> t_rgba16uint [[texture(4)]], texture3d<int, access::write> t_rgba16sint [[texture(5)]], texture3d<float, access::write> t_rgba16float [[texture(6)]], texture3d<uint, access::write> t_r32uint [[texture(7)]], texture3d<int, access::write> t_r32sint [[texture(8)]], texture3d<float, access::write> t_r32float [[texture(9)]], texture3d<uint, access::write> t_rg32uint [[texture(10)]], texture3d<int, access::write> t_rg32sint [[texture(11)]], texture3d<float, access::write> t_rg32float [[texture(12)]], texture3d<uint, access::write> t_rgba32uint [[texture(13)]], texture3d<int, access::write> t_rgba32sint [[texture(14)]], texture3d<float, access::write> t_rgba32float [[texture(15)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.t_rgba8unorm=t_rgba8unorm, .t_rgba8snorm=t_rgba8snorm, .t_rgba8uint=t_rgba8uint, .t_rgba8sint=t_rgba8sint, .t_rgba16uint=t_rgba16uint, .t_rgba16sint=t_rgba16sint, .t_rgba16float=t_rgba16float, .t_r32uint=t_r32uint, .t_r32sint=t_r32sint, .t_r32float=t_r32float, .t_rg32uint=t_rg32uint, .t_rg32sint=t_rg32sint, .t_rg32float=t_rg32float, .t_rgba32uint=t_rgba32uint, .t_rgba32sint=t_rgba32sint, .t_rgba32float=t_rgba32float};
- uint const v = tint_module_vars.t_rgba8unorm.get_width(0u);
- uint const v_1 = tint_module_vars.t_rgba8unorm.get_height(0u);
- uint3 dim1 = uint3(v, v_1, tint_module_vars.t_rgba8unorm.get_depth(0u));
- uint const v_2 = tint_module_vars.t_rgba8snorm.get_width(0u);
- uint const v_3 = tint_module_vars.t_rgba8snorm.get_height(0u);
- uint3 dim2 = uint3(v_2, v_3, tint_module_vars.t_rgba8snorm.get_depth(0u));
- uint const v_4 = tint_module_vars.t_rgba8uint.get_width(0u);
- uint const v_5 = tint_module_vars.t_rgba8uint.get_height(0u);
- uint3 dim3 = uint3(v_4, v_5, tint_module_vars.t_rgba8uint.get_depth(0u));
- uint const v_6 = tint_module_vars.t_rgba8sint.get_width(0u);
- uint const v_7 = tint_module_vars.t_rgba8sint.get_height(0u);
- uint3 dim4 = uint3(v_6, v_7, tint_module_vars.t_rgba8sint.get_depth(0u));
- uint const v_8 = tint_module_vars.t_rgba16uint.get_width(0u);
- uint const v_9 = tint_module_vars.t_rgba16uint.get_height(0u);
- uint3 dim5 = uint3(v_8, v_9, tint_module_vars.t_rgba16uint.get_depth(0u));
- uint const v_10 = tint_module_vars.t_rgba16sint.get_width(0u);
- uint const v_11 = tint_module_vars.t_rgba16sint.get_height(0u);
- uint3 dim6 = uint3(v_10, v_11, tint_module_vars.t_rgba16sint.get_depth(0u));
- uint const v_12 = tint_module_vars.t_rgba16float.get_width(0u);
- uint const v_13 = tint_module_vars.t_rgba16float.get_height(0u);
- uint3 dim7 = uint3(v_12, v_13, tint_module_vars.t_rgba16float.get_depth(0u));
- uint const v_14 = tint_module_vars.t_r32uint.get_width(0u);
- uint const v_15 = tint_module_vars.t_r32uint.get_height(0u);
- uint3 dim8 = uint3(v_14, v_15, tint_module_vars.t_r32uint.get_depth(0u));
- uint const v_16 = tint_module_vars.t_r32sint.get_width(0u);
- uint const v_17 = tint_module_vars.t_r32sint.get_height(0u);
- uint3 dim9 = uint3(v_16, v_17, tint_module_vars.t_r32sint.get_depth(0u));
- uint const v_18 = tint_module_vars.t_r32float.get_width(0u);
- uint const v_19 = tint_module_vars.t_r32float.get_height(0u);
- uint3 dim10 = uint3(v_18, v_19, tint_module_vars.t_r32float.get_depth(0u));
- uint const v_20 = tint_module_vars.t_rg32uint.get_width(0u);
- uint const v_21 = tint_module_vars.t_rg32uint.get_height(0u);
- uint3 dim11 = uint3(v_20, v_21, tint_module_vars.t_rg32uint.get_depth(0u));
- uint const v_22 = tint_module_vars.t_rg32sint.get_width(0u);
- uint const v_23 = tint_module_vars.t_rg32sint.get_height(0u);
- uint3 dim12 = uint3(v_22, v_23, tint_module_vars.t_rg32sint.get_depth(0u));
- uint const v_24 = tint_module_vars.t_rg32float.get_width(0u);
- uint const v_25 = tint_module_vars.t_rg32float.get_height(0u);
- uint3 dim13 = uint3(v_24, v_25, tint_module_vars.t_rg32float.get_depth(0u));
- uint const v_26 = tint_module_vars.t_rgba32uint.get_width(0u);
- uint const v_27 = tint_module_vars.t_rgba32uint.get_height(0u);
- uint3 dim14 = uint3(v_26, v_27, tint_module_vars.t_rgba32uint.get_depth(0u));
- uint const v_28 = tint_module_vars.t_rgba32sint.get_width(0u);
- uint const v_29 = tint_module_vars.t_rgba32sint.get_height(0u);
- uint3 dim15 = uint3(v_28, v_29, tint_module_vars.t_rgba32sint.get_depth(0u));
- uint const v_30 = tint_module_vars.t_rgba32float.get_width(0u);
- uint const v_31 = tint_module_vars.t_rgba32float.get_height(0u);
- uint3 dim16 = uint3(v_30, v_31, tint_module_vars.t_rgba32float.get_depth(0u));
+ uint3 dim1 = uint3(tint_module_vars.t_rgba8unorm.get_width(0u), tint_module_vars.t_rgba8unorm.get_height(0u), tint_module_vars.t_rgba8unorm.get_depth(0u));
+ uint3 dim2 = uint3(tint_module_vars.t_rgba8snorm.get_width(0u), tint_module_vars.t_rgba8snorm.get_height(0u), tint_module_vars.t_rgba8snorm.get_depth(0u));
+ uint3 dim3 = uint3(tint_module_vars.t_rgba8uint.get_width(0u), tint_module_vars.t_rgba8uint.get_height(0u), tint_module_vars.t_rgba8uint.get_depth(0u));
+ uint3 dim4 = uint3(tint_module_vars.t_rgba8sint.get_width(0u), tint_module_vars.t_rgba8sint.get_height(0u), tint_module_vars.t_rgba8sint.get_depth(0u));
+ uint3 dim5 = uint3(tint_module_vars.t_rgba16uint.get_width(0u), tint_module_vars.t_rgba16uint.get_height(0u), tint_module_vars.t_rgba16uint.get_depth(0u));
+ uint3 dim6 = uint3(tint_module_vars.t_rgba16sint.get_width(0u), tint_module_vars.t_rgba16sint.get_height(0u), tint_module_vars.t_rgba16sint.get_depth(0u));
+ uint3 dim7 = uint3(tint_module_vars.t_rgba16float.get_width(0u), tint_module_vars.t_rgba16float.get_height(0u), tint_module_vars.t_rgba16float.get_depth(0u));
+ uint3 dim8 = uint3(tint_module_vars.t_r32uint.get_width(0u), tint_module_vars.t_r32uint.get_height(0u), tint_module_vars.t_r32uint.get_depth(0u));
+ uint3 dim9 = uint3(tint_module_vars.t_r32sint.get_width(0u), tint_module_vars.t_r32sint.get_height(0u), tint_module_vars.t_r32sint.get_depth(0u));
+ uint3 dim10 = uint3(tint_module_vars.t_r32float.get_width(0u), tint_module_vars.t_r32float.get_height(0u), tint_module_vars.t_r32float.get_depth(0u));
+ uint3 dim11 = uint3(tint_module_vars.t_rg32uint.get_width(0u), tint_module_vars.t_rg32uint.get_height(0u), tint_module_vars.t_rg32uint.get_depth(0u));
+ uint3 dim12 = uint3(tint_module_vars.t_rg32sint.get_width(0u), tint_module_vars.t_rg32sint.get_height(0u), tint_module_vars.t_rg32sint.get_depth(0u));
+ uint3 dim13 = uint3(tint_module_vars.t_rg32float.get_width(0u), tint_module_vars.t_rg32float.get_height(0u), tint_module_vars.t_rg32float.get_depth(0u));
+ uint3 dim14 = uint3(tint_module_vars.t_rgba32uint.get_width(0u), tint_module_vars.t_rgba32uint.get_height(0u), tint_module_vars.t_rgba32uint.get_depth(0u));
+ uint3 dim15 = uint3(tint_module_vars.t_rgba32sint.get_width(0u), tint_module_vars.t_rgba32sint.get_height(0u), tint_module_vars.t_rgba32sint.get_depth(0u));
+ uint3 dim16 = uint3(tint_module_vars.t_rgba32float.get_width(0u), tint_module_vars.t_rgba32float.get_height(0u), tint_module_vars.t_rgba32float.get_depth(0u));
}