Mesa (gallium-0.2): cell: fix assertions

Brian Paul brianp at kemper.freedesktop.org
Tue Oct 14 18:55:50 UTC 2008


Module: Mesa
Branch: gallium-0.2
Commit: 58ea98dc68605130dda2538027f941df39ccd514
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=58ea98dc68605130dda2538027f941df39ccd514

Author: Brian Paul <brian.paul at tungstengraphics.com>
Date:   Tue Oct 14 12:41:46 2008 -0600

cell: fix assertions

---

 src/gallium/drivers/cell/ppu/cell_texture.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/gallium/drivers/cell/ppu/cell_texture.c b/src/gallium/drivers/cell/ppu/cell_texture.c
index 608bda3..87f1598 100644
--- a/src/gallium/drivers/cell/ppu/cell_texture.c
+++ b/src/gallium/drivers/cell/ppu/cell_texture.c
@@ -155,7 +155,7 @@ cell_texture_release(struct pipe_screen *screen,
  * Convert image from linear layout to tiled layout.  4-byte pixels.
  */
 static void
-swizzle_image_uint(uint w, uint h, uint tile_size, uint *dst,
+twiddle_image_uint(uint w, uint h, uint tile_size, uint *dst,
                    uint src_stride, const uint *src)
 {
    const uint tile_size2 = tile_size * tile_size;
@@ -179,8 +179,8 @@ swizzle_image_uint(uint w, uint h, uint tile_size, uint *dst,
             for (j = 0; j < tile_width; j++) {
                const uint srci = it * tile_size + i;
                const uint srcj = jt * tile_size + j;
-               ASSERT(srci < w);
-               ASSERT(srcj < h);
+               ASSERT(srci < h);
+               ASSERT(srcj < w);
                tdst[i * tile_size + j] = src[srci * src_stride + srcj];
             }
          }
@@ -214,12 +214,12 @@ cell_twiddle_texture(struct pipe_screen *screen,
       }
       /* alloc new tiled data */
       texture->tiled_data[level] = align_malloc(bufWidth * bufHeight * 4, 16);
-      swizzle_image_uint(texWidth, texHeight, TILE_SIZE,
+      twiddle_image_uint(texWidth, texHeight, TILE_SIZE,
                          texture->tiled_data[level],
                          surface->stride, src);
       break;
    default:
-      printf("Unsupported texture format\n");
+      printf("Cell: twiddle unsupported texture format\n");
       ;
    }
 




More information about the mesa-commit mailing list