[Mesa-dev] [PATCH-RFC] draw: Rewrite primitive decomposer
Chia-I Wu
olvaffe at gmail.com
Mon Aug 2 09:33:50 PDT 2010
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. So I started the work to add a generic draw_decompose_tmp.h
that can be included by other tmp header files. You may find the
changes in the attachments, or
http://cgit.freedesktop.org/~olv/mesa/log/?h=draw-decompose
draw_decompose_tmp.h supports all primitive modes. While it is a
rewrite, it resembles the existing decomposers a lot. There are two
changes regarding how PIPE_PRIM_POLYGON and
PIPE_PRIM_TRIANGLE_STRIP_ADJACENCY are decomposed.
When flatshade_first is TRUE, the first triangle of the decomposed
polygon has edge flags 0 and 1 set; the last triangle has edge flags 1
and 2 set; the other triangles has edge flags 1 set. This is
different from the existing decomposers, which seem to set the edge
flags wrongly(?).
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.
I haven't done a thorough (read: piglit) test yet. I would like to
get early feedback before continuing. Suggestions?
--
olv at LunarG.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-draw-Add-draw_decompose_tmp.h.patch
Type: text/x-diff
Size: 13835 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20100803/440cf520/attachment-0005.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-draw-Include-draw_decompose_tmp.h-in-draw_pt_vcache_.patch
Type: text/x-diff
Size: 10993 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20100803/440cf520/attachment-0006.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-draw-Include-draw_decompose_tmp.h-in-draw_so_emit_tm.patch
Type: text/x-diff
Size: 5896 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20100803/440cf520/attachment-0007.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0004-draw-Include-draw_decompose_tmp.h-in-draw_gs_tmp.h.patch
Type: text/x-diff
Size: 7226 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20100803/440cf520/attachment-0008.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0005-draw-Include-draw_decompose_tmp.h-in-draw_pt_decompo.patch
Type: text/x-diff
Size: 15812 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20100803/440cf520/attachment-0009.patch>
More information about the mesa-dev
mailing list