mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 04:58:05 +02:00
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 <ian.d.romanick@intel.com>
This commit is contained in:
parent
e7e748cd04
commit
ef0e02f93d
2 changed files with 2 additions and 50 deletions
|
|
@ -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));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -370,15 +335,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)
|
||||
|
|
|
|||
|
|
@ -36,10 +36,6 @@ extern void
|
|||
_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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue