[Mesa-dev] [PATCH-RFC] draw: Rewrite primitive decomposer

Zack Rusin zackr at vmware.com
Mon Aug 2 15:48:43 PDT 2010

On Monday 02 August 2010 12:33:50 Chia-I Wu wrote:
> Hi,
> While studying the draw module, I noticed that multiple primitive
> decomposers exist: draw_pt_vcache_tmp.h, draw_gs_tmp.h,
> draw_so_emit_tmp.h, and draw_pt_decompose.h.  The differences between
> them are small, yet some of them support primitive modes that others
> don't.  

Yes, that's because they all operate on a different set of primitives and 
presence of any of the others should result in an assert since it signifies 
that something went seriously wrong.

> As for PIPE_PRIM_TRIANGLE_STRIP_ADJACENCY, the GS decomposer does not
> seem to follow the vertex ordering of GL_TRIANGLE_STRIP_ADJACENCY.  I
> write that part from scratch.  I am not 100% sure here as I don't have
> a test case to verify.  It would be great if someone can clarify.

That's very vague, what's not right? The only thing I see in the old code is 
that we possibly flip the first and second adjacency vertex.

> I haven't done a thorough (read: piglit) test yet.  I would like to
> get early feedback before continuing.  Suggestions?

Obviously having multiple paths that decompose primitives isn't ideal so it 
would be nice to fix it. The new code is harder to read and misses those extra 
asserts that we had, plus it would be good if fixes, if any, came in separate 
patches, not during refactoring and given that pretty much all of the new 
decompose code is copy and paste it would nice if the old copyright notices 
were preserved.


More information about the mesa-dev mailing list