aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/main/texstore.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2008-06-10 16:13:42 -0600
committerBrian Paul <[email protected]>2008-06-10 16:13:42 -0600
commit40d1a40f294f1ed2dacfad6f5498322fc08cc2d1 (patch)
treef82624643856ed57346b91a25274a492258d3fde /src/mesa/main/texstore.c
parentef27bdbfa8fd4b7cdd7f1ab0e65bc30f17150d2e (diff)
mesa: refactor: move #define FEATURE flags into new mfeatures.h file
Also, check the FEATURE flags in many places.
Diffstat (limited to 'src/mesa/main/texstore.c')
-rw-r--r--src/mesa/main/texstore.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/mesa/main/texstore.c b/src/mesa/main/texstore.c
index a6a18910fc7..5ac61169503 100644
--- a/src/mesa/main/texstore.c
+++ b/src/mesa/main/texstore.c
@@ -55,7 +55,9 @@
#include "bufferobj.h"
#include "colormac.h"
#include "context.h"
+#if FEATURE_convolve
#include "convolve.h"
+#endif
#include "image.h"
#include "macros.h"
#include "mipmap.h"
@@ -269,6 +271,16 @@ compute_component_mapping(GLenum inFormat, GLenum outFormat,
}
+#if !FEATURE_convolve
+static void
+_mesa_adjust_image_for_convolution(GLcontext *ctx, GLuint dims,
+ GLsizei *srcWidth, GLsizei *srcHeight)
+{
+ /* no-op */
+}
+#endif
+
+
/**
* Make a temporary (color) texture image with GLfloat components.
* Apply all needed pixel unpacking and pixel transfer operations.
@@ -368,6 +380,7 @@ make_temp_float_image(GLcontext *ctx, GLuint dims,
dst += srcWidth * 4;
}
+#if FEATURE_convolve
/* do convolution */
{
GLfloat *src = tempImage + img * (srcWidth * srcHeight * 4);
@@ -389,7 +402,7 @@ make_temp_float_image(GLcontext *ctx, GLuint dims,
}
}
}
-
+#endif
/* do post-convolution transfer and pack into tempImage */
{
const GLint logComponents
@@ -546,6 +559,7 @@ _mesa_make_temp_chan_image(GLcontext *ctx, GLuint dims,
textureBaseFormat == GL_ALPHA ||
textureBaseFormat == GL_INTENSITY);
+#if FEATURE_convolve
if ((dims == 1 && ctx->Pixel.Convolution1DEnabled) ||
(dims >= 2 && ctx->Pixel.Convolution2DEnabled) ||
(dims >= 2 && ctx->Pixel.Separable2DEnabled)) {
@@ -567,6 +581,7 @@ _mesa_make_temp_chan_image(GLcontext *ctx, GLuint dims,
transferOps = 0;
freeSrcImage = GL_TRUE;
}
+#endif
/* unpack and transfer the source image */
tempImage = (GLchan *) _mesa_malloc(srcWidth * srcHeight * srcDepth