diff options
author | Samuel Pitoiset <samuel.pitoiset@gmail.com> | 2023-03-06 19:06:17 +0100 |
---|---|---|
committer | Eric Engestrom <eric@engestrom.ch> | 2023-03-08 18:00:17 +0000 |
commit | acb42bea9c22eee0f51e76f113884725539f67cb (patch) | |
tree | b872b40f1c4ece2b3331020975d9aeebb7f88cbb | |
parent | 8292375d11c536ba29a36ace63923b36a3f02c94 (diff) | |
download | mesa-acb42bea9c22eee0f51e76f113884725539f67cb.tar.gz |
radv: disable DCC with signedness reinterpretation on GFX11
All formats should be compatible on GFX11 but for some weird reasons
DCC with signedness reinterpretation doesn't work as expected, like
R8_UINT<->R8_SINT. Note that RadeonSI also has issues with this.
This might be a hardware bug on RDNA3.
This fixes DCC issues with Cyberpunk and A Plague Tale: Requiem.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8020
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8371
Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21755>
(cherry picked from commit e6735409eefaec52ef78acecd3f3e7c310c63887)
-rw-r--r-- | .pick_status.json | 2 | ||||
-rw-r--r-- | src/amd/vulkan/radv_formats.c | 14 |
2 files changed, 10 insertions, 6 deletions
diff --git a/.pick_status.json b/.pick_status.json index 4ef665fde51..d3d8f8f9ec4 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -157,7 +157,7 @@ "description": "radv: disable DCC with signedness reinterpretation on GFX11", "nominated": true, "nomination_type": 0, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": null }, diff --git a/src/amd/vulkan/radv_formats.c b/src/amd/vulkan/radv_formats.c index 5251916a488..a1729eba268 100644 --- a/src/amd/vulkan/radv_formats.c +++ b/src/amd/vulkan/radv_formats.c @@ -2096,10 +2096,6 @@ radv_dcc_formats_compatible(enum amd_gfx_level gfx_level, VkFormat format1, VkFo unsigned size1, size2; int i; - /* All formats are compatible on GFX11. */ - if (gfx_level >= GFX11) - return true; - if (format1 == format2) return true; @@ -2122,8 +2118,16 @@ radv_dcc_formats_compatible(enum amd_gfx_level gfx_level, VkFormat format1, VkFo (type1 == dcc_channel_float) != (type2 == dcc_channel_float) || size1 != size2) return false; - if (type1 != type2) + if (type1 != type2) { + /* FIXME: All formats should be compatible on GFX11 but for some reasons DCC with signedness + * reinterpretation doesn't work as expected, like R8_UINT<->R8_SINT. Note that disabling + * fast-clears doesn't help. + */ + if (gfx_level >= GFX11) + return false; + *sign_reinterpret = true; + } return true; } |