Re: [Mesa-dev] [PATCH 1/4] r600g/compute: Don't leak cbufs in compute state

2014-11-17 Thread Michel Dänzer
On 17.11.2014 23:30, Aaron Watry wrote: On Mon, Nov 17, 2014 at 1:45 AM, Michel Dänzer wrote: On 14.11.2014 19:37, Marek Olšák wrote: surface_destroy should never be called directly, because surfaces have a reference counter. For unreferencing resources, use pipe_surface_reference(&pointer, NU

Re: [Mesa-dev] [PATCH 1/4] r600g/compute: Don't leak cbufs in compute state

2014-11-17 Thread Marek Olšák
Not sure if that's the right place, but this framebuffer state is set by the driver and not a state tracker. Compute shader read-write resources (buffers, images) are implemented by the CB block on r600 and are referred to as RAT (random access target) in the register docs. The first 0-7 binding sl

Re: [Mesa-dev] [PATCH 1/4] r600g/compute: Don't leak cbufs in compute state

2014-11-17 Thread Aaron Watry
On Mon, Nov 17, 2014 at 1:45 AM, Michel Dänzer wrote: > On 14.11.2014 19:37, Marek Olšák wrote: >> surface_destroy should never be called directly, because surfaces have >> a reference counter. For unreferencing resources, use >> pipe_surface_reference(&pointer, NULL). It will call surface_destroy

Re: [Mesa-dev] [PATCH 1/4] r600g/compute: Don't leak cbufs in compute state

2014-11-16 Thread Michel Dänzer
On 14.11.2014 19:37, Marek Olšák wrote: > surface_destroy should never be called directly, because surfaces have > a reference counter. For unreferencing resources, use > pipe_surface_reference(&pointer, NULL). It will call surface_destroy > if needed. Indeed, if this was the right place for this,

Re: [Mesa-dev] [PATCH 1/4] r600g/compute: Don't leak cbufs in compute state

2014-11-14 Thread Marek Olšák
surface_destroy should never be called directly, because surfaces have a reference counter. For unreferencing resources, use pipe_surface_reference(&pointer, NULL). It will call surface_destroy if needed. Marek On Fri, Nov 14, 2014 at 12:43 AM, Aaron Watry wrote: > Walk the array of cbufs backwa

Re: [Mesa-dev] [PATCH 1/4] r600g/compute: Don't leak cbufs in compute state

2014-11-13 Thread Michel Dänzer
On 14.11.2014 08:43, Aaron Watry wrote: > Walk the array of cbufs backwards and free all of them. > > v3: Rebase on top of changes since Aug 2014 > > Signed-off-by: Aaron Watry > --- > src/gallium/drivers/r600/evergreen_compute.c | 9 + > 1 file changed, 9 insertions(+) > > diff --gi

[Mesa-dev] [PATCH 1/4] r600g/compute: Don't leak cbufs in compute state

2014-11-13 Thread Aaron Watry
Walk the array of cbufs backwards and free all of them. v3: Rebase on top of changes since Aug 2014 Signed-off-by: Aaron Watry --- src/gallium/drivers/r600/evergreen_compute.c | 9 + 1 file changed, 9 insertions(+) diff --git a/src/gallium/drivers/r600/evergreen_compute.c b/src/galliu