[Mesa-dev] [PATCH] i965: Sort array elements to increase chances of reusing buffer relocation

2014-12-01 Thread Neil Roberts
When submitting the vertex buffers the i965 driver will try to recognise when multiple attributes are using the same buffer so that it can submit a single relocation for it and set a different offset in the attribute. Previously however if the application happens to have the attributes in a struct

Re: [Mesa-dev] [PATCH] i965: Sort array elements to increase chances of reusing buffer relocation

2014-12-01 Thread Eric Anholt
Neil Roberts writes: > When submitting the vertex buffers the i965 driver will try to recognise when > multiple attributes are using the same buffer so that it can submit a single > relocation for it and set a different offset in the attribute. Previously > however if the application happens to h

Re: [Mesa-dev] [PATCH] i965: Sort array elements to increase chances of reusing buffer relocation

2014-12-01 Thread Ben Widawsky
On Mon, Dec 01, 2014 at 05:37:27PM -0800, Eric Anholt wrote: > Neil Roberts writes: > > > When submitting the vertex buffers the i965 driver will try to recognise > > when > > multiple attributes are using the same buffer so that it can submit a single > > relocation for it and set a different o

Re: [Mesa-dev] [PATCH] i965: Sort array elements to increase chances of reusing buffer relocation

2014-12-01 Thread Kenneth Graunke
On Monday, December 01, 2014 08:23:32 PM Neil Roberts wrote: > When submitting the vertex buffers the i965 driver will try to recognise when > multiple attributes are using the same buffer so that it can submit a single > relocation for it and set a different offset in the attribute. Previously > h

Re: [Mesa-dev] [PATCH] i965: Sort array elements to increase chances of reusing buffer relocation

2014-12-02 Thread Neil Roberts
Ok, I've written a somewhat contrived test case here: https://github.com/bpeel/glthing/tree/time-attribs (Make sure to use the time-attribs branch) The example draws a 1000 single-pixel points each with a separate draw call. Each call uses a separate but identical VAO so that the driver will be

Re: [Mesa-dev] [PATCH] i965: Sort array elements to increase chances of reusing buffer relocation

2014-12-02 Thread Ben Widawsky
On Tue, Dec 02, 2014 at 04:17:35PM +, Neil Roberts wrote: > Ok, I've written a somewhat contrived test case here: > > https://github.com/bpeel/glthing/tree/time-attribs > > (Make sure to use the time-attribs branch) > > The example draws a 1000 single-pixel points each with a separate draw >

Re: [Mesa-dev] [PATCH] i965: Sort array elements to increase chances of reusing buffer relocation

2014-12-02 Thread Ian Romanick
On 12/02/2014 08:17 AM, Neil Roberts wrote: > Ok, I've written a somewhat contrived test case here: > > https://github.com/bpeel/glthing/tree/time-attribs > > (Make sure to use the time-attribs branch) > > The example draws a 1000 single-pixel points each with a separate draw > call. Each call u

Re: [Mesa-dev] [PATCH] i965: Sort array elements to increase chances of reusing buffer relocation

2014-12-02 Thread Ian Romanick
On 12/02/2014 08:17 AM, Neil Roberts wrote: > Ok, I've written a somewhat contrived test case here: > > https://github.com/bpeel/glthing/tree/time-attribs > > (Make sure to use the time-attribs branch) > > The example draws a 1000 single-pixel points each with a separate draw > call. Each call u