mesa: remove FBO texture depth/stencil test
authorBrian Paul <brianp@vmware.com>
Sat, 24 Oct 2009 00:21:59 +0000 (18:21 -0600)
committerBrian Paul <brianp@vmware.com>
Sat, 24 Oct 2009 00:22:41 +0000 (18:22 -0600)
The texture format should not be checked until validation time since
the format might be changed by a subsequent glTexImage() call.

src/mesa/main/fbobject.c

index 825a23090b582d25b2dbbb94f82e3ddd93ce91de..ed1db0feca6a6751b9bdd295d46c8ce14e0d5738 100644 (file)
@@ -1511,18 +1511,6 @@ framebuffer_texture(GLcontext *ctx, const char *caller, GLenum target,
       return;
    }
 
-   if (texObj && attachment == GL_DEPTH_STENCIL_ATTACHMENT) {
-      /* the texture format must be depth+stencil */
-      const struct gl_texture_image *texImg;
-      texImg = texObj->Image[0][texObj->BaseLevel];
-      if (!texImg || texImg->_BaseFormat != GL_DEPTH_STENCIL) {
-         _mesa_error(ctx, GL_INVALID_OPERATION,
-                     "glFramebufferTexture%sEXT(texture is not"
-                     " DEPTH_STENCIL format)", caller);
-         return;
-      }
-   }
-
    FLUSH_CURRENT(ctx, _NEW_BUFFERS);
    /* The above doesn't fully flush the drivers in the way that a
     * glFlush does, but that is required here: