From 380f7611b5d23b72684ce1eb848f956945e4c39b Mon Sep 17 00:00:00 2001 From: Ilia Mirkin Date: Fri, 24 Apr 2015 19:17:11 -0400 Subject: [PATCH] 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 --- src/mesa/state_tracker/st_atom_framebuffer.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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); } -- 2.30.2