Module: Mesa Branch: staging/20.3 Commit: e1e31f6126c16c8bc24e7c5f2771a32c69f336e7 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=e1e31f6126c16c8bc24e7c5f2771a32c69f336e7
Author: Bas Nieuwenhuizen <[email protected]> Date: Sat Nov 21 20:58:37 2020 +0100 radv: Fix RB+ blending for VK_FORMAT_E5B9G9R9_UFLOAT_PACK32. Fixes: e893102bcf5 ("radv: Add VK_FORMAT_E5B9G9R9_UFLOAT_PACK32 rendering support.") Reviewed-by: Samuel Pitoiset <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7716> (cherry picked from commit 025cb90042ba62db8f4be6b612c8f5d2b6b3746b) --- .pick_status.json | 2 +- src/amd/vulkan/radv_cmd_buffer.c | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.pick_status.json b/.pick_status.json index d7f2811c588..b4656f158a2 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -355,7 +355,7 @@ "description": "radv: Fix RB+ blending for VK_FORMAT_E5B9G9R9_UFLOAT_PACK32.", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "master_sha": null, "because_sha": "e893102bcf5d6632f36399d745481639344e5526" }, diff --git a/src/amd/vulkan/radv_cmd_buffer.c b/src/amd/vulkan/radv_cmd_buffer.c index f0a4d05fc6f..e0080320ab6 100644 --- a/src/amd/vulkan/radv_cmd_buffer.c +++ b/src/amd/vulkan/radv_cmd_buffer.c @@ -1119,6 +1119,11 @@ radv_emit_rbplus_state(struct radv_cmd_buffer *cmd_buffer) has_alpha = false; } + /* The HW doesn't quite blend correctly with rgb9e5 if we disable the alpha + * optimization, even though it has no alpha. */ + if (has_rgb && format == V_028C70_COLOR_5_9_9_9) + has_alpha = true; + /* Disable value checking for disabled channels. */ if (!has_rgb) sx_blend_opt_control |= S_02875C_MRT0_COLOR_OPT_DISABLE(1) << (i * 4); _______________________________________________ mesa-commit mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-commit
