[Mesa-dev] primitive-restart branch

Roland Scheidegger sroland at vmware.com
Thu Jul 15 07:40:40 PDT 2010


On 15.07.2010 16:23, Brian Paul wrote:
> On 07/15/2010 01:57 AM, Chia-I Wu wrote:
>> On Thu, Jul 15, 2010 at 10:26 AM, Brian Paul<brian.e.paul at gmail.com>  wrote:
>>> I've pushed a branch which implements the GL_NV_primitive_restart
>>> extension (part of GL 3.1).
>>>
>>> It currently works for Gallium softpipe and llvmpipe but there's still
>>> a few loose ends.
>>>
>>> The new gallium interface for this isn't finalized.  It might make
>>> sense to put the new enable/index state into pipe_rasterizer_state.
>>> I'm not sure how often apps might change the restart index (i.e. how
>>> constant is it?).  Comments are welcome.
> 
>> I am wondering if it is a better place to support primitive restart in
>> draw_pt_vcache_tmp.h instead of in draw_pt_vcache.c.
> 
> I was trying to avoid adding the cost of checking primitive restart on 
> the "fast" path.  So it's done in the _flags() version of the 
> point/line/tri funcs.  But to be honest, I'm not 100% sure I 
> understand all the code paths there so I could be doing it wrong. 
> Keith should probably review.
> 
> 
>> The restart index should
>> be compared before elt_bias,
> 
> That's a loose end that I haven't tested yet.
> 
> 
>> and the extension should also support other
>> primitive modes that are less useful (TRIANGLES, LINES, ...).
> 
> Primitive restart is really only useful for strip primitives.

This is quite true but technically the extension asks for it to be
supported for all primitives. So if an app really uses this with points,
the point with the restart index would need to be dropped. Maybe it's
safe to ignore this though.

Roland


More information about the mesa-dev mailing list