aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/freedreno/a6xx/fd6_context.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/freedreno/a6xx/fd6_context.c')
-rw-r--r--src/gallium/drivers/freedreno/a6xx/fd6_context.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/gallium/drivers/freedreno/a6xx/fd6_context.c b/src/gallium/drivers/freedreno/a6xx/fd6_context.c
index cb848fc20fc..f2e8e4eaf3d 100644
--- a/src/gallium/drivers/freedreno/a6xx/fd6_context.c
+++ b/src/gallium/drivers/freedreno/a6xx/fd6_context.c
@@ -50,8 +50,10 @@ fd6_context_destroy(struct pipe_context *pctx)
fd_context_destroy(pctx);
- fd_bo_del(fd6_ctx->vsc_data);
- fd_bo_del(fd6_ctx->vsc_data2);
+ if (fd6_ctx->vsc_data)
+ fd_bo_del(fd6_ctx->vsc_data);
+ if (fd6_ctx->vsc_data2)
+ fd_bo_del(fd6_ctx->vsc_data2);
fd_bo_del(fd6_ctx->control_mem);
fd_context_cleanup_common_vbos(&fd6_ctx->base);
@@ -116,13 +118,11 @@ fd6_context_create(struct pipe_screen *pscreen, void *priv, unsigned flags)
pctx->delete_rasterizer_state = fd6_rasterizer_state_delete;
pctx->delete_depth_stencil_alpha_state = fd6_depth_stencil_alpha_state_delete;
- fd6_ctx->vsc_data = fd_bo_new(screen->dev,
- (A6XX_VSC_DATA_PITCH * 32) + 0x100,
- DRM_FREEDRENO_GEM_TYPE_KMEM, "vsc_data");
-
- fd6_ctx->vsc_data2 = fd_bo_new(screen->dev,
- A6XX_VSC_DATA2_PITCH * 32,
- DRM_FREEDRENO_GEM_TYPE_KMEM, "vsc_data2");
+ /* initial sizes for VSC buffers (or rather the per-pipe sizes
+ * which is used to derive entire buffer size:
+ */
+ fd6_ctx->vsc_data_pitch = 0x440;
+ fd6_ctx->vsc_data2_pitch = 0x1040;
fd6_ctx->control_mem = fd_bo_new(screen->dev, 0x1000,
DRM_FREEDRENO_GEM_TYPE_KMEM, "control");