[Mesa-dev] [PATCH 3/7] gallium/util: correctly unref a buffer in u_prim_restart
Marek Olšák
maraeo at gmail.com
Thu Feb 16 12:52:32 UTC 2017
From: Marek Olšák <marek.olsak at amd.com>
---
src/gallium/auxiliary/util/u_prim_restart.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/gallium/auxiliary/util/u_prim_restart.c b/src/gallium/auxiliary/util/u_prim_restart.c
index a4d7c14..e45aa56 100644
--- a/src/gallium/auxiliary/util/u_prim_restart.c
+++ b/src/gallium/auxiliary/util/u_prim_restart.c
@@ -110,21 +110,21 @@ util_translate_prim_restart_ib(struct pipe_context *context,
pipe_buffer_unmap(context, dst_transfer);
return PIPE_OK;
error:
if (src_transfer)
pipe_buffer_unmap(context, src_transfer);
if (dst_transfer)
pipe_buffer_unmap(context, dst_transfer);
if (*dst_buffer)
- screen->resource_destroy(screen, *dst_buffer);
+ pipe_resource_reference(dst_buffer, NULL);
return PIPE_ERROR_OUT_OF_MEMORY;
}
/** Helper structs for util_draw_vbo_without_prim_restart() */
struct range {
unsigned start, count;
};
--
2.7.4
More information about the mesa-dev
mailing list