On 08/25/2010 07:14 AM, Nick Bowler wrote:
Intel sometimes uses packed depth/stencil buffers even when only a
depth buffer or only a stencil buffer was requested. GL specifies
that GL_DEPTH_COMPONENT renderbuffers are *not* stencil-attachable,
but the current check happily attaches these buffers to the stencil
attachment point (or vice-versa for GL_STENCIL_INDEX renderbuffers
and the depth attachment). Performing such an attachment must yield
an incomplete framebuffer.
Since the renderbuffer struct has the actual base format stored in it,
use that value instead of recomputing it incorrectly.
Signed-off-by: Nick Bowler<nbow...@draconx.ca>
---
src/mesa/main/fbobject.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c
index 9a84e5a..80bc518 100644
--- a/src/mesa/main/fbobject.c
+++ b/src/mesa/main/fbobject.c
@@ -485,8 +485,7 @@ test_attachment_completeness(const GLcontext *ctx, GLenum
format,
}
}
else if (att->Type == GL_RENDERBUFFER_EXT) {
- const GLenum baseFormat =
- _mesa_get_format_base_format(att->Renderbuffer->Format);
+ const GLenum baseFormat = att->Renderbuffer->_BaseFormat;
ASSERT(att->Renderbuffer);
if (!att->Renderbuffer->InternalFormat ||
This looks good. I'm not sure if there's a piglit test that would
exercise this. Did you run the piglit fbo tests just to be sure
there's no regressions?
-Brian
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev