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

Author: Michel Dänzer <[email protected]>
Date:   Mon Oct 22 19:20:56 2012 +0200

st/mesa: Fix assertions for copying texture image to finalized miptree.

The layer dimension of array textures is not subject to mipmap minification.
OTOH we were missing an assertion for the depth dimension.

Fixes assertion failures with piglit {f,v}s-textureSize-sampler1DArrayShadow.
For some reason, they only resulted in piglit 'warn' results for me, not
failures.

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

NOTE: This is a candidate for the stable branches.

Signed-off-by: Michel Dänzer <[email protected]>
Reviewed-by: Brian Paul <[email protected]>
Tested-by: Andreas Boll <[email protected]>
(cherry picked from commit eee1ff423c6a0c9c776b4e76b79bb5ed5480d83c)

---

 src/mesa/state_tracker/st_cb_texture.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/src/mesa/state_tracker/st_cb_texture.c 
b/src/mesa/state_tracker/st_cb_texture.c
index af12856..63b8ee3 100644
--- a/src/mesa/state_tracker/st_cb_texture.c
+++ b/src/mesa/state_tracker/st_cb_texture.c
@@ -1191,7 +1191,10 @@ copy_image_data_to_texture(struct st_context *st,
 
       assert(src_level <= stImage->pt->last_level);
       assert(u_minify(stImage->pt->width0, src_level) == stImage->base.Width);
-      assert(u_minify(stImage->pt->height0, src_level) == 
stImage->base.Height);
+      assert(stImage->pt->target == PIPE_TEXTURE_1D_ARRAY ||
+             u_minify(stImage->pt->height0, src_level) == 
stImage->base.Height);
+      assert(stImage->pt->target == PIPE_TEXTURE_2D_ARRAY ||
+             u_minify(stImage->pt->depth0, src_level) == stImage->base.Depth);
 
       st_texture_image_copy(st->pipe,
                             stObj->pt, dstLevel,  /* dest texture, level */

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

Reply via email to