summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/convolve.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2003-12-04 03:19:46 +0000
committerBrian Paul <[email protected]>2003-12-04 03:19:46 +0000
commitb305028464f02947c0cce0476af0e35f4ed1fafa (patch)
tree6623fb86dea2eb572743c161055e37a1d43c995d /src/mesa/main/convolve.c
parent03e29a5f77c13b7b888bd8443cb2752850e47d6a (diff)
Port over changes from XFree86/Mesa 5.0.2, mostly to silence compiler warnings.
Diffstat (limited to 'src/mesa/main/convolve.c')
-rw-r--r--src/mesa/main/convolve.c19
1 files changed, 5 insertions, 14 deletions
diff --git a/src/mesa/main/convolve.c b/src/mesa/main/convolve.c
index b7d2eeb20f9..e6b19fabd42 100644
--- a/src/mesa/main/convolve.c
+++ b/src/mesa/main/convolve.c
@@ -1,9 +1,8 @@
-
/*
* Mesa 3-D graphics library
- * Version: 4.1
+ * Version: 5.1
*
- * Copyright (C) 1999-2002 Brian Paul All Rights Reserved.
+ * Copyright (C) 1999-2003 Brian Paul All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -178,7 +177,7 @@ void GLAPIENTRY
_mesa_ConvolutionFilter2D(GLenum target, GLenum internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image)
{
GLint baseFormat;
- GLint i, components;
+ GLint i;
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
@@ -215,8 +214,8 @@ _mesa_ConvolutionFilter2D(GLenum target, GLenum internalFormat, GLsizei width, G
return;
}
- components = _mesa_components_in_format(format);
- assert(components > 0); /* this should have been caught earlier */
+ /* this should have been caught earlier */
+ assert(_mesa_components_in_format(format));
ctx->Convolution2D.Format = format;
ctx->Convolution2D.InternalFormat = internalFormat;
@@ -304,22 +303,18 @@ void GLAPIENTRY
_mesa_ConvolutionParameterfv(GLenum target, GLenum pname, const GLfloat *params)
{
GET_CURRENT_CONTEXT(ctx);
- struct gl_convolution_attrib *conv;
GLuint c;
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
switch (target) {
case GL_CONVOLUTION_1D:
c = 0;
- conv = &ctx->Convolution1D;
break;
case GL_CONVOLUTION_2D:
c = 1;
- conv = &ctx->Convolution2D;
break;
case GL_SEPARABLE_2D:
c = 2;
- conv = &ctx->Separable2D;
break;
default:
_mesa_error(ctx, GL_INVALID_ENUM, "glConvolutionParameterfv(target)");
@@ -403,22 +398,18 @@ void GLAPIENTRY
_mesa_ConvolutionParameteriv(GLenum target, GLenum pname, const GLint *params)
{
GET_CURRENT_CONTEXT(ctx);
- struct gl_convolution_attrib *conv;
GLuint c;
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
switch (target) {
case GL_CONVOLUTION_1D:
c = 0;
- conv = &ctx->Convolution1D;
break;
case GL_CONVOLUTION_2D:
c = 1;
- conv = &ctx->Convolution2D;
break;
case GL_SEPARABLE_2D:
c = 2;
- conv = &ctx->Separable2D;
break;
default:
_mesa_error(ctx, GL_INVALID_ENUM, "glConvolutionParameteriv(target)");