aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/texobj.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-11-09 13:27:06 +0100
committermarha <marha@users.sourceforge.net>2012-11-09 13:27:06 +0100
commit8d57b7fcb22cf1a52203ee57c745b64bba649249 (patch)
treeaaf65faecb30fbffbe7bb11d4bff43ea3297cf2e /mesalib/src/mesa/main/texobj.c
parent1738a6973deb03f33a71c9527594727cb8bb64b4 (diff)
downloadvcxsrv-8d57b7fcb22cf1a52203ee57c745b64bba649249.tar.gz
vcxsrv-8d57b7fcb22cf1a52203ee57c745b64bba649249.tar.bz2
vcxsrv-8d57b7fcb22cf1a52203ee57c745b64bba649249.zip
mesa git update 9 nov 2012
mesa: 011f8458805e443ac9130865d2840a929a00cabf
Diffstat (limited to 'mesalib/src/mesa/main/texobj.c')
-rw-r--r--mesalib/src/mesa/main/texobj.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/mesalib/src/mesa/main/texobj.c b/mesalib/src/mesa/main/texobj.c
index 8525ff9fd..c083c72e2 100644
--- a/mesalib/src/mesa/main/texobj.c
+++ b/mesalib/src/mesa/main/texobj.c
@@ -108,6 +108,7 @@ _mesa_initialize_texture_object( struct gl_texture_object *obj,
target == GL_TEXTURE_1D_ARRAY_EXT ||
target == GL_TEXTURE_2D_ARRAY_EXT ||
target == GL_TEXTURE_EXTERNAL_OES ||
+ target == GL_TEXTURE_CUBE_MAP_ARRAY ||
target == GL_TEXTURE_BUFFER);
memset(obj, 0, sizeof(*obj));
@@ -316,6 +317,7 @@ valid_texture_object(const struct gl_texture_object *tex)
case GL_TEXTURE_2D_ARRAY_EXT:
case GL_TEXTURE_BUFFER:
case GL_TEXTURE_EXTERNAL_OES:
+ case GL_TEXTURE_CUBE_MAP_ARRAY:
return GL_TRUE;
case 0x99:
_mesa_problem(NULL, "invalid reference to a deleted texture object");
@@ -515,6 +517,7 @@ _mesa_test_texobj_completeness( const struct gl_context *ctx,
maxLevels = ctx->Const.Max3DTextureLevels;
break;
case GL_TEXTURE_CUBE_MAP_ARB:
+ case GL_TEXTURE_CUBE_MAP_ARRAY:
maxLog2 = MAX2(baseImage->WidthLog2,
baseImage->HeightLog2);
maxLevels = ctx->Const.MaxCubeTextureLevels;
@@ -599,7 +602,7 @@ _mesa_test_texobj_completeness( const struct gl_context *ctx,
if (height > 1 && t->Target != GL_TEXTURE_1D_ARRAY) {
height /= 2;
}
- if (depth > 1 && t->Target != GL_TEXTURE_2D_ARRAY) {
+ if (depth > 1 && t->Target != GL_TEXTURE_2D_ARRAY && t->Target != GL_TEXTURE_CUBE_MAP_ARRAY) {
depth /= 2;
}
@@ -768,6 +771,10 @@ _mesa_get_fallback_texture(struct gl_context *ctx, gl_texture_index tex)
dims = 0;
target = GL_TEXTURE_BUFFER;
break;
+ case TEXTURE_CUBE_ARRAY_INDEX:
+ dims = 3;
+ target = GL_TEXTURE_CUBE_MAP_ARRAY;
+ break;
case TEXTURE_EXTERNAL_INDEX:
dims = 2;
target = GL_TEXTURE_EXTERNAL_OES;
@@ -1155,6 +1162,8 @@ target_enum_to_index(struct gl_context *ctx, GLenum target)
case GL_TEXTURE_EXTERNAL_OES:
return _mesa_is_gles(ctx) && ctx->Extensions.OES_EGL_image_external
? TEXTURE_EXTERNAL_INDEX : -1;
+ case GL_TEXTURE_CUBE_MAP_ARRAY:
+ return TEXTURE_CUBE_ARRAY_INDEX;
default:
return -1;
}