summaryrefslogtreecommitdiff
path: root/src/mesa/main/pixel.c
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2006-10-13 17:41:23 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2006-10-13 17:41:23 +0000
commit5b0edff412f45fe64bd42fb481adeda7d34b0fa8 (patch)
tree141c7825eb0f289f69a4fc5fb206e6c7415d51c7 /src/mesa/main/pixel.c
parent461651357713b1408400669d6a809f2e367182fe (diff)
Consolidate, move, fix code related to color index and stencil image transfer
operations (shift, offset, table lookup, etc).
Diffstat (limited to 'src/mesa/main/pixel.c')
-rw-r--r--src/mesa/main/pixel.c81
1 files changed, 0 insertions, 81 deletions
diff --git a/src/mesa/main/pixel.c b/src/mesa/main/pixel.c
index e0a9084326..d20f89c543 100644
--- a/src/mesa/main/pixel.c
+++ b/src/mesa/main/pixel.c
@@ -1407,49 +1407,6 @@ _mesa_lookup_rgba_ubyte(const struct gl_color_table *table,
/*
- * Apply color index shift and offset to an array of pixels.
- */
-void
-_mesa_shift_and_offset_ci( const GLcontext *ctx, GLuint n, GLuint indexes[] )
-{
- GLint shift = ctx->Pixel.IndexShift;
- GLint offset = ctx->Pixel.IndexOffset;
- GLuint i;
- if (shift > 0) {
- for (i=0;i<n;i++) {
- indexes[i] = (indexes[i] << shift) + offset;
- }
- }
- else if (shift < 0) {
- shift = -shift;
- for (i=0;i<n;i++) {
- indexes[i] = (indexes[i] >> shift) + offset;
- }
- }
- else {
- for (i=0;i<n;i++) {
- indexes[i] = indexes[i] + offset;
- }
- }
-}
-
-
-/*
- * Apply color index mapping to color indexes.
- */
-void
-_mesa_map_ci( const GLcontext *ctx, GLuint n, GLuint index[] )
-{
- const GLuint mask = ctx->Pixel.MapItoIsize - 1;
- GLuint i;
- for (i = 0; i < n; i++) {
- const GLuint j = index[i] & mask;
- index[i] = IROUND(ctx->Pixel.MapItoI[j]);
- }
-}
-
-
-/*
* Map color indexes to float rgba values.
*/
void
@@ -1500,44 +1457,6 @@ _mesa_map_ci8_to_rgba8(const GLcontext *ctx, GLuint n, const GLubyte index[],
void
-_mesa_shift_and_offset_stencil( const GLcontext *ctx, GLuint n,
- GLstencil stencil[] )
-{
- GLuint i;
- GLint shift = ctx->Pixel.IndexShift;
- GLint offset = ctx->Pixel.IndexOffset;
- if (shift > 0) {
- for (i=0;i<n;i++) {
- stencil[i] = (stencil[i] << shift) + offset;
- }
- }
- else if (shift < 0) {
- shift = -shift;
- for (i=0;i<n;i++) {
- stencil[i] = (stencil[i] >> shift) + offset;
- }
- }
- else {
- for (i=0;i<n;i++) {
- stencil[i] = stencil[i] + offset;
- }
- }
-
-}
-
-
-void
-_mesa_map_stencil( const GLcontext *ctx, GLuint n, GLstencil stencil[] )
-{
- GLuint mask = ctx->Pixel.MapStoSsize - 1;
- GLuint i;
- for (i=0;i<n;i++) {
- stencil[i] = ctx->Pixel.MapStoS[ stencil[i] & mask ];
- }
-}
-
-
-void
_mesa_scale_and_bias_depth(const GLcontext *ctx, GLuint n,
GLfloat depthValues[])
{