summaryrefslogtreecommitdiff
path: root/src/mesa/main/teximage.c
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2008-06-10 16:13:42 -0600
committerBrian Paul <brian.paul@tungstengraphics.com>2008-06-10 16:13:42 -0600
commit40d1a40f294f1ed2dacfad6f5498322fc08cc2d1 (patch)
treef82624643856ed57346b91a25274a492258d3fde /src/mesa/main/teximage.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/teximage.c')
-rw-r--r--src/mesa/main/teximage.c21
1 files changed, 20 insertions, 1 deletions
diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
index 384e145520..eed1937517 100644
--- a/src/mesa/main/teximage.c
+++ b/src/mesa/main/teximage.c
@@ -32,7 +32,9 @@
#include "glheader.h"
#include "bufferobj.h"
#include "context.h"
+#if FEATURE_convolve
#include "convolve.h"
+#endif
#include "fbobject.h"
#include "framebuffer.h"
#include "image.h"
@@ -2429,9 +2431,11 @@ _mesa_TexImage1D( GLenum target, GLint level, GLint internalFormat,
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
+#if FEATURE_convolve
if (is_color_format(internalFormat)) {
_mesa_adjust_image_for_convolution(ctx, 1, &postConvWidth, NULL);
}
+#endif
if (target == GL_TEXTURE_1D) {
/* non-proxy target */
@@ -2524,10 +2528,12 @@ _mesa_TexImage2D( GLenum target, GLint level, GLint internalFormat,
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
+#if FEATURE_convolve
if (is_color_format(internalFormat)) {
_mesa_adjust_image_for_convolution(ctx, 2, &postConvWidth,
&postConvHeight);
}
+#endif
if (target == GL_TEXTURE_2D ||
(ctx->Extensions.ARB_texture_cube_map &&
@@ -2746,10 +2752,12 @@ _mesa_TexSubImage1D( GLenum target, GLint level,
if (ctx->NewState & _IMAGE_NEW_TRANSFER_STATE)
_mesa_update_state(ctx);
+#if FEATURE_convolve
/* XXX should test internal format */
if (is_color_format(format)) {
_mesa_adjust_image_for_convolution(ctx, 1, &postConvWidth, NULL);
}
+#endif
if (subtexture_error_check(ctx, 1, target, level, xoffset, 0, 0,
postConvWidth, 1, 1, format, type)) {
@@ -2804,11 +2812,13 @@ _mesa_TexSubImage2D( GLenum target, GLint level,
if (ctx->NewState & _IMAGE_NEW_TRANSFER_STATE)
_mesa_update_state(ctx);
+#if FEATURE_convolve
/* XXX should test internal format */
if (is_color_format(format)) {
_mesa_adjust_image_for_convolution(ctx, 2, &postConvWidth,
&postConvHeight);
}
+#endif
if (subtexture_error_check(ctx, 2, target, level, xoffset, yoffset, 0,
postConvWidth, postConvHeight, 1, format, type)) {
@@ -2918,9 +2928,11 @@ _mesa_CopyTexImage1D( GLenum target, GLint level,
if (ctx->NewState & _IMAGE_NEW_TRANSFER_STATE)
_mesa_update_state(ctx);
+#if FEATURE_convolve
if (is_color_format(internalFormat)) {
_mesa_adjust_image_for_convolution(ctx, 1, &postConvWidth, NULL);
}
+#endif
if (copytexture_error_check(ctx, 1, target, level, internalFormat,
postConvWidth, 1, border))
@@ -2981,11 +2993,12 @@ _mesa_CopyTexImage2D( GLenum target, GLint level, GLenum internalFormat,
if (ctx->NewState & _IMAGE_NEW_TRANSFER_STATE)
_mesa_update_state(ctx);
+#if FEATURE_convolve
if (is_color_format(internalFormat)) {
_mesa_adjust_image_for_convolution(ctx, 2, &postConvWidth,
&postConvHeight);
}
-
+#endif
if (copytexture_error_check(ctx, 2, target, level, internalFormat,
postConvWidth, postConvHeight, border))
return;
@@ -3047,8 +3060,10 @@ _mesa_CopyTexSubImage1D( GLenum target, GLint level,
if (ctx->NewState & _IMAGE_NEW_TRANSFER_STATE)
_mesa_update_state(ctx);
+#if FEATURE_convolve
/* XXX should test internal format */
_mesa_adjust_image_for_convolution(ctx, 1, &postConvWidth, NULL);
+#endif
if (copytexsubimage_error_check(ctx, 1, target, level,
xoffset, 0, 0, postConvWidth, 1))
@@ -3100,8 +3115,10 @@ _mesa_CopyTexSubImage2D( GLenum target, GLint level,
if (ctx->NewState & _IMAGE_NEW_TRANSFER_STATE)
_mesa_update_state(ctx);
+#if FEATURE_convolve
/* XXX should test internal format */
_mesa_adjust_image_for_convolution(ctx, 2, &postConvWidth, &postConvHeight);
+#endif
if (copytexsubimage_error_check(ctx, 2, target, level, xoffset, yoffset, 0,
postConvWidth, postConvHeight))
@@ -3152,8 +3169,10 @@ _mesa_CopyTexSubImage3D( GLenum target, GLint level,
if (ctx->NewState & _IMAGE_NEW_TRANSFER_STATE)
_mesa_update_state(ctx);
+#if FEATURE_convolve
/* XXX should test internal format */
_mesa_adjust_image_for_convolution(ctx, 2, &postConvWidth, &postConvHeight);
+#endif
if (copytexsubimage_error_check(ctx, 3, target, level, xoffset, yoffset,
zoffset, postConvWidth, postConvHeight))