[Mesa-dev] [RFC 09/24] nvc0: add missing glMemoryBarrier bits
Samuel Pitoiset
samuel.pitoiset at gmail.com
Thu Apr 14 22:07:52 UTC 2016
On 04/13/2016 10:25 PM, Ilia Mirkin wrote:
> Reviewed-by: Ilia Mirkin <imirkin at alum.mit.edu>
>
> If you wanted to play around with it to figure out which bit was
> which, I wouldn't object. I think someone pushed (or has sent) a more
> complete mem barrier test. Although such guessing can't be conclusive,
> so perhaps might as well just leave it like this...
REing those barriers bits doesn't seem to be really easy. :)
I prefer to leave it like this as you suggest.
>
> Oh, but one thing, instead please do
>
> if (flags & (PIPE_A | PIPE_B | PIPE_C))
>
> that way it's a single operation instead of 20.
Fine by me.
>
> -ilia
>
>
> On Tue, Apr 12, 2016 at 7:56 PM, Samuel Pitoiset
> <samuel.pitoiset at gmail.com> wrote:
>> This fixes a bunch of subtests of
>> arb_shader_image_load_store-host-mem-barrier.
>>
>> Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
>> ---
>> src/gallium/drivers/nouveau/nvc0/nvc0_context.c | 9 ++++++++-
>> 1 file changed, 8 insertions(+), 1 deletion(-)
>>
>> diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_context.c b/src/gallium/drivers/nouveau/nvc0/nvc0_context.c
>> index 3e25572..3b20196 100644
>> --- a/src/gallium/drivers/nouveau/nvc0/nvc0_context.c
>> +++ b/src/gallium/drivers/nouveau/nvc0/nvc0_context.c
>> @@ -91,7 +91,14 @@ nvc0_memory_barrier(struct pipe_context *pipe, unsigned flags)
>> }
>> }
>> }
>> - if (flags & PIPE_BARRIER_SHADER_BUFFER) {
>> +
>> + if ((flags & PIPE_BARRIER_SHADER_BUFFER) ||
>> + (flags & PIPE_BARRIER_CONSTANT_BUFFER) ||
>> + (flags & PIPE_BARRIER_INDEX_BUFFER) ||
>> + (flags & PIPE_BARRIER_IMAGE) ||
>> + (flags & PIPE_BARRIER_TEXTURE) ||
>> + (flags & PIPE_BARRIER_VERTEX_BUFFER) ||
>> + (flags & PIPE_BARRIER_STREAMOUT_BUFFER)) {
>> IMMED_NVC0(push, NVC0_3D(MEM_BARRIER), 0x1011);
>> }
>> }
>> --
>> 2.8.0
>>
>> _______________________________________________
>> mesa-dev mailing list
>> mesa-dev at lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list