mesa: Branch 'master'

Michel Daenzer daenzer at kemper.freedesktop.org
Wed Mar 7 16:53:23 UTC 2007


 src/mesa/drivers/dri/i915tex/i915_tex_layout.c |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)

New commits:
diff-tree 9adf6e9d6c0fe420f648bf3f57c22df72dea485f (from 2282d815360c2087dd080c794084bea65e6da358)
Author: Michel Dänzer <michel at tungstengraphics.com>
Date:   Wed Mar 7 17:52:44 2007 +0100

    i945_miptree_layout: Adapt cubemap fixes from i915_miptree_layout.
    
    Cubemaps aren't working fully correctly yet, but at least they don't seem to
    cause crashes anymore.

diff --git a/src/mesa/drivers/dri/i915tex/i915_tex_layout.c b/src/mesa/drivers/dri/i915tex/i915_tex_layout.c
index c844f53..2e1600c 100644
--- a/src/mesa/drivers/dri/i915tex/i915_tex_layout.c
+++ b/src/mesa/drivers/dri/i915tex/i915_tex_layout.c
@@ -190,6 +190,9 @@ i945_miptree_layout(struct intel_mipmap_
    case GL_TEXTURE_CUBE_MAP:{
          const GLuint dim = mt->width0;
          GLuint face;
+         GLuint lvlWidth = mt->width0, lvlHeight = mt->height0;
+
+         assert(lvlWidth == lvlHeight); /* cubemap images are square */
 
          /* Depending on the size of the largest images, pitch can be
           * determined either by the old-style packing of cubemap faces,
@@ -204,11 +207,13 @@ i945_miptree_layout(struct intel_mipmap_
 
          /* Set all the levels to effectively occupy the whole rectangular region. 
           */
-         for (level = mt->first_level; level <= mt->last_level; level++)
+         for (level = mt->first_level; level <= mt->last_level; level++) {
             intel_miptree_set_level_info(mt, level, 6,
                                          0, 0,
-                                         mt->pitch, mt->total_height, 1);
-
+                                         lvlWidth, lvlHeight, 1);
+	    lvlWidth /= 2;
+	    lvlHeight /= 2;
+	 }
 
 
          for (face = 0; face < 6; face++) {



More information about the mesa-commit mailing list