From 386404918402e1b359a60dcd7a06ac0ae091ba9f Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Wed, 8 Mar 2023 02:29:06 -0800 Subject: [PATCH] intel/fs: Fix inferred_sync_pipe for F16TO32 opcodes For converting half-float to float, we currently emit BRW_OPCODE_F16TO32 with a UW source, to match legacy Gfx7 behavior. In the generator, this becomes a MOV with a HF source on Gfx8+. Unfortunately, this UW source confuses the scoreboarding pass into thinking it's an integer source, leading to incorrect SWSB annotations on Alchemist. We should ultimately fix the IR to stop being so...legacy...here, but this is the simplest fix for stable branches. Fixes misrendering in Elden Ring and likely Sekiro: Shadows Die Twice. Cc: mesa-stable Tested-by: Chuansheng Liu Reviewed-by: Lionel Landwerlin Reviewed-by: Sagar Ghuge References: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8018 References: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8375 Part-of: --- src/intel/compiler/brw_fs_scoreboard.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/intel/compiler/brw_fs_scoreboard.cpp b/src/intel/compiler/brw_fs_scoreboard.cpp index 2418357..dd31b01 100644 --- a/src/intel/compiler/brw_fs_scoreboard.cpp +++ b/src/intel/compiler/brw_fs_scoreboard.cpp @@ -84,7 +84,8 @@ namespace { if (inst->src[i].file != BAD_FILE && !inst->is_control_source(i)) { const brw_reg_type t = inst->src[i].type; - has_int_src |= !brw_reg_type_is_floating_point(t); + has_int_src |= !brw_reg_type_is_floating_point(t) && + inst->opcode != BRW_OPCODE_F16TO32; has_long_src |= type_sz(t) >= 8; } } -- 2.7.4