diff options
author | Eric Anholt <[email protected]> | 2009-05-15 16:24:59 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2009-06-17 11:06:46 -0700 |
commit | 957f3c8c3d3b6a48bbcc24e9db2c110a7fde177b (patch) | |
tree | fd21827468fe05eb98a9c74c4fa434ceb5fc99f7 | |
parent | 66bfd025c84ca6d4fb73f394adcdd41418ab6b25 (diff) |
mesa: Mark FBOs with compressed color attachments as FBO-incomplete.
Both EXT_fbo and ARB_fbo agree on this. Fixes a segfault in the metaops
mipmap generation in Intel for SGIS_generate_mipmap of S3TC textures in
Regnum Online.
Bug #21654.
(cherry picked from commit 0307e609aa3e707eeb40051bd664d36f2340ba9b)
-rw-r--r-- | src/mesa/main/fbobject.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c index e8e8c2bf30e..83301f1e621 100644 --- a/src/mesa/main/fbobject.c +++ b/src/mesa/main/fbobject.c @@ -368,6 +368,11 @@ 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) { |