From a710c21ac200fc1c80a6209862e837f0a75f4cc5 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Fri, 7 Oct 2016 14:28:21 -0600 Subject: mesa: remove 'params' parameter from ctx->Driver.TexParameter() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit None of the drivers which implement this hook do anything with the texture parameter value. Drivers just look at the pname and set a dirty flag if needed. We were doing some ugly casting and type conversion to setup the argument so that all goes away. Reviewed-by: Marek Olšák --- src/mesa/main/texobj.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'src/mesa/main/texobj.c') diff --git a/src/mesa/main/texobj.c b/src/mesa/main/texobj.c index 9a051bc8e2b..fbd498dd935 100644 --- a/src/mesa/main/texobj.c +++ b/src/mesa/main/texobj.c @@ -365,15 +365,12 @@ finish_texture_init(struct gl_context *ctx, GLenum target, obj->Sampler.MinFilter = filter; obj->Sampler.MagFilter = filter; 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, 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, obj, - GL_TEXTURE_MAG_FILTER, fparam_filter); + /* XXX we probably don't need to make all these calls */ + ctx->Driver.TexParameter(ctx, obj, GL_TEXTURE_WRAP_S); + ctx->Driver.TexParameter(ctx, obj, GL_TEXTURE_WRAP_T); + ctx->Driver.TexParameter(ctx, obj, GL_TEXTURE_WRAP_R); + ctx->Driver.TexParameter(ctx, obj, GL_TEXTURE_MIN_FILTER); + ctx->Driver.TexParameter(ctx, obj, GL_TEXTURE_MAG_FILTER); } break; -- cgit v1.2.3