aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/texobj.c
diff options
context:
space:
mode:
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;
}