Module: Mesa
Branch: 12.0
Commit: 49e84b8f18631b9460ade078f86d7567b80c332d
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=49e84b8f18631b9460ade078f86d7567b80c332d

Author: Emil Velikov <[email protected]>
Date:   Sat Sep  3 18:52:06 2016 +0100

Revert "i965/miptree: Set logical_depth0 == 6 for cube maps"

This reverts commit 48e9ecc47f078cba3f56694e4583003681717410.

The commit regressed several piglit tests on SNB/ILK hardware.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97567

---

 src/mesa/drivers/dri/i965/intel_mipmap_tree.c | 15 ++++-----------
 1 file changed, 4 insertions(+), 11 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c 
b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
index a82f7bb..c234f24 100644
--- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
+++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
@@ -501,8 +501,10 @@ intel_miptree_create_layout(struct brw_context *brw,
       }
    }
 
-   if (target == GL_TEXTURE_CUBE_MAP)
-      assert(depth0 == 6);
+   if (target == GL_TEXTURE_CUBE_MAP) {
+      assert(depth0 == 1);
+      depth0 = 6;
+   }
 
    mt->physical_width0 = width0;
    mt->physical_height0 = height0;
@@ -1036,15 +1038,6 @@ intel_get_image_dims(struct gl_texture_image *image,
       *height = 1;
       *depth = image->Height;
       break;
-   case GL_TEXTURE_CUBE_MAP:
-      /* For Cube maps, the mesa/main api layer gives us a depth of 1 even
-       * though we really have 6 slices.
-       */
-      assert(image->Depth == 1);
-      *width = image->Width;
-      *height = image->Height;
-      *depth = 6;
-      break;
    default:
       *width = image->Width;
       *height = image->Height;

_______________________________________________
mesa-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to