[Mesa-dev] [PATCH 02/18] mesa: Update viewport dd interface for viewport_array
Courtney Goeltzenleuchter
courtney at lunarg.com
Wed Nov 20 14:59:17 PST 2013
Signed-off-by: Courtney Goeltzenleuchter <courtney at LunarG.com>
---
src/mesa/drivers/dri/i915/intel_context.c | 4 ++--
src/mesa/drivers/dri/i965/brw_context.c | 2 +-
src/mesa/drivers/dri/r200/r200_state.c | 2 +-
src/mesa/drivers/dri/radeon/radeon_common.c | 4 ++--
src/mesa/drivers/dri/radeon/radeon_state.c | 2 +-
src/mesa/drivers/dri/swrast/swrast.c | 3 ++-
src/mesa/main/dd.h | 3 ++-
src/mesa/main/viewport.c | 2 +-
src/mesa/state_tracker/st_cb_viewport.c | 3 ++-
9 files changed, 14 insertions(+), 11 deletions(-)
diff --git a/src/mesa/drivers/dri/i915/intel_context.c b/src/mesa/drivers/dri/i915/intel_context.c
index 3618893..6752f4b 100644
--- a/src/mesa/drivers/dri/i915/intel_context.c
+++ b/src/mesa/drivers/dri/i915/intel_context.c
@@ -271,7 +271,7 @@ intel_prepare_render(struct intel_context *intel)
}
static void
-intel_noninvalidate_viewport(struct gl_context *ctx, GLint x, GLint y,
+intel_noninvalidate_viewport(struct gl_context *ctx, GLuint idx, GLint x, GLint y,
GLsizei w, GLsizei h)
{
struct intel_context *intel = intel_context(ctx);
@@ -291,7 +291,7 @@ 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, GLuint idx, GLint x, GLint y, GLsizei w, GLsizei h)
{
(void) x;
(void) y;
diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c
index 0399ec0..8f049e7 100644
--- a/src/mesa/drivers/dri/i965/brw_context.c
+++ b/src/mesa/drivers/dri/i965/brw_context.c
@@ -134,7 +134,7 @@ 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, GLuint idx, GLint x, GLint y, GLsizei w, GLsizei h)
{
struct brw_context *brw = brw_context(ctx);
__DRIcontext *driContext = brw->driContext;
diff --git a/src/mesa/drivers/dri/r200/r200_state.c b/src/mesa/drivers/dri/r200/r200_state.c
index ee7b945..515499e 100644
--- a/src/mesa/drivers/dri/r200/r200_state.c
+++ b/src/mesa/drivers/dri/r200/r200_state.c
@@ -1600,7 +1600,7 @@ void r200_vtbl_update_scissor( struct gl_context *ctx )
}
-static void r200Viewport( struct gl_context *ctx, GLint x, GLint y,
+static void r200Viewport( struct gl_context *ctx, GLuint idx, GLint x, GLint y,
GLsizei width, GLsizei height )
{
(void) x;
diff --git a/src/mesa/drivers/dri/radeon/radeon_common.c b/src/mesa/drivers/dri/radeon/radeon_common.c
index c4090fa..671c15f 100644
--- a/src/mesa/drivers/dri/radeon/radeon_common.c
+++ b/src/mesa/drivers/dri/radeon/radeon_common.c
@@ -319,7 +319,7 @@ void radeon_draw_buffer(struct gl_context *ctx, struct gl_framebuffer *fb)
#if 0
/* update viewport since it depends on window size */
if (ctx->Driver.Viewport) {
- ctx->Driver.Viewport(ctx, ctx->Viewport.X, ctx->Viewport.Y,
+ ctx->Driver.Viewport(ctx, 0, ctx->Viewport.X, ctx->Viewport.Y,
ctx->Viewport.Width, ctx->Viewport.Height);
} else {
@@ -410,7 +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, GLint x, GLint y,
+ void (*old_viewport)(struct gl_context *ctx, GLuint idx, GLint x, GLint y,
GLsizei w, GLsizei h);
if (_mesa_is_winsys_fbo(ctx->DrawBuffer)) {
diff --git a/src/mesa/drivers/dri/radeon/radeon_state.c b/src/mesa/drivers/dri/radeon/radeon_state.c
index 625271d..48bbbd8 100644
--- a/src/mesa/drivers/dri/radeon/radeon_state.c
+++ b/src/mesa/drivers/dri/radeon/radeon_state.c
@@ -1383,7 +1383,7 @@ void radeonUpdateWindow( struct gl_context *ctx )
}
-static void radeonViewport( struct gl_context *ctx, GLint x, GLint y,
+static void radeonViewport( struct gl_context *ctx, GLuint idx, GLint x, GLint y,
GLsizei width, GLsizei height )
{
(void) x;
diff --git a/src/mesa/drivers/dri/swrast/swrast.c b/src/mesa/drivers/dri/swrast/swrast.c
index c062071..deba27e 100644
--- a/src/mesa/drivers/dri/swrast/swrast.c
+++ b/src/mesa/drivers/dri/swrast/swrast.c
@@ -618,7 +618,8 @@ 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, GLuint idx,
+ GLint x, GLint y, GLsizei w, GLsizei h)
{
struct gl_framebuffer *draw = ctx->WinSysDrawBuffer;
struct gl_framebuffer *read = ctx->WinSysReadBuffer;
diff --git a/src/mesa/main/dd.h b/src/mesa/main/dd.h
index 1910d2c..ed4ad6f 100644
--- a/src/mesa/main/dd.h
+++ b/src/mesa/main/dd.h
@@ -543,7 +543,8 @@ 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, GLuint idx,
+ GLint x, GLint y, GLsizei w, GLsizei h);
/*@}*/
diff --git a/src/mesa/main/viewport.c b/src/mesa/main/viewport.c
index 91578ba..8540e52 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, 0, x, y, width, height);
}
}
diff --git a/src/mesa/state_tracker/st_cb_viewport.c b/src/mesa/state_tracker/st_cb_viewport.c
index d654ed6..d48127e 100644
--- a/src/mesa/state_tracker/st_cb_viewport.c
+++ b/src/mesa/state_tracker/st_cb_viewport.c
@@ -48,7 +48,8 @@ st_ws_framebuffer(struct gl_framebuffer *fb)
return NULL;
}
-static void st_viewport(struct gl_context * ctx, GLint x, GLint y,
+static void st_viewport(struct gl_context * ctx, GLuint idx,
+ GLint x, GLint y,
GLsizei width, GLsizei height)
{
struct st_context *st = ctx->st;
--
1.8.1.2
More information about the mesa-dev
mailing list