summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/texparam.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2016-10-07 14:28:21 -0600
committerBrian Paul <[email protected]>2016-10-13 17:38:49 -0600
commita710c21ac200fc1c80a6209862e837f0a75f4cc5 (patch)
tree7b00bb81989736169eea549dc1e4b09fae7471f3 /src/mesa/main/texparam.c
parent99d790538de2e7d7d489a8638b13c5aa069c27c3 (diff)
mesa: remove 'params' parameter from ctx->Driver.TexParameter()
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 <[email protected]>
Diffstat (limited to 'src/mesa/main/texparam.c')
-rw-r--r--src/mesa/main/texparam.c17
1 files changed, 4 insertions, 13 deletions
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);
}
}