diff options
author | Michel Dänzer <daenzer@vmware.com> | 2009-05-20 17:00:48 +0200 |
---|---|---|
committer | Michel Dänzer <daenzer@vmware.com> | 2009-05-20 17:00:48 +0200 |
commit | b9bd1abf2664a75642ee5e1999697bbe480b9172 (patch) | |
tree | 06e34f206854badbb1ec5f31abdf661900ab389e /src/mesa/main/fbobject.c | |
parent | c696dd0f62c195d71cf7ecbdd04d9b156dd0da0b (diff) | |
parent | 0c75cb5afe81b0de9d006f9f9b75fdc9a15038d0 (diff) |
Merge branch 'master' into radeon-rewrite
Conflicts:
src/mesa/drivers/dri/r300/r300_context.c
src/mesa/drivers/dri/r300/r300_texstate.c
Diffstat (limited to 'src/mesa/main/fbobject.c')
-rw-r--r-- | src/mesa/main/fbobject.c | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c index 9c5a5908a2..83301f1e62 100644 --- a/src/mesa/main/fbobject.c +++ b/src/mesa/main/fbobject.c @@ -368,12 +368,18 @@ test_attachment_completeness(const GLcontext *ctx, GLenum format, att->Complete = GL_FALSE; return; } + if (texImage->TexFormat->TexelBytes == 0) { + att_incomplete("compressed internalformat"); + att->Complete = GL_FALSE; + return; + } } else if (format == GL_DEPTH) { if (texImage->TexFormat->BaseFormat == GL_DEPTH_COMPONENT) { /* OK */ } else if (ctx->Extensions.EXT_packed_depth_stencil && + ctx->Extensions.ARB_depth_texture && texImage->TexFormat->BaseFormat == GL_DEPTH_STENCIL_EXT) { /* OK */ } @@ -384,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) { |