[virglrenderer-devel] [PATCH] renderer: use is_buffer flag on resource destruction
Dave Airlie
airlied at gmail.com
Wed Jun 6 04:00:27 UTC 2018
From: Dave Airlie <airlied at redhat.com>
This just makes sure we use the correect destruction path.
---
src/vrend_renderer.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/src/vrend_renderer.c b/src/vrend_renderer.c
index 53df8a4..66506bc 100644
--- a/src/vrend_renderer.c
+++ b/src/vrend_renderer.c
@@ -4779,11 +4779,7 @@ void vrend_renderer_resource_destroy(struct vrend_resource *res, bool remove)
if (res->ptr)
free(res->ptr);
if (res->id) {
- if (res->target == GL_ELEMENT_ARRAY_BUFFER_ARB ||
- res->target == GL_ARRAY_BUFFER_ARB ||
- res->target == GL_UNIFORM_BUFFER||
- res->target == GL_TEXTURE_BUFFER||
- res->target == GL_TRANSFORM_FEEDBACK_BUFFER) {
+ if (res->is_buffer) {
glDeleteBuffers(1, &res->id);
if (res->tbo_tex_id)
glDeleteTextures(1, &res->tbo_tex_id);
--
2.14.3
More information about the virglrenderer-devel
mailing list