diff options
author | Patrick Lerda <patrick9876@free.fr> | 2024-02-16 14:22:05 +0100 |
---|---|---|
committer | Marge Bot <emma+marge@anholt.net> | 2024-02-19 14:48:18 +0000 |
commit | 3b90c46bdf9b536e6856b1ead5f8d806080728f7 (patch) | |
tree | c8f1143acc8319829745b42632cbceb6c2519834 | |
parent | fb971411312cb7362c093564c7631dc6fb3cacc8 (diff) |
r300: fix vertex_buffer related refcnt imbalance
Indeed, vertex_buffer was not properly freed.
For instance, this issue is triggered with:
"piglit/bin/fcc-read-after-clear blit rb -auto -fbo"
while setting GALLIUM_REFCNT_LOG=refcnt.log.
Fixes: 8a963d122d4b ("r300g/swtcl: don't do stuff which is only for HWTCL")
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27678>
-rw-r--r-- | src/gallium/drivers/r300/r300_context.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gallium/drivers/r300/r300_context.c b/src/gallium/drivers/r300/r300_context.c index e644e25f6de..8bdea751e8e 100644 --- a/src/gallium/drivers/r300/r300_context.c +++ b/src/gallium/drivers/r300/r300_context.c @@ -86,6 +86,9 @@ static void r300_destroy_context(struct pipe_context* context) if (r300->draw) draw_destroy(r300->draw); + for (unsigned i = 0; i < r300->nr_vertex_buffers; i++) + pipe_vertex_buffer_unreference(&r300->vertex_buffer[i]); + if (r300->uploader) u_upload_destroy(r300->uploader); if (r300->context.stream_uploader) |