From 1dc8e08e84c6b014622e00090eb2d7301355faf6 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jos=C3=A9=20Fonseca?= Date: Sun, 11 Apr 2010 17:58:17 +0900 Subject: [PATCH] stw: Fix minor st_api migration glitches. --- src/gallium/state_trackers/wgl/stw_context.c | 2 +- src/gallium/state_trackers/wgl/stw_st.c | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) 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; } -- 2.30.2