From f86a112b07f01e267828fc255ffd63f223d2d5bb Mon Sep 17 00:00:00 2001 From: Nicolai Hähnle Date: Sun, 17 Sep 2017 11:10:04 +0200 Subject: radeonsi: move current_rast_prim to r600_common_context MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We'll use it in the scissors / clip / guardband state. v2: avoid a performance regression on r600 when applied to (pre-fork) stable branches Cc: mesa-stable@lists.freedesktop.org Reviewed-by: Marek Olšák --- src/gallium/drivers/radeon/r600_pipe_common.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/gallium/drivers/radeon/r600_pipe_common.c') diff --git a/src/gallium/drivers/radeon/r600_pipe_common.c b/src/gallium/drivers/radeon/r600_pipe_common.c index 62bd5f6a98f..b327fd106a8 100644 --- a/src/gallium/drivers/radeon/r600_pipe_common.c +++ b/src/gallium/drivers/radeon/r600_pipe_common.c @@ -724,6 +724,10 @@ bool si_common_context_init(struct r600_common_context *rctx, rctx->dma_clear_buffer = r600_dma_clear_buffer_fallback; rctx->b.buffer_subdata = si_buffer_subdata; + /* Set a reasonable default to avoid a performance regression in r600 + * on stable branches. */ + rctx->current_rast_prim = PIPE_PRIM_TRIANGLES; + if (rscreen->info.drm_major == 2 && rscreen->info.drm_minor >= 43) { rctx->b.get_device_reset_status = r600_get_reset_status; rctx->gpu_reset_counter = -- cgit v1.2.3