Mesa (7.10): mesa: fix up assertion in _mesa_source_buffer_exists

Marek Olšák mareko at kemper.freedesktop.org
Sun Jun 12 04:18:38 UTC 2011


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

Author: Marek Olšák <maraeo at gmail.com>
Date:   Mon Mar 14 10:20:55 2011 +0100

mesa: fix up assertion in _mesa_source_buffer_exists

This was probably missed when implementing luminance and luminance alpha
render targets.

_mesa_get_format_bits checks for both GL_*_BITS and GL_TEXTURE_*_SIZE.

This fixes:
main/framebuffer.c:892: _mesa_source_buffer_exists: Assertion `....' failed.
(cherry picked from commit c0110d5450f2d4722652728a6b30bc9ae6b81c60)

---

 src/mesa/main/framebuffer.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/src/mesa/main/framebuffer.c b/src/mesa/main/framebuffer.c
index 5530c51..deb263d 100644
--- a/src/mesa/main/framebuffer.c
+++ b/src/mesa/main/framebuffer.c
@@ -890,6 +890,8 @@ _mesa_source_buffer_exists(struct gl_context *ctx, GLenum format)
       }
       ASSERT(_mesa_get_format_bits(ctx->ReadBuffer->_ColorReadBuffer->Format, GL_RED_BITS) > 0 ||
              _mesa_get_format_bits(ctx->ReadBuffer->_ColorReadBuffer->Format, GL_ALPHA_BITS) > 0 ||
+             _mesa_get_format_bits(ctx->ReadBuffer->_ColorReadBuffer->Format, GL_TEXTURE_LUMINANCE_SIZE) > 0 ||
+             _mesa_get_format_bits(ctx->ReadBuffer->_ColorReadBuffer->Format, GL_TEXTURE_INTENSITY_SIZE) > 0 ||
              _mesa_get_format_bits(ctx->ReadBuffer->_ColorReadBuffer->Format, GL_INDEX_BITS) > 0);
       break;
    case GL_DEPTH:




More information about the mesa-commit mailing list