From: Kenneth Graunke Date: Wed, 8 Mar 2023 10:29:06 +0000 (-0800) Subject: intel/fs: Fix inferred_sync_pipe for F16TO32 opcodes X-Git-Tag: upstream/23.3.3~11872 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=386404918402e1b359a60dcd7a06ac0ae091ba9f;p=platform%2Fupstream%2Fmesa.git 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: --- 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; } }