On Mon, Aug 2, 2010 at 5:33 PM, Chia-I Wu <olva...@gmail.com> 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. 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.
The trivial/poly-unfilled test and friends should give a quick idea. > I haven't done a thorough (read: piglit) test yet. I would like to > get early feedback before continuing. Suggestions? > This looks like a great cleanup - thanks for taking it on. I think everyone would have wanted it to be like this, but a lot of that code was written in something of a hurry... Keith _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev