From: Brian Paul Date: Thu, 8 May 2008 23:42:18 +0000 (-0600) Subject: gallium: fix render to depth texture X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2f07e1caa02c9dcdddc673e61eb91b83b82d283b;p=mesa.git gallium: fix render to depth texture --- diff --git a/src/mesa/state_tracker/st_atom_framebuffer.c b/src/mesa/state_tracker/st_atom_framebuffer.c index c9a30e44b24..d46c3ee16c5 100644 --- a/src/mesa/state_tracker/st_atom_framebuffer.c +++ b/src/mesa/state_tracker/st_atom_framebuffer.c @@ -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; }