Mesa (master): st/mesa: remove unnecessary st_texture_match_image() parameters

Brian Paul brianp at kemper.freedesktop.org
Thu Sep 22 22:44:53 UTC 2011


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

Author: Brian Paul <brianp at vmware.com>
Date:   Thu Sep 22 16:32:49 2011 -0600

st/mesa: remove unnecessary st_texture_match_image() parameters

We didn't use the face parameter and the level parameter can be found
in the gl_texture_image.

---

 src/mesa/state_tracker/st_cb_texture.c |    6 ++----
 src/mesa/state_tracker/st_texture.c    |    9 ++++-----
 src/mesa/state_tracker/st_texture.h    |    3 +--
 3 files changed, 7 insertions(+), 11 deletions(-)

diff --git a/src/mesa/state_tracker/st_cb_texture.c b/src/mesa/state_tracker/st_cb_texture.c
index 97c1fab..e744a9f 100644
--- a/src/mesa/state_tracker/st_cb_texture.c
+++ b/src/mesa/state_tracker/st_cb_texture.c
@@ -577,8 +577,7 @@ st_TexImage(struct gl_context * ctx,
     */
    if (stObj->pt) {
       if (level > (GLint) stObj->pt->last_level ||
-          !st_texture_match_image(stObj->pt, &stImage->base,
-                                  stImage->base.Face, stImage->base.Level)) {
+          !st_texture_match_image(stObj->pt, &stImage->base)) {
          DBG("release it\n");
          pipe_resource_reference(&stObj->pt, NULL);
          assert(!stObj->pt);
@@ -611,8 +610,7 @@ st_TexImage(struct gl_context * ctx,
     * in its own buffer.
     */
    if (stObj->pt &&
-       st_texture_match_image(stObj->pt, &stImage->base,
-                              stImage->base.Face, stImage->base.Level)) {
+       st_texture_match_image(stObj->pt, &stImage->base)) {
 
       pipe_resource_reference(&stImage->pt, stObj->pt);
       assert(stImage->pt);
diff --git a/src/mesa/state_tracker/st_texture.c b/src/mesa/state_tracker/st_texture.c
index bf98e76..c182688 100644
--- a/src/mesa/state_tracker/st_texture.c
+++ b/src/mesa/state_tracker/st_texture.c
@@ -170,8 +170,7 @@ st_gl_texture_dims_to_pipe_dims(GLenum texture,
  */
 GLboolean
 st_texture_match_image(const struct pipe_resource *pt,
-                       const struct gl_texture_image *image,
-                       GLuint face, GLuint level)
+                       const struct gl_texture_image *image)
 {
    GLuint ptWidth, ptHeight, ptDepth, ptLayers;
 
@@ -192,9 +191,9 @@ st_texture_match_image(const struct pipe_resource *pt,
    /* Test if this image's size matches what's expected in the
     * established texture.
     */
-   if (ptWidth != u_minify(pt->width0, level) ||
-       ptHeight != u_minify(pt->height0, level) ||
-       ptDepth != u_minify(pt->depth0, level) ||
+   if (ptWidth != u_minify(pt->width0, image->Level) ||
+       ptHeight != u_minify(pt->height0, image->Level) ||
+       ptDepth != u_minify(pt->depth0, image->Level) ||
        ptLayers != pt->array_size)
       return GL_FALSE;
 
diff --git a/src/mesa/state_tracker/st_texture.h b/src/mesa/state_tracker/st_texture.h
index 50b7284..dd3bc73 100644
--- a/src/mesa/state_tracker/st_texture.h
+++ b/src/mesa/state_tracker/st_texture.h
@@ -184,8 +184,7 @@ st_gl_texture_dims_to_pipe_dims(GLenum texture,
  */
 extern GLboolean
 st_texture_match_image(const struct pipe_resource *pt,
-                       const struct gl_texture_image *image,
-                       GLuint face, GLuint level);
+                       const struct gl_texture_image *image);
 
 /* Return a pointer to an image within a texture.  Return image stride as
  * well.




More information about the mesa-commit mailing list