[Mesa-dev] [PATCH 17/18] mesa: Remove unused arguments from driver->Viewport
Courtney Goeltzenleuchter
courtney at lunarg.com
Wed Nov 20 14:59:33 PST 2013
Signed-off-by: Courtney Goeltzenleuchter <courtney at LunarG.com>
---
src/mesa/drivers/dri/i915/intel_context.c | 14 ++------------
src/mesa/drivers/dri/i965/brw_context.c | 7 +------
src/mesa/drivers/dri/r200/r200_state.c | 9 +--------
src/mesa/drivers/dri/radeon/radeon_common.c | 4 +---
src/mesa/drivers/dri/radeon/radeon_state.c | 8 +-------
src/mesa/drivers/dri/swrast/swrast.c | 9 +++------
src/mesa/main/dd.h | 4 +---
src/mesa/main/viewport.c | 4 +---
src/mesa/state_tracker/st_cb_viewport.c | 4 +---
9 files changed, 12 insertions(+), 51 deletions(-)
diff --git a/src/mesa/drivers/dri/i915/intel_context.c b/src/mesa/drivers/dri/i915/intel_context.c
index 24837cd..2291b0e 100644
--- a/src/mesa/drivers/dri/i915/intel_context.c
+++ b/src/mesa/drivers/dri/i915/intel_context.c
@@ -271,16 +271,12 @@ intel_prepare_render(struct intel_context *intel)
}
static void
-intel_viewport(struct gl_context *ctx, GLuint idx, GLfloat x, GLfloat y, GLfloat w, GLfloat h)
+intel_viewport(struct gl_context *ctx, GLuint idx)
{
struct intel_context *intel = intel_context(ctx);
__DRIcontext *driContext = intel->driContext;
(void) idx;
- (void) x;
- (void) y;
- (void) w;
- (void) h;
intelCalcViewport(ctx);
@@ -291,14 +287,8 @@ intel_viewport(struct gl_context *ctx, GLuint idx, GLfloat x, GLfloat y, GLfloat
}
static void
-intel_noninvalidate_viewport(struct gl_context *ctx, GLuint idx, GLfloat x, GLfloat y, GLfloat w, GLfloat h)
+intel_noninvalidate_viewport(struct gl_context *ctx, GLuint idx)
{
- (void) idx;
- (void) x;
- (void) y;
- (void) w;
- (void) h;
-
intelCalcViewport(ctx);
}
diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c
index bf01caa..2c03a6c 100644
--- a/src/mesa/drivers/dri/i965/brw_context.c
+++ b/src/mesa/drivers/dri/i965/brw_context.c
@@ -134,16 +134,11 @@ intelGetString(struct gl_context * ctx, GLenum name)
}
static void
-intel_viewport(struct gl_context *ctx, GLuint idx, GLfloat x, GLfloat y, GLfloat w, GLfloat h)
+intel_viewport(struct gl_context *ctx, GLuint idx)
{
struct brw_context *brw = brw_context(ctx);
__DRIcontext *driContext = brw->driContext;
- (void) x;
- (void) y;
- (void) w;
- (void) h;
-
if (_mesa_is_winsys_fbo(ctx->DrawBuffer)) {
dri2InvalidateDrawable(driContext->driDrawablePriv);
dri2InvalidateDrawable(driContext->driReadablePriv);
diff --git a/src/mesa/drivers/dri/r200/r200_state.c b/src/mesa/drivers/dri/r200/r200_state.c
index a62928e..a9c9f9f 100644
--- a/src/mesa/drivers/dri/r200/r200_state.c
+++ b/src/mesa/drivers/dri/r200/r200_state.c
@@ -1600,15 +1600,8 @@ void r200_vtbl_update_scissor( struct gl_context *ctx )
}
-static void r200Viewport( struct gl_context *ctx, GLuint idx,
- GLfloat x, GLfloat y,
- GLfloat width, GLfloat height )
+static void r200Viewport( struct gl_context *ctx, GLuint idx)
{
- (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.
diff --git a/src/mesa/drivers/dri/radeon/radeon_common.c b/src/mesa/drivers/dri/radeon/radeon_common.c
index 692e22a..d7121c4 100644
--- a/src/mesa/drivers/dri/radeon/radeon_common.c
+++ b/src/mesa/drivers/dri/radeon/radeon_common.c
@@ -410,9 +410,7 @@ void radeon_viewport(struct gl_context *ctx)
{
radeonContextPtr radeon = RADEON_CONTEXT(ctx);
__DRIcontext *driContext = radeon->dri.context;
- void (*old_viewport)(struct gl_context *ctx, GLuint idx,
- GLfloat X, GLfloat Y,
- GLfloat Width, GLfloat Height);
+ void (*old_viewport)(struct gl_context *ctx, GLuint idx);
if (_mesa_is_winsys_fbo(ctx->DrawBuffer)) {
if (radeon->is_front_buffer_rendering) {
diff --git a/src/mesa/drivers/dri/radeon/radeon_state.c b/src/mesa/drivers/dri/radeon/radeon_state.c
index 1225cd5..52ddbfd 100644
--- a/src/mesa/drivers/dri/radeon/radeon_state.c
+++ b/src/mesa/drivers/dri/radeon/radeon_state.c
@@ -1383,14 +1383,8 @@ void radeonUpdateWindow( struct gl_context *ctx )
}
-static void radeonViewport( struct gl_context *ctx, GLuint idx,
- GLfloat x, GLfloat y,
- GLfloat width, GLfloat height )
+static void radeonViewport( struct gl_context *ctx, GLuint idx)
{
- (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
diff --git a/src/mesa/drivers/dri/swrast/swrast.c b/src/mesa/drivers/dri/swrast/swrast.c
index 2e3177d..34e63ee 100644
--- a/src/mesa/drivers/dri/swrast/swrast.c
+++ b/src/mesa/drivers/dri/swrast/swrast.c
@@ -618,16 +618,13 @@ update_state( struct gl_context *ctx, GLuint new_state )
}
static void
-viewport(struct gl_context *ctx, GLuint idx,
- GLfloat x, GLfloat y, GLfloat w, GLfloat h)
+viewport(struct gl_context *ctx, GLuint idx)
{
struct gl_framebuffer *draw = ctx->WinSysDrawBuffer;
struct gl_framebuffer *read = ctx->WinSysReadBuffer;
- (void) x;
- (void) y;
- (void) w;
- (void) h;
+ (void) idx;
+
swrast_check_and_update_window_size(ctx, draw);
swrast_check_and_update_window_size(ctx, read);
}
diff --git a/src/mesa/main/dd.h b/src/mesa/main/dd.h
index 6083f5d..c61fe12 100644
--- a/src/mesa/main/dd.h
+++ b/src/mesa/main/dd.h
@@ -542,9 +542,7 @@ struct dd_function_table {
struct gl_texture_object *texObj,
GLenum pname, const GLfloat *params);
/** Set the viewport */
- void (*Viewport)(struct gl_context *ctx, GLuint idx,
- GLfloat X, GLfloat Y,
- GLfloat Width, GLfloat Height);
+ void (*Viewport)(struct gl_context *ctx, GLuint idx);
/*@}*/
diff --git a/src/mesa/main/viewport.c b/src/mesa/main/viewport.c
index e3d64b8..ce1dd2f 100644
--- a/src/mesa/main/viewport.c
+++ b/src/mesa/main/viewport.c
@@ -218,9 +218,7 @@ _mesa_set_viewporti(struct gl_context *ctx, GLuint index,
/* Many drivers will use this call to check for window size changes
* and reallocate the z/stencil/accum/etc buffers if needed.
*/
- ctx->Driver.Viewport(ctx, index,
- ctx->ViewportArray[index].X, ctx->ViewportArray[index].Y,
- ctx->ViewportArray[index].Width, ctx->ViewportArray[index].Height);
+ ctx->Driver.Viewport(ctx, index);
}
}
diff --git a/src/mesa/state_tracker/st_cb_viewport.c b/src/mesa/state_tracker/st_cb_viewport.c
index 0517b7f..22a977b 100644
--- a/src/mesa/state_tracker/st_cb_viewport.c
+++ b/src/mesa/state_tracker/st_cb_viewport.c
@@ -48,9 +48,7 @@ st_ws_framebuffer(struct gl_framebuffer *fb)
return NULL;
}
-static void st_viewport(struct gl_context * ctx, GLuint idx,
- GLfloat X, GLfloat Y,
- GLfloat Width, GLfloat Height)
+static void st_viewport(struct gl_context * ctx, GLuint idx)
{
struct st_context *st = ctx->st;
struct st_framebuffer *stdraw;
--
1.8.1.2
More information about the mesa-dev
mailing list