[Mesa-dev] [PATCH] intel: Set depth to 6 for cubemaps

Ian Romanick idr at freedesktop.org
Tue Jan 17 14:10:29 PST 2012


From: Ian Romanick <ian.d.romanick at intel.com>

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=41216
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=43212
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=43250
Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
Cc: Jin Yang <jin.a.yang at intel.com>
---
 src/mesa/drivers/dri/i915/i915_tex_layout.c |    4 ++--
 src/mesa/drivers/dri/i965/brw_tex_layout.c  |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/mesa/drivers/dri/i915/i915_tex_layout.c b/src/mesa/drivers/dri/i915/i915_tex_layout.c
index caa7127..1e3cfad 100644
--- a/src/mesa/drivers/dri/i915/i915_tex_layout.c
+++ b/src/mesa/drivers/dri/i915/i915_tex_layout.c
@@ -129,7 +129,7 @@ i915_miptree_layout_cube(struct intel_mipmap_tree * mt)
       intel_miptree_set_level_info(mt, level,
 				   0, 0,
 				   lvlWidth, lvlHeight,
-				   1);
+				   6);
       lvlWidth /= 2;
       lvlHeight /= 2;
    }
@@ -337,7 +337,7 @@ i945_miptree_layout_cube(struct intel_mipmap_tree * mt)
    for (level = mt->first_level; level <= mt->last_level; level++) {
       intel_miptree_set_level_info(mt, level,
 				   0, 0,
-				   lvlWidth, lvlHeight, 1);
+				   lvlWidth, lvlHeight, 6);
       lvlWidth /= 2;
       lvlHeight /= 2;
    }
diff --git a/src/mesa/drivers/dri/i965/brw_tex_layout.c b/src/mesa/drivers/dri/i965/brw_tex_layout.c
index 4c7e88c..ade40e4 100644
--- a/src/mesa/drivers/dri/i965/brw_tex_layout.c
+++ b/src/mesa/drivers/dri/i965/brw_tex_layout.c
@@ -108,7 +108,7 @@ brw_miptree_layout(struct intel_context *intel, struct intel_mipmap_tree *mt)
 
 	 intel_miptree_set_level_info(mt, level,
 				      0, mt->total_height,
-				      width, height, depth);
+				      width, height, nr_images);
 
 	 for (q = 0; q < nr_images;) {
 	    for (j = 0; j < pack_x_nr && q < nr_images; j++, q++) {
-- 
1.7.6.4



More information about the mesa-dev mailing list