From: José Fonseca Date: Sun, 11 Apr 2010 08:58:17 +0000 (+0900) Subject: stw: Fix minor st_api migration glitches. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1dc8e08e84c6b014622e00090eb2d7301355faf6;p=mesa.git stw: Fix minor st_api migration glitches. --- diff --git a/src/gallium/state_trackers/wgl/stw_context.c b/src/gallium/state_trackers/wgl/stw_context.c index 663d8b8090c..0fb7cd83069 100644 --- a/src/gallium/state_trackers/wgl/stw_context.c +++ b/src/gallium/state_trackers/wgl/stw_context.c @@ -320,7 +320,7 @@ stw_make_current( if (!stw_dev->stapi->make_current(stw_dev->stapi, ctx->st, fb->stfb, fb->stfb)) goto fail; - stw_framebuffer_reference(&curctx->current_framebuffer, fb); + stw_framebuffer_reference(&ctx->current_framebuffer, fb); success: assert(fb); diff --git a/src/gallium/state_trackers/wgl/stw_st.c b/src/gallium/state_trackers/wgl/stw_st.c index 6c71f2ac452..1decc6237be 100644 --- a/src/gallium/state_trackers/wgl/stw_st.c +++ b/src/gallium/state_trackers/wgl/stw_st.c @@ -65,6 +65,10 @@ stw_st_framebuffer_validate_locked(struct st_framebuffer_iface *stfb, struct pipe_texture templ; unsigned i; + /* remove outdated surface */ + pipe_surface_reference(&stwfb->front_surface, NULL); + pipe_surface_reference(&stwfb->back_surface, NULL); + /* remove outdated textures */ if (stwfb->texture_width != width || stwfb->texture_height != height) { for (i = 0; i < ST_ATTACHMENT_COUNT; i++) @@ -137,7 +141,7 @@ stw_st_framebuffer_validate(struct st_framebuffer_iface *stfb, if (stwfb->fb->must_resize || (statt_mask & ~stwfb->texture_mask)) { stw_st_framebuffer_validate_locked(&stwfb->base, - statt_mask, stwfb->fb->width, stwfb->fb->height); + stwfb->fb->width, stwfb->fb->height, statt_mask); stwfb->fb->must_resize = FALSE; }