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: 8a963d122d ("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>
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user