mesa: Remove EXT_histogram.

This has always been optional, and not useful.
This commit is contained in:
Eric Anholt
2010-09-09 16:10:22 -07:00
parent 907a6734fc
commit 7126e38d90
13 changed files with 43 additions and 1166 deletions

View File

@@ -78,7 +78,6 @@ struct gl_enable_attrib
GLboolean DepthTest; GLboolean DepthTest;
GLboolean Dither; GLboolean Dither;
GLboolean Fog; GLboolean Fog;
GLboolean Histogram;
GLboolean Light[MAX_LIGHTS]; GLboolean Light[MAX_LIGHTS];
GLboolean Lighting; GLboolean Lighting;
GLboolean LineSmooth; GLboolean LineSmooth;
@@ -107,7 +106,6 @@ struct gl_enable_attrib
GLboolean Map2Vertex4; GLboolean Map2Vertex4;
GLboolean Map2Attrib[16]; /* GL_NV_vertex_program */ GLboolean Map2Attrib[16]; /* GL_NV_vertex_program */
GLboolean MinMax;
GLboolean Normalize; GLboolean Normalize;
GLboolean PixelTexture; GLboolean PixelTexture;
GLboolean PointSmooth; GLboolean PointSmooth;
@@ -279,8 +277,6 @@ _mesa_PushAttrib(GLbitfield mask)
attr->Lighting = ctx->Light.Enabled; attr->Lighting = ctx->Light.Enabled;
attr->LineSmooth = ctx->Line.SmoothFlag; attr->LineSmooth = ctx->Line.SmoothFlag;
attr->LineStipple = ctx->Line.StippleFlag; attr->LineStipple = ctx->Line.StippleFlag;
attr->Histogram = ctx->Pixel.HistogramEnabled;
attr->MinMax = ctx->Pixel.MinMaxEnabled;
attr->IndexLogicOp = ctx->Color.IndexLogicOpEnabled; attr->IndexLogicOp = ctx->Color.IndexLogicOpEnabled;
attr->ColorLogicOp = ctx->Color.ColorLogicOpEnabled; attr->ColorLogicOp = ctx->Color.ColorLogicOpEnabled;
attr->Map1Color4 = ctx->Eval.Map1Color4; attr->Map1Color4 = ctx->Eval.Map1Color4;

View File

@@ -98,7 +98,6 @@
#include "feedback.h" #include "feedback.h"
#include "fog.h" #include "fog.h"
#include "framebuffer.h" #include "framebuffer.h"
#include "histogram.h"
#include "hint.h" #include "hint.h"
#include "hash.h" #include "hash.h"
#include "light.h" #include "light.h"
@@ -738,7 +737,6 @@ init_attrib_groups(GLcontext *ctx)
_mesa_init_fbobjects( ctx ); _mesa_init_fbobjects( ctx );
_mesa_init_feedback( ctx ); _mesa_init_feedback( ctx );
_mesa_init_fog( ctx ); _mesa_init_fog( ctx );
_mesa_init_histogram( ctx );
_mesa_init_hint( ctx ); _mesa_init_hint( ctx );
_mesa_init_line( ctx ); _mesa_init_line( ctx );
_mesa_init_lighting( ctx ); _mesa_init_lighting( ctx );

View File

