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

Chia-I Wu olvaffe at gmail.com
Thu Aug 5 09:51:57 PDT 2010

On Thu, Aug 5, 2010 at 3:20 AM, Zack Rusin <zackr at vmware.com> wrote:
>> With GS, the order of the vertices of a primitive becomes significant.  We
>> can no longer permute the vertices to support flatshade_first (at least,
>> not before GS runs).
> Awesome stuff. Thanks for looking into this. I'd commit that patch and we'll
> abstract it under some settable "use d3d or gl rules" flag for draw - we'll
Yeah, that should be a settable flag.  But we should then support
flatshade_first somewhere else.

The GL rule is last vertex last for each primitive.  The D3D rule is first
vertex first.  My idea is to have draw_decompose_tmp.h use a local variable,
last_vertex_last, to select the rules.  In draw_gs_tmp.h and
draw_so_emit_tmp.h, last_vertex_last is TRUE when the new settable flags is
TRUE.  However, in draw_pt_decompse.h, where the rules no longer matter,
last_vertex_last is set to !(flatshade && flatshade_first).

As for draw_pt_vcache_tmp.h, I am considering removing it and make vcache look
more like varray except with index buffer buffer.  I will try to work
out the idea soon.
> need it for clipping anyway.
For clipping?

olv at LunarG.com

More information about the mesa-dev mailing list