[Mesa-dev] [PATCH 08/10] st/mesa: add shader buffer barrier bit
Marek Olšák
maraeo at gmail.com
Mon Jan 18 04:36:43 PST 2016
Reviewed-by: Marek Olšák <marek.olsak at amd.com>
Marek
On Mon, Jan 18, 2016 at 6:51 AM, Ilia Mirkin <imirkin at alum.mit.edu> wrote:
> Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
> ---
> src/gallium/include/pipe/p_defines.h | 1 +
> src/mesa/state_tracker/st_cb_texturebarrier.c | 4 ++++
> 2 files changed, 5 insertions(+)
>
> diff --git a/src/gallium/include/pipe/p_defines.h b/src/gallium/include/pipe/p_defines.h
> index cb837cd..7ffe045 100644
> --- a/src/gallium/include/pipe/p_defines.h
> +++ b/src/gallium/include/pipe/p_defines.h
> @@ -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
> diff --git a/src/mesa/state_tracker/st_cb_texturebarrier.c b/src/mesa/state_tracker/st_cb_texturebarrier.c
> index dd4dde7..6f6176b 100644
> --- a/src/mesa/state_tracker/st_cb_texturebarrier.c
> +++ b/src/mesa/state_tracker/st_cb_texturebarrier.c
> @@ -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);
> --
> 2.4.10
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list