From: Marek Olšák <marek.ol...@amd.com>

---
 src/gallium/drivers/radeonsi/si_pipe.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/gallium/drivers/radeonsi/si_pipe.c 
b/src/gallium/drivers/radeonsi/si_pipe.c
index fa9ee43389a..1cc08c5feed 100644
--- a/src/gallium/drivers/radeonsi/si_pipe.c
+++ b/src/gallium/drivers/radeonsi/si_pipe.c
@@ -748,21 +748,28 @@ struct pipe_screen *radeonsi_screen_create(struct 
radeon_winsys *ws,
        if (!debug_get_bool_option("RADEON_DISABLE_PERFCOUNTERS", false))
                si_init_perfcounters(sscreen);
 
        /* Determine tessellation ring info. */
        bool double_offchip_buffers = sscreen->info.chip_class >= CIK &&
                                      sscreen->info.family != CHIP_CARRIZO &&
                                      sscreen->info.family != CHIP_STONEY;
        /* 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;
 
        /* Hawaii has a bug with offchip buffers > 256 that can be worked
         * around by setting 4K granularity.
         */
        if (sscreen->info.family == CHIP_HAWAII) {
                sscreen->tess_offchip_block_dw_size = 4096;
                offchip_granularity = V_03093C_X_4K_DWORDS;
-- 
2.15.1

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to