[Mesa-dev] [PATCH] mesa: remove target param from ctx->Driver.TexParameter()
Brian Paul
brianp at vmware.com
Fri Jan 31 16:28:12 PST 2014
Not really used anywhere.
---
src/mesa/drivers/dri/nouveau/nouveau_state.c | 2 +-
src/mesa/drivers/dri/r200/r200_tex.c | 5 ++---
src/mesa/drivers/dri/radeon/radeon_tex.c | 2 +-
src/mesa/main/dd.h | 2 +-
src/mesa/main/texobj.c | 10 +++++-----
src/mesa/main/texparam.c | 8 ++++----
6 files changed, 14 insertions(+), 15 deletions(-)
diff --git a/src/mesa/drivers/dri/nouveau/nouveau_state.c b/src/mesa/drivers/dri/nouveau/nouveau_state.c
index 3e7ed21..596b3c4 100644
--- a/src/mesa/drivers/dri/nouveau/nouveau_state.c
+++ b/src/mesa/drivers/dri/nouveau/nouveau_state.c
@@ -392,7 +392,7 @@ nouveau_tex_env(struct gl_context *ctx, GLenum target, GLenum pname,
}
static void
-nouveau_tex_parameter(struct gl_context *ctx, GLenum target,
+nouveau_tex_parameter(struct gl_context *ctx,
struct gl_texture_object *t, GLenum pname,
const GLfloat *params)
{
diff --git a/src/mesa/drivers/dri/r200/r200_tex.c b/src/mesa/drivers/dri/r200/r200_tex.c
index f80bd6f..4c63260 100644
--- a/src/mesa/drivers/dri/r200/r200_tex.c
+++ b/src/mesa/drivers/dri/r200/r200_tex.c
@@ -375,16 +375,15 @@ void r200TexUpdateParameters(struct gl_context *ctx, GLuint unit)
* Changes variables and flags for a state update, which will happen at the
* next UpdateTextureState
*/
-static void r200TexParameter( struct gl_context *ctx, GLenum target,
+static void r200TexParameter( struct gl_context *ctx,
struct gl_texture_object *texObj,
GLenum pname, const GLfloat *params )
{
radeonTexObj* t = radeon_tex_obj(texObj);
radeon_print(RADEON_TEXTURE | RADEON_STATE, RADEON_VERBOSE,
- "%s(%p, tex %p) target %s, pname %s\n",
+ "%s(%p, tex %p) pname %s\n",
__FUNCTION__, ctx, texObj,
- _mesa_lookup_enum_by_nr( target ),
_mesa_lookup_enum_by_nr( pname ) );
switch ( pname ) {
diff --git a/src/mesa/drivers/dri/radeon/radeon_tex.c b/src/mesa/drivers/dri/radeon/radeon_tex.c
index fe8d8ed..2c9c1bc 100644
--- a/src/mesa/drivers/dri/radeon/radeon_tex.c
+++ b/src/mesa/drivers/dri/radeon/radeon_tex.c
@@ -328,7 +328,7 @@ void radeonTexUpdateParameters(struct gl_context *ctx, GLuint unit)
* next UpdateTextureState
*/
-static void radeonTexParameter( struct gl_context *ctx, GLenum target,
+static void radeonTexParameter( struct gl_context *ctx,
struct gl_texture_object *texObj,
GLenum pname, const GLfloat *params )
{
diff --git a/src/mesa/main/dd.h b/src/mesa/main/dd.h
index cb6fac4..31d9c48 100644
--- a/src/mesa/main/dd.h
+++ b/src/mesa/main/dd.h
@@ -543,7 +543,7 @@ struct dd_function_table {
void (*TexEnv)(struct gl_context *ctx, GLenum target, GLenum pname,
const GLfloat *param);
/** Set texture parameters */
- void (*TexParameter)(struct gl_context *ctx, GLenum target,
+ void (*TexParameter)(struct gl_context *ctx,
struct gl_texture_object *texObj,
GLenum pname, const GLfloat *params);
/** Set the viewport */
diff --git a/src/mesa/main/texobj.c b/src/mesa/main/texobj.c
index 8f52114..cd6e62c 100644
--- a/src/mesa/main/texobj.c
+++ b/src/mesa/main/texobj.c
@@ -189,12 +189,12 @@ finish_texture_init(struct gl_context *ctx, GLenum target,
if (ctx->Driver.TexParameter) {
static const GLfloat fparam_wrap[1] = {(GLfloat) GL_CLAMP_TO_EDGE};
const GLfloat fparam_filter[1] = {(GLfloat) filter};
- ctx->Driver.TexParameter(ctx, target, obj, GL_TEXTURE_WRAP_S, fparam_wrap);
- ctx->Driver.TexParameter(ctx, target, obj, GL_TEXTURE_WRAP_T, fparam_wrap);
- ctx->Driver.TexParameter(ctx, target, obj, GL_TEXTURE_WRAP_R, fparam_wrap);
- ctx->Driver.TexParameter(ctx, target, obj,
+ ctx->Driver.TexParameter(ctx, obj, GL_TEXTURE_WRAP_S, fparam_wrap);
+ ctx->Driver.TexParameter(ctx, obj, GL_TEXTURE_WRAP_T, fparam_wrap);
+ ctx->Driver.TexParameter(ctx, obj, GL_TEXTURE_WRAP_R, fparam_wrap);
+ ctx->Driver.TexParameter(ctx, obj,
GL_TEXTURE_MIN_FILTER, fparam_filter);
- ctx->Driver.TexParameter(ctx, target, obj,
+ ctx->Driver.TexParameter(ctx, obj,
GL_TEXTURE_MAG_FILTER, fparam_filter);
}
break;
diff --git a/src/mesa/main/texparam.c b/src/mesa/main/texparam.c
index 9362cf84..0931ace 100644
--- a/src/mesa/main/texparam.c
+++ b/src/mesa/main/texparam.c
@@ -784,7 +784,7 @@ _mesa_TexParameterf(GLenum target, GLenum pname, GLfloat param)
}
if (ctx->Driver.TexParameter && need_update) {
- ctx->Driver.TexParameter(ctx, target, texObj, pname, ¶m);
+ ctx->Driver.TexParameter(ctx, texObj, pname, ¶m);
}
}
@@ -855,7 +855,7 @@ _mesa_TexParameterfv(GLenum target, GLenum pname, const GLfloat *params)
}
if (ctx->Driver.TexParameter && need_update) {
- ctx->Driver.TexParameter(ctx, target, texObj, pname, params);
+ ctx->Driver.TexParameter(ctx, texObj, pname, params);
}
}
@@ -898,7 +898,7 @@ _mesa_TexParameteri(GLenum target, GLenum pname, GLint param)
if (ctx->Driver.TexParameter && need_update) {
GLfloat fparam = (GLfloat) param;
- ctx->Driver.TexParameter(ctx, target, texObj, pname, &fparam);
+ ctx->Driver.TexParameter(ctx, texObj, pname, &fparam);
}
}
@@ -954,7 +954,7 @@ _mesa_TexParameteriv(GLenum target, GLenum pname, const GLint *params)
fparams[2] = INT_TO_FLOAT(params[2]);
fparams[3] = INT_TO_FLOAT(params[3]);
}
- ctx->Driver.TexParameter(ctx, target, texObj, pname, fparams);
+ ctx->Driver.TexParameter(ctx, texObj, pname, fparams);
}
}
--
1.7.10.4
More information about the mesa-dev
mailing list