[Mesa-dev] [PATCH 01/18] mesa: Change scissor dd interface for viewport_array

Chris Forbes chrisf at ijw.co.nz
Wed Nov 20 15:16:29 PST 2013


For patches 1/2/3, I think you should add explicit

  (void) idx;

to the various implementations, at least when the surrounding code
uses that convention for marking other parameters unused.

On Thu, Nov 21, 2013 at 11:59 AM, Courtney Goeltzenleuchter
<courtney at lunarg.com> wrote:
>
> Signed-off-by: Courtney Goeltzenleuchter <courtney at LunarG.com>
> ---
>  src/mesa/drivers/common/driverfuncs.c       | 2 +-
>  src/mesa/drivers/dri/i915/i830_state.c      | 2 +-
>  src/mesa/drivers/dri/i915/i830_vtbl.c       | 2 +-
>  src/mesa/drivers/dri/i915/i915_state.c      | 2 +-
>  src/mesa/drivers/dri/i915/i915_vtbl.c       | 2 +-
>  src/mesa/drivers/dri/radeon/radeon_common.c | 3 +--
>  src/mesa/drivers/dri/radeon/radeon_common.h | 2 +-
>  src/mesa/main/dd.h                          | 4 +++-
>  src/mesa/main/scissor.c                     | 2 +-
>  9 files changed, 11 insertions(+), 10 deletions(-)
>
> diff --git a/src/mesa/drivers/common/driverfuncs.c b/src/mesa/drivers/common/driverfuncs.c
> index 5faa98a..e45dc0e 100644
> --- a/src/mesa/drivers/common/driverfuncs.c
> +++ b/src/mesa/drivers/common/driverfuncs.c
> @@ -299,7 +299,7 @@ _mesa_init_driver_state(struct gl_context *ctx)
>     ctx->Driver.LogicOpcode(ctx, ctx->Color.LogicOp);
>     ctx->Driver.PointSize(ctx, ctx->Point.Size);
>     ctx->Driver.PolygonStipple(ctx, (const GLubyte *) ctx->PolygonStipple);
> -   ctx->Driver.Scissor(ctx, ctx->Scissor.X, ctx->Scissor.Y,
> +   ctx->Driver.Scissor(ctx, 0, ctx->Scissor.X, ctx->Scissor.Y,
>                         ctx->Scissor.Width, ctx->Scissor.Height);
>     ctx->Driver.ShadeModel(ctx, ctx->Light.ShadeModel);
>     ctx->Driver.StencilFuncSeparate(ctx, GL_FRONT,
> diff --git a/src/mesa/drivers/dri/i915/i830_state.c b/src/mesa/drivers/dri/i915/i830_state.c
> index bbf0cef..e140e04 100644
> --- a/src/mesa/drivers/dri/i915/i830_state.c
> +++ b/src/mesa/drivers/dri/i915/i830_state.c
> @@ -527,7 +527,7 @@ i830PolygonStipple(struct gl_context * ctx, const GLubyte * mask)
>   * Hardware clipping
>   */
>  static void
> -i830Scissor(struct gl_context * ctx, GLint x, GLint y, GLsizei w, GLsizei h)
> +i830Scissor(struct gl_context * ctx, GLuint idx, GLint x, GLint y, GLsizei w, GLsizei h)
>  {
>     struct i830_context *i830 = i830_context(ctx);
>     int x1, y1, x2, y2;
> diff --git a/src/mesa/drivers/dri/i915/i830_vtbl.c b/src/mesa/drivers/dri/i915/i830_vtbl.c
> index f988a83..cea6930 100644
> --- a/src/mesa/drivers/dri/i915/i830_vtbl.c
> +++ b/src/mesa/drivers/dri/i915/i830_vtbl.c
> @@ -837,7 +837,7 @@ i830_update_draw_buffer(struct intel_context *intel)
>
>     /* Set state we know depends on drawable parameters:
>      */
> -   ctx->Driver.Scissor(ctx, ctx->Scissor.X, ctx->Scissor.Y,
> +   ctx->Driver.Scissor(ctx, 0, ctx->Scissor.X, ctx->Scissor.Y,
>                        ctx->Scissor.Width, ctx->Scissor.Height);
>
>     ctx->Driver.DepthRange(ctx, ctx->Viewport.Near, ctx->Viewport.Far);
> diff --git a/src/mesa/drivers/dri/i915/i915_state.c b/src/mesa/drivers/dri/i915/i915_state.c
> index fedafec..ca26bdc 100644
> --- a/src/mesa/drivers/dri/i915/i915_state.c
> +++ b/src/mesa/drivers/dri/i915/i915_state.c
> @@ -501,7 +501,7 @@ i915PolygonStipple(struct gl_context * ctx, const GLubyte * mask)
>   * Hardware clipping
>   */
>  static void
> -i915Scissor(struct gl_context * ctx, GLint x, GLint y, GLsizei w, GLsizei h)
> +i915Scissor(struct gl_context * ctx, GLuint idx, GLint x, GLint y, GLsizei w, GLsizei h)
>  {
>     struct i915_context *i915 = I915_CONTEXT(ctx);
>     int x1, y1, x2, y2;
> diff --git a/src/mesa/drivers/dri/i915/i915_vtbl.c b/src/mesa/drivers/dri/i915/i915_vtbl.c
> index 3368fe4..f7656f9 100644
> --- a/src/mesa/drivers/dri/i915/i915_vtbl.c
> +++ b/src/mesa/drivers/dri/i915/i915_vtbl.c
> @@ -811,7 +811,7 @@ i915_update_draw_buffer(struct intel_context *intel)
>
>     /* Set state we know depends on drawable parameters:
>      */
> -   ctx->Driver.Scissor(ctx, ctx->Scissor.X, ctx->Scissor.Y,
> +   ctx->Driver.Scissor(ctx, 0, ctx->Scissor.X, ctx->Scissor.Y,
>                        ctx->Scissor.Width, ctx->Scissor.Height);
>     ctx->Driver.DepthRange(ctx, ctx->Viewport.Near, ctx->Viewport.Far);
>
> diff --git a/src/mesa/drivers/dri/radeon/radeon_common.c b/src/mesa/drivers/dri/radeon/radeon_common.c
> index 7be0ba7..c4090fa 100644
> --- a/src/mesa/drivers/dri/radeon/radeon_common.c
> +++ b/src/mesa/drivers/dri/radeon/radeon_common.c
> @@ -141,8 +141,7 @@ void radeonUpdateScissor( struct gl_context *ctx )
>  /* =============================================================
>   * Scissoring
>   */
> -
> -void radeonScissor(struct gl_context* ctx, GLint x, GLint y, GLsizei w, GLsizei h)
> +void radeonScissor(struct gl_context* ctx, GLuint idx, GLint x, GLint y, GLsizei w, GLsizei h)
>  {
>         radeonContextPtr radeon = RADEON_CONTEXT(ctx);
>         if (ctx->Scissor.Enabled) {
> diff --git a/src/mesa/drivers/dri/radeon/radeon_common.h b/src/mesa/drivers/dri/radeon/radeon_common.h
> index 69a1727..173b473 100644
> --- a/src/mesa/drivers/dri/radeon/radeon_common.h
> +++ b/src/mesa/drivers/dri/radeon/radeon_common.h
> @@ -8,7 +8,7 @@
>  void radeonUserClear(struct gl_context *ctx, GLuint mask);
>  void radeonSetCliprects(radeonContextPtr radeon);
>  void radeonUpdateScissor( struct gl_context *ctx );
> -void radeonScissor(struct gl_context* ctx, GLint x, GLint y, GLsizei w, GLsizei h);
> +void radeonScissor(struct gl_context* ctx, GLuint idx, GLint x, GLint y, GLsizei w, GLsizei h);
>
>  extern uint32_t radeonGetAge(radeonContextPtr radeon);
>
> diff --git a/src/mesa/main/dd.h b/src/mesa/main/dd.h
> index b5b874f..1910d2c 100644
> --- a/src/mesa/main/dd.h
> +++ b/src/mesa/main/dd.h
> @@ -519,7 +519,9 @@ struct dd_function_table {
>     /** Set rasterization mode */
>     void (*RenderMode)(struct gl_context *ctx, GLenum mode );
>     /** Define the scissor box */
> -   void (*Scissor)(struct gl_context *ctx, GLint x, GLint y, GLsizei w, GLsizei h);
> +   void (*Scissor)(struct gl_context *ctx, GLuint idx,
> +                   GLint x, GLint y,
> +                   GLsizei width, GLsizei height);
>     /** Select flat or smooth shading */
>     void (*ShadeModel)(struct gl_context *ctx, GLenum mode);
>     /** OpenGL 2.0 two-sided StencilFunc */
> diff --git a/src/mesa/main/scissor.c b/src/mesa/main/scissor.c
> index 0eddaa6..4eb6337 100644
> --- a/src/mesa/main/scissor.c
> +++ b/src/mesa/main/scissor.c
> @@ -79,7 +79,7 @@ _mesa_set_scissor(struct gl_context *ctx,
>     ctx->Scissor.Height = height;
>
>     if (ctx->Driver.Scissor)
> -      ctx->Driver.Scissor( ctx, x, y, width, height );
> +      ctx->Driver.Scissor( ctx, 0, x, y, width, height );
>  }
>
>
> --
> 1.8.1.2
>
> _______________________________________________
> 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