diff options
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r-- | src/mesa/state_tracker/st_cb_texture.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_cb_texture.c b/src/mesa/state_tracker/st_cb_texture.c index 81a5d9b4dfb..824a13e205d 100644 --- a/src/mesa/state_tracker/st_cb_texture.c +++ b/src/mesa/state_tracker/st_cb_texture.c @@ -1483,6 +1483,12 @@ st_finalize_texture(struct gl_context *ctx, if (tObj->Target == GL_TEXTURE_BUFFER) { struct st_buffer_object *st_obj = st_buffer_object(tObj->BufferObject); + if (!st_obj) { + pipe_resource_reference(&stObj->pt, NULL); + pipe_sampler_view_reference(&stObj->sampler_view, NULL); + return GL_TRUE; + } + if (st_obj->buffer != stObj->pt) { pipe_resource_reference(&stObj->pt, st_obj->buffer); pipe_sampler_view_release(st->pipe, &stObj->sampler_view); |