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

2010-08-06 Thread Chia-I Wu
On Fri, Aug 6, 2010 at 6:03 PM, Henri Verbeet wrote: > On 5 August 2010 18:51, Chia-I Wu wrote: >> 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.  

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

2010-08-06 Thread Henri Verbeet
On 5 August 2010 18:51, Chia-I Wu wrote: > 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

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

2010-08-05 Thread Zack Rusin
On Thursday 05 August 2010 12:51:57 Chia-I Wu wrote: > On Thu, Aug 5, 2010 at 3:20 AM, Zack Rusin 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). > > > >

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

2010-08-05 Thread Chia-I Wu
On Thu, Aug 5, 2010 at 3:20 AM, Zack Rusin 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 a

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

2010-08-04 Thread Zack Rusin
On Wednesday 04 August 2010 04:17:15 Chia-I Wu wrote: > I've updated the geometry shader so that given a triangle with adjacency, 3 > triangles will be emitted: > > - the triangle formed by the first edge and the first adjacent vertex > - the triangle formed by the second edge and the second

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

2010-08-04 Thread Zack Rusin
On Wednesday 04 August 2010 13:06:33 Chia-I Wu wrote: > On Wed, Aug 4, 2010 at 11:01 PM, Zack Rusin wrote: > > On Wednesday 04 August 2010 04:17:15 Chia-I Wu wrote: > >> I've updated the geometry shader so that given a triangle with > >> adjacency, 3 triangles will be emitted: > >> > >> - the t

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

2010-08-04 Thread Chia-I Wu
On Wed, Aug 4, 2010 at 11:01 PM, Zack Rusin wrote: > On Wednesday 04 August 2010 04:17:15 Chia-I Wu wrote: >> I've updated the geometry shader so that given a triangle with adjacency, 3 >> triangles will be emitted: >> >>   - the triangle formed by the first edge and the first adjacent vertex >>  

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

2010-08-03 Thread Zack Rusin
On Tuesday 03 August 2010 12:56:41 Chia-I Wu wrote: > I see your point. There are more than one way to interpret the > diagram. Now I am curious if the diagram is all the D3D documents have > for triangle strip with adjacency? As far as the public docs go I think that's it. > > and so on. If yo

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

2010-08-03 Thread Chia-I Wu
On Wed, Aug 4, 2010 at 12:03 AM, Zack Rusin wrote: > On Tuesday 03 August 2010 11:41:02 Chia-I Wu wrote: >> On Tue, Aug 3, 2010 at 9:40 PM, Zack Rusin wrote: >> > I'm not sure if should, if adjacency primitives are set there should >> > always be a gs and if not we should set a pass-through gs sh

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

2010-08-03 Thread Zack Rusin
On Tuesday 03 August 2010 11:41:02 Chia-I Wu wrote: > On Tue, Aug 3, 2010 at 9:40 PM, Zack Rusin wrote: > > I'm not sure if should, if adjacency primitives are set there should > > always be a gs and if not we should set a pass-through gs should which > > just emits triangles. > > There is no pa

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

2010-08-03 Thread Chia-I Wu
On Tue, Aug 3, 2010 at 11:41 PM, Chia-I Wu wrote: > On Tue, Aug 3, 2010 at 9:40 PM, Zack Rusin wrote: >> On Tuesday 03 August 2010 01:34:46 Chia-I Wu wrote: >>> On Tue, Aug 3, 2010 at 6:48 AM, Zack Rusin wrote: >>> > On Monday 02 August 2010 12:33:50 Chia-I Wu wrote: >>> >> While studying the dr

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

2010-08-03 Thread Chia-I Wu
On Tue, Aug 3, 2010 at 9:40 PM, Zack Rusin wrote: > On Tuesday 03 August 2010 01:34:46 Chia-I Wu wrote: >> On Tue, Aug 3, 2010 at 6:48 AM, Zack Rusin wrote: >> > On Monday 02 August 2010 12:33:50 Chia-I Wu wrote: >> >> While studying the draw module, I noticed that multiple primitive >> >> decomp

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

2010-08-03 Thread Zack Rusin
On Tuesday 03 August 2010 01:34:46 Chia-I Wu wrote: > On Tue, Aug 3, 2010 at 6:48 AM, Zack Rusin wrote: > > On Monday 02 August 2010 12:33:50 Chia-I Wu wrote: > >> While studying the draw module, I noticed that multiple primitive > >> decomposers exist: draw_pt_vcache_tmp.h, draw_gs_tmp.h, > >> dr

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

2010-08-02 Thread Chia-I Wu
On Tue, Aug 3, 2010 at 6:48 AM, Zack Rusin wrote: > On Monday 02 August 2010 12:33:50 Chia-I Wu wrote: >> 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 be

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

2010-08-02 Thread Zack Rusin
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 suppor

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

2010-08-02 Thread keith whitwell
On Mon, Aug 2, 2010 at 5:33 PM, 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