[Mesa-dev] [PATCH 5/9] i965: Add some checks for array textures in unsupported paths.
Eric Anholt
eric at anholt.net
Mon Nov 5 16:48:11 PST 2012
I noticed these in the next patch where these paths were using the Face of a
teximage but didn't have array handling.
---
src/mesa/drivers/dri/intel/intel_blit.c | 3 +++
src/mesa/drivers/dri/intel/intel_tex_copy.c | 5 +++++
src/mesa/drivers/dri/intel/intel_tex_image.c | 6 ++++++
3 files changed, 14 insertions(+)
diff --git a/src/mesa/drivers/dri/intel/intel_blit.c b/src/mesa/drivers/dri/intel/intel_blit.c
index 36a2c6a..5658bd7 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 f436633..c744633 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 7b9638f..f3588f6 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 */
--
1.7.10.4
More information about the mesa-dev
mailing list