diff options
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r-- | src/mesa/state_tracker/st_cb_fbo.c | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/src/mesa/state_tracker/st_cb_fbo.c b/src/mesa/state_tracker/st_cb_fbo.c index 7c18f380cd..0d23f7eec4 100644 --- a/src/mesa/state_tracker/st_cb_fbo.c +++ b/src/mesa/state_tracker/st_cb_fbo.c @@ -129,19 +129,10 @@ static void st_renderbuffer_delete(struct gl_renderbuffer *rb) { struct st_renderbuffer *strb = st_renderbuffer(rb); - GET_CURRENT_CONTEXT(ctx); - if (ctx) { - struct pipe_context *pipe = ctx->st->pipe; - ASSERT(strb); - if (strb && strb->surface) { - if (strb->surface->region) { - pipe->winsys->region_release(pipe->winsys, &strb->surface->region); - } - free(strb->surface); - } - } - else { - _mesa_warning(NULL, "st_renderbuffer_delete() called, but no current context"); + ASSERT(strb); + if (strb->surface) { + struct pipe_winsys *ws = strb->surface->winsys; + ws->surface_release(ws, &strb->surface); } free(strb); } |