st/mesa: add shader buffer barrier bit
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
This commit is contained in:
parent
792bab24ac
commit
6fb8fac853
|
@ -352,6 +352,7 @@ enum pipe_flush_flags
|
|||
* Flags for pipe_context::memory_barrier.
|
||||
*/
|
||||
#define PIPE_BARRIER_MAPPED_BUFFER (1 << 0)
|
||||
#define PIPE_BARRIER_SHADER_BUFFER (1 << 1)
|
||||
|
||||
/**
|
||||
* Resource binding flags -- state tracker must specify in advance all
|
||||
|
|
|
@ -65,6 +65,10 @@ st_MemoryBarrier(struct gl_context *ctx, GLbitfield barriers)
|
|||
|
||||
if (barriers & GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT)
|
||||
flags |= PIPE_BARRIER_MAPPED_BUFFER;
|
||||
if (barriers & GL_ATOMIC_COUNTER_BARRIER_BIT)
|
||||
flags |= PIPE_BARRIER_SHADER_BUFFER;
|
||||
if (barriers & GL_SHADER_STORAGE_BARRIER_BIT)
|
||||
flags |= PIPE_BARRIER_SHADER_BUFFER;
|
||||
|
||||
if (flags && pipe->memory_barrier)
|
||||
pipe->memory_barrier(pipe, flags);
|
||||
|
|
Loading…
Reference in New Issue