[Mesa-dev] Mesa (master): mesa: always generate error in glColorTableParameter[fi]v()
Ian Romanick
idr at freedesktop.org
Tue Mar 1 12:12:27 PST 2011
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 02/28/2011 05:34 PM, Brian Paul wrote:
> Module: Mesa
> Branch: master
> Commit: 7d8db55148b0861e35ec6bb6323db6dad4c8f17f
> URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=7d8db55148b0861e35ec6bb6323db6dad4c8f17f
>
> Author: Brian Paul <brianp at vmware.com>
> Date: Mon Feb 28 18:24:30 2011 -0700
>
> mesa: always generate error in glColorTableParameter[fi]v()
Do we even need to keep these functions?
> These were only used by GL_SGI_texture_color_table, which is gone now.
>
> ---
>
> src/mesa/main/colortab.c | 29 ++++++-----------------------
> 1 files changed, 6 insertions(+), 23 deletions(-)
>
> diff --git a/src/mesa/main/colortab.c b/src/mesa/main/colortab.c
> index 026fa48..cf34997 100644
> --- a/src/mesa/main/colortab.c
> +++ b/src/mesa/main/colortab.c
> @@ -628,28 +628,10 @@ _mesa_GetColorTable( GLenum target, GLenum format,
> static void GLAPIENTRY
> _mesa_ColorTableParameterfv(GLenum target, GLenum pname, const GLfloat *params)
> {
> - GLfloat *scale, *bias;
> + /* no extensions use this function */
> GET_CURRENT_CONTEXT(ctx);
> ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
> -
> - switch (target) {
> - default:
> - _mesa_error(ctx, GL_INVALID_ENUM, "glColorTableParameter(target)");
> - return;
> - }
> -
> - if (pname == GL_COLOR_TABLE_SCALE_SGI) {
> - COPY_4V(scale, params);
> - }
> - else if (pname == GL_COLOR_TABLE_BIAS_SGI) {
> - COPY_4V(bias, params);
> - }
> - else {
> - _mesa_error(ctx, GL_INVALID_ENUM, "glColorTableParameterfv(pname)");
> - return;
> - }
> -
> - ctx->NewState |= _NEW_PIXEL;
> + _mesa_error(ctx, GL_INVALID_ENUM, "glColorTableParameterfv(target)");
> }
>
>
> @@ -657,9 +639,10 @@ _mesa_ColorTableParameterfv(GLenum target, GLenum pname, const GLfloat *params)
> static void GLAPIENTRY
> _mesa_ColorTableParameteriv(GLenum target, GLenum pname, const GLint *params)
> {
> - GLfloat fparams[4];
> - fparams[0] = (GLfloat) params[0];
> - _mesa_ColorTableParameterfv(target, pname, fparams);
> + /* no extensions use this function */
> + GET_CURRENT_CONTEXT(ctx);
> + ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
> + _mesa_error(ctx, GL_INVALID_ENUM, "glColorTableParameteriv(target)");
> }
>
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/
iEYEARECAAYFAk1tUycACgkQX1gOwKyEAw+CXQCfdd64RFu8RDEfhbA0wELk9wVN
tkIAn3MIpEGu4AP5q2YquOw4JHcrWTuY
=sDQB
-----END PGP SIGNATURE-----
More information about the mesa-dev
mailing list