mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 20:08:06 +02:00
util/blitter: fix util_blitter_clear_buffer() refcnt imbalance
Indeed, the vertex state was restored using a specific condition at the util_blitter_restore_vertex_states() level. This change ensures that the condition is the same when the vertex state is saved. The function util_blitter_clear_buffer() is only called by the r600 driver on pre-evergreen gpus. This issue is triggered on a rv770 gpu with "piglit/bin/fbo-1d -auto -fbo" or "piglit/bin/draw_buffers_gles2 -auto -fbo" while setting GALLIUM_REFCNT_LOG=refcnt.log. Fixes:5f566faa46("radeonsi: don't save and restore vertex buffers and elements for u_blitter") Signed-off-by: Patrick Lerda <patrick9876@free.fr> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23721> (cherry picked from commit23c003b88c)
This commit is contained in:
parent
4dcacfff6a
commit
144ac599c5
2 changed files with 5 additions and 2 deletions
|
|
@ -112,7 +112,7 @@
|
|||
"description": "util/blitter: fix util_blitter_clear_buffer() refcnt imbalance",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": "5f566faa46078500d0d70f510d3ce3e75d1f6e83"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -2634,7 +2634,10 @@ void util_blitter_clear_buffer(struct blitter_context *blitter,
|
|||
blitter_check_saved_vertex_states(ctx);
|
||||
blitter_disable_render_cond(ctx);
|
||||
|
||||
pipe->set_vertex_buffers(pipe, ctx->base.vb_slot, 1, 0, false, &vb);
|
||||
if (ctx->base.saved_vertex_buffer.buffer.resource) {
|
||||
pipe->set_vertex_buffers(pipe, ctx->base.vb_slot, 1, 0, false, &vb);
|
||||
}
|
||||
|
||||
pipe->bind_vertex_elements_state(pipe,
|
||||
ctx->velem_state_readbuf[num_channels-1]);
|
||||
bind_vs_pos_only(ctx, num_channels);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue