diff options
author | Brian Paul <[email protected]> | 2010-12-02 08:20:08 -0700 |
---|---|---|
committer | Brian Paul <[email protected]> | 2010-12-02 10:09:03 -0700 |
commit | 4b08f35487fa439fd9ca4d653d3a146c3dc09c1c (patch) | |
tree | 35fed9d63a68b7ec4c065245d07acc3cfe848796 /src/mesa/main/context.c | |
parent | 23390e2f5cf1050f98c70c8603e374191e7d84e7 (diff) |
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.
Diffstat (limited to 'src/mesa/main/context.c')
-rw-r--r-- | src/mesa/main/context.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c index e2c91c3e400..f42a566c302 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; |