summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChristian König <[email protected]>2014-03-08 14:52:25 +0100
committerChristian König <[email protected]>2014-03-08 16:08:15 +0100
commit6a402359fdb3e82771e36c47bbf2b99a2ecc4d03 (patch)
tree20e2f180c63e8899c798aae4ad2391011cf4f2ed /src
parent58d2afa2232060b88f9c444ce7a0d6e63c841bb2 (diff)
radeonsi: fix freeing descriptor buffers
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 <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/radeonsi/si_descriptors.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/drivers/radeonsi/si_descriptors.c b/src/gallium/drivers/radeonsi/si_descriptors.c
index 9b10d011b9c..06b29d42b8b 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);
}