renderer: use is_buffer flag on resource destruction

This just makes sure we use the correct destruction path.

Reviewed-by: Elie Tournier <elie.tournier@collabora.com>
Tested-by: Jakob Bornecrantz <jakob@collabora.com>
Signed-off-by: Jakob Bornecrantz <jakob@collabora.com>
macos/master
Dave Airlie 7 years ago committed by Jakob Bornecrantz
parent 0cca6d6b48
commit 5c50c84c7a
  1. 6
      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);

Loading…
Cancel
Save