From: Marek Olšák Date: Mon, 14 Feb 2011 05:26:56 +0000 (+0100) Subject: r300g: fix reference counting when translating indices X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=004dd015839dfb77b9d66fb2df6514feefb87d9e;p=mesa.git r300g: fix reference counting when translating indices --- diff --git a/src/gallium/drivers/r300/r300_render_translate.c b/src/gallium/drivers/r300/r300_render_translate.c index dbc64ebf827..777857514fc 100644 --- a/src/gallium/drivers/r300/r300_render_translate.c +++ b/src/gallium/drivers/r300/r300_render_translate.c @@ -44,6 +44,7 @@ void r300_translate_index_buffer(struct r300_context *r300, &r300->context, *index_buffer, index_offset, *start, count, ptr); + *index_buffer = NULL; pipe_resource_reference(index_buffer, out_buffer); *index_size = 2; *start = out_offset / 2; @@ -59,6 +60,7 @@ void r300_translate_index_buffer(struct r300_context *r300, index_offset, *start, count, ptr); + *index_buffer = NULL; pipe_resource_reference(index_buffer, out_buffer); *start = out_offset / 2; r300->validate_buffers = TRUE; @@ -74,6 +76,7 @@ void r300_translate_index_buffer(struct r300_context *r300, index_offset, *start, count, ptr); + *index_buffer = NULL; pipe_resource_reference(index_buffer, out_buffer); *start = out_offset / 4; r300->validate_buffers = TRUE;