Mesa (master): st/mesa: remove old convolution-related vars and min pitch code

Brian Paul brianp at kemper.freedesktop.org
Mon May 3 23:14:26 UTC 2010


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

Author: Brian Paul <brianp at vmware.com>
Date:   Mon May  3 15:35:21 2010 -0600

st/mesa: remove old convolution-related vars and min pitch code

---

 src/mesa/state_tracker/st_cb_texture.c |   17 ++---------------
 1 files changed, 2 insertions(+), 15 deletions(-)

diff --git a/src/mesa/state_tracker/st_cb_texture.c b/src/mesa/state_tracker/st_cb_texture.c
index 777d86b..60e1d42 100644
--- a/src/mesa/state_tracker/st_cb_texture.c
+++ b/src/mesa/state_tracker/st_cb_texture.c
@@ -526,7 +526,6 @@ st_TexImage(GLcontext * ctx,
    struct pipe_screen *screen = st->pipe->screen;
    struct st_texture_object *stObj = st_texture_object(texObj);
    struct st_texture_image *stImage = st_texture_image(texImage);
-   GLint postConvWidth, postConvHeight;
    GLint texelBytes, sizeInBytes;
    GLuint dstRowStride = 0;
    struct gl_pixelstore_attrib unpackNB;
@@ -558,9 +557,6 @@ st_TexImage(GLcontext * ctx,
       border = 0;
    }
 
-   postConvWidth = width;
-   postConvHeight = height;
-
    stImage->face = _mesa_tex_target_to_face(target);
    stImage->level = level;
 
@@ -572,15 +568,6 @@ st_TexImage(GLcontext * ctx,
    }
    else {
       texelBytes = _mesa_get_format_bytes(texImage->TexFormat);
-      
-      /* Minimum pitch of 32 bytes */
-      if (postConvWidth * texelBytes < 32) {
-	 postConvWidth = 32 / texelBytes;
-	 texImage->RowStride = postConvWidth;
-      }
-      
-      /* we'll set RowStride elsewhere when the texture is a "mapped" state */
-      /*assert(texImage->RowStride == postConvWidth);*/
    }
 
    /* Release the reference to a potentially orphaned buffer.   
@@ -704,8 +691,8 @@ st_TexImage(GLcontext * ctx,
          assert(dims != 3);
       }
       else {
-         dstRowStride = postConvWidth * texelBytes;
-         sizeInBytes = depth * dstRowStride * postConvHeight;
+         dstRowStride = width * texelBytes;
+         sizeInBytes = depth * dstRowStride * height;
       }
 
       texImage->Data = _mesa_align_malloc(sizeInBytes, 16);




More information about the mesa-commit mailing list