gallium: fix render to depth texture
authorBrian Paul <brian.paul@tungstengraphics.com>
Thu, 8 May 2008 23:42:18 +0000 (17:42 -0600)
committerBrian Paul <brian.paul@tungstengraphics.com>
Thu, 8 May 2008 23:42:18 +0000 (17:42 -0600)
src/mesa/state_tracker/st_atom_framebuffer.c

index c9a30e44b2401056f129cd15db2b3c4bde57378d..d46c3ee16c5d8af9b6f6f3851f1114d18c9d0859 100644 (file)
@@ -127,6 +127,11 @@ update_framebuffer_state( struct st_context *st )
    strb = st_renderbuffer(fb->Attachment[BUFFER_DEPTH].Renderbuffer);
    if (strb) {
       strb = st_renderbuffer(strb->Base.Wrapped);
+      if (strb->rtt) {
+         /* rendering to a GL texture, may have to update surface */
+         update_renderbuffer_surface(st, strb);
+      }
+
       assert(strb->surface);
       framebuffer->zsbuf = strb->surface;
    }