[Mesa-dev] [PATCH 4/4] radeonsi: fix freeing descriptor buffers
Christian König
deathsimple at vodafone.de
Sat Mar 8 05:54:40 PST 2014
From: Christian König <christian.koenig at amd.com>
That structure member is a pointer, so the loop with
the Elements macro only freed up the first entry.
Signed-off-by: Christian König <christian.koenig at amd.com>
---
src/gallium/drivers/radeonsi/si_descriptors.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/gallium/drivers/radeonsi/si_descriptors.c b/src/gallium/drivers/radeonsi/si_descriptors.c
index 9b10d01..06b29d4 100644
--- a/src/gallium/drivers/radeonsi/si_descriptors.c
+++ b/src/gallium/drivers/radeonsi/si_descriptors.c
@@ -387,7 +387,7 @@ static void si_release_buffer_resources(struct si_buffer_resources *buffers)
{
int i;
- for (i = 0; i < Elements(buffers->buffers); i++) {
+ for (i = 0; i < buffers->num_buffers; i++) {
pipe_resource_reference(&buffers->buffers[i], NULL);
}
--
1.8.3.2
More information about the mesa-dev
mailing list