swrast: check max renderbuffer size against SWRAST_MAX_WIDTH

This commit is contained in:
Brian Paul 2012-02-20 11:07:00 -07:00
parent a3b2c3a421
commit cb49def3d6
1 changed files with 2 additions and 0 deletions

View 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);