radv: allow to force VRS rates on GFX10.3 with RADV_FORCE_VRS

This allows to force the VRS rates via RADV_FORCE_VRS, the supported
values are 2x2, 1x2 and 2x1. This supports the primitive shading rate
mode for non GUI elements.

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/7794>
This commit is contained in:
Samuel Pitoiset
2021-01-19 16:12:01 +01:00
parent 549f41754a
commit 1ad295ed6f
8 changed files with 117 additions and 7 deletions
@@ -328,8 +328,10 @@ setup_vs_output_info(isel_context *ctx, nir_shader *nir,
outinfo->param_exports = 0;
int pos_written = 0x1;
bool writes_primitive_shading_rate = outinfo->writes_primitive_shading_rate ||
ctx->options->force_vrs_rates;
if (outinfo->writes_pointsize || outinfo->writes_viewport_index || outinfo->writes_layer ||
outinfo->writes_primitive_shading_rate)
writes_primitive_shading_rate)
pos_written |= 1 << 1;
uint64_t mask = nir->info.outputs_written;