diff options
Diffstat (limited to 'src/mesa/main/fbobject.c')
-rw-r--r-- | src/mesa/main/fbobject.c | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c index dbd4c5848c..83301f1e62 100644 --- a/src/mesa/main/fbobject.c +++ b/src/mesa/main/fbobject.c @@ -379,6 +379,7 @@ test_attachment_completeness(const GLcontext *ctx, GLenum format, /* OK */ } else if (ctx->Extensions.EXT_packed_depth_stencil && + ctx->Extensions.ARB_depth_texture && texImage->TexFormat->BaseFormat == GL_DEPTH_STENCIL_EXT) { /* OK */ } @@ -389,10 +390,19 @@ test_attachment_completeness(const GLcontext *ctx, GLenum format, } } else { - /* no such thing as stencil textures */ - att_incomplete("illegal stencil texture"); - att->Complete = GL_FALSE; - return; + ASSERT(format == GL_STENCIL); + ASSERT(att->Renderbuffer->StencilBits); + if (ctx->Extensions.EXT_packed_depth_stencil && + ctx->Extensions.ARB_depth_texture && + att->Renderbuffer->_BaseFormat == GL_DEPTH_STENCIL_EXT) { + /* OK */ + } + else { + /* no such thing as stencil-only textures */ + att_incomplete("illegal stencil texture"); + att->Complete = GL_FALSE; + return; + } } } else if (att->Type == GL_RENDERBUFFER_EXT) { |