From f7575fa71fb026003800bc5e376393d1cfab7113 Mon Sep 17 00:00:00 2001 From: Rhys Perry Date: Tue, 9 Feb 2021 21:33:43 +0000 Subject: [PATCH] aco: fix adjust_vertex_fetch_alpha MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit These offsets were wrong and didn't match the old behaviour. Signed-off-by: Rhys Perry Reviewed-by: Daniel Schürmann Fixes: e8220e106bf ("aco: optimize AC_FETCH_FORMAT_SNORM alpha adjust") Part-of: --- src/amd/compiler/aco_instruction_selection.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/amd/compiler/aco_instruction_selection.cpp b/src/amd/compiler/aco_instruction_selection.cpp index e21b71b99ff..7eb95bc43f7 100644 --- a/src/amd/compiler/aco_instruction_selection.cpp +++ b/src/amd/compiler/aco_instruction_selection.cpp @@ -4854,7 +4854,7 @@ Temp adjust_vertex_fetch_alpha(isel_context *ctx, unsigned adjustment, Temp alph * and happen to contain 0, 1, 2, 3 as the two LSBs of the * exponent. */ - unsigned offset = adjustment == AC_FETCH_FORMAT_SNORM ? 7u : 30u; + unsigned offset = adjustment == AC_FETCH_FORMAT_SNORM ? 23u : 0u; alpha = bld.vop3(aco_opcode::v_bfe_i32, bld.def(v1), alpha, Operand(offset), Operand(2u)); /* Convert back to the right type. */