@@ -363,13 +363,6 @@ _mesa_set_enable(GLcontext *ctx, GLenum cap, GLboolean state)
FLUSH_VERTICES(ctx, _NEW_FOG); FLUSH_VERTICES(ctx, _NEW_FOG);
ctx->Fog.Enabled = state; ctx->Fog.Enabled = state;
break; break;
case GL_HISTOGRAM:
CHECK_EXTENSION(EXT_histogram, cap);
if (ctx->Pixel.HistogramEnabled == state)
return;
FLUSH_VERTICES(ctx, _NEW_PIXEL);
ctx->Pixel.HistogramEnabled = state;
break;
case GL_LIGHT0: case GL_LIGHT0:
case GL_LIGHT1: case GL_LIGHT1:
case GL_LIGHT2: case GL_LIGHT2:
@@ -534,12 +527,6 @@ _mesa_set_enable(GLcontext *ctx, GLenum cap, GLboolean state)
FLUSH_VERTICES(ctx, _NEW_EVAL); FLUSH_VERTICES(ctx, _NEW_EVAL);
ctx->Eval.Map2Vertex4 = state; ctx->Eval.Map2Vertex4 = state;
break; break;
case GL_MINMAX:
if (ctx->Pixel.MinMaxEnabled == state)
return;
FLUSH_VERTICES(ctx, _NEW_PIXEL);
ctx->Pixel.MinMaxEnabled = state;
break;
case GL_NORMALIZE: case GL_NORMALIZE:
if (ctx->Transform.Normalize == state) if (ctx->Transform.Normalize == state)
return; return;
@@ -1356,14 +1343,6 @@ _mesa_IsEnabled( GLenum cap )
return (ctx->Array.ArrayObj->PointSize.Enabled != 0); return (ctx->Array.ArrayObj->PointSize.Enabled != 0);
#endif #endif
/* GL_EXT_histogram */
case GL_HISTOGRAM:
CHECK_EXTENSION(EXT_histogram);
return ctx->Pixel.HistogramEnabled;
case GL_MINMAX:
CHECK_EXTENSION(EXT_histogram);
return ctx->Pixel.MinMaxEnabled;
/* GL_SGI_color_table */ /* GL_SGI_color_table */
case GL_COLOR_TABLE_SGI: case GL_COLOR_TABLE_SGI:
CHECK_EXTENSION(SGI_color_table); CHECK_EXTENSION(SGI_color_table);

View File

@@ -128,7 +128,6 @@ static const struct {
{ OFF, "GL_EXT_framebuffer_sRGB", F(EXT_framebuffer_sRGB) }, { OFF, "GL_EXT_framebuffer_sRGB", F(EXT_framebuffer_sRGB) },
{ OFF, "GL_EXT_fog_coord", F(EXT_fog_coord) }, { OFF, "GL_EXT_fog_coord", F(EXT_fog_coord) },
{ OFF, "GL_EXT_gpu_program_parameters", F(EXT_gpu_program_parameters) }, { OFF, "GL_EXT_gpu_program_parameters", F(EXT_gpu_program_parameters) },
{ OFF, "GL_EXT_histogram", F(EXT_histogram) },
{ ON, "GL_EXT_multi_draw_arrays", F(EXT_multi_draw_arrays) }, { ON, "GL_EXT_multi_draw_arrays", F(EXT_multi_draw_arrays) },
{ OFF, "GL_EXT_packed_depth_stencil", F(EXT_packed_depth_stencil) }, { OFF, "GL_EXT_packed_depth_stencil", F(EXT_packed_depth_stencil) },
{ OFF, "GL_EXT_packed_float", F(EXT_packed_float) }, { OFF, "GL_EXT_packed_float", F(EXT_packed_float) },
@@ -319,7 +318,6 @@ _mesa_enable_sw_extensions(GLcontext *ctx)
#if FEATURE_ARB_framebuffer_object #if FEATURE_ARB_framebuffer_object
ctx->Extensions.EXT_framebuffer_multisample = GL_TRUE; ctx->Extensions.EXT_framebuffer_multisample = GL_TRUE;
#endif #endif
ctx->Extensions.EXT_histogram = GL_TRUE;
/*ctx->Extensions.EXT_multi_draw_arrays = GL_TRUE;*/ /*ctx->Extensions.EXT_multi_draw_arrays = GL_TRUE;*/
ctx->Extensions.EXT_packed_depth_stencil = GL_TRUE; ctx->Extensions.EXT_packed_depth_stencil = GL_TRUE;
ctx->Extensions.EXT_paletted_texture = GL_TRUE; ctx->Extensions.EXT_paletted_texture = GL_TRUE;
@@ -400,7 +398,6 @@ _mesa_enable_imaging_extensions(GLcontext *ctx)
ctx->Extensions.EXT_blend_minmax = GL_TRUE; ctx->Extensions.EXT_blend_minmax = GL_TRUE;
ctx->Extensions.EXT_blend_subtract = GL_TRUE; ctx->Extensions.EXT_blend_subtract = GL_TRUE;
ctx->Extensions.EXT_convolution = GL_TRUE; ctx->Extensions.EXT_convolution = GL_TRUE;
ctx->Extensions.EXT_histogram = GL_TRUE;
ctx->Extensions.SGI_color_matrix = GL_TRUE; ctx->Extensions.SGI_color_matrix = GL_TRUE;
ctx->Extensions.SGI_color_table = GL_TRUE; ctx->Extensions.SGI_color_table = GL_TRUE;
} }

