[Mesa-dev] [PATCH 03/40] mesa: Eliminate parameters to dd_function_table::Viewport
Ian Romanick
idr at freedesktop.org
Fri Jan 10 17:40:04 PST 2014
From: Ian Romanick <ian.d.romanick at intel.com>
No driver uses them. They will just be annoying in future patches.
Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
---
src/mesa/drivers/dri/i915/intel_context.c | 15 ++-------------
src/mesa/drivers/dri/i965/brw_context.c | 7 +------
src/mesa/drivers/dri/r200/r200_state.c | 8 +-------
src/mesa/drivers/dri/radeon/radeon_state.c | 8 +-------
src/mesa/drivers/dri/swrast/swrast.c | 6 +-----
src/mesa/drivers/windows/gdi/wmesa.c | 4 +---
src/mesa/drivers/x11/xm_dd.c | 6 +-----
src/mesa/main/dd.h | 2 +-
src/mesa/main/viewport.c | 2 +-
src/mesa/state_tracker/st_cb_viewport.c | 3 +--
10 files changed, 11 insertions(+), 50 deletions(-)
diff --git a/src/mesa/drivers/dri/i915/intel_context.c b/src/mesa/drivers/dri/i915/intel_context.c
index ac5d4ff..e076396 100644
--- a/src/mesa/drivers/dri/i915/intel_context.c
+++ b/src/mesa/drivers/dri/i915/intel_context.c
@@ -271,17 +271,11 @@ intel_prepare_render(struct intel_context *intel)
}
static void
-intel_noninvalidate_viewport(struct gl_context *ctx, GLint x, GLint y,
- GLsizei w, GLsizei h)
+intel_noninvalidate_viewport(struct gl_context *ctx)
{
struct intel_context *intel = intel_context(ctx);
__DRIcontext *driContext = intel->driContext;
- (void) x;
- (void) y;
- (void) w;
- (void) h;
-
intelCalcViewport(ctx);
if (_mesa_is_winsys_fbo(ctx->DrawBuffer)) {
@@ -291,13 +285,8 @@ intel_noninvalidate_viewport(struct gl_context *ctx, GLint x, GLint y,
}
static void
-intel_viewport(struct gl_context *ctx, GLint x, GLint y, GLsizei w, GLsizei h)
+intel_viewport(struct gl_context *ctx)
{
- (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 1b42751..6821029 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, GLint x, GLint y, GLsizei w, GLsizei h)
+intel_viewport(struct gl_context *ctx)
{
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 b4ef7cf..0522287 100644
--- a/src/mesa/drivers/dri/r200/r200_state.c
+++ b/src/mesa/drivers/dri/r200/r200_state.c
@@ -1600,14 +1600,8 @@ void r200_vtbl_update_scissor( struct gl_context *ctx )
}
-static void r200Viewport( struct gl_context *ctx, GLint x, GLint y,
- GLsizei width, GLsizei height )
+static void r200Viewport(struct gl_context *ctx)
{
- (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_state.c b/src/mesa/drivers/dri/radeon/radeon_state.c
index 843a5a6..160f396 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, GLint x, GLint y,
- GLsizei width, GLsizei height )
+static void radeonViewport(struct gl_context *ctx)
{
- (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/swrast/swrast.c b/src/mesa/drivers/dri/swrast/swrast.c
index 79a2740..30e6805 100644
--- a/src/mesa/drivers/dri/swrast/swrast.c
+++ b/src/mesa/drivers/dri/swrast/swrast.c
@@ -618,15 +618,11 @@ update_state( struct gl_context *ctx, GLuint new_state )
}
static void
-viewport(struct gl_context *ctx, GLint x, GLint y, GLsizei w, GLsizei h)
+viewport(struct gl_context *ctx)
{
struct gl_framebuffer *draw = ctx->WinSysDrawBuffer;
struct gl_framebuffer *read = ctx->WinSysReadBuffer;
- (void) x;
- (void) y;
- (void) w;
- (void) h;
swrast_check_and_update_window_size(ctx, draw);
swrast_check_and_update_window_size(ctx, read);
}
diff --git a/src/mesa/drivers/windows/gdi/wmesa.c b/src/mesa/drivers/windows/gdi/wmesa.c
index d6eb823..c1a9c28 100644
--- a/src/mesa/drivers/windows/gdi/wmesa.c
+++ b/src/mesa/drivers/windows/gdi/wmesa.c
@@ -484,9 +484,7 @@ wmesa_resize_buffers(struct gl_context *ctx, struct gl_framebuffer *buffer,
* we get the viewport set correctly, even if the app does not call
* glViewport and relies on the defaults.
*/
-static void wmesa_viewport(struct gl_context *ctx,
- GLint x, GLint y,
- GLsizei width, GLsizei height)
+static void wmesa_viewport(struct gl_context *ctx)
{
GLuint new_width, new_height;
diff --git a/src/mesa/drivers/x11/xm_dd.c b/src/mesa/drivers/x11/xm_dd.c
index 676411a..fc0b956 100644
--- a/src/mesa/drivers/x11/xm_dd.c
+++ b/src/mesa/drivers/x11/xm_dd.c
@@ -750,17 +750,13 @@ xmesa_update_state( struct gl_context *ctx, GLbitfield new_state )
* That problem led to the GLX_MESA_resize_buffers extension.
*/
static void
-xmesa_viewport(struct gl_context *ctx, GLint x, GLint y, GLsizei w, GLsizei h)
+xmesa_viewport(struct gl_context *ctx)
{
XMesaContext xmctx = XMESA_CONTEXT(ctx);
XMesaBuffer xmdrawbuf = XMESA_BUFFER(ctx->WinSysDrawBuffer);
XMesaBuffer xmreadbuf = XMESA_BUFFER(ctx->WinSysReadBuffer);
xmesa_check_and_update_buffer_size(xmctx, xmdrawbuf);
xmesa_check_and_update_buffer_size(xmctx, xmreadbuf);
- (void) x;
- (void) y;
- (void) w;
- (void) h;
}
diff --git a/src/mesa/main/dd.h b/src/mesa/main/dd.h
index 6e73691..f438278 100644
--- a/src/mesa/main/dd.h
+++ b/src/mesa/main/dd.h
@@ -546,7 +546,7 @@ struct dd_function_table {
struct gl_texture_object *texObj,
GLenum pname, const GLfloat *params);
/** Set the viewport */
- void (*Viewport)(struct gl_context *ctx, GLint x, GLint y, GLsizei w, GLsizei h);
+ void (*Viewport)(struct gl_context *ctx);
/*@}*/
diff --git a/src/mesa/main/viewport.c b/src/mesa/main/viewport.c
index 91578ba..7ea1d5f 100644
--- a/src/mesa/main/viewport.c
+++ b/src/mesa/main/viewport.c
@@ -99,7 +99,7 @@ _mesa_set_viewport(struct gl_context *ctx, GLint x, GLint y,
/* 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, x, y, width, height);
+ ctx->Driver.Viewport(ctx);
}
}
diff --git a/src/mesa/state_tracker/st_cb_viewport.c b/src/mesa/state_tracker/st_cb_viewport.c
index d654ed6..f0e9729 100644
--- a/src/mesa/state_tracker/st_cb_viewport.c
+++ b/src/mesa/state_tracker/st_cb_viewport.c
@@ -48,8 +48,7 @@ st_ws_framebuffer(struct gl_framebuffer *fb)
return NULL;
}
-static void st_viewport(struct gl_context * ctx, GLint x, GLint y,
- GLsizei width, GLsizei height)
+static void st_viewport(struct gl_context *ctx)
{
struct st_context *st = ctx->st;
struct st_framebuffer *stdraw;
--
1.8.1.4
More information about the mesa-dev
mailing list