diff options
author | Brian Paul <[email protected]> | 2012-02-19 20:08:52 -0700 |
---|---|---|
committer | Brian Paul <[email protected]> | 2012-02-24 08:02:54 -0700 |
commit | 08687c7912f3d1b8f5420ba3c0a4fc474fa80d37 (patch) | |
tree | fdd76621ae3b458c1161a37cdd1af3c7a8bc9c84 /src/mesa/swrast | |
parent | 3e88e432244336518e1bbcf303ee53eae4df2a02 (diff) |
mesa: move/fix MAX_WIDTH/HEIGHT-related assertions
Max texture and viewport size is only limited by MAX_WIDTH/HEIGHT for swrast.
Reviewed-by: José Fonseca <[email protected]>
Diffstat (limited to 'src/mesa/swrast')
-rw-r--r-- | src/mesa/swrast/s_context.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mesa/swrast/s_context.c b/src/mesa/swrast/s_context.c index cc304d70c06..2ebb649eade 100644 --- a/src/mesa/swrast/s_context.c +++ b/src/mesa/swrast/s_context.c @@ -726,6 +726,14 @@ _swrast_CreateContext( struct gl_context *ctx ) const GLuint maxThreads = 1; #endif + assert(ctx->Const.MaxViewportWidth <= MAX_WIDTH); + assert(ctx->Const.MaxViewportHeight <= MAX_WIDTH); + + /* make sure largest texture image is <= MAX_WIDTH in size */ + assert((1 << (ctx->Const.MaxTextureLevels - 1)) <= MAX_WIDTH); + assert((1 << (ctx->Const.MaxCubeTextureLevels - 1)) <= MAX_WIDTH); + assert((1 << (ctx->Const.Max3DTextureLevels - 1)) <= MAX_WIDTH); + if (SWRAST_DEBUG) { _mesa_debug(ctx, "_swrast_CreateContext\n"); } |