View File

@@ -277,7 +277,6 @@ EXTRA_EXT(NV_texture_rectangle);
EXTRA_EXT(EXT_stencil_two_side); EXTRA_EXT(EXT_stencil_two_side);
EXTRA_EXT(NV_light_max_exponent); EXTRA_EXT(NV_light_max_exponent);
EXTRA_EXT(EXT_convolution); EXTRA_EXT(EXT_convolution);
EXTRA_EXT(EXT_histogram);
EXTRA_EXT(SGI_color_table); EXTRA_EXT(SGI_color_table);
EXTRA_EXT(SGI_texture_color_table); EXTRA_EXT(SGI_texture_color_table);
EXTRA_EXT(EXT_depth_bounds_test); EXTRA_EXT(EXT_depth_bounds_test);
@@ -938,11 +937,6 @@ static const struct value_desc values[] = {
CONTEXT_FLOAT(Pixel.PostConvolutionBias[3]), CONTEXT_FLOAT(Pixel.PostConvolutionBias[3]),
extra_EXT_convolution }, extra_EXT_convolution },
/* GL_EXT_histogram */
{ GL_HISTOGRAM, CONTEXT_BOOL(Pixel.HistogramEnabled),
extra_EXT_histogram },
{ GL_MINMAX, CONTEXT_BOOL(Pixel.MinMaxEnabled), extra_EXT_histogram },
/* GL_SGI_color_table */ /* GL_SGI_color_table */
{ GL_COLOR_TABLE_SGI, { GL_COLOR_TABLE_SGI,
CONTEXT_BOOL(Pixel.ColorTableEnabled[COLORTABLE_PRECONVOLUTION]), CONTEXT_BOOL(Pixel.ColorTableEnabled[COLORTABLE_PRECONVOLUTION]),

File diff suppressed because it is too large Load Diff

View File

@@ -52,6 +52,4 @@ _mesa_init_histogram_dispatch(struct _glapi_table *disp)
#endif /* FEATURE_histogram */ #endif /* FEATURE_histogram */
extern void _mesa_init_histogram( GLcontext * ctx );
#endif /* HISTOGRAM_H */ #endif /* HISTOGRAM_H */

View File

@@ -1876,69 +1876,6 @@ _mesa_scale_and_bias_depth_uint(const GLcontext *ctx, GLuint n,
} }
} }
/*
* Update the min/max values from an array of fragment colors.
*/
static void
update_minmax(GLcontext *ctx, GLuint n, const GLfloat rgba[][4])
{
GLuint i;
for (i = 0; i < n; i++) {
/* update mins */
if (rgba[i][RCOMP] < ctx->MinMax.Min[RCOMP])
ctx->MinMax.Min[RCOMP] = rgba[i][RCOMP];
if (rgba[i][GCOMP] < ctx->MinMax.Min[GCOMP])
ctx->MinMax.Min[GCOMP] = rgba[i][GCOMP];
if (rgba[i][BCOMP] < ctx->MinMax.Min[BCOMP])
ctx->MinMax.Min[BCOMP] = rgba[i][BCOMP];
if (rgba[i][ACOMP] < ctx->MinMax.Min[ACOMP])
ctx->MinMax.Min[ACOMP] = rgba[i][ACOMP];
/* update maxs */
if (rgba[i][RCOMP] > ctx->MinMax.Max[RCOMP])
ctx->MinMax.Max[RCOMP] = rgba[i][RCOMP];
if (rgba[i][GCOMP] > ctx->MinMax.Max[GCOMP])
ctx->MinMax.Max[GCOMP] = rgba[i][GCOMP];
if (rgba[i][BCOMP] > ctx->MinMax.Max[BCOMP])
ctx->MinMax.Max[BCOMP] = rgba[i][BCOMP];
if (rgba[i][ACOMP] > ctx->MinMax.Max[ACOMP])
ctx->MinMax.Max[ACOMP] = rgba[i][ACOMP];
}
}
/*
* Update the histogram values from an array of fragment colors.
*/
static void
update_histogram(GLcontext *ctx, GLuint n, const GLfloat rgba[][4])
{
const GLint max = ctx->Histogram.Width - 1;
GLfloat w = (GLfloat) max;
GLuint i;
if (ctx->Histogram.Width == 0)
return;
for (i = 0; i < n; i++) {
GLint ri = IROUND(rgba[i][RCOMP] * w);
GLint gi = IROUND(rgba[i][GCOMP] * w);
GLint bi = IROUND(rgba[i][BCOMP] * w);
GLint ai = IROUND(rgba[i][ACOMP] * w);
ri = CLAMP(ri, 0, max);
gi = CLAMP(gi, 0, max);
bi = CLAMP(bi, 0, max);
ai = CLAMP(ai, 0, max);
ctx->Histogram.Count[ri][RCOMP]++;
ctx->Histogram.Count[gi][GCOMP]++;
ctx->Histogram.Count[bi][BCOMP]++;
ctx->Histogram.Count[ai][ACOMP]++;
}
}
/** /**
* Apply various pixel transfer operations to an array of RGBA pixels * Apply various pixel transfer operations to an array of RGBA pixels
* as indicated by the transferOps bitmask * as indicated by the transferOps bitmask
@@ -1992,14 +1929,6 @@ _mesa_apply_rgba_transfer_ops(GLcontext *ctx, GLbitfield transferOps,
if (transferOps & IMAGE_POST_COLOR_MATRIX_COLOR_TABLE_BIT) { if (transferOps & IMAGE_POST_COLOR_MATRIX_COLOR_TABLE_BIT) {
_mesa_lookup_rgba_float(&ctx->ColorTable[COLORTABLE_POSTCOLORMATRIX], n, rgba); _mesa_lookup_rgba_float(&ctx->ColorTable[COLORTABLE_POSTCOLORMATRIX], n, rgba);
} }
/* update histogram count */
if (transferOps & IMAGE_HISTOGRAM_BIT) {
update_histogram(ctx, n, (CONST GLfloat (*)[4]) rgba);
}
/* update min/max values */
if (transferOps & IMAGE_MIN_MAX_BIT) {
update_minmax(ctx, n, (CONST GLfloat (*)[4]) rgba);
}
/* clamping to [0,1] */ /* clamping to [0,1] */
if (transferOps & IMAGE_CLAMP_BIT) { if (transferOps & IMAGE_CLAMP_BIT) {
GLuint i; GLuint i;
@@ -2132,9 +2061,6 @@ _mesa_pack_rgba_span_float(GLcontext *ctx, GLuint n, GLfloat rgba[][4],
if (transferOps) { if (transferOps) {
_mesa_apply_rgba_transfer_ops(ctx, transferOps, n, rgba); _mesa_apply_rgba_transfer_ops(ctx, transferOps, n, rgba);
if ((transferOps & IMAGE_MIN_MAX_BIT) && ctx->MinMax.Sink) {
return;
}
} }
if (dstFormat == GL_LUMINANCE || dstFormat == GL_LUMINANCE_ALPHA) { if (dstFormat == GL_LUMINANCE || dstFormat == GL_LUMINANCE_ALPHA) {

View File

@@ -100,7 +100,6 @@
#define FEATURE_drawpix FEATURE_GL #define FEATURE_drawpix FEATURE_GL
#define FEATURE_evaluators FEATURE_GL #define FEATURE_evaluators FEATURE_GL
#define FEATURE_feedback FEATURE_GL #define FEATURE_feedback FEATURE_GL
#define FEATURE_histogram FEATURE_GL
#define FEATURE_pixel_transfer FEATURE_GL #define FEATURE_pixel_transfer FEATURE_GL
#define FEATURE_queryobj FEATURE_GL #define FEATURE_queryobj FEATURE_GL
#define FEATURE_rastpos FEATURE_GL #define FEATURE_rastpos FEATURE_GL

View File

@@ -811,34 +811,6 @@ struct gl_hint_attrib
}; };
/**
* Histogram attributes.
*/
struct gl_histogram_attrib
{
GLuint Width; /**< number of table entries */
GLint Format; /**< GL_ALPHA, GL_RGB, etc */
GLuint Count[HISTOGRAM_TABLE_SIZE][4]; /**< the histogram */
GLboolean Sink; /**< terminate image transfer? */
GLubyte RedSize; /**< Bits per counter */
GLubyte GreenSize;
GLubyte BlueSize;
GLubyte AlphaSize;
GLubyte LuminanceSize;
};
/**
* Color Min/max state.
*/
struct gl_minmax_attrib
{
GLenum Format;
GLboolean Sink;
GLfloat Min[4], Max[4]; /**< RGBA */
};
/** /**
* Image convolution state. * Image convolution state.
*/ */
@@ -1013,11 +985,6 @@ struct gl_pixel_attrib
GLfloat PostColorMatrixScale[4]; /**< RGBA */ GLfloat PostColorMatrixScale[4]; /**< RGBA */
GLfloat PostColorMatrixBias[4]; /**< RGBA */ GLfloat PostColorMatrixBias[4]; /**< RGBA */
/* Histogram & minmax (GL_EXT_histogram) */
/* Note: histogram and minmax data are not part of this attrib group */
GLboolean HistogramEnabled;
GLboolean MinMaxEnabled;
/*--- End Pixel Transfer State ---*/ /*--- End Pixel Transfer State ---*/
/** glPixelZoom */ /** glPixelZoom */
@@ -2717,7 +2684,6 @@ struct gl_extensions
GLboolean EXT_framebuffer_object; GLboolean EXT_framebuffer_object;
GLboolean EXT_framebuffer_sRGB; GLboolean EXT_framebuffer_sRGB;
GLboolean EXT_gpu_program_parameters; GLboolean EXT_gpu_program_parameters;
GLboolean EXT_histogram;
GLboolean EXT_multi_draw_arrays; GLboolean EXT_multi_draw_arrays;
GLboolean EXT_paletted_texture; GLboolean EXT_paletted_texture;
GLboolean EXT_packed_depth_stencil; GLboolean EXT_packed_depth_stencil;
@@ -2831,8 +2797,6 @@ struct gl_matrix_stack
#define IMAGE_POST_CONVOLUTION_COLOR_TABLE_BIT 0x40 #define IMAGE_POST_CONVOLUTION_COLOR_TABLE_BIT 0x40
#define IMAGE_COLOR_MATRIX_BIT 0x80 #define IMAGE_COLOR_MATRIX_BIT 0x80
#define IMAGE_POST_COLOR_MATRIX_COLOR_TABLE_BIT 0x100 #define IMAGE_POST_COLOR_MATRIX_COLOR_TABLE_BIT 0x100
#define IMAGE_HISTOGRAM_BIT 0x200
#define IMAGE_MIN_MAX_BIT 0x400
#define IMAGE_CLAMP_BIT 0x800 #define IMAGE_CLAMP_BIT 0x800
@@ -2846,9 +2810,7 @@ struct gl_matrix_stack
#define IMAGE_POST_CONVOLUTION_BITS (IMAGE_POST_CONVOLUTION_SCALE_BIAS | \ #define IMAGE_POST_CONVOLUTION_BITS (IMAGE_POST_CONVOLUTION_SCALE_BIAS | \
IMAGE_POST_CONVOLUTION_COLOR_TABLE_BIT | \ IMAGE_POST_CONVOLUTION_COLOR_TABLE_BIT | \
IMAGE_COLOR_MATRIX_BIT | \ IMAGE_COLOR_MATRIX_BIT | \
IMAGE_POST_COLOR_MATRIX_COLOR_TABLE_BIT |\ IMAGE_POST_COLOR_MATRIX_COLOR_TABLE_BIT)
IMAGE_HISTOGRAM_BIT | \
IMAGE_MIN_MAX_BIT)
/*@}*/ /*@}*/
@@ -3206,8 +3168,6 @@ struct __GLcontextRec
/** \name Other assorted state (not pushed/popped on attribute stack) */ /** \name Other assorted state (not pushed/popped on attribute stack) */
/*@{*/ /*@{*/
struct gl_pixelmaps PixelMaps; struct gl_pixelmaps PixelMaps;
struct gl_histogram_attrib Histogram;
struct gl_minmax_attrib MinMax;
struct gl_convolution_attrib Convolution1D; struct gl_convolution_attrib Convolution1D;
struct gl_convolution_attrib Convolution2D; struct gl_convolution_attrib Convolution2D;
struct gl_convolution_attrib Separable2D; struct gl_convolution_attrib Separable2D;

View File

@@ -738,12 +738,6 @@ update_image_transfer_state(GLcontext *ctx)
if (ctx->Pixel.ColorTableEnabled[COLORTABLE_POSTCOLORMATRIX]) if (ctx->Pixel.ColorTableEnabled[COLORTABLE_POSTCOLORMATRIX])
mask |= IMAGE_POST_COLOR_MATRIX_COLOR_TABLE_BIT; mask |= IMAGE_POST_COLOR_MATRIX_COLOR_TABLE_BIT;
if (ctx->Pixel.HistogramEnabled)
mask |= IMAGE_HISTOGRAM_BIT;
if (ctx->Pixel.MinMaxEnabled)
mask |= IMAGE_MIN_MAX_BIT;
ctx->_ImageTransferState = mask; ctx->_ImageTransferState = mask;
} }
@@ -829,8 +823,6 @@ _mesa_init_pixel( GLcontext *ctx )
init_pixelmap(&ctx->PixelMaps.GtoG); init_pixelmap(&ctx->PixelMaps.GtoG);
init_pixelmap(&ctx->PixelMaps.BtoB); init_pixelmap(&ctx->PixelMaps.BtoB);
init_pixelmap(&ctx->PixelMaps.AtoA); init_pixelmap(&ctx->PixelMaps.AtoA);
ctx->Pixel.HistogramEnabled = GL_FALSE;
ctx->Pixel.MinMaxEnabled = GL_FALSE;
ASSIGN_4V(ctx->Pixel.PostColorMatrixScale, 1.0, 1.0, 1.0, 1.0); ASSIGN_4V(ctx->Pixel.PostColorMatrixScale, 1.0, 1.0, 1.0, 1.0);
ASSIGN_4V(ctx->Pixel.PostColorMatrixBias, 0.0, 0.0, 0.0, 0.0); ASSIGN_4V(ctx->Pixel.PostColorMatrixBias, 0.0, 0.0, 0.0, 0.0);
for (i = 0; i < COLORTABLE_MAX; i++) { for (i = 0; i < COLORTABLE_MAX; i++) {

View File

@@ -103,8 +103,6 @@ copy_conv_rgba_pixels(GLcontext *ctx, GLint srcx, GLint srcy,
GLint row; GLint row;
const GLboolean zoom = ctx->Pixel.ZoomX != 1.0F || ctx->Pixel.ZoomY != 1.0F; const GLboolean zoom = ctx->Pixel.ZoomX != 1.0F || ctx->Pixel.ZoomY != 1.0F;
const GLbitfield transferOps = ctx->_ImageTransferState; const GLbitfield transferOps = ctx->_ImageTransferState;
const GLboolean sink = (ctx->Pixel.MinMaxEnabled && ctx->MinMax.Sink)
|| (ctx->Pixel.HistogramEnabled && ctx->Histogram.Sink);
GLfloat *dest, *tmpImage, *convImage; GLfloat *dest, *tmpImage, *convImage;
SWspan span; SWspan span;
@@ -160,30 +158,28 @@ copy_conv_rgba_pixels(GLcontext *ctx, GLint srcx, GLint srcy,
width, rgba); width, rgba);
} }
if (!sink) { /* write the new image */
/* write the new image */ for (row = 0; row < height; row++) {
for (row = 0; row < height; row++) { const GLfloat *src = convImage + row * width * 4;
const GLfloat *src = convImage + row * width * 4; GLfloat *rgba = (GLfloat *) span.array->attribs[FRAG_ATTRIB_COL0];
GLfloat *rgba = (GLfloat *) span.array->attribs[FRAG_ATTRIB_COL0];
/* copy convolved colors into span array */ /* copy convolved colors into span array */
memcpy(rgba, src, width * 4 * sizeof(GLfloat)); memcpy(rgba, src, width * 4 * sizeof(GLfloat));
/* write span */ /* write span */
span.x = destx; span.x = destx;
span.y = desty + row; span.y = desty + row;
span.end = width; span.end = width;
span.array->ChanType = GL_FLOAT; span.array->ChanType = GL_FLOAT;
if (zoom) { if (zoom) {
_swrast_write_zoomed_rgba_span(ctx, destx, desty, &span, rgba); _swrast_write_zoomed_rgba_span(ctx, destx, desty, &span, rgba);
} }
else { else {
_swrast_write_rgba_span(ctx, &span); _swrast_write_rgba_span(ctx, &span);
}
} }
/* restore this */
span.array->ChanType = CHAN_TYPE;
} }
/* restore this */
span.array->ChanType = CHAN_TYPE;
free(convImage); free(convImage);
} }

