[Mesa-dev] [PATCH v2 03/13] nir: Add a writemask to store intrinsics.

Jason Ekstrand jason at jlekstrand.net
Sat Dec 12 14:00:26 PST 2015


On Sat, Dec 12, 2015 at 12:22 PM, Kenneth Graunke <kenneth at whitecape.org> wrote:
> On Saturday, December 12, 2015 08:29:37 AM Jason Ekstrand wrote:
>> On Dec 11, 2015 1:24 PM, "Kenneth Graunke" <kenneth at whitecape.org> wrote:
> [snip]
>> > @@ -302,12 +302,12 @@ LOAD(shared, 1, 1, NIR_INTRINSIC_CAN_ELIMINATE)
>> >  #define STORE(name, srcs, indices, flags) \
>> >     INTRINSIC(store_##name, srcs, ARR(0, 1, 1, 1), false, 0, 0, indices,
>> flags)
>> >
>> > -/* src[] = { value, offset }. const_index[] = { base } */
>> > -STORE(output, 2, 1, 0)
>> > -/* src[] = { value, vertex, offset }. const_index[] = { base } */
>> > -STORE(per_vertex_output, 3, 1, 0)
>> > +/* src[] = { value, offset }. const_index[] = { base, write_mask } */
>> > +STORE(output, 2, 2, 0)
>> > +/* src[] = { value, vertex, offset }. const_index[] = { base, write_mask
>> } */
>> > +STORE(per_vertex_output, 3, 2, 0)
>> >  /* src[] = { value, block_index, offset }. const_index[] = { write_mask
>> } */
>> > -STORE(ssbo, 3, 1, 0)
>> > +STORE(ssbo, 3, 2, 0)
>>
>> I don't think you meant to change SSBOs.
>
> Oops.  Yeah, that was a mistake when resolving merge conflicts.
> Changed for v3.
>
>> >  /* src[] = { value, offset }. const_index[] = { base, write_mask } */
>> >  STORE(shared, 2, 1, 0)
>
> While we're here, this comment seems wrong, doesn't it?  There's only
> one index, but the comment lists two.  (It's wrong before my patch...)

Yes, we should fix that.  It's only one index.  That was my mistake
while rebasing on shared variables.


More information about the mesa-dev mailing list