Mesa (8.0): mesa: remove assertions that do not allow compressed 2D_ARRAY textures

Ian Romanick idr at kemper.freedesktop.org
Tue Jul 31 19:29:22 UTC 2012


Module: Mesa
Branch: 8.0
Commit: b4fbb0b180ee1ef33bc8d06cf93918c449279010
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=b4fbb0b180ee1ef33bc8d06cf93918c449279010

Author: Marek Olšák <maraeo at gmail.com>
Date:   Sun Jul  8 19:24:37 2012 +0200

mesa: remove assertions that do not allow compressed 2D_ARRAY textures

NOTE: This is a candidate for the 8.0 branch.

Reviewed-by: Alex Deucher <alexander.deucher at amd.com>
(cherry picked from commit 13b0af721a6ff9e98d47a2c0a740fe843c034016)

---

 src/mesa/main/formats.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/mesa/main/formats.c b/src/mesa/main/formats.c
index d11b167..d566249 100644
--- a/src/mesa/main/formats.c
+++ b/src/mesa/main/formats.c
@@ -1860,8 +1860,7 @@ _mesa_format_image_size(gl_format format, GLsizei width,
       const GLuint wblocks = (width + bw - 1) / bw;
       const GLuint hblocks = (height + bh - 1) / bh;
       const GLuint sz = wblocks * hblocks * info->BytesPerBlock;
-      assert(depth == 1);
-      return sz;
+      return sz * depth;
    }
    else {
       /* non-compressed */
@@ -1887,8 +1886,7 @@ _mesa_format_image_size64(gl_format format, GLsizei width,
       const uint64_t wblocks = (width + bw - 1) / bw;
       const uint64_t hblocks = (height + bh - 1) / bh;
       const uint64_t sz = wblocks * hblocks * info->BytesPerBlock;
-      assert(depth == 1);
-      return sz;
+      return sz * depth;
    }
    else {
       /* non-compressed */




More information about the mesa-commit mailing list