[Mesa-dev] [PATCH 1/3] i965: Use intel_get_image_dims in alloc_texture_storage
Jason Ekstrand
jason at jlekstrand.net
Tue Jul 19 05:16:51 UTC 2016
The intel_get_image_dims helper function handles some image dimension
sanitization for us for things such as 1-D array textures. We should
probably be using it here.
Signed-off-by: Jason Ekstrand <jason at jlekstrand.net>
Cc: "12.0 11.2 11.1" <mesa-stable at lists.freedesktop.org>
---
src/mesa/drivers/dri/i965/intel_tex.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/mesa/drivers/dri/i965/intel_tex.c b/src/mesa/drivers/dri/i965/intel_tex.c
index 8c32fe3..d3e24f4 100644
--- a/src/mesa/drivers/dri/i965/intel_tex.c
+++ b/src/mesa/drivers/dri/i965/intel_tex.c
@@ -141,6 +141,8 @@ intel_alloc_texture_storage(struct gl_context *ctx,
!intel_miptree_match_image(intel_texobj->mt, first_image) ||
intel_texobj->mt->last_level != levels - 1) {
intel_miptree_release(&intel_texobj->mt);
+
+ intel_get_image_dims(first_image, &width, &height, &depth);
intel_texobj->mt = intel_miptree_create(brw, texobj->Target,
first_image->TexFormat,
0, levels - 1,
--
2.5.0.400.gff86faf
More information about the mesa-dev
mailing list