radeonsi: use maximum OFFCHIP_BUFFERING on Vega12
authorMarek Olšák <marek.olsak@amd.com>
Mon, 26 Mar 2018 21:11:51 +0000 (17:11 -0400)
committerMarek Olšák <marek.olsak@amd.com>
Wed, 28 Mar 2018 22:45:52 +0000 (18:45 -0400)
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
src/gallium/drivers/radeonsi/si_pipe.c

index fa9ee43389a6af4df021c9e77af43b76ab88ba67..1cc08c5feedb9642d0565f805c69c08841c6f8b8 100644 (file)
@@ -755,7 +755,14 @@ struct pipe_screen *radeonsi_screen_create(struct radeon_winsys *ws,
        /* This must be one less than the maximum number due to a hw limitation.
         * Various hardware bugs in SI, CIK, and GFX9 need this.
         */
-       unsigned max_offchip_buffers_per_se = double_offchip_buffers ? 127 : 63;
+       unsigned max_offchip_buffers_per_se;
+
+       /* Only certain chips can use the maximum value. */
+       if (sscreen->info.family == CHIP_VEGA12)
+               max_offchip_buffers_per_se = double_offchip_buffers ? 128 : 64;
+       else
+               max_offchip_buffers_per_se = double_offchip_buffers ? 127 : 63;
+
        unsigned max_offchip_buffers = max_offchip_buffers_per_se *
                                       sscreen->info.max_se;
        unsigned offchip_granularity;