summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/framebuffer.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2009-08-07 14:51:59 -0600
committerBrian Paul <[email protected]>2009-08-08 07:30:26 -0600
commit483a7916d1c93d1edf125dc671dcfbff42a9fc5e (patch)
treeb8b2db0612140d8fc87e029186abe92757d7af78 /src/mesa/main/framebuffer.c
parent101c2f907e71b7c5e14dcd899389155ea802b2af (diff)
mesa: update framebuffer status as needed in _mesa_source/dest_buffer_exists()
Diffstat (limited to 'src/mesa/main/framebuffer.c')
-rw-r--r--src/mesa/main/framebuffer.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/mesa/main/framebuffer.c b/src/mesa/main/framebuffer.c
index 9d9c4217a6c..dc79b8ca61a 100644
--- a/src/mesa/main/framebuffer.c
+++ b/src/mesa/main/framebuffer.c
@@ -827,8 +827,10 @@ _mesa_source_buffer_exists(GLcontext *ctx, GLenum format)
{
const struct gl_renderbuffer_attachment *att = ctx->ReadBuffer->Attachment;
- /* state validation should have already been done */
- ASSERT(ctx->NewState == 0x0);
+ /* If we don't know the framebuffer status, update it now */
+ if (ctx->ReadBuffer->_Status == 0) {
+ _mesa_test_framebuffer_completeness(ctx, ctx->ReadBuffer);
+ }
if (ctx->ReadBuffer->_Status != GL_FRAMEBUFFER_COMPLETE_EXT) {
return GL_FALSE;
@@ -898,8 +900,10 @@ _mesa_dest_buffer_exists(GLcontext *ctx, GLenum format)
{
const struct gl_renderbuffer_attachment *att = ctx->DrawBuffer->Attachment;
- /* state validation should have already been done */
- ASSERT(ctx->NewState == 0x0);
+ /* If we don't know the framebuffer status, update it now */
+ if (ctx->DrawBuffer->_Status == 0) {
+ _mesa_test_framebuffer_completeness(ctx, ctx->DrawBuffer);
+ }
if (ctx->DrawBuffer->_Status != GL_FRAMEBUFFER_COMPLETE_EXT) {
return GL_FALSE;