From 7fa453c813a78684771e5b10a4b0b4bdece70d70 Mon Sep 17 00:00:00 2001 From: Triang3l Date: Sun, 18 Nov 2018 22:20:43 +0300 Subject: [PATCH] [GPU] Fix 1-component ALU instruction swizzle (hopefully) --- src/xenia/gpu/shader_translator.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/xenia/gpu/shader_translator.cc b/src/xenia/gpu/shader_translator.cc index c01309b3f..d76f2c17a 100644 --- a/src/xenia/gpu/shader_translator.cc +++ b/src/xenia/gpu/shader_translator.cc @@ -1074,7 +1074,7 @@ void ParseAluInstructionOperand(const AluInstruction& op, int i, out_op->component_count = swizzle_component_count; uint32_t swizzle = op.src_swizzle(i); if (swizzle_component_count == 1) { - uint32_t a = swizzle & 0x3; + uint32_t a = ((swizzle >> 6) + 3) & 0x3; out_op->components[0] = GetSwizzleFromComponentIndex(a); } else if (swizzle_component_count == 2) { uint32_t a = ((swizzle >> 6) + 3) & 0x3;