radv: cleanup setting disabled binning state for GFX9
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Wed, 19 Oct 2022 11:37:29 +0000 (13:37 +0200)
committerMarge Bot <emma+marge@anholt.net>
Mon, 7 Nov 2022 14:22:02 +0000 (14:22 +0000)
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/19164>

src/amd/vulkan/radv_pipeline.c

index 89da9324b827a525c4b6d733200a953fbb1bf8c9..434543858b163574117f9133c27c35a5b627c3ab 100644 (file)
@@ -4686,8 +4686,7 @@ radv_pipeline_init_disabled_binning_state(struct radv_graphics_pipeline *pipelin
                                           const struct vk_graphics_pipeline_state *state)
 {
    const struct radv_physical_device *pdevice = pipeline->base.device->physical_device;
-   uint32_t pa_sc_binner_cntl_0 = S_028C44_BINNING_MODE(V_028C44_DISABLE_BINNING_USE_LEGACY_SC) |
-                                  S_028C44_DISABLE_START_OF_PRIM(1);
+   uint32_t pa_sc_binner_cntl_0;
 
    if (pdevice->rad_info.gfx_level >= GFX10) {
       unsigned min_bytes_per_pixel = 0;
@@ -4711,6 +4710,9 @@ radv_pipeline_init_disabled_binning_state(struct radv_graphics_pipeline *pipelin
          S_028C44_BIN_SIZE_Y(0) | S_028C44_BIN_SIZE_X_EXTEND(2) |       /* 128 */
          S_028C44_BIN_SIZE_Y_EXTEND(min_bytes_per_pixel <= 4 ? 2 : 1) | /* 128 or 64 */
          S_028C44_DISABLE_START_OF_PRIM(1);
+   } else {
+      pa_sc_binner_cntl_0 = S_028C44_BINNING_MODE(V_028C44_DISABLE_BINNING_USE_LEGACY_SC) |
+                            S_028C44_DISABLE_START_OF_PRIM(1);
    }
 
    pipeline->binning.pa_sc_binner_cntl_0 = pa_sc_binner_cntl_0;