[Mesa-dev] [PATCH] u_primconvert: add primitive restart support

Dave Airlie airlied at gmail.com
Thu Mar 19 16:09:09 PDT 2015


On 19 March 2015 at 05:36, Brian Paul <brianp at vmware.com> wrote:
> On 03/17/2015 08:13 PM, Dave Airlie wrote:
>>
>> This add primitive restart support to the prim conversion.
>>
>> This involves changing the API for the translate functions
>> as we need to pass the prim restart index and the original
>> number of indices into the translate functions.
>>
>> primitive restart is support for quads, quad strips
>> and polygons.
>>
>> This deal with the case where the actual number of output
>> primitives is less than the initially calculated number,
>> by filling the rest of the output primitives with the restart
>> index, the other option is to reduce the output prim number,
>> but that will make the generator code a bit messier.
>>
>> Signed-off-by: Dave Airlie <airlied at redhat.com>
>
>
> This is some pretty dense code.  I know, I was working on adding prim
> restart support a while back but never finished.
>
> Changes look good AFAICT.  Just a minor unsigned->boolean nit/question
> below.
>
> Reviewed-by: Brian Paul <brianp at vmware.com>
>
> If it were me I might replace "prim_restart_idx" with "restart_index", but
> not a big deal.

Yeah that looks nicer, I'll do that before pushing.
>>                           unsigned nr,
>>                           unsigned in_pv,
>>                           unsigned out_pv,
>> +                        unsigned prim_restart,
>
>
> boolean?

Because I used it directly to dereference the array of translate
objects I didn't think boolean was appropriate, and to be
consistent with in_pv and out_pv being unsigned.

Dave.


More information about the mesa-dev mailing list