mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 15:58:05 +02:00
r600: update memory barrier operations
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:
parent
6f50dda648
commit
2c1923458c
1 changed files with 8 additions and 7 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue