[Mesa-dev] [PATCH 01/10] tgsi: add MEMBAR opcode to handle memoryBarrier* GLSL intrinsics

Ilia Mirkin imirkin at alum.mit.edu
Mon Jan 18 18:25:16 PST 2016


On Mon, Jan 18, 2016 at 6:06 AM, Marek Olšák <maraeo at gmail.com> wrote:
> For 1-4,
>
> Reviewed-by: Marek Olšák <marek.olsak at amd.com>
>
> I'm not very familiar with the code in 2, but the changes seem reasonable.
>
> Also, and I know this is not your mistake, but still, mtypes.h has:
>
> struct gl_atomic_buffer_binding
>       AtomicBufferBindings[MAX_COMBINED_ATOMIC_BUFFERS];
>
> But it should be:
>
> struct gl_atomic_buffer_binding
>       AtomicBufferBindings[16 /* or use a proper definition here */];
>
> It's not possible to use more than MaxAtomicBufferBindings, because
> the slots are shared among all shader stages.

Besides the suboptimal name, I don't see what's so terribly wrong
about this. They're saying there are 15*6 binding points (the value of
MAX_COMBINED_ATOMIC_BUFFERS), and that's also the
MaxCombinedAtomicBuffers thing. I guess MaxCombinedAtomicBuffers
should be N * the max # of bindings? So this is a bit more restrictive
than it could be, but... meh.

  -ilia


More information about the mesa-dev mailing list