From 4b08f35487fa439fd9ca4d653d3a146c3dc09c1c Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 2 Dec 2010 08:20:08 -0700 Subject: mesa: raise max texture sizes to 16K This allows 16K x 16K 2D textures, for example, but we don't want to allow that for 3D textures. The new gl_constants::MaxTextureMBytes field is used to prevent allocating too large of texture image. This allows a 16K x 32 x 32 3D texture, for example, but prevents 16K^3. Drivers can override this limit. The default is currently 1GB. Apps should use the proxy texture mechanism to determine the actual max texture size. --- src/mesa/main/context.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/mesa/main/context.c') diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c index e2c91c3e40..f42a566c30 100644 --- a/src/mesa/main/context.c +++ b/src/mesa/main/context.c @@ -535,6 +535,7 @@ _mesa_init_constants(struct gl_context *ctx) assert(ctx); /* Constants, may be overriden (usually only reduced) by device drivers */ + ctx->Const.MaxTextureMbytes = MAX_TEXTURE_MBYTES; ctx->Const.MaxTextureLevels = MAX_TEXTURE_LEVELS; ctx->Const.Max3DTextureLevels = MAX_3D_TEXTURE_LEVELS; ctx->Const.MaxCubeTextureLevels = MAX_CUBE_TEXTURE_LEVELS; -- cgit v1.2.3