Mesa (7.10): intel: When validating an FBO's combined depth/stencil, use the given FBO.

Eric Anholt anholt at kemper.freedesktop.org
Tue Jan 4 21:13:44 UTC 2011


Module: Mesa
Branch: 7.10
Commit: 52586ceb2b408e21e4d30d354a77732e7ed7ed10
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=52586ceb2b408e21e4d30d354a77732e7ed7ed10

Author: Eric Anholt <eric at anholt.net>
Date:   Tue Jan  4 10:00:51 2011 -0800

intel: When validating an FBO's combined depth/stencil, use the given FBO.

We were looking at the current draw buffer instead to see whether the
depth/stencil combination matched.  So you'd get told your framebuffer
was complete, until you bound it and went to draw and we decided that
it was incomplete.
(cherry picked from commit b7b2791c6bea6ad0db76fdad9a217aa1efffea93)

---

 src/mesa/drivers/dri/intel/intel_fbo.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/mesa/drivers/dri/intel/intel_fbo.c b/src/mesa/drivers/dri/intel/intel_fbo.c
index 46a1664..7f3b99c 100644
--- a/src/mesa/drivers/dri/intel/intel_fbo.c
+++ b/src/mesa/drivers/dri/intel/intel_fbo.c
@@ -614,10 +614,10 @@ intel_validate_framebuffer(struct gl_context *ctx, struct gl_framebuffer *fb)
    int i;
 
    if (depthRb && stencilRb && stencilRb != depthRb) {
-      if (ctx->DrawBuffer->Attachment[BUFFER_DEPTH].Type == GL_TEXTURE &&
-	  ctx->DrawBuffer->Attachment[BUFFER_STENCIL].Type == GL_TEXTURE &&
-	  (ctx->DrawBuffer->Attachment[BUFFER_DEPTH].Texture->Name ==
-	   ctx->DrawBuffer->Attachment[BUFFER_STENCIL].Texture->Name)) {
+      if (fb->Attachment[BUFFER_DEPTH].Type == GL_TEXTURE &&
+	  fb->Attachment[BUFFER_STENCIL].Type == GL_TEXTURE &&
+	  (fb->Attachment[BUFFER_DEPTH].Texture->Name ==
+	   fb->Attachment[BUFFER_STENCIL].Texture->Name)) {
 	 /* OK */
       } else {
 	 /* we only support combined depth/stencil buffers, not separate




More information about the mesa-commit mailing list