Re: [Mesa-dev] [PATCH 2/2] util/u_helpers: return correct number of bound buffers

2015-12-09 Thread Ilia Mirkin
I'm probably just being dense... can you provide an exact sequence of calls that would cause this logic to fail? Seems like it should work as-is... On Sun, Dec 6, 2015 at 4:12 AM, Patrick Rudolph wrote: > In case a state tracker unbinds every slot by a seperate >

Re: [Mesa-dev] [PATCH 2/2] util/u_helpers: return correct number of bound buffers

2015-12-09 Thread Ilia Mirkin
On Wed, Dec 9, 2015 at 2:01 PM, Patrick Rudolph wrote: > Ok, first of all bind some buffers: > > pipe->set_vertex_buffers(pipe, 0, 1, ); > pipe->set_vertex_buffers(pipe, 1, 1, ); > pipe->set_vertex_buffers(pipe, 2, 1, ); > > num_vtxbufs is now 3 as it should be. > > Now you

Re: [Mesa-dev] [PATCH 2/2] util/u_helpers: return correct number of bound buffers

2015-12-09 Thread Patrick Rudolph
Ok, first of all bind some buffers: pipe->set_vertex_buffers(pipe, 0, 1, ); pipe->set_vertex_buffers(pipe, 1, 1, ); pipe->set_vertex_buffers(pipe, 2, 1, ); num_vtxbufs is now 3 as it should be. Now you are unbinding buffers, one after another starting at slot 0: pipe->set_vertex_buffers(pipe,

[Mesa-dev] [PATCH 2/2] util/u_helpers: return correct number of bound buffers

2015-12-06 Thread Patrick Rudolph
In case a state tracker unbinds every slot by a seperate pipe->set_vertex_buffers() call, starting from slot zero, the number of bound buffers would not reach zero at all. Unbinding all buffers at once or starting at the top-most slot results in correct behaviour. Calculating the correct number

Re: [Mesa-dev] [PATCH 2/2] util/u_helpers: return correct number of bound buffers

2015-12-06 Thread Marek Olšák
Reviewed-by: Marek Olšák Marek On Sun, Dec 6, 2015 at 10:12 AM, Patrick Rudolph wrote: > In case a state tracker unbinds every slot by a seperate > pipe->set_vertex_buffers() call, starting from slot zero, the number > of bound buffers would not reach