[Mesa-dev] primitive-restart branch

Roland Scheidegger sroland at vmware.com
Thu Jul 15 06:51:50 PDT 2010


On 15.07.2010 04:26, Brian Paul 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 also committed a new piglit test for this feature: primitive-restart.c

I don't know where it should live, but I suspect both the index value as
well as the enable could be quite constant - considering it's always
enabled (with fixed cut index) in d3d10. Though in d3d10 the cut index
is either 0xffff or 0xffffffff depending if the index buffer contains 16
or 32 bit values, hence it would always need to be switched depending on
index buffer type. Hmm... There's also hw (like i965) which can only
handle d3d10 index value (it can be switched on and off but the index is
always the max value). I think it would be nice if we could also express
this behavior somehow (i.e. set the restart index to INDEX_MAX without
having to re-set it depending on the type of the index buffer). Or maybe
just setting to 0xffffffff should be reinterpreted as 0xffff for 16 bit
indices to get this behavior? I guess though that would be technically
wrong for NV_primitive_restart as it is apparently legal to set to
0xffffffff and then use 16bit indices - it just will never trigger...

Roland



More information about the mesa-dev mailing list