st/mesa: remove unnecessary st_texture_match_image() parameters
authorBrian Paul <brianp@vmware.com>
Thu, 22 Sep 2011 22:32:49 +0000 (16:32 -0600)
committerBrian Paul <brianp@vmware.com>
Thu, 22 Sep 2011 22:43:45 +0000 (16:43 -0600)
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
src/mesa/state_tracker/st_texture.c
src/mesa/state_tracker/st_texture.h

index 97c1fabd52e2dc63c8ec07fa6870ab32210f8687..e744a9f0d69325175b395e36ff4e313a234b6d06 100644 (file)
@@ -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);
index bf98e76c78301383f322010aac409f59842596b5..c182688298f3ac4c3fdaa39f83601c1653509631 100644 (file)
@@ -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;
 
index 50b7284e7604033bea3aba9df86e33760ec89771..dd3bc73100db4055f09248a87f11a38c7b7c1616 100644 (file)
@@ -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.