aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/fbobject.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-05-09 15:52:33 +0200
committermarha <marha@users.sourceforge.net>2012-05-09 15:52:33 +0200
commit8a448108ec0bc3a0a488b2234e0d12aee503c67c (patch)
tree22e71069622608062b2f5eab3ef485438cd32122 /mesalib/src/mesa/main/fbobject.c
parent62068b3bc534d504e40df34847b4436f1a496f35 (diff)
downloadvcxsrv-8a448108ec0bc3a0a488b2234e0d12aee503c67c.tar.gz
vcxsrv-8a448108ec0bc3a0a488b2234e0d12aee503c67c.tar.bz2
vcxsrv-8a448108ec0bc3a0a488b2234e0d12aee503c67c.zip
libX11 mesa xserver xkeyboard-config
Diffstat (limited to 'mesalib/src/mesa/main/fbobject.c')
-rw-r--r--mesalib/src/mesa/main/fbobject.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/mesalib/src/mesa/main/fbobject.c b/mesalib/src/mesa/main/fbobject.c
index 26ae1087c..f56369483 100644
--- a/mesalib/src/mesa/main/fbobject.c
+++ b/mesalib/src/mesa/main/fbobject.c
@@ -2023,7 +2023,11 @@ framebuffer_texture(struct gl_context *ctx, const char *caller, GLenum target,
_glthread_LOCK_MUTEX(fb->Mutex);
if (texObj) {
if (attachment == GL_DEPTH_ATTACHMENT &&
- texObj == fb->Attachment[BUFFER_STENCIL].Texture) {
+ texObj == fb->Attachment[BUFFER_STENCIL].Texture &&
+ level == fb->Attachment[BUFFER_STENCIL].TextureLevel &&
+ _mesa_tex_target_to_face(textarget) ==
+ fb->Attachment[BUFFER_STENCIL].CubeMapFace &&
+ zoffset == fb->Attachment[BUFFER_STENCIL].Zoffset) {
/* The texture object is already attached to the stencil attachment
* point. Don't create a new renderbuffer; just reuse the stencil
* attachment's. This is required to prevent a GL error in
@@ -2032,8 +2036,12 @@ framebuffer_texture(struct gl_context *ctx, const char *caller, GLenum target,
reuse_framebuffer_texture_attachment(fb, BUFFER_DEPTH,
BUFFER_STENCIL);
} else if (attachment == GL_STENCIL_ATTACHMENT &&
- texObj == fb->Attachment[BUFFER_DEPTH].Texture) {
- /* As above, but with depth and stencil juxtaposed. */
+ texObj == fb->Attachment[BUFFER_DEPTH].Texture &&
+ level == fb->Attachment[BUFFER_DEPTH].TextureLevel &&
+ _mesa_tex_target_to_face(textarget) ==
+ fb->Attachment[BUFFER_DEPTH].CubeMapFace &&
+ zoffset == fb->Attachment[BUFFER_DEPTH].Zoffset) {
+ /* As above, but with depth and stencil transposed. */
reuse_framebuffer_texture_attachment(fb, BUFFER_STENCIL,
BUFFER_DEPTH);
} else {