mesa: remove calls to _mesa_compressed_row_stride()
authorBrian Paul <brianp@vmware.com>
Sun, 25 Oct 2009 23:23:37 +0000 (17:23 -0600)
committerBrian Paul <brianp@vmware.com>
Sun, 25 Oct 2009 23:23:37 +0000 (17:23 -0600)
src/mesa/drivers/dri/intel/intel_tex_image.c
src/mesa/drivers/dri/intel/intel_tex_subimage.c
src/mesa/drivers/dri/radeon/radeon_texture.c
src/mesa/drivers/dri/tdfx/tdfx_tex.c
src/mesa/drivers/dri/unichrome/via_tex.c

index cbe29f61a2bac5dc91680a0642981d62be1fb1f1..daf6d9da0e1a89abbad0133ba21334aaae0c8c58 100644 (file)
@@ -493,7 +493,7 @@ intelTexImage(GLcontext * ctx,
                                                texImage->Height,
                                                texImage->Depth);
          dstRowStride =
-            _mesa_compressed_row_stride(texImage->TexFormat, width);
+            _mesa_format_row_stride(texImage->TexFormat, width);
          assert(dims != 3);
       }
       else {
index cc329dae58b8ede44b37e6ed08bb6b9bd3f5df3c..1f68208266012a540e21a21f5dbf119b596af771 100644 (file)
@@ -87,7 +87,7 @@ intelTexSubimage(GLcontext * ctx,
    else {
       if (_mesa_is_format_compressed(texImage->TexFormat)) {
          dstRowStride =
-            _mesa_compressed_row_stride(texImage->TexFormat, width);
+            _mesa_format_row_stride(texImage->TexFormat, width);
          assert(dims != 3);
       }
       else {
index 1a48e8c95544647eceaade2a6707005974f3f8c0..d8e81237d07546cb94898d7592747c72b681b613 100644 (file)
@@ -605,7 +605,7 @@ static void radeon_teximage(
                if (compressed) {
                        if (image->mt) {
                                uint32_t srcRowStride, bytesPerRow, rows;
-                               srcRowStride = _mesa_compressed_row_stride(texImage->TexFormat, width);
+                               srcRowStride = _mesa_format_row_stride(texImage->TexFormat, width);
                                bytesPerRow = srcRowStride;
                                rows = (height + 3) / 4;
                                copy_rows(texImage->Data, image->mt->levels[level].rowstride,
@@ -755,7 +755,7 @@ static void radeon_texsubimage(GLcontext* ctx, int dims, GLenum target, int leve
                        uint32_t srcRowStride, bytesPerRow, rows;
                        GLubyte *img_start;
                        if (!image->mt) {
-                               dstRowStride = _mesa_compressed_row_stride(texImage->TexFormat, texImage->Width);
+                               dstRowStride = _mesa_format_row_stride(texImage->TexFormat, texImage->Width);
                                img_start = _mesa_compressed_image_address(xoffset, yoffset, 0,
                                                                           texImage->TexFormat,
                                                                           texImage->Width, texImage->Data);
@@ -764,7 +764,7 @@ static void radeon_texsubimage(GLcontext* ctx, int dims, GLenum target, int leve
                                uint32_t blocks_x = dstRowStride / (image->mt->bpp * 4);
                                img_start = texImage->Data + image->mt->bpp * 4 * (blocks_x * (yoffset / 4) + xoffset / 4);
                        }
-                       srcRowStride = _mesa_compressed_row_stride(texImage->TexFormat, width);
+                       srcRowStride = _mesa_format_row_stride(texImage->TexFormat, width);
                        bytesPerRow = srcRowStride;
                        rows = (height + 3) / 4;
 
@@ -887,7 +887,7 @@ static void migrate_image_to_miptree(radeon_mipmap_tree *mt, radeon_texture_imag
                /* need to confirm this value is correct */
                if (mt->compressed) {
                        height = (image->base.Height + 3) / 4;
-                       srcrowstride = _mesa_compressed_row_stride(image->base.TexFormat, image->base.Width);
+                       srcrowstride = _mesa_format_row_stride(image->base.TexFormat, image->base.Width);
                } else {
                        height = image->base.Height * image->base.Depth;
                        srcrowstride = image->base.Width * _mesa_get_format_bytes(image->base.TexFormat);
index 63783d6ecd8167d952a9efb0bec3119ca9584303..af434315c1605cdb7505a7ccc51ef61b92778008 100644 (file)
@@ -1410,7 +1410,7 @@ tdfxTexImage2D(GLcontext *ctx, GLenum target, GLint level,
     if (_mesa_is_format_compressed(texImage->TexFormat)) {
        GLuint compressedSize = _mesa_format_image_size(mesaFormat, mml->width,
                                                        mml->height, 1);
-       dstRowStride = _mesa_compressed_row_stride(texImage->TexFormat, mml->width);
+       dstRowStride = _mesa_format_row_stride(texImage->TexFormat, mml->width);
        texImage->Data = _mesa_alloc_texmemory(compressedSize);
     } else {
        dstRowStride = mml->width * texelBytes;
@@ -1488,7 +1488,7 @@ tdfxTexSubImage2D(GLcontext *ctx, GLenum target, GLint level,
 
     texelBytes = _mesa_get_format_bytes(texImage->TexFormat);
     if (_mesa_is_format_compressed(texImage->TexFormat)) {
-       dstRowStride = _mesa_compressed_row_stride(texImage->TexFormat, mml->width);
+       dstRowStride = _mesa_format_row_stride(texImage->TexFormat, mml->width);
     } else {
        dstRowStride = mml->width * texelBytes;
     }
@@ -1660,9 +1660,9 @@ tdfxCompressedTexImage2D (GLcontext *ctx, GLenum target,
         * For now, we take 2) + 3) but texelfetchers will be wrong!
         */
        const GLuint mesaFormat = texImage->TexFormat;
-       GLuint srcRowStride = _mesa_compressed_row_stride(mesaFormat, width);
+       GLuint srcRowStride = _mesa_format_row_stride(mesaFormat, width);
  
-       GLuint destRowStride = _mesa_compressed_row_stride(mesaFormat,
+       GLuint destRowStride = _mesa_format_row_stride(mesaFormat,
                                                    mml->width);
  
        _mesa_upscale_teximage2d(srcRowStride, (height+3) / 4,
@@ -1707,9 +1707,9 @@ tdfxCompressedTexSubImage2D( GLcontext *ctx, GLenum target,
     mml = TDFX_TEXIMAGE_DATA(texImage);
     assert(mml);
 
-    srcRowStride = _mesa_compressed_row_stride(mesaFormat, width);
+    srcRowStride = _mesa_format_row_stride(mesaFormat, width);
 
-    destRowStride = _mesa_compressed_row_stride(mesaFormat, mml->width);
+    destRowStride = _mesa_format_row_stride(mesaFormat, mml->width);
     dest = _mesa_compressed_image_address(xoffset, yoffset, 0,
                                           mesaFormat,
                                           mml->width,
@@ -1727,9 +1727,9 @@ tdfxCompressedTexSubImage2D( GLcontext *ctx, GLenum target,
      * see fxDDCompressedTexImage2D for caveats
      */
     if (mml->wScale != 1 || mml->hScale != 1) {
-       srcRowStride = _mesa_compressed_row_stride(mesaFormat, texImage->Width);
+       srcRowStride = _mesa_format_row_stride(mesaFormat, texImage->Width);
  
-       destRowStride = _mesa_compressed_row_stride(mesaFormat, mml->width);
+       destRowStride = _mesa_format_row_stride(mesaFormat, mml->width);
        _mesa_upscale_teximage2d(srcRowStride, texImage->Height / 4,
                                 destRowStride, mml->height / 4,
                                 1, texImage->Data, destRowStride,
index 1bc5ddc429ce9a51b1df21849b4545dd25254248..24924d261382f2652627fbe50be739c20dde71c8 100644 (file)
@@ -785,7 +785,7 @@ static void viaTexImage(GLcontext *ctx,
       GLboolean success;
 
       if (_mesa_is_format_compressed(texImage->TexFormat)) {
-         dstRowStride = _mesa_compressed_row_stride(texImage->TexFormat, width);
+         dstRowStride = _mesa_format_row_stride(texImage->TexFormat, width);
       }
       else {
          dstRowStride = postConvWidth * _mesa_get_format_bytes(texImage->TexFormat);