summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorJosé Fonseca <[email protected]>2010-04-11 17:58:17 +0900
committerJosé Fonseca <[email protected]>2010-04-12 15:32:21 +0900
commit1dc8e08e84c6b014622e00090eb2d7301355faf6 (patch)
tree1beb9a6bc595223cd31be37bc3610f905a07c477 /src/gallium
parent192f06adca5e79b4824d92dc41186592ed57f71e (diff)
stw: Fix minor st_api migration glitches.
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/state_trackers/wgl/stw_context.c2
-rw-r--r--src/gallium/state_trackers/wgl/stw_st.c6
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;
}