View File

@@ -551,8 +551,6 @@ draw_rgba_pixels( GLcontext *ctx, GLint x, GLint y,
* General solution * General solution
*/ */
{ {
const GLboolean sink = (ctx->Pixel.MinMaxEnabled && ctx->MinMax.Sink)
|| (ctx->Pixel.HistogramEnabled && ctx->Histogram.Sink);
const GLbitfield interpMask = span.interpMask; const GLbitfield interpMask = span.interpMask;
const GLbitfield arrayMask = span.arrayMask; const GLbitfield arrayMask = span.arrayMask;
const GLint srcStride const GLint srcStride
@@ -575,24 +573,21 @@ draw_rgba_pixels( GLcontext *ctx, GLint x, GLint y,
_mesa_unpack_color_span_float(ctx, spanWidth, GL_RGBA, rgba, _mesa_unpack_color_span_float(ctx, spanWidth, GL_RGBA, rgba,
format, type, source, unpack, format, type, source, unpack,
transferOps); transferOps);
/* draw the span */ /* Set these for each row since the _swrast_write_* functions
if (!sink) { * may change them while clipping/rendering.
/* Set these for each row since the _swrast_write_* functions */
* may change them while clipping/rendering. span.array->ChanType = GL_FLOAT;
*/ span.x = x + skipPixels;
span.array->ChanType = GL_FLOAT; span.y = y + row;
span.x = x + skipPixels; span.end = spanWidth;
span.y = y + row; span.arrayMask = arrayMask;
span.end = spanWidth; span.interpMask = interpMask;
span.arrayMask = arrayMask; if (zoom) {
span.interpMask = interpMask; _swrast_write_zoomed_rgba_span(ctx, imgX, imgY, &span, rgba);
if (zoom) { }
_swrast_write_zoomed_rgba_span(ctx, imgX, imgY, &span, rgba); else {
} _swrast_write_rgba_span(ctx, &span);
else { }
_swrast_write_rgba_span(ctx, &span);
}
}
source += srcStride; source += srcStride;
} /* for row */ } /* for row */