summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/context.c
diff options
context:
space:
mode:
authorJouk <joukj@tarantella.(none)>2007-06-08 13:38:24 +0200
committerJouk <joukj@tarantella.(none)>2007-06-08 13:38:24 +0200
commit55f8b7053065ce88296608071feed6f9540f6c0d (patch)
tree86ac301ed5805c895985040caf56f857de017233 /src/mesa/main/context.c
parent518f9168862b2096278ae14a65c8c854c208e004 (diff)
parent7b559a91028d297b34df9ec939bd4d00fad6027c (diff)
Merge branch 'master' of git+ssh://[email protected]/git/mesa/mesa
Diffstat (limited to 'src/mesa/main/context.c')
-rw-r--r--src/mesa/main/context.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c
index ace68499d79..ccaf6f64280 100644
--- a/src/mesa/main/context.c
+++ b/src/mesa/main/context.c
@@ -467,12 +467,22 @@ alloc_shared_state( GLcontext *ctx )
if (!ss->DefaultRect)
goto cleanup;
+ ss->Default1DArray = (*ctx->Driver.NewTextureObject)(ctx, 0, GL_TEXTURE_1D_ARRAY_EXT);
+ if (!ss->Default1DArray)
+ goto cleanup;
+
+ ss->Default2DArray = (*ctx->Driver.NewTextureObject)(ctx, 0, GL_TEXTURE_2D_ARRAY_EXT);
+ if (!ss->Default2DArray)
+ goto cleanup;
+
/* Effectively bind the default textures to all texture units */
ss->Default1D->RefCount += MAX_TEXTURE_IMAGE_UNITS;
ss->Default2D->RefCount += MAX_TEXTURE_IMAGE_UNITS;
ss->Default3D->RefCount += MAX_TEXTURE_IMAGE_UNITS;
ss->DefaultCubeMap->RefCount += MAX_TEXTURE_IMAGE_UNITS;
ss->DefaultRect->RefCount += MAX_TEXTURE_IMAGE_UNITS;
+ ss->Default1DArray->RefCount += MAX_TEXTURE_IMAGE_UNITS;
+ ss->Default2DArray->RefCount += MAX_TEXTURE_IMAGE_UNITS;
_glthread_INIT_MUTEX(ss->TexMutex);
ss->TextureStateStamp = 0;
@@ -772,6 +782,7 @@ _mesa_init_constants(GLcontext *ctx)
ctx->Const.Max3DTextureLevels = MAX_3D_TEXTURE_LEVELS;
ctx->Const.MaxCubeTextureLevels = MAX_CUBE_TEXTURE_LEVELS;
ctx->Const.MaxTextureRectSize = MAX_TEXTURE_RECT_SIZE;
+ ctx->Const.MaxArrayTextureLayers = MAX_ARRAY_TEXTURE_LAYERS;
ctx->Const.MaxTextureCoordUnits = MAX_TEXTURE_COORD_UNITS;
ctx->Const.MaxTextureImageUnits = MAX_TEXTURE_IMAGE_UNITS;
ctx->Const.MaxTextureUnits = MIN2(ctx->Const.MaxTextureCoordUnits,