radv: enable VRS 2x2 coarse shading for flat shading on GFX10.3+

This should safe to enable and shouldn't degrade the quality.
It decreases the number of PS invocations by 4 when used.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9515>
This commit is contained in:
Samuel Pitoiset
2021-03-10 16:21:34 +01:00
parent cf54ff3ea6
commit f5540209ab
2 changed files with 18 additions and 11 deletions

View File

@@ -506,15 +506,6 @@ si_emit_graphics(struct radv_device *device,
/* This allows sample shading. */
radeon_set_context_reg(cs, R_028848_PA_CL_VRS_CNTL,
S_028848_SAMPLE_ITER_COMBINER_MODE(1));
/* This is the main VRS register and also the last
* combiner, set it to passthrough mode because other
* combiners are configured with PA_CL_VRS_CNTL.
*/
radeon_set_context_reg(cs, R_028064_DB_VRS_OVERRIDE_CNTL,
S_028064_VRS_OVERRIDE_RATE_COMBINER_MODE(V_028064_VRS_COMB_MODE_PASSTHRU) |
S_028064_VRS_OVERRIDE_RATE_X(0) |
S_028064_VRS_OVERRIDE_RATE_Y(0));
}
if (physical_device->rad_info.chip_class == GFX10) {