Mesa (master): intel: Improve some of the miptree debugging.

Eric Anholt anholt at kemper.freedesktop.org
Sat Sep 25 01:52:23 UTC 2010


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

Author: Eric Anholt <eric at anholt.net>
Date:   Fri Sep 24 18:25:42 2010 -0700

intel: Improve some of the miptree debugging.

---

 src/mesa/drivers/dri/intel/intel_mipmap_tree.c |   13 +++++++++++--
 1 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/src/mesa/drivers/dri/intel/intel_mipmap_tree.c b/src/mesa/drivers/dri/intel/intel_mipmap_tree.c
index d316d34..9c4e5c5 100644
--- a/src/mesa/drivers/dri/intel/intel_mipmap_tree.c
+++ b/src/mesa/drivers/dri/intel/intel_mipmap_tree.c
@@ -333,7 +333,6 @@ intel_miptree_image_map(struct intel_context * intel,
                         GLuint * row_stride, GLuint * image_offsets)
 {
    GLuint x, y;
-   DBG("%s \n", __FUNCTION__);
 
    if (row_stride)
       *row_stride = mt->region->pitch * mt->cpp;
@@ -348,6 +347,8 @@ intel_miptree_image_map(struct intel_context * intel,
 	 image_offsets[i] = x + y * mt->region->pitch;
       }
 
+      DBG("%s \n", __FUNCTION__);
+
       return intel_region_map(intel, mt->region);
    } else {
       assert(mt->level[level].depth == 1);
@@ -355,6 +356,9 @@ intel_miptree_image_map(struct intel_context * intel,
 				     &x, &y);
       image_offsets[0] = 0;
 
+      DBG("%s: (%d,%d) -> (%d, %d)/%d\n",
+	  __FUNCTION__, face, level, x, y, mt->region->pitch * mt->cpp);
+
       return intel_region_map(intel, mt->region) +
 	 (x + y * mt->region->pitch) * mt->cpp;
    }
@@ -385,7 +389,6 @@ intel_miptree_image_data(struct intel_context *intel,
    const GLuint depth = dst->level[level].depth;
    GLuint i;
 
-   DBG("%s: %d/%d\n", __FUNCTION__, face, level);
    for (i = 0; i < depth; i++) {
       GLuint dst_x, dst_y, height;
 
@@ -395,6 +398,12 @@ intel_miptree_image_data(struct intel_context *intel,
       if(dst->compressed)
 	 height = (height + 3) / 4;
 
+      DBG("%s: %d/%d %p/%d -> (%d, %d)/%d (%d, %d)\n",
+	  __FUNCTION__, face, level,
+	  src, src_row_pitch * dst->cpp,
+	  dst_x, dst_y, dst->region->pitch * dst->cpp,
+	  dst->level[level].width, height);
+
       intel_region_data(intel,
 			dst->region, 0, dst_x, dst_y,
 			src,




More information about the mesa-commit mailing list