intel/fs: Fix inferred_sync_pipe for F16TO32 opcodes
authorKenneth Graunke <kenneth@whitecape.org>
Wed, 8 Mar 2023 10:29:06 +0000 (02:29 -0800)
committerMarge Bot <emma+marge@anholt.net>
Thu, 9 Mar 2023 23:26:17 +0000 (23:26 +0000)
commit386404918402e1b359a60dcd7a06ac0ae091ba9f
tree2c4d4aa9cc3d397e667d8f6958e2743b27d68209
parent4978db6b9ed47538b5ab8094bb4017d47d46b5ac
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 <chuansheng.liu@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
References: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8018
References: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8375
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21783>
src/intel/compiler/brw_fs_scoreboard.cpp