summaryrefslogtreecommitdiff
path: root/src/mesa/swrast/s_drawpix.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/swrast/s_drawpix.c')
-rw-r--r--src/mesa/swrast/s_drawpix.c57
1 files changed, 0 insertions, 57 deletions
diff --git a/src/mesa/swrast/s_drawpix.c b/src/mesa/swrast/s_drawpix.c
index 9bc0e9043b..7778820c5c 100644
--- a/src/mesa/swrast/s_drawpix.c
+++ b/src/mesa/swrast/s_drawpix.c
@@ -27,7 +27,6 @@
#include "main/bufferobj.h"
#include "main/condrender.h"
#include "main/context.h"
-#include "main/convolve.h"
#include "main/image.h"
#include "main/macros.h"
#include "main/imports.h"
@@ -484,62 +483,6 @@ draw_rgba_pixels( GLcontext *ctx, GLint x, GLint y,
span.arrayMask = SPAN_RGBA;
span.arrayAttribs = FRAG_BIT_COL0; /* we're fill in COL0 attrib values */
- if (ctx->Pixel.Convolution2DEnabled || ctx->Pixel.Separable2DEnabled) {
- /* Convolution has to be handled specially. We'll create an
- * intermediate image, applying all pixel transfer operations
- * up to convolution. Then we'll convolve the image. Then
- * we'll proceed with the rest of the transfer operations and
- * rasterize the image.
- */
- GLint row;
- GLfloat *dest, *tmpImage;
-
- tmpImage = (GLfloat *) malloc(width * height * 4 * sizeof(GLfloat));
- if (!tmpImage) {
- _mesa_error(ctx, GL_OUT_OF_MEMORY, "glDrawPixels");
- return;
- }
- convImage = (GLfloat *) malloc(width * height * 4 * sizeof(GLfloat));
- if (!convImage) {
- free(tmpImage);
- _mesa_error(ctx, GL_OUT_OF_MEMORY, "glDrawPixels");
- return;
- }
-
- /* Unpack the image and apply transfer ops up to convolution */
- dest = tmpImage;
- for (row = 0; row < height; row++) {
- const GLvoid *source = _mesa_image_address2d(unpack,
- pixels, width, height, format, type, row, 0);
- _mesa_unpack_color_span_float(ctx, width, GL_RGBA, (GLfloat *) dest,
- format, type, source, unpack,
- transferOps & IMAGE_PRE_CONVOLUTION_BITS);
- dest += width * 4;
- }
-
- /* do convolution */
- if (ctx->Pixel.Convolution2DEnabled) {
- _mesa_convolve_2d_image(ctx, &width, &height, tmpImage, convImage);
- }
- else {
- ASSERT(ctx->Pixel.Separable2DEnabled);
- _mesa_convolve_sep_image(ctx, &width, &height, tmpImage, convImage);
- }
- free(tmpImage);
-
- /* continue transfer ops and draw the convolved image */
- unpack = &ctx->DefaultPacking;
- pixels = convImage;
- format = GL_RGBA;
- type = GL_FLOAT;
- transferOps &= IMAGE_POST_CONVOLUTION_BITS;
- }
- else if (ctx->Pixel.Convolution1DEnabled) {
- /* we only want to apply 1D convolution to glTexImage1D */
- transferOps &= ~(IMAGE_CONVOLUTION_BIT |
- IMAGE_POST_CONVOLUTION_SCALE_BIAS);
- }
-
if (ctx->DrawBuffer->_NumColorDrawBuffers > 0 &&
ctx->DrawBuffer->_ColorDrawBuffers[0]->DataType != GL_FLOAT &&
ctx->Color.ClampFragmentColor != GL_FALSE) {