swrast: check max renderbuffer size against SWRAST_MAX_WIDTH
authorBrian Paul <brianp@vmware.com>
Mon, 20 Feb 2012 18:07:00 +0000 (11:07 -0700)
committerBrian Paul <brianp@vmware.com>
Fri, 24 Feb 2012 15:03:10 +0000 (08:03 -0700)
src/mesa/swrast/s_context.c

index d00a6a7..32f95de 100644 (file)
@@ -729,6 +729,8 @@ _swrast_CreateContext( struct gl_context *ctx )
    assert(ctx->Const.MaxViewportWidth <= SWRAST_MAX_WIDTH);
    assert(ctx->Const.MaxViewportHeight <= SWRAST_MAX_WIDTH);
 
+   assert(ctx->Const.MaxRenderbufferSize <= SWRAST_MAX_WIDTH);
+
    /* make sure largest texture image is <= SWRAST_MAX_WIDTH in size */
    assert((1 << (ctx->Const.MaxTextureLevels - 1)) <= SWRAST_MAX_WIDTH);
    assert((1 << (ctx->Const.MaxCubeTextureLevels - 1)) <= SWRAST_MAX_WIDTH);