summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker
diff options
context:
space:
mode:
authorIlia Mirkin <[email protected]>2015-04-24 19:17:11 -0400
committerIlia Mirkin <[email protected]>2015-05-12 18:41:11 -0400
commit380f7611b5d23b72684ce1eb848f956945e4c39b (patch)
tree0e564d8d98b23c0962947d8d3d976876deed3055 /src/mesa/state_tracker
parent71ba30f7788167c04d0968d286a387fce16afcce (diff)
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 <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r--src/mesa/state_tracker/st_atom_framebuffer.c5
1 files changed, 4 insertions, 1 deletions
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);
}