summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/convolve.c
diff options
context:
space:
mode:
authorKeith Whitwell <[email protected]>2000-10-30 13:31:59 +0000
committerKeith Whitwell <[email protected]>2000-10-30 13:31:59 +0000
commita96308c37db0bc0086a017d318bc3504aa5f0b1a (patch)
tree0010de3aa19901acf13b57e57e7ba465abffa95e /src/mesa/main/convolve.c
parenta4575499679d9d91055a35c7673b81872ec127cb (diff)
Replace the flags Mesa was using for ctx->NewState with a new set
based on the GL attribute groups. Introduced constants describing the circumstances under which some key derived values can change: _SWRAST_NEW_RASTERMASK -- ctx->RasterMask _SWRAST_NEW_TRIANGLE -- The software rasterizer's triangle function _DD_NEW_FEEDBACK -- the 'DD_FEEDBACK' bit in ctx->TriangleCaps These are helpful in deciding whether you need to recalculate state if your recalculation involves reference to a derived value.
Diffstat (limited to 'src/mesa/main/convolve.c')
-rw-r--r--src/mesa/main/convolve.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/mesa/main/convolve.c b/src/mesa/main/convolve.c
index b32b3e73731..2a5f5f9b2d2 100644
--- a/src/mesa/main/convolve.c
+++ b/src/mesa/main/convolve.c
@@ -1,4 +1,4 @@
-/* $Id: convolve.c,v 1.7 2000/10/28 20:41:13 brianp Exp $ */
+/* $Id: convolve.c,v 1.8 2000/10/30 13:32:00 keithw Exp $ */
/*
* Mesa 3-D graphics library
@@ -170,6 +170,8 @@ _mesa_ConvolutionFilter1D(GLenum target, GLenum internalFormat, GLsizei width, G
ctx->Convolution1D.Filter[i * 4 + 3] = a;
}
}
+
+ ctx->NewState |= _NEW_IMAGING;
}
@@ -248,6 +250,8 @@ _mesa_ConvolutionFilter2D(GLenum target, GLenum internalFormat, GLsizei width, G
ctx->Convolution2D.Filter[i * 4 + 3] = a;
}
}
+
+ ctx->NewState |= _NEW_IMAGING;
}
@@ -290,6 +294,8 @@ _mesa_ConvolutionParameterf(GLenum target, GLenum pname, GLfloat param)
gl_error(ctx, GL_INVALID_ENUM, "glConvolutionParameterf(pname)");
return;
}
+
+ ctx->NewState |= _NEW_PIXEL;
}
@@ -345,6 +351,8 @@ _mesa_ConvolutionParameterfv(GLenum target, GLenum pname, const GLfloat *params)
gl_error(ctx, GL_INVALID_ENUM, "glConvolutionParameterfv(pname)");
return;
}
+
+ ctx->NewState |= _NEW_PIXEL;
}
@@ -387,6 +395,8 @@ _mesa_ConvolutionParameteri(GLenum target, GLenum pname, GLint param)
gl_error(ctx, GL_INVALID_ENUM, "glConvolutionParameteri(pname)");
return;
}
+
+ ctx->NewState |= _NEW_PIXEL;
}
@@ -445,6 +455,8 @@ _mesa_ConvolutionParameteriv(GLenum target, GLenum pname, const GLint *params)
gl_error(ctx, GL_INVALID_ENUM, "glConvolutionParameteriv(pname)");
return;
}
+
+ ctx->NewState |= _NEW_PIXEL;
}
@@ -530,11 +542,13 @@ _mesa_CopyConvolutionFilter2D(GLenum target, GLenum internalFormat, GLint x, GLi
ctx->Unpack.SkipImages = 0;
ctx->Unpack.SwapBytes = GL_FALSE;
ctx->Unpack.LsbFirst = GL_FALSE;
+ ctx->NewState |= _NEW_PACKUNPACK;
_mesa_ConvolutionFilter2D(target, internalFormat, width, height,
GL_RGBA, GL_UNSIGNED_BYTE, rgba);
ctx->Unpack = packSave; /* restore pixel packing params */
+ ctx->NewState |= _NEW_PACKUNPACK;
}
@@ -860,6 +874,8 @@ _mesa_SeparableFilter2D(GLenum target, GLenum internalFormat, GLsizei width, GLs
ctx->Separable2D.Filter[i * 4 + 3 + colStart] = a;
}
}
+
+ ctx->NewState |= _NEW_IMAGING;
}