radv: emit PA_SU_PRIM_FILTER_CNTL in the graphics preamble
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Thu, 10 Nov 2022 16:54:43 +0000 (17:54 +0100)
committerMarge Bot <emma+marge@anholt.net>
Wed, 16 Nov 2022 13:02:14 +0000 (13:02 +0000)
This register doesn't change.

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/19654>

src/amd/vulkan/radv_pipeline.c
src/amd/vulkan/si_cmd_buffer.c

index db1f95f..603afd3 100644 (file)
@@ -4379,19 +4379,9 @@ static void
 radv_pipeline_emit_multisample_state(struct radeon_cmdbuf *ctx_cs,
                                      const struct radv_graphics_pipeline *pipeline)
 {
-   const struct radv_physical_device *pdevice = pipeline->base.device->physical_device;
    const struct radv_multisample_state *ms = &pipeline->ms;
 
    radeon_set_context_reg(ctx_cs, R_028A4C_PA_SC_MODE_CNTL_1, ms->pa_sc_mode_cntl_1);
-
-   /* The exclusion bits can be set to improve rasterization efficiency
-    * if no sample lies on the pixel boundary (-8 sample offset). It's
-    * currently always TRUE because the driver doesn't support 16 samples.
-    */
-   bool exclusion = pdevice->rad_info.gfx_level >= GFX7;
-   radeon_set_context_reg(
-      ctx_cs, R_02882C_PA_SU_PRIM_FILTER_CNTL,
-      S_02882C_XMAX_RIGHT_EXCLUSION(exclusion) | S_02882C_YMAX_BOTTOM_EXCLUSION(exclusion));
 }
 
 static void
index 2589c83..f1e7924 100644 (file)
@@ -630,6 +630,15 @@ si_emit_graphics(struct radv_device *device, struct radeon_cmdbuf *cs)
       radeon_set_uconfig_reg(cs, R_031114_SPI_GS_THROTTLE_CNTL2, 0x1544D);
    }
 
+   /* The exclusion bits can be set to improve rasterization efficiency if no sample lies on the
+    * pixel boundary (-8 sample offset). It's currently always TRUE because the driver doesn't
+    * support 16 samples.
+    */
+   bool exclusion = physical_device->rad_info.gfx_level >= GFX7;
+   radeon_set_context_reg(cs, R_02882C_PA_SU_PRIM_FILTER_CNTL,
+                              S_02882C_XMAX_RIGHT_EXCLUSION(exclusion) |
+                              S_02882C_YMAX_BOTTOM_EXCLUSION(exclusion));
+
    si_emit_compute(device, cs);
 }