r600: fix r600_draw_rectangle refcnt imbalance

The object buf is referenced at the beginning of the
r600_draw_rectangle() function and should be freed
at the end. This issue was introduced with cbb6e0277f.

Fixes: cbb6e0277f ("r600: stop using util_set_vertex_buffers")
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37617>
This commit is contained in:
Patrick Lerda 2025-09-26 17:06:28 +02:00 committed by Marge Bot
parent ffec70465c
commit 3b1e3a40a8

View file

@ -201,6 +201,7 @@ void r600_draw_rectangle(struct blitter_context *blitter,
rctx->b.set_vertex_buffers(&rctx->b, 1, &vbuffer);
util_draw_arrays_instanced(&rctx->b, R600_PRIM_RECTANGLE_LIST, 0, 3,
0, num_instances);
pipe_resource_reference(&buf, NULL);
}
static void r600_dma_emit_wait_idle(struct r600_common_context *rctx)