diff --git a/src/gallium/drivers/freedreno/a3xx/fd3_context.c b/src/gallium/drivers/freedreno/a3xx/fd3_context.c index 878f67afba0..27312bf66ae 100644 --- a/src/gallium/drivers/freedreno/a3xx/fd3_context.c +++ b/src/gallium/drivers/freedreno/a3xx/fd3_context.c @@ -43,6 +43,7 @@ fd3_context_destroy(struct pipe_context *pctx) struct fd3_context *fd3_ctx = fd3_context(fd_context(pctx)); u_upload_destroy(fd3_ctx->border_color_uploader); + pipe_resource_reference(&fd3_ctx->border_color_buf, NULL); fd_context_destroy(pctx); diff --git a/src/gallium/drivers/freedreno/a4xx/fd4_context.c b/src/gallium/drivers/freedreno/a4xx/fd4_context.c index 896050918dc..b24818046f4 100644 --- a/src/gallium/drivers/freedreno/a4xx/fd4_context.c +++ b/src/gallium/drivers/freedreno/a4xx/fd4_context.c @@ -43,6 +43,7 @@ fd4_context_destroy(struct pipe_context *pctx) struct fd4_context *fd4_ctx = fd4_context(fd_context(pctx)); u_upload_destroy(fd4_ctx->border_color_uploader); + pipe_resource_reference(&fd4_ctx->border_color_buf, NULL); fd_context_destroy(pctx); diff --git a/src/gallium/drivers/freedreno/a5xx/fd5_context.c b/src/gallium/drivers/freedreno/a5xx/fd5_context.c index 211d2b5fee5..434a7bbbf4d 100644 --- a/src/gallium/drivers/freedreno/a5xx/fd5_context.c +++ b/src/gallium/drivers/freedreno/a5xx/fd5_context.c @@ -45,6 +45,7 @@ fd5_context_destroy(struct pipe_context *pctx) struct fd5_context *fd5_ctx = fd5_context(fd_context(pctx)); u_upload_destroy(fd5_ctx->border_color_uploader); + pipe_resource_reference(&fd5_ctx->border_color_buf, NULL); fd_context_destroy(pctx); diff --git a/src/gallium/drivers/freedreno/a6xx/fd6_context.c b/src/gallium/drivers/freedreno/a6xx/fd6_context.c index 773c3d239f6..d580c331944 100644 --- a/src/gallium/drivers/freedreno/a6xx/fd6_context.c +++ b/src/gallium/drivers/freedreno/a6xx/fd6_context.c @@ -47,6 +47,7 @@ fd6_context_destroy(struct pipe_context *pctx) struct fd6_context *fd6_ctx = fd6_context(fd_context(pctx)); u_upload_destroy(fd6_ctx->border_color_uploader); + pipe_resource_reference(&fd6_ctx->border_color_buf, NULL); fd_context_destroy(pctx);