summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/common
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/drivers/common')
-rw-r--r--src/mesa/drivers/common/meta.c23
1 files changed, 20 insertions, 3 deletions
diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c
index 1d870d2980f..e6772fce223 100644
--- a/src/mesa/drivers/common/meta.c
+++ b/src/mesa/drivers/common/meta.c
@@ -4021,11 +4021,28 @@ decompress_texture_image(struct gl_context *ctx,
target == GL_TEXTURE_2D_ARRAY);
}
- if (target == GL_TEXTURE_CUBE_MAP) {
+ switch (target) {
+ case GL_TEXTURE_1D:
+ case GL_TEXTURE_1D_ARRAY:
+ assert(!"No compressed 1D textures.");
+ return;
+
+ case GL_TEXTURE_3D:
+ assert(!"No compressed 3D textures.");
+ return;
+
+ case GL_TEXTURE_2D_ARRAY:
+ case GL_TEXTURE_CUBE_MAP_ARRAY:
+ /* These targets are just broken currently. */
+ return;
+
+ case GL_TEXTURE_CUBE_MAP:
faceTarget = GL_TEXTURE_CUBE_MAP_POSITIVE_X + texImage->Face;
- }
- else {
+ break;
+
+ default:
faceTarget = target;
+ break;
}
/* save fbo bindings (not saved by _mesa_meta_begin()) */