[Mesa-dev] [PATCH 16/23] swrast: check max renderbuffer size against SWRAST_MAX_WIDTH

Brian Paul brian.e.paul at gmail.com
Mon Feb 20 12:15:04 PST 2012


From: Brian Paul <brianp at vmware.com>

---
 src/mesa/swrast/s_context.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/src/mesa/swrast/s_context.c b/src/mesa/swrast/s_context.c
index dba038b..ffa2687 100644
--- a/src/mesa/swrast/s_context.c
+++ b/src/mesa/swrast/s_context.c
@@ -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);
-- 
1.7.3.4



More information about the mesa-dev mailing list