aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2012-10-31 16:57:51 -0700
committerEric Anholt <[email protected]>2012-11-19 15:07:22 -0800
commitc1fabea1c5a40c60176201f55253bd463fd146f5 (patch)
tree092208214dc7f3ae905d39bd314394d93b34949b /src/mesa
parent923c4b3f4a70737f7f36894dc0b4648f04fd8c19 (diff)
i965: Add some checks for array textures in unsupported paths.
I noticed these in the next patch where these paths were using the Face of a teximage but didn't have array handling. Reviewed-by: Chad Versace <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/intel/intel_blit.c3
-rw-r--r--src/mesa/drivers/dri/intel/intel_tex_copy.c5
-rw-r--r--src/mesa/drivers/dri/intel/intel_tex_image.c6
3 files changed, 14 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_blit.c b/src/mesa/drivers/dri/intel/intel_blit.c
index 36a2c6aadac..5658bd7131d 100644
--- a/src/mesa/drivers/dri/intel/intel_blit.c
+++ b/src/mesa/drivers/dri/intel/intel_blit.c
@@ -540,6 +540,9 @@ intel_set_teximage_alpha_to_one(struct gl_context *ctx,
int width, height, depth;
BATCH_LOCALS;
+ /* This target would require iterating over the slices, which we don't do */
+ assert(intel_image->base.Base.TexObject->Target != GL_TEXTURE_1D_ARRAY);
+
intel_miptree_get_dimensions_for_image(&intel_image->base.Base,
&width, &height, &depth);
assert(depth == 1);
diff --git a/src/mesa/drivers/dri/intel/intel_tex_copy.c b/src/mesa/drivers/dri/intel/intel_tex_copy.c
index f4366330f88..c744633c578 100644
--- a/src/mesa/drivers/dri/intel/intel_tex_copy.c
+++ b/src/mesa/drivers/dri/intel/intel_tex_copy.c
@@ -70,6 +70,11 @@ intel_copy_texsubimage(struct intel_context *intel,
assert(region);
}
+ if (intelImage->base.Base.TexObject->Target == GL_TEXTURE_1D_ARRAY ||
+ intelImage->base.Base.TexObject->Target == GL_TEXTURE_2D_ARRAY) {
+ perf_debug("no support for array textures\n");
+ }
+
copy_supported = intelImage->base.Base.TexFormat == intel_rb_format(irb);
/* Converting ARGB8888 to XRGB8888 is trivial: ignore the alpha bits */
diff --git a/src/mesa/drivers/dri/intel/intel_tex_image.c b/src/mesa/drivers/dri/intel/intel_tex_image.c
index 8e623f05b5a..55b721fb046 100644
--- a/src/mesa/drivers/dri/intel/intel_tex_image.c
+++ b/src/mesa/drivers/dri/intel/intel_tex_image.c
@@ -167,6 +167,12 @@ try_pbo_upload(struct gl_context *ctx,
return false;
}
+ if (image->TexObject->Target == GL_TEXTURE_1D_ARRAY ||
+ image->TexObject->Target == GL_TEXTURE_2D_ARRAY) {
+ DBG("%s: no support for array textures\n", __FUNCTION__);
+ return false;
+ }
+
dst_buffer = intelImage->mt->region->bo;
src_buffer = intel_bufferobj_source(intel, pbo, 64, &src_offset);
/* note: potential 64-bit ptr to 32-bit int cast */