radeonsi: unreference vertex buffers when destroying the context
authorMarek Olšák <marek.olsak@amd.com>
Wed, 21 Jun 2017 16:39:41 +0000 (18:39 +0200)
committerMarek Olšák <marek.olsak@amd.com>
Fri, 23 Jun 2017 17:53:54 +0000 (19:53 +0200)
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
src/gallium/drivers/radeonsi/si_descriptors.c

index acf6fb47fae5870c77a539855d4959c6a9c04b33..75d2a1d86cf576178e36be3c0e1f55ae2fd9f521 100644 (file)
@@ -2940,6 +2940,8 @@ void si_release_all_descriptors(struct si_context *sctx)
        }
        si_release_buffer_resources(&sctx->rw_buffers,
                                    &sctx->descriptors[SI_DESCS_RW_BUFFERS]);
+       for (i = 0; i < SI_NUM_VERTEX_BUFFERS; i++)
+               pipe_vertex_buffer_unreference(&sctx->vertex_buffer[i]);
 
        for (i = 0; i < SI_NUM_DESCS; ++i)
                si_release_descriptors(&sctx->descriptors[i]);