[Mesa-dev] [PATCH 3/3] radeon / r200: Don't pass unused parameters to radeon_viewport

Alex Deucher alexdeucher at gmail.com
Mon Nov 4 10:04:50 PST 2013


On Fri, Nov 1, 2013 at 3:44 PM, Ian Romanick <idr at freedesktop.org> wrote:
> From: Ian Romanick <ian.d.romanick at intel.com>
>
> The x, y, width, and height parameters aren't used by radeon_viewport,
> so don't pass them.  This should make future changes to the
> dd_function_table::Viewport interface a little easier.
>
> Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
> Cc: Courtney Goeltzenleuchter <courtney at lunarg.com>
> Cc: Jordan Justen <jljusten at gmail.com>

Seems fine to me.

Acked-by: Alex Deucher <alexander.deucher at amd.com>

> ---
>  src/mesa/drivers/dri/r200/r200_state.c      | 7 ++++++-
>  src/mesa/drivers/dri/radeon/radeon_common.c | 2 +-
>  src/mesa/drivers/dri/radeon/radeon_common.h | 2 +-
>  src/mesa/drivers/dri/radeon/radeon_state.c  | 7 ++++++-
>  4 files changed, 14 insertions(+), 4 deletions(-)
>
> diff --git a/src/mesa/drivers/dri/r200/r200_state.c b/src/mesa/drivers/dri/r200/r200_state.c
> index d3e8114..ee7b945 100644
> --- a/src/mesa/drivers/dri/r200/r200_state.c
> +++ b/src/mesa/drivers/dri/r200/r200_state.c
> @@ -1603,13 +1603,18 @@ void r200_vtbl_update_scissor( struct gl_context *ctx )
>  static void r200Viewport( struct gl_context *ctx, GLint x, GLint y,
>                             GLsizei width, GLsizei height )
>  {
> +   (void) x;
> +   (void) y;
> +   (void) width;
> +   (void) height;
> +
>     /* Don't pipeline viewport changes, conflict with window offset
>      * setting below.  Could apply deltas to rescue pipelined viewport
>      * values, or keep the originals hanging around.
>      */
>     r200UpdateWindow( ctx );
>
> -   radeon_viewport(ctx, x, y, width, height);
> +   radeon_viewport(ctx);
>  }
>
>  static void r200DepthRange( struct gl_context *ctx, GLclampd nearval,
> diff --git a/src/mesa/drivers/dri/radeon/radeon_common.c b/src/mesa/drivers/dri/radeon/radeon_common.c
> index 0f0945d..7be0ba7 100644
> --- a/src/mesa/drivers/dri/radeon/radeon_common.c
> +++ b/src/mesa/drivers/dri/radeon/radeon_common.c
> @@ -407,7 +407,7 @@ void radeon_window_moved(radeonContextPtr radeon)
>         radeonSetCliprects(radeon);
>  }
>
> -void radeon_viewport(struct gl_context *ctx, GLint x, GLint y, GLsizei width, GLsizei height)
> +void radeon_viewport(struct gl_context *ctx)
>  {
>         radeonContextPtr radeon = RADEON_CONTEXT(ctx);
>         __DRIcontext *driContext = radeon->dri.context;
> diff --git a/src/mesa/drivers/dri/radeon/radeon_common.h b/src/mesa/drivers/dri/radeon/radeon_common.h
> index 636822f..69a1727 100644
> --- a/src/mesa/drivers/dri/radeon/radeon_common.h
> +++ b/src/mesa/drivers/dri/radeon/radeon_common.h
> @@ -23,7 +23,7 @@ void radeon_window_moved(radeonContextPtr radeon);
>  void radeon_draw_buffer(struct gl_context *ctx, struct gl_framebuffer *fb);
>  void radeonDrawBuffer( struct gl_context *ctx, GLenum mode );
>  void radeonReadBuffer( struct gl_context *ctx, GLenum mode );
> -void radeon_viewport(struct gl_context *ctx, GLint x, GLint y, GLsizei width, GLsizei height);
> +void radeon_viewport(struct gl_context *ctx);
>  void radeon_fbo_init(struct radeon_context *radeon);
>  void
>  radeon_renderbuffer_set_bo(struct radeon_renderbuffer *rb,
> diff --git a/src/mesa/drivers/dri/radeon/radeon_state.c b/src/mesa/drivers/dri/radeon/radeon_state.c
> index 70542f6..625271d 100644
> --- a/src/mesa/drivers/dri/radeon/radeon_state.c
> +++ b/src/mesa/drivers/dri/radeon/radeon_state.c
> @@ -1386,13 +1386,18 @@ void radeonUpdateWindow( struct gl_context *ctx )
>  static void radeonViewport( struct gl_context *ctx, GLint x, GLint y,
>                             GLsizei width, GLsizei height )
>  {
> +   (void) x;
> +   (void) y;
> +   (void) width;
> +   (void) height;
> +
>     /* Don't pipeline viewport changes, conflict with window offset
>      * setting below.  Could apply deltas to rescue pipelined viewport
>      * values, or keep the originals hanging around.
>      */
>     radeonUpdateWindow( ctx );
>
> -   radeon_viewport(ctx, x, y, width, height);
> +   radeon_viewport(ctx);
>  }
>
>  static void radeonDepthRange( struct gl_context *ctx, GLclampd nearval,
> --
> 1.8.1.4
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list