From: Ilia Mirkin Date: Fri, 24 Apr 2015 23:17:11 +0000 (-0400) Subject: st/mesa: update stencil surface if it comes from texture X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=380f7611b5d23b72684ce1eb848f956945e4c39b;p=mesa.git st/mesa: update stencil surface if it comes from texture Now that ARB_texture_stencil8 is supported, this might happen. Signed-off-by: Ilia Mirkin Reviewed-by: Dave Airlie --- diff --git a/src/mesa/state_tracker/st_atom_framebuffer.c b/src/mesa/state_tracker/st_atom_framebuffer.c index b195c55b347..ae883a2535e 100644 --- a/src/mesa/state_tracker/st_atom_framebuffer.c +++ b/src/mesa/state_tracker/st_atom_framebuffer.c @@ -134,7 +134,10 @@ update_framebuffer_state( struct st_context *st ) else { strb = st_renderbuffer(fb->Attachment[BUFFER_STENCIL].Renderbuffer); if (strb) { - assert(strb->surface); + if (strb->is_rtt) { + /* rendering to a GL texture, may have to update surface */ + st_update_renderbuffer_surface(st, strb); + } pipe_surface_reference(&framebuffer->zsbuf, strb->surface); update_framebuffer_size(framebuffer, strb->surface); }