aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/fbobject.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-06-18 08:29:53 +0200
committermarha <marha@users.sourceforge.net>2012-06-18 08:29:53 +0200
commita3691edaff553b5130c97ff912ecaa96f08a6643 (patch)
tree8a1fb2257d45cc0ebd3d0a69fdf8a7a8a0cc9d1e /mesalib/src/mesa/main/fbobject.c
parenta33de30073bfa0ee1abba186dba9fa52cf0aa23a (diff)
downloadvcxsrv-a3691edaff553b5130c97ff912ecaa96f08a6643.tar.gz
vcxsrv-a3691edaff553b5130c97ff912ecaa96f08a6643.tar.bz2
vcxsrv-a3691edaff553b5130c97ff912ecaa96f08a6643.zip
fontconfig mesa pixman git update 18 Jun 2012
Diffstat (limited to 'mesalib/src/mesa/main/fbobject.c')
-rw-r--r--mesalib/src/mesa/main/fbobject.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/mesalib/src/mesa/main/fbobject.c b/mesalib/src/mesa/main/fbobject.c
index 777783eb7..cfaea62bb 100644
--- a/mesalib/src/mesa/main/fbobject.c
+++ b/mesalib/src/mesa/main/fbobject.c
@@ -805,6 +805,15 @@ _mesa_test_framebuffer_completeness(struct gl_context *ctx,
return;
}
}
+
+ /* Check that the format is valid. (MESA_FORMAT_NONE means unsupported)
+ */
+ if (att->Type == GL_RENDERBUFFER &&
+ att->Renderbuffer->Format == MESA_FORMAT_NONE) {
+ fb->_Status = GL_FRAMEBUFFER_UNSUPPORTED;
+ fbo_incomplete("unsupported renderbuffer format", i);
+ return;
+ }
}
#if FEATURE_GL
@@ -1394,7 +1403,7 @@ renderbuffer_storage(GLenum target, GLenum internalFormat,
ASSERT(rb->AllocStorage);
if (rb->AllocStorage(ctx, rb, internalFormat, width, height)) {
/* No error - check/set fields now */
- assert(rb->Format != MESA_FORMAT_NONE);
+ /* If rb->Format == MESA_FORMAT_NONE, the format is unsupported. */
assert(rb->Width == (GLuint) width);
assert(rb->Height == (GLuint) height);
rb->InternalFormat = internalFormat;