radeonsi: enable dithered alpha-to-coverage for better quality

same as AMDVLK.

GL_NV_alpha_to_coverage_dither_control allows controlling this behavior.
The default is implementation-dependent.
This commit is contained in:
Marek Olšák 2019-01-14 21:21:28 -05:00
parent b4986d2e0c
commit 1c12d56e4d
1 changed files with 5 additions and 4 deletions

View File

@ -474,10 +474,11 @@ static void *si_create_blend_state_mode(struct pipe_context *ctx,
si_pm4_set_reg(pm4, R_028B70_DB_ALPHA_TO_MASK,
S_028B70_ALPHA_TO_MASK_ENABLE(state->alpha_to_coverage) |
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));
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 (state->alpha_to_coverage)
blend->need_src_alpha_4bit |= 0xf;