[Mesa-dev] [PATCH 03/40] mesa: Eliminate parameters to dd_function_table::Viewport
Ian Romanick
idr at freedesktop.org
Wed Mar 19 13:58:20 PDT 2014
On 03/16/2014 01:52 PM, Alexander von Gluck IV wrote:
> On 01/10/2014 07:40 PM, Ian Romanick wrote:
>> 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/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);
>> }
>> }
>
>
> *cough* just realized that Haiku uses these arguments while compiling
> 10.1 :-)
>
> http://cgit.freedesktop.org/mesa/mesa/tree/src/gallium/targets/haiku-softpipe/GalliumContext.cpp#n46
>
> http://cgit.freedesktop.org/mesa/mesa/tree/src/gallium/targets/haiku-softpipe/GalliumContext.cpp#n346
>
> Anyone know any easy alternatives off the top of their head?
Just change the Haiku code. It may have been passing values, but no
driver was using the passed values.
> -- Alex
More information about the mesa-dev
mailing list