aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/main')
-rw-r--r--src/mesa/main/dd.h5
-rw-r--r--src/mesa/main/teximage.c6
-rw-r--r--src/mesa/main/texobj.c15
-rw-r--r--src/mesa/main/texparam.c17
4 files changed, 14 insertions, 29 deletions
diff --git a/src/mesa/main/dd.h b/src/mesa/main/dd.h
index 7f5327186ff..1d75b9fc29b 100644
--- a/src/mesa/main/dd.h
+++ b/src/mesa/main/dd.h
@@ -610,10 +610,9 @@ struct dd_function_table {
/** Set texture environment parameters */
void (*TexEnv)(struct gl_context *ctx, GLenum target, GLenum pname,
const GLfloat *param);
- /** Set texture parameters */
+ /** Set texture parameter (callee gets param value from the texObj) */
void (*TexParameter)(struct gl_context *ctx,
- struct gl_texture_object *texObj,
- GLenum pname, const GLfloat *params);
+ struct gl_texture_object *texObj, GLenum pname);
/** Set the viewport */
void (*Viewport)(struct gl_context *ctx);
/*@}*/
diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
index 411ec49efd1..bc3b76a926d 100644
--- a/src/mesa/main/teximage.c
+++ b/src/mesa/main/teximage.c
@@ -5082,12 +5082,10 @@ texture_buffer_range(struct gl_context *ctx,
if (ctx->Driver.TexParameter) {
if (offset != oldOffset) {
- ctx->Driver.TexParameter(ctx, texObj, GL_TEXTURE_BUFFER_OFFSET,
- (const GLfloat *) &offset);
+ ctx->Driver.TexParameter(ctx, texObj, GL_TEXTURE_BUFFER_OFFSET);
}
if (size != oldSize) {
- ctx->Driver.TexParameter(ctx, texObj, GL_TEXTURE_BUFFER_SIZE,
- (const GLfloat *) &size);
+ ctx->Driver.TexParameter(ctx, texObj, GL_TEXTURE_BUFFER_SIZE);
}
}
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;
diff --git a/src/mesa/main/texparam.c b/src/mesa/main/texparam.c
index a8147786fa8..29eed078650 100644
--- a/src/mesa/main/texparam.c
+++ b/src/mesa/main/texparam.c
@@ -807,7 +807,7 @@ _mesa_texture_parameterf(struct gl_context *ctx,
}
if (ctx->Driver.TexParameter && need_update) {
- ctx->Driver.TexParameter(ctx, texObj, pname, &param);
+ ctx->Driver.TexParameter(ctx, texObj, pname);
}
}
@@ -874,7 +874,7 @@ _mesa_texture_parameterfv(struct gl_context *ctx,
}
if (ctx->Driver.TexParameter && need_update) {
- ctx->Driver.TexParameter(ctx, texObj, pname, params);
+ ctx->Driver.TexParameter(ctx, texObj, pname);
}
}
@@ -919,8 +919,7 @@ _mesa_texture_parameteri(struct gl_context *ctx,
}
if (ctx->Driver.TexParameter && need_update) {
- GLfloat fparam = (GLfloat) param;
- ctx->Driver.TexParameter(ctx, texObj, pname, &fparam);
+ ctx->Driver.TexParameter(ctx, texObj, pname);
}
}
@@ -964,15 +963,7 @@ _mesa_texture_parameteriv(struct gl_context *ctx,
}
if (ctx->Driver.TexParameter && need_update) {
- GLfloat fparams[4];
- fparams[0] = INT_TO_FLOAT(params[0]);
- if (pname == GL_TEXTURE_BORDER_COLOR ||
- pname == GL_TEXTURE_CROP_RECT_OES) {
- fparams[1] = INT_TO_FLOAT(params[1]);
- fparams[2] = INT_TO_FLOAT(params[2]);
- fparams[3] = INT_TO_FLOAT(params[3]);
- }
- ctx->Driver.TexParameter(ctx, texObj, pname, fparams);
+ ctx->Driver.TexParameter(ctx, texObj, pname);
}
}