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:
Ilia Mirkin 2016-01-10 22:39:16 -05:00
parent 792bab24ac
commit 6fb8fac853
2 changed files with 5 additions and 0 deletions

View File

@ -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

View File

@ -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);