From: Rhys Perry Date: Wed, 9 Jan 2019 14:40:15 +0000 (+0000) Subject: radv: use dithered alpha-to-coverage X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8a52e4cc4fad4f1c75acc0badd624778f9dfe202;p=mesa.git radv: use dithered alpha-to-coverage This matches the behaviour of AMDVLK and hides banding. It is also seems to be allowed by the Vulkan spec. Signed-off-by: Rhys Perry Reviewed-by: Bas Nieuwenhuizen --- diff --git a/src/amd/vulkan/radv_pipeline.c b/src/amd/vulkan/radv_pipeline.c index d9463a1e8b8..3bf3c7ffef7 100644 --- a/src/amd/vulkan/radv_pipeline.c +++ b/src/amd/vulkan/radv_pipeline.c @@ -681,10 +681,11 @@ radv_pipeline_init_blend_state(struct radv_pipeline *pipeline, else blend.cb_color_control |= S_028808_ROP3(V_028808_ROP3_COPY); - blend.db_alpha_to_mask = S_028B70_ALPHA_TO_MASK_OFFSET0(2) | - S_028B70_ALPHA_TO_MASK_OFFSET1(2) | - S_028B70_ALPHA_TO_MASK_OFFSET2(2) | - S_028B70_ALPHA_TO_MASK_OFFSET3(2); + blend.db_alpha_to_mask = S_028B70_ALPHA_TO_MASK_OFFSET0(3) | + S_028B70_ALPHA_TO_MASK_OFFSET1(1) | + S_028B70_ALPHA_TO_MASK_OFFSET2(0) | + S_028B70_ALPHA_TO_MASK_OFFSET3(2) | + S_028B70_OFFSET_ROUND(1); if (vkms && vkms->alphaToCoverageEnable) { blend.db_alpha_to_mask |= S_028B70_ALPHA_TO_MASK_ENABLE(1);