mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 00:58:05 +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>
This commit is contained in:
parent
3d22bcb790
commit
23c003b88c
1 changed files with 4 additions and 1 deletions
|
|
@ -2633,7 +2633,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