summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker/st_framebuffer.c
diff options
context:
space:
mode:
authorAlan Hourihane <alanh@vmware.com>2008-12-19 14:59:43 +0000
committerAlan Hourihane <alanh@vmware.com>2008-12-19 15:01:08 +0000
commit663d6a0fe31c6e973df3a2827cfb88fe69d88d8a (patch)
treeb980d24cb4bb54cce0725eb92bd441a91962f9ee /src/mesa/state_tracker/st_framebuffer.c
parentaae74c36982b98f1f54a12a6512f78006bf4fd0d (diff)
downloadexternal_mesa3d-663d6a0fe31c6e973df3a2827cfb88fe69d88d8a.zip
external_mesa3d-663d6a0fe31c6e973df3a2827cfb88fe69d88d8a.tar.gz
external_mesa3d-663d6a0fe31c6e973df3a2827cfb88fe69d88d8a.tar.bz2
gallium: set ST_NEW_FRAMEBUFFER when setting new surfaces
Diffstat (limited to 'src/mesa/state_tracker/st_framebuffer.c')
-rw-r--r--src/mesa/state_tracker/st_framebuffer.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_framebuffer.c b/src/mesa/state_tracker/st_framebuffer.c
index aaa7d42..43ac195 100644
--- a/src/mesa/state_tracker/st_framebuffer.c
+++ b/src/mesa/state_tracker/st_framebuffer.c
@@ -169,6 +169,8 @@ void
st_set_framebuffer_surface(struct st_framebuffer *stfb,
uint surfIndex, struct pipe_surface *surf)
{
+ GET_CURRENT_CONTEXT(ctx);
+ struct st_context *st;
static const GLuint invalid_size = 9999999;
struct st_renderbuffer *strb;
GLuint width, height, i;
@@ -184,6 +186,15 @@ st_set_framebuffer_surface(struct st_framebuffer *stfb,
pipe_surface_reference( &strb->surface, surf );
pipe_texture_reference( &strb->texture, surf->texture );
+ if (ctx) {
+ /* If ctx isn't set, we've likely not made current yet.
+ * But when we do, we need to start setting this dirty bit
+ * to ensure the renderbuffer attachements are up-to-date
+ * via update_framebuffer.
+ */
+ ctx->st->dirty.st |= ST_NEW_FRAMEBUFFER;
+ }
+
/* update renderbuffer's width/height */
strb->Base.Width = surf->width;
strb->Base.Height = surf->height;