r600: update memory barrier operations
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run

Note: the atomic host-mem-barrier tests assume that the atomic
buffer could be shared which is not how the r600 operates.

This change was tested on palm and cayman, with the exception
of the "atomic counter" tests, it fixes all the other cases:
spec/arb_shader_image_load_store/host-mem-barrier/.*: fail pass

Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41199>
This commit is contained in:
Patrick Lerda 2026-04-27 13:18:10 +02:00 committed by Marge Bot
parent 6f50dda648
commit 2c1923458c

View file

@ -82,26 +82,27 @@ static void r600_memory_barrier(struct pipe_context *ctx, unsigned flags)
{
struct r600_context *rctx = (struct r600_context *)ctx;
if (!(flags & ~PIPE_BARRIER_UPDATE))
if (!(flags & ~PIPE_BARRIER_UPDATE_TEXTURE))
return;
if (flags & PIPE_BARRIER_CONSTANT_BUFFER)
rctx->b.flags |= R600_CONTEXT_INV_CONST_CACHE;
if (flags & (PIPE_BARRIER_VERTEX_BUFFER |
PIPE_BARRIER_SHADER_BUFFER |
PIPE_BARRIER_TEXTURE |
PIPE_BARRIER_IMAGE |
PIPE_BARRIER_STREAMOUT_BUFFER |
PIPE_BARRIER_GLOBAL_BUFFER)) {
rctx->b.flags |= R600_CONTEXT_INV_VERTEX_CACHE|
R600_CONTEXT_INV_TEX_CACHE;
}
if (flags & (PIPE_BARRIER_FRAMEBUFFER|
if (flags & (PIPE_BARRIER_FRAMEBUFFER |
PIPE_BARRIER_IMAGE))
rctx->b.flags |= R600_CONTEXT_FLUSH_AND_INV;
if (flags & (PIPE_BARRIER_INDEX_BUFFER |
PIPE_BARRIER_UPDATE_BUFFER |
PIPE_BARRIER_CONSTANT_BUFFER |
PIPE_BARRIER_TEXTURE))
rctx->b.flags |= R600_CONTEXT_FLUSH_AND_INV_CB;
rctx->b.flags |= R600_CONTEXT_WAIT_3D_IDLE;
}