aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/swrast
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2010-02-24 15:11:04 -0800
committerIan Romanick <[email protected]>2010-03-03 12:37:03 -0800
commitef0e02f93d5969e6659f5e41dd572c2db8e20044 (patch)
treeb77b261b5a8de10c7eaf2cd0024e8cfe5aa7736d /src/mesa/swrast
parente7e748cd04f5f014a1e4d8837ee7590d68115768 (diff)
swrast: Remove _swrast_write_zoomed_index_span and associated code
After removing support for CopyPixels and DrawPixels involving color-index buffers, _swrast_write_zoomed_index_span is no longer used. Removed it and all the support for COLOR_INDEX formats in zoom_span. Signed-off-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/mesa/swrast')
-rw-r--r--src/mesa/swrast/s_zoom.c48
-rw-r--r--src/mesa/swrast/s_zoom.h4
2 files changed, 2 insertions, 50 deletions
diff --git a/src/mesa/swrast/s_zoom.c b/src/mesa/swrast/s_zoom.c
index bec16208e3d..f224627d50e 100644
--- a/src/mesa/swrast/s_zoom.c
+++ b/src/mesa/swrast/s_zoom.c
@@ -185,15 +185,6 @@ zoom_span( GLcontext *ctx, GLint imgX, GLint imgY, const SWspan *span,
zoomed.arrayAttribs |= FRAG_BIT_COL0; /* we'll produce these values */
ASSERT(span->arrayMask & SPAN_RGBA);
}
- else if (format == GL_COLOR_INDEX) {
- /* copy Z info */
- zoomed.z = span->z;
- zoomed.zStep = span->zStep;
- /* we'll generate an array of color indexes */
- zoomed.interpMask = span->interpMask & ~SPAN_INDEX;
- zoomed.arrayMask |= SPAN_INDEX;
- ASSERT(span->arrayMask & SPAN_INDEX);
- }
else if (format == GL_DEPTH_COMPONENT) {
/* Copy color info */
zoomed.red = span->red;
@@ -288,16 +279,6 @@ zoom_span( GLcontext *ctx, GLint imgX, GLint imgY, const SWspan *span,
}
}
}
- else if (format == GL_COLOR_INDEX) {
- const GLuint *indexes = (const GLuint *) src;
- GLint i;
- for (i = 0; i < zoomedWidth; i++) {
- GLint j = unzoom_x(ctx->Pixel.ZoomX, imgX, x0 + i) - span->x;
- ASSERT(j >= 0);
- ASSERT(j < (GLint) span->end);
- zoomed.array->index[i] = indexes[j];
- }
- }
else if (format == GL_DEPTH_COMPONENT) {
const GLuint *zValues = (const GLuint *) src;
GLint i;
@@ -307,8 +288,8 @@ zoom_span( GLcontext *ctx, GLint imgX, GLint imgY, const SWspan *span,
ASSERT(j < (GLint) span->end);
zoomed.array->z[i] = zValues[j];
}
- /* Now, fall into either the RGB or COLOR_INDEX path below */
- format = ctx->Visual.rgbMode ? GL_RGBA : GL_COLOR_INDEX;
+ /* Now, fall into the RGB path below */
+ format = GL_RGBA;
}
/* write the span in rows [r0, r1) */
@@ -335,22 +316,6 @@ zoom_span( GLcontext *ctx, GLint imgX, GLint imgY, const SWspan *span,
}
}
}
- else if (format == GL_COLOR_INDEX) {
- /* use specular color array for temp storage */
- GLuint *indexSave = (GLuint *) zoomed.array->attribs[FRAG_ATTRIB_FOGC];
- const GLint end = zoomed.end; /* save */
- if (y1 - y0 > 1) {
- memcpy(indexSave, zoomed.array->index, zoomed.end * sizeof(GLuint));
- }
- for (zoomed.y = y0; zoomed.y < y1; zoomed.y++) {
- _swrast_write_index_span(ctx, &zoomed);
- zoomed.end = end; /* restore */
- if (y1 - y0 > 1) {
- /* restore the colors */
- memcpy(zoomed.array->index, indexSave, zoomed.end * sizeof(GLuint));
- }
- }
- }
}
@@ -371,15 +336,6 @@ _swrast_write_zoomed_rgb_span(GLcontext *ctx, GLint imgX, GLint imgY,
void
-_swrast_write_zoomed_index_span(GLcontext *ctx, GLint imgX, GLint imgY,
- const SWspan *span)
-{
- zoom_span(ctx, imgX, imgY, span,
- (const GLvoid *) span->array->index, GL_COLOR_INDEX);
-}
-
-
-void
_swrast_write_zoomed_depth_span(GLcontext *ctx, GLint imgX, GLint imgY,
const SWspan *span)
{
diff --git a/src/mesa/swrast/s_zoom.h b/src/mesa/swrast/s_zoom.h
index d2815b41a0e..43917be65fc 100644
--- a/src/mesa/swrast/s_zoom.h
+++ b/src/mesa/swrast/s_zoom.h
@@ -37,10 +37,6 @@ _swrast_write_zoomed_rgb_span(GLcontext *ctx, GLint imgX, GLint imgY,
const SWspan *span, const GLvoid *rgb);
extern void
-_swrast_write_zoomed_index_span(GLcontext *ctx, GLint imgX, GLint imgY,
- const SWspan *span);
-
-extern void
_swrast_write_zoomed_depth_span(GLcontext *ctx, GLint imgX, GLint imgY,
const SWspan *span);