Mesa (master): st/mesa: update stencil surface if it comes from texture
Ilia Mirkin
imirkin at kemper.freedesktop.org
Tue May 12 22:42:12 UTC 2015
Module: Mesa
Branch: master
Commit: 380f7611b5d23b72684ce1eb848f956945e4c39b
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=380f7611b5d23b72684ce1eb848f956945e4c39b
Author: Ilia Mirkin <imirkin at alum.mit.edu>
Date: Fri Apr 24 19:17:11 2015 -0400
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 <imirkin at alum.mit.edu>
Reviewed-by: Dave Airlie <airlied at redhat.com>
---
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 b195c55..ae883a2 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);
}
More information about the mesa-commit
mailing list