Mesa (master): intel: Silence several "warning: unused parameter"

Ian Romanick idr at kemper.freedesktop.org
Fri Sep 9 19:20:29 UTC 2011


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

Author: Ian Romanick <ian.d.romanick at intel.com>
Date:   Fri Aug 26 10:22:49 2011 -0700

intel: Silence several "warning: unused parameter"

The internalFormat, format, and type parameters were not used by
either try_pbo_upload or try_pbo_zcopy, so remove them.  The width
parameter was also not used by try_pbo_zcopy (because it doesn't
actually copy anything), so remove it too.

Eric Anholt notes:

    The current structure of this code is so hateful I can't bring
    myself to say anything about whether changing the current code is
    good or bad.

    I have a dream that one call would try to make a surface
    (miptree/region) out of the PBO, then we'd see about whether it
    matches up nicely and zero-copy/blit using that.  That would be
    reusable for texsubimage, which is currently awful in this
    respect.

At some point we should revisit this code with pitchforks and torches.

---

 src/mesa/drivers/dri/intel/intel_tex_image.c |   17 ++++-------------
 1 files changed, 4 insertions(+), 13 deletions(-)

diff --git a/src/mesa/drivers/dri/intel/intel_tex_image.c b/src/mesa/drivers/dri/intel/intel_tex_image.c
index 2bbd952..2ef5d55 100644
--- a/src/mesa/drivers/dri/intel/intel_tex_image.c
+++ b/src/mesa/drivers/dri/intel/intel_tex_image.c
@@ -160,9 +160,7 @@ static GLboolean
 try_pbo_upload(struct intel_context *intel,
                struct intel_texture_image *intelImage,
                const struct gl_pixelstore_attrib *unpack,
-               GLint internalFormat,
-               GLint width, GLint height,
-               GLenum format, GLenum type, const void *pixels)
+               GLint width, GLint height, const void *pixels)
 {
    struct intel_buffer_object *pbo = intel_buffer_object(unpack->BufferObj);
    GLuint src_offset, src_stride;
@@ -220,9 +218,7 @@ static GLboolean
 try_pbo_zcopy(struct intel_context *intel,
               struct intel_texture_image *intelImage,
               const struct gl_pixelstore_attrib *unpack,
-              GLint internalFormat,
-              GLint width, GLint height,
-              GLenum format, GLenum type, const void *pixels)
+              GLint width, const void *pixels)
 {
    struct intel_buffer_object *pbo = intel_buffer_object(unpack->BufferObj);
    GLuint src_offset, src_stride;
@@ -466,10 +462,7 @@ intelTexImage(struct gl_context * ctx,
           intelObj->mt->first_level == level &&
           intelObj->mt->last_level == level) {
 
-         if (try_pbo_zcopy(intel, intelImage, unpack,
-                           internalFormat,
-                           width, height, format, type, pixels)) {
-
+         if (try_pbo_zcopy(intel, intelImage, unpack, width, pixels)) {
             DBG("pbo zcopy upload succeeded\n");
             return;
          }
@@ -478,9 +471,7 @@ intelTexImage(struct gl_context * ctx,
 
       /* Otherwise, attempt to use the blitter for PBO image uploads.
        */
-      if (try_pbo_upload(intel, intelImage, unpack,
-                         internalFormat,
-                         width, height, format, type, pixels)) {
+      if (try_pbo_upload(intel, intelImage, unpack, width, height, pixels)) {
          DBG("pbo upload succeeded\n");
          return;
       }




More information about the mesa-commit mailing list