summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs/VERSIONS1
-rw-r--r--progs/demos/Makefile1
-rw-r--r--progs/demos/pixeltex.c210
-rw-r--r--src/mesa/main/attrib.c3
-rw-r--r--src/mesa/main/dlist.c93
-rw-r--r--src/mesa/main/enable.c28
-rw-r--r--src/mesa/main/extensions.c4
-rw-r--r--src/mesa/main/get.c60
-rw-r--r--src/mesa/main/get_gen.py34
-rw-r--r--src/mesa/main/mtypes.h6
-rw-r--r--src/mesa/main/pixel.c5
-rw-r--r--src/mesa/main/state.c15
-rw-r--r--src/mesa/main/texstate.c132
-rw-r--r--src/mesa/main/texstate.h44
-rw-r--r--src/mesa/sources1
-rw-r--r--src/mesa/swrast/descrip.mms5
-rw-r--r--src/mesa/swrast/s_copypix.c12
-rw-r--r--src/mesa/swrast/s_drawpix.c5
-rw-r--r--src/mesa/swrast/s_pixeltex.c110
-rw-r--r--src/mesa/swrast/s_pixeltex.h38
-rw-r--r--windows/VC6/mesa/mesa/mesa.dsp8
-rw-r--r--windows/VC7/mesa/mesa/mesa.vcproj6
22 files changed, 6 insertions, 815 deletions
diff --git a/docs/VERSIONS b/docs/VERSIONS
index 22eae50d543..6cf48e68d35 100644
--- a/docs/VERSIONS
+++ b/docs/VERSIONS
@@ -1422,5 +1422,6 @@ Mesa Version History
- MESA_GLX_ALPHA_BITS env var for xlib driver
Changes:
- removed GL_HP_occlusion_test (use GL_ARB_occlusion_query instead)
+ - removed GL_SGIX/SGIS_pixel_texture extensions
Bug fixes:
diff --git a/progs/demos/Makefile b/progs/demos/Makefile
index 109d0aca91f..8240b9fc47e 100644
--- a/progs/demos/Makefile
+++ b/progs/demos/Makefile
@@ -37,7 +37,6 @@ PROGS = \
multiarb \
occlude \
paltex \
- pixeltex \
pointblast \
ray \
readpix \
diff --git a/progs/demos/pixeltex.c b/progs/demos/pixeltex.c
deleted file mode 100644
index 03e653a4543..00000000000
--- a/progs/demos/pixeltex.c
+++ /dev/null
@@ -1,210 +0,0 @@
-/*
- * GL_SGIS_pixel_texture demo
- *
- * Brian Paul
- * 6 Apr 2000
- *
- * Copyright (C) 2000 Brian Paul All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-
-/*
- * How this works:
- * 1. We load the image into a 2D texture.
- * 2. We generate a sequence of RGB images in which the R component
- * is really the S texture coordinate and the G component is really
- * the T texture coordinate.
- * By warping the mapping from R to S and G to T we can get non-linear
- * distortions.
- * 3. Draw the warped image (a 2-D warping function) with pixel texgen
- * enabled.
- * 4. Loop over the warped images to animate.
- *
- * The pixel texgen extension can also be used to do color-space
- * conversions. For example, we could convert YCR to RGB with a
- * 3D texture map which takes YCR as the S,T,R texture coordinate and
- * returns RGB texel values.
- *
- * You can use this extension in (at least) two ways:
- * 1. glDrawPixels w/ color space conversion/warping
- * 2. glDrawPixels to spatially warp another image in texture memory
- *
- * We're basically using glDrawPixels to draw a texture coordinate image.
- */
-
-
-#include <math.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <GL/glut.h>
-#include <GL/glext.h>
-#include "readtex.h"
-
-#define TEXTURE_FILE "../images/girl.rgb"
-
-static int ImgWidth = 300, ImgHeight = 300;
-#define FRAMES 20
-static GLubyte *ImgData[FRAMES];
-static GLint Frame = 0;
-
-static GLboolean TextureFlag = GL_TRUE;
-
-
-static void Display( void )
-{
- glClear( GL_COLOR_BUFFER_BIT );
-
- if (TextureFlag) {
- glEnable(GL_PIXEL_TEXTURE_SGIS);
- glEnable(GL_TEXTURE_2D);
- }
- else {
- glDisable(GL_PIXEL_TEXTURE_SGIS);
- glDisable(GL_TEXTURE_2D);
- }
-
- glColor3f(1, 1, 1);
- glRasterPos2f(10, 10);
- glDrawPixels(ImgWidth, ImgHeight, GL_RGB, GL_UNSIGNED_BYTE, ImgData[Frame]);
-
- glutSwapBuffers();
-}
-
-
-static void Reshape( int width, int height )
-{
- glViewport( 0, 0, width, height );
- glMatrixMode( GL_PROJECTION );
- glLoadIdentity();
- glOrtho(0, width, 0, height, -1, 1);
- glMatrixMode( GL_MODELVIEW );
- glLoadIdentity();
-}
-
-
-static void Key( unsigned char key, int x, int y )
-{
- (void) x;
- (void) y;
- switch (key) {
- case ' ':
- TextureFlag = !TextureFlag;
- break;
- case 27:
- exit(0);
- break;
- }
- glutPostRedisplay();
-}
-
-
-static void Idle(void)
-{
- Frame++;
- if (Frame >= FRAMES)
- Frame = 0;
- glutPostRedisplay();
-}
-
-
-static GLubyte warp(GLfloat s, int frame)
-{
- static const GLfloat pi = 3.14159265;
- static int halfFrame = FRAMES / 2;
- GLfloat y, weight, v;
- if (frame >= halfFrame)
- frame = halfFrame - (frame - halfFrame);
- y = sin(s * pi);
- weight = (float) frame / (FRAMES-1);
- v = y * (0.8 * weight + 0.2);
- return (GLint) (v * 255.0F);
-}
-
-
-static void InitImage(void)
-{
- int i, j, frame;
- for (frame = 0; frame < FRAMES; frame++) {
- ImgData[frame] = (GLubyte *) malloc(ImgWidth * ImgHeight * 3);
- for (i = 0; i < ImgHeight; i++) {
- for (j = 0; j < ImgWidth; j++) {
- GLubyte *pixel = ImgData[frame] + (i * ImgWidth + j) * 3;
- pixel[0] = warp((float) j / (ImgWidth - 0), frame);
- pixel[1] = warp((float) i / (ImgHeight - 0), frame);
- pixel[2] = 0.0;
- }
- }
- }
-}
-
-
-static void Init( int argc, char *argv[] )
-{
- const char *exten = (const char *) glGetString(GL_EXTENSIONS);
- if (!strstr(exten, "GL_SGIS_pixel_texture")) {
- printf("Sorry, GL_SGIS_pixel_texture not supported by this renderer.\n");
- exit(1);
- }
-
- /* linear filtering looks nicer, but it's slower, since it's in software */
-#if 1
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
-#else
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
-#endif
-
- glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
-
- glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
-
- if (!LoadRGBMipmaps(TEXTURE_FILE, GL_RGB)) {
- printf("Error: couldn't load texture image\n");
- exit(1);
- }
-
- glClearColor(0.3, 0.3, 0.4, 1.0);
-
- InitImage();
-
- printf("Hit SPACE to toggle pixel texgen\n");
-}
-
-
-int main( int argc, char *argv[] )
-{
- glutInit( &argc, argv );
- glutInitWindowSize( 330, 330 );
- glutInitWindowPosition( 0, 0 );
- glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );
- glutCreateWindow(argv[0] );
-
- Init( argc, argv );
-
- glutKeyboardFunc( Key );
- glutReshapeFunc( Reshape );
- glutDisplayFunc( Display );
- glutIdleFunc( Idle );
-
- glutMainLoop();
- return 0;
-}
diff --git a/src/mesa/main/attrib.c b/src/mesa/main/attrib.c
index b4a587efb04..41119f7937d 100644
--- a/src/mesa/main/attrib.c
+++ b/src/mesa/main/attrib.c
@@ -179,7 +179,6 @@ _mesa_PushAttrib(GLbitfield mask)
MEMCPY(attr->Map2Attrib, ctx->Eval.Map2Attrib, sizeof(ctx->Eval.Map2Attrib));
attr->Normalize = ctx->Transform.Normalize;
attr->RasterPositionUnclipped = ctx->Transform.RasterPositionUnclipped;
- attr->PixelTexture = ctx->Pixel.PixelTextureEnabled;
attr->PointSmooth = ctx->Point.SmoothFlag;
attr->PointSprite = ctx->Point.PointSprite;
attr->PolygonOffsetPoint = ctx->Polygon.OffsetPoint;
@@ -499,8 +498,6 @@ pop_enable_group(GLcontext *ctx, const struct gl_enable_attrib *enable)
TEST_AND_UPDATE(ctx->Transform.RasterPositionUnclipped,
enable->RasterPositionUnclipped,
GL_RASTER_POSITION_UNCLIPPED_IBM);
- TEST_AND_UPDATE(ctx->Pixel.PixelTextureEnabled, enable->PixelTexture,
- GL_POINT_SMOOTH);
TEST_AND_UPDATE(ctx->Point.SmoothFlag, enable->PointSmooth,
GL_POINT_SMOOTH);
if (ctx->Extensions.NV_point_sprite || ctx->Extensions.ARB_point_sprite) {
diff --git a/src/mesa/main/dlist.c b/src/mesa/main/dlist.c
index 0ce0e095a9b..8a0ac0fa4ab 100644
--- a/src/mesa/main/dlist.c
+++ b/src/mesa/main/dlist.c
@@ -285,9 +285,6 @@ typedef enum {
OPCODE_WINDOW_POS,
/* GL_ARB_multitexture */
OPCODE_ACTIVE_TEXTURE,
- /* GL_SGIX/SGIS_pixel_texture */
- OPCODE_PIXEL_TEXGEN_SGIX,
- OPCODE_PIXEL_TEXGEN_PARAMETER_SGIS,
/* GL_ARB_texture_compression */
OPCODE_COMPRESSED_TEX_IMAGE_1D,
OPCODE_COMPRESSED_TEX_IMAGE_2D,
@@ -769,9 +766,6 @@ _mesa_init_lists( void )
InstSize[OPCODE_CONTINUE] = 2;
InstSize[OPCODE_ERROR] = 3;
InstSize[OPCODE_END_OF_LIST] = 1;
- /* GL_SGIX/SGIS_pixel_texture */
- InstSize[OPCODE_PIXEL_TEXGEN_SGIX] = 2;
- InstSize[OPCODE_PIXEL_TEXGEN_PARAMETER_SGIS] = 3;
/* GL_ARB_texture_compression */
InstSize[OPCODE_COMPRESSED_TEX_IMAGE_1D] = 8;
InstSize[OPCODE_COMPRESSED_TEX_IMAGE_2D] = 9;
@@ -3943,22 +3937,6 @@ save_MultTransposeMatrixfARB( const GLfloat m[16] )
}
-static void GLAPIENTRY
-save_PixelTexGenSGIX(GLenum mode)
-{
- GET_CURRENT_CONTEXT(ctx);
- Node *n;
- ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION( ctx, OPCODE_PIXEL_TEXGEN_SGIX, 1 );
- if (n) {
- n[1].e = mode;
- }
- if (ctx->ExecuteFlag) {
- CALL_PixelTexGenSGIX(ctx->Exec, ( mode ));
- }
-}
-
-
/* GL_ARB_texture_compression */
static void GLAPIENTRY
save_CompressedTexImage1DARB(GLenum target, GLint level,
@@ -4235,46 +4213,6 @@ save_SampleCoverageARB(GLclampf value, GLboolean invert)
}
-/* GL_SGIS_pixel_texture */
-
-static void GLAPIENTRY
-save_PixelTexGenParameteriSGIS(GLenum target, GLint value)
-{
- GET_CURRENT_CONTEXT(ctx);
- Node *n;
- ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION( ctx, OPCODE_PIXEL_TEXGEN_PARAMETER_SGIS, 2 );
- if (n) {
- n[1].e = target;
- n[2].i = value;
- }
- if (ctx->ExecuteFlag) {
- CALL_PixelTexGenParameteriSGIS(ctx->Exec, ( target, value ));
- }
-}
-
-
-static void GLAPIENTRY
-save_PixelTexGenParameterfSGIS(GLenum target, GLfloat value)
-{
- save_PixelTexGenParameteriSGIS(target, (GLint) value);
-}
-
-
-static void GLAPIENTRY
-save_PixelTexGenParameterivSGIS(GLenum target, const GLint *value)
-{
- save_PixelTexGenParameteriSGIS(target, *value);
-}
-
-
-static void GLAPIENTRY
-save_PixelTexGenParameterfvSGIS(GLenum target, const GLfloat *value)
-{
- save_PixelTexGenParameteriSGIS(target, (GLint) *value);
-}
-
-
/*
* GL_NV_vertex_program
*/
@@ -6268,12 +6206,6 @@ execute_list( GLcontext *ctx, GLuint list )
case OPCODE_ACTIVE_TEXTURE: /* GL_ARB_multitexture */
CALL_ActiveTextureARB(ctx->Exec, ( n[1].e ));
break;
- case OPCODE_PIXEL_TEXGEN_SGIX: /* GL_SGIX_pixel_texture */
- CALL_PixelTexGenSGIX(ctx->Exec, ( n[1].e ));
- break;
- case OPCODE_PIXEL_TEXGEN_PARAMETER_SGIS: /* GL_SGIS_pixel_texture */
- CALL_PixelTexGenParameteriSGIS(ctx->Exec, ( n[1].e, n[2].i ));
- break;
case OPCODE_COMPRESSED_TEX_IMAGE_1D: /* GL_ARB_texture_compression */
CALL_CompressedTexImage1DARB(ctx->Exec, (n[1].e, n[2].i, n[3].e,
n[4].i, n[5].i, n[6].i, n[7].data));
@@ -7346,20 +7278,6 @@ static void GLAPIENTRY exec_SeparableFilter2D(GLenum target, GLenum internalForm
type, row, column));
}
-static void GLAPIENTRY exec_GetPixelTexGenParameterivSGIS(GLenum target, GLint *value)
-{
- GET_CURRENT_CONTEXT(ctx);
- FLUSH_VERTICES(ctx, 0);
- CALL_GetPixelTexGenParameterivSGIS(ctx->Exec, ( target, value));
-}
-
-static void GLAPIENTRY exec_GetPixelTexGenParameterfvSGIS(GLenum target, GLfloat *value)
-{
- GET_CURRENT_CONTEXT(ctx);
- FLUSH_VERTICES(ctx, 0);
- CALL_GetPixelTexGenParameterfvSGIS(ctx->Exec, ( target, value));
-}
-
static void GLAPIENTRY exec_ColorPointerEXT(GLint size, GLenum type, GLsizei stride,
GLsizei count, const GLvoid *ptr)
{
@@ -7784,17 +7702,6 @@ _mesa_init_dlist_table( struct _glapi_table *table )
SET_TexSubImage3DEXT(table, save_TexSubImage3D);
#endif
- /* 15. GL_SGIX_pixel_texture */
- SET_PixelTexGenSGIX(table, save_PixelTexGenSGIX);
-
- /* 15. GL_SGIS_pixel_texture */
- SET_PixelTexGenParameteriSGIS(table, save_PixelTexGenParameteriSGIS);
- SET_PixelTexGenParameterfSGIS(table, save_PixelTexGenParameterfSGIS);
- SET_PixelTexGenParameterivSGIS(table, save_PixelTexGenParameterivSGIS);
- SET_PixelTexGenParameterfvSGIS(table, save_PixelTexGenParameterfvSGIS);
- SET_GetPixelTexGenParameterivSGIS(table, exec_GetPixelTexGenParameterivSGIS);
- SET_GetPixelTexGenParameterfvSGIS(table, exec_GetPixelTexGenParameterfvSGIS);
-
/* 30. GL_EXT_vertex_array */
SET_ColorPointerEXT(table, exec_ColorPointerEXT);
SET_EdgeFlagPointerEXT(table, exec_EdgeFlagPointerEXT);
diff --git a/src/mesa/main/enable.c b/src/mesa/main/enable.c
index 7ce13a19675..931aa2cc26c 100644
--- a/src/mesa/main/enable.c
+++ b/src/mesa/main/enable.c
@@ -687,24 +687,6 @@ void _mesa_set_enable( GLcontext *ctx, GLenum cap, GLboolean state )
client_state( ctx, cap, state );
return;
- /* GL_SGIS_pixel_texture */
- case GL_PIXEL_TEXTURE_SGIS:
- CHECK_EXTENSION(SGIS_pixel_texture, cap);
- if (ctx->Pixel.PixelTextureEnabled == state)
- return;
- FLUSH_VERTICES(ctx, _NEW_PIXEL);
- ctx->Pixel.PixelTextureEnabled = state;
- break;
-
- /* GL_SGIX_pixel_texture */
- case GL_PIXEL_TEX_GEN_SGIX:
- CHECK_EXTENSION(SGIX_pixel_texture, cap);
- if (ctx->Pixel.PixelTextureEnabled == state)
- return;
- FLUSH_VERTICES(ctx, _NEW_PIXEL);
- ctx->Pixel.PixelTextureEnabled = state;
- break;
-
/* GL_SGI_color_table */
case GL_COLOR_TABLE_SGI:
CHECK_EXTENSION(SGI_color_table, cap);
@@ -1242,16 +1224,6 @@ _mesa_IsEnabled( GLenum cap )
CHECK_EXTENSION(EXT_histogram);
return ctx->Pixel.MinMaxEnabled;
- /* GL_SGIS_pixel_texture */
- case GL_PIXEL_TEXTURE_SGIS:
- CHECK_EXTENSION(SGIS_pixel_texture);
- return ctx->Pixel.PixelTextureEnabled;
-
- /* GL_SGIX_pixel_texture */
- case GL_PIXEL_TEX_GEN_SGIX:
- CHECK_EXTENSION(SGIX_pixel_texture);
- return ctx->Pixel.PixelTextureEnabled;
-
/* GL_SGI_color_table */
case GL_COLOR_TABLE_SGI:
CHECK_EXTENSION(SGI_color_table);
diff --git a/src/mesa/main/extensions.c b/src/mesa/main/extensions.c
index 816fca9957e..b56cf539d0e 100644
--- a/src/mesa/main/extensions.c
+++ b/src/mesa/main/extensions.c
@@ -155,12 +155,10 @@ static const struct {
{ OFF, "GL_SGI_color_table", F(SGI_color_table) },
{ OFF, "GL_SGI_texture_color_table", F(SGI_texture_color_table) },
{ OFF, "GL_SGIS_generate_mipmap", F(SGIS_generate_mipmap) },
- { OFF, "GL_SGIS_pixel_texture", F(SGIS_pixel_texture) },
{ OFF, "GL_SGIS_texture_border_clamp", F(ARB_texture_border_clamp) },
{ ON, "GL_SGIS_texture_edge_clamp", F(SGIS_texture_edge_clamp) },
{ ON, "GL_SGIS_texture_lod", F(SGIS_texture_lod) },
{ OFF, "GL_SGIX_depth_texture", F(SGIX_depth_texture) },
- { OFF, "GL_SGIX_pixel_texture", F(SGIX_pixel_texture) },
{ OFF, "GL_SGIX_shadow", F(SGIX_shadow) },
{ OFF, "GL_SGIX_shadow_ambient", F(SGIX_shadow_ambient) },
{ OFF, "GL_SUN_multi_draw_arrays", F(EXT_multi_draw_arrays) },
@@ -274,10 +272,8 @@ _mesa_enable_sw_extensions(GLcontext *ctx)
ctx->Extensions.SGI_color_table = GL_TRUE;
ctx->Extensions.SGI_texture_color_table = GL_TRUE;
ctx->Extensions.SGIS_generate_mipmap = GL_TRUE;
- ctx->Extensions.SGIS_pixel_texture = GL_TRUE;
ctx->Extensions.SGIS_texture_edge_clamp = GL_TRUE;
ctx->Extensions.SGIX_depth_texture = GL_TRUE;
- ctx->Extensions.SGIX_pixel_texture = GL_TRUE;
ctx->Extensions.SGIX_shadow = GL_TRUE;
ctx->Extensions.SGIX_shadow_ambient = GL_TRUE;
}
diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c
index 9bbc29e346c..3363f311e18 100644
--- a/src/mesa/main/get.c
+++ b/src/mesa/main/get.c
@@ -53,30 +53,6 @@
CHECK1(EXTNAME, "Float", PNAME )
-/**
- * Helper routine.
- */
-static GLenum
-pixel_texgen_mode(const GLcontext *ctx)
-{
- if (ctx->Pixel.FragmentRgbSource == GL_CURRENT_RASTER_POSITION) {
- if (ctx->Pixel.FragmentAlphaSource == GL_CURRENT_RASTER_POSITION) {
- return GL_RGBA;
- }
- else {
- return GL_RGB;
- }
- }
- else {
- if (ctx->Pixel.FragmentAlphaSource == GL_CURRENT_RASTER_POSITION) {
- return GL_ALPHA;
- }
- else {
- return GL_NONE;
- }
- }
-}
-
void GLAPIENTRY
_mesa_GetBooleanv( GLenum pname, GLboolean *params )
{
@@ -1183,18 +1159,6 @@ _mesa_GetBooleanv( GLenum pname, GLboolean *params )
params[15] = FLOAT_TO_BOOLEAN(matrix[15]);
}
break;
- case GL_PIXEL_TEXTURE_SGIS:
- CHECK_EXTENSION_B(SGIS_pixel_texture, pname);
- params[0] = ctx->Pixel.PixelTextureEnabled;
- break;
- case GL_PIXEL_TEX_GEN_SGIX:
- CHECK_EXTENSION_B(SGIX_pixel_texture, pname);
- params[0] = ctx->Pixel.PixelTextureEnabled;
- break;
- case GL_PIXEL_TEX_GEN_MODE_SGIX:
- CHECK_EXTENSION_B(SGIX_pixel_texture, pname);
- params[0] = ENUM_TO_BOOLEAN(pixel_texgen_mode(ctx));
- break;
case GL_COLOR_MATRIX_SGI:
{
const GLfloat *matrix = ctx->ColorMatrixStack.Top->m;
@@ -3013,18 +2977,6 @@ _mesa_GetFloatv( GLenum pname, GLfloat *params )
params[15] = matrix[15];
}
break;
- case GL_PIXEL_TEXTURE_SGIS:
- CHECK_EXTENSION_F(SGIS_pixel_texture, pname);
- params[0] = BOOLEAN_TO_FLOAT(ctx->Pixel.PixelTextureEnabled);
- break;
- case GL_PIXEL_TEX_GEN_SGIX:
- CHECK_EXTENSION_F(SGIX_pixel_texture, pname);
- params[0] = BOOLEAN_TO_FLOAT(ctx->Pixel.PixelTextureEnabled);
- break;
- case GL_PIXEL_TEX_GEN_MODE_SGIX:
- CHECK_EXTENSION_F(SGIX_pixel_texture, pname);
- params[0] = ENUM_TO_FLOAT(pixel_texgen_mode(ctx));
- break;
case GL_COLOR_MATRIX_SGI:
{
const GLfloat *matrix = ctx->ColorMatrixStack.Top->m;
@@ -4843,18 +4795,6 @@ _mesa_GetIntegerv( GLenum pname, GLint *params )
params[15] = IROUND(matrix[15]);
}
break;
- case GL_PIXEL_TEXTURE_SGIS:
- CHECK_EXTENSION_I(SGIS_pixel_texture, pname);
- params[0] = BOOLEAN_TO_INT(ctx->Pixel.PixelTextureEnabled);
- break;
- case GL_PIXEL_TEX_GEN_SGIX:
- CHECK_EXTENSION_I(SGIX_pixel_texture, pname);
- params[0] = BOOLEAN_TO_INT(ctx->Pixel.PixelTextureEnabled);
- break;
- case GL_PIXEL_TEX_GEN_MODE_SGIX:
- CHECK_EXTENSION_I(SGIX_pixel_texture, pname);
- params[0] = ENUM_TO_INT(pixel_texgen_mode(ctx));
- break;
case GL_COLOR_MATRIX_SGI:
{
const GLfloat *matrix = ctx->ColorMatrixStack.Top->m;
diff --git a/src/mesa/main/get_gen.py b/src/mesa/main/get_gen.py
index c22dda9f186..1940b4d6c63 100644
--- a/src/mesa/main/get_gen.py
+++ b/src/mesa/main/get_gen.py
@@ -558,16 +558,6 @@ StateVars = [
"matrix[3]", "matrix[7]", "matrix[11]", "matrix[15]"],
"const GLfloat *matrix = ctx->TextureMatrixStack[ctx->Texture.CurrentUnit].Top->m;", None ),
- # GL_SGIS_pixel_texture
- ( "GL_PIXEL_TEXTURE_SGIS", GLboolean, ["ctx->Pixel.PixelTextureEnabled"],
- "", "SGIS_pixel_texture" ),
-
- # GL_SGIX_pixel_texture
- ( "GL_PIXEL_TEX_GEN_SGIX", GLboolean, ["ctx->Pixel.PixelTextureEnabled"],
- "", "SGIX_pixel_texture" ),
- ( "GL_PIXEL_TEX_GEN_MODE_SGIX", GLenum, ["pixel_texgen_mode(ctx)"],
- "", "SGIX_pixel_texture" ),
-
# GL_SGI_color_matrix (also in 1.2 imaging)
( "GL_COLOR_MATRIX_SGI", GLfloat,
["matrix[0]", "matrix[1]", "matrix[2]", "matrix[3]",
@@ -1119,30 +1109,6 @@ def EmitHeader():
#define CHECK_EXTENSION_F(EXTNAME, PNAME) \\
CHECK1(EXTNAME, "Float", PNAME )
-
-/**
- * Helper routine.
- */
-static GLenum
-pixel_texgen_mode(const GLcontext *ctx)
-{
- if (ctx->Pixel.FragmentRgbSource == GL_CURRENT_RASTER_POSITION) {
- if (ctx->Pixel.FragmentAlphaSource == GL_CURRENT_RASTER_POSITION) {
- return GL_RGBA;
- }
- else {
- return GL_RGB;
- }
- }
- else {
- if (ctx->Pixel.FragmentAlphaSource == GL_CURRENT_RASTER_POSITION) {
- return GL_ALPHA;
- }
- else {
- return GL_NONE;
- }
- }
-}
"""
return
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index 81f10cb1f73..87e13f5e62c 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -941,10 +941,6 @@ struct gl_pixel_attrib
/** GL_EXT_histogram */
GLboolean HistogramEnabled;
GLboolean MinMaxEnabled;
- /** GL_SGIS_pixel_texture */
- GLboolean PixelTextureEnabled;
- GLenum FragmentRgbSource;
- GLenum FragmentAlphaSource;
/** GL_SGI_color_matrix */
GLfloat PostColorMatrixScale[4]; /**< RGBA */
GLfloat PostColorMatrixBias[4]; /**< RGBA */
@@ -2381,11 +2377,9 @@ struct gl_extensions
GLboolean SGI_color_table;
GLboolean SGI_texture_color_table;
GLboolean SGIS_generate_mipmap;
- GLboolean SGIS_pixel_texture;
GLboolean SGIS_texture_edge_clamp;
GLboolean SGIS_texture_lod;
GLboolean SGIX_depth_texture;
- GLboolean SGIX_pixel_texture;
GLboolean SGIX_shadow;
GLboolean SGIX_shadow_ambient; /* or GL_ARB_shadow_ambient */
GLboolean TDFX_texture_compression_FXT1;
diff --git a/src/mesa/main/pixel.c b/src/mesa/main/pixel.c
index 14eca650b1f..3b1f848e8c3 100644
--- a/src/mesa/main/pixel.c
+++ b/src/mesa/main/pixel.c
@@ -1,6 +1,6 @@
/*
* Mesa 3-D graphics library
- * Version: 6.3
+ * Version: 6.5
*
* Copyright (C) 1999-2005 Brian Paul All Rights Reserved.
*
@@ -2038,9 +2038,6 @@ _mesa_init_pixel( GLcontext *ctx )
ctx->Pixel.MapAtoA[0] = 0.0;
ctx->Pixel.HistogramEnabled = GL_FALSE;
ctx->Pixel.MinMaxEnabled = GL_FALSE;
- ctx->Pixel.PixelTextureEnabled = GL_FALSE;
- ctx->Pixel.FragmentRgbSource = GL_PIXEL_GROUP_COLOR_SGIS;
- ctx->Pixel.FragmentAlphaSource = GL_PIXEL_GROUP_COLOR_SGIS;
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.ColorTableScale, 1.0, 1.0, 1.0, 1.0);
diff --git a/src/mesa/main/state.c b/src/mesa/main/state.c
index 56cb358c4a3..627b24cce0c 100644
--- a/src/mesa/main/state.c
+++ b/src/mesa/main/state.c
@@ -419,21 +419,6 @@ _mesa_init_exec_table(struct _glapi_table *exec)
SET_GetMinmaxParameterivEXT(exec, _mesa_GetMinmaxParameteriv);
#endif
- /* ?. GL_SGIX_pixel_texture */
-#if _HAVE_FULL_GL
- SET_PixelTexGenSGIX(exec, _mesa_PixelTexGenSGIX);
-#endif
-
- /* 15. GL_SGIS_pixel_texture */
-#if _HAVE_FULL_GL
- SET_PixelTexGenParameteriSGIS(exec, _mesa_PixelTexGenParameteriSGIS);
- SET_PixelTexGenParameterivSGIS(exec, _mesa_PixelTexGenParameterivSGIS);
- SET_PixelTexGenParameterfSGIS(exec, _mesa_PixelTexGenParameterfSGIS);
- SET_PixelTexGenParameterfvSGIS(exec, _mesa_PixelTexGenParameterfvSGIS);
- SET_GetPixelTexGenParameterivSGIS(exec, _mesa_GetPixelTexGenParameterivSGIS);
- SET_GetPixelTexGenParameterfvSGIS(exec, _mesa_GetPixelTexGenParameterfvSGIS);
-#endif
-
/* 30. GL_EXT_vertex_array */
#if _HAVE_FULL_GL
SET_ColorPointerEXT(exec, _mesa_ColorPointerEXT);
diff --git a/src/mesa/main/texstate.c b/src/mesa/main/texstate.c
index b352d1a5ad6..608dbc1088a 100644
--- a/src/mesa/main/texstate.c
+++ b/src/mesa/main/texstate.c
@@ -2704,138 +2704,6 @@ _mesa_ClientActiveTextureARB( GLenum target )
/**********************************************************************/
-/* Pixel Texgen Extensions */
-/**********************************************************************/
-
-void GLAPIENTRY
-_mesa_PixelTexGenSGIX(GLenum mode)
-{
- GLenum newRgbSource, newAlphaSource;
- GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
-
- switch (mode) {
- case GL_NONE:
- newRgbSource = GL_PIXEL_GROUP_COLOR_SGIS;
- newAlphaSource = GL_PIXEL_GROUP_COLOR_SGIS;
- break;
- case GL_ALPHA:
- newRgbSource = GL_PIXEL_GROUP_COLOR_SGIS;
- newAlphaSource = GL_CURRENT_RASTER_COLOR;
- break;
- case GL_RGB:
- newRgbSource = GL_CURRENT_RASTER_COLOR;
- newAlphaSource = GL_PIXEL_GROUP_COLOR_SGIS;
- break;
- case GL_RGBA:
- newRgbSource = GL_CURRENT_RASTER_COLOR;
- newAlphaSource = GL_CURRENT_RASTER_COLOR;
- break;
- default:
- _mesa_error(ctx, GL_INVALID_ENUM, "glPixelTexGenSGIX(mode)");
- return;
- }
-
- if (newRgbSource == ctx->Pixel.FragmentRgbSource &&
- newAlphaSource == ctx->Pixel.FragmentAlphaSource)
- return;
-
- FLUSH_VERTICES(ctx, _NEW_PIXEL);
- ctx->Pixel.FragmentRgbSource = newRgbSource;
- ctx->Pixel.FragmentAlphaSource = newAlphaSource;
-}
-
-
-void GLAPIENTRY
-_mesa_PixelTexGenParameterfSGIS(GLenum target, GLfloat value)
-{
- _mesa_PixelTexGenParameteriSGIS(target, (GLint) value);
-}
-
-
-void GLAPIENTRY
-_mesa_PixelTexGenParameterfvSGIS(GLenum target, const GLfloat *value)
-{
- _mesa_PixelTexGenParameteriSGIS(target, (GLint) *value);
-}
-
-
-void GLAPIENTRY
-_mesa_PixelTexGenParameteriSGIS(GLenum target, GLint value)
-{
- GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
-
- if (value != GL_CURRENT_RASTER_COLOR && value != GL_PIXEL_GROUP_COLOR_SGIS) {
- _mesa_error(ctx, GL_INVALID_ENUM, "glPixelTexGenParameterSGIS(value)");
- return;
- }
-
- switch (target) {
- case GL_PIXEL_FRAGMENT_RGB_SOURCE_SGIS:
- if (ctx->Pixel.FragmentRgbSource == (GLenum) value)
- return;
- FLUSH_VERTICES(ctx, _NEW_PIXEL);
- ctx->Pixel.FragmentRgbSource = (GLenum) value;
- break;
- case GL_PIXEL_FRAGMENT_ALPHA_SOURCE_SGIS:
- if (ctx->Pixel.FragmentAlphaSource == (GLenum) value)
- return;
- FLUSH_VERTICES(ctx, _NEW_PIXEL);
- ctx->Pixel.FragmentAlphaSource = (GLenum) value;
- break;
- default:
- _mesa_error(ctx, GL_INVALID_ENUM, "glPixelTexGenParameterSGIS(target)");
- return;
- }
-}
-
-
-void GLAPIENTRY
-_mesa_PixelTexGenParameterivSGIS(GLenum target, const GLint *value)
-{
- _mesa_PixelTexGenParameteriSGIS(target, *value);
-}
-
-
-void GLAPIENTRY
-_mesa_GetPixelTexGenParameterfvSGIS(GLenum target, GLfloat *value)
-{
- GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
-
- if (target == GL_PIXEL_FRAGMENT_RGB_SOURCE_SGIS) {
- *value = (GLfloat) ctx->Pixel.FragmentRgbSource;
- }
- else if (target == GL_PIXEL_FRAGMENT_ALPHA_SOURCE_SGIS) {
- *value = (GLfloat) ctx->Pixel.FragmentAlphaSource;
- }
- else {
- _mesa_error(ctx, GL_INVALID_ENUM, "glGetPixelTexGenParameterfvSGIS(target)");
- }
-}
-
-
-void GLAPIENTRY
-_mesa_GetPixelTexGenParameterivSGIS(GLenum target, GLint *value)
-{
- GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
-
- if (target == GL_PIXEL_FRAGMENT_RGB_SOURCE_SGIS) {
- *value = (GLint) ctx->Pixel.FragmentRgbSource;
- }
- else if (target == GL_PIXEL_FRAGMENT_ALPHA_SOURCE_SGIS) {
- *value = (GLint) ctx->Pixel.FragmentAlphaSource;
- }
- else {
- _mesa_error(ctx, GL_INVALID_ENUM, "glGetPixelTexGenParameterivSGIS(target)");
- }
-}
-
-
-
-/**********************************************************************/
/***** State management *****/
/**********************************************************************/
diff --git a/src/mesa/main/texstate.h b/src/mesa/main/texstate.h
index 7cc3d2c19ce..ca29c6a23ff 100644
--- a/src/mesa/main/texstate.h
+++ b/src/mesa/main/texstate.h
@@ -5,9 +5,9 @@
/*
* Mesa 3-D graphics library
- * Version: 5.1
+ * Version: 6.5
*
- * Copyright (C) 1999-2002 Brian Paul All Rights Reserved.
+ * Copyright (C) 1999-2005 Brian Paul All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -133,46 +133,6 @@ extern void GLAPIENTRY
_mesa_ClientActiveTextureARB( GLenum target );
-/*
- * Pixel Texture Extensions
- */
-
-extern void GLAPIENTRY
-_mesa_PixelTexGenSGIX(GLenum mode);
-
-extern void GLAPIENTRY
-_mesa_PixelTexGenParameterfSGIS(GLenum target, GLfloat value);
-
-#ifdef VMS
-#define _mesa_PixelTexGenParameterfvSGIS _mesa_PixelTexGenParameterfv
-#endif
-extern void GLAPIENTRY
-_mesa_PixelTexGenParameterfvSGIS(GLenum target, const GLfloat *value);
-
-extern void GLAPIENTRY
-_mesa_PixelTexGenParameteriSGIS(GLenum target, GLint value);
-
-#ifdef VMS
-#define _mesa_PixelTexGenParameterivSGIS _mesa_PixelTexGenParameteriv
-#endif
-extern void GLAPIENTRY
-_mesa_PixelTexGenParameterivSGIS(GLenum target, const GLint *value);
-
-#ifdef VMS
-#define _mesa_GetPixelTexGenParameterfvSGIS _mesa_GetPixelTexGenParameterfv
-#endif
-extern void GLAPIENTRY
-_mesa_GetPixelTexGenParameterfvSGIS(GLenum target, GLfloat *value);
-
-#ifdef VMS
-#define _mesa_GetPixelTexGenParameterivSGIS _mesa_GetPixelTexGenParameteriv
-#endif
-extern void GLAPIENTRY
-_mesa_GetPixelTexGenParameterivSGIS(GLenum target, GLint *value);
-
-/*@}*/
-
-
/**
* \name Initialization, state maintenance
*/
diff --git a/src/mesa/sources b/src/mesa/sources
index 920510becf7..bd3af92cbc9 100644
--- a/src/mesa/sources
+++ b/src/mesa/sources
@@ -99,7 +99,6 @@ SWRAST_SOURCES = \
swrast/s_logic.c \
swrast/s_masking.c \
swrast/s_nvfragprog.c \
- swrast/s_pixeltex.c \
swrast/s_points.c \
swrast/s_readpix.c \
swrast/s_span.c \
diff --git a/src/mesa/swrast/descrip.mms b/src/mesa/swrast/descrip.mms
index 9c45bff8f61..25b6c90ccb2 100644
--- a/src/mesa/swrast/descrip.mms
+++ b/src/mesa/swrast/descrip.mms
@@ -21,7 +21,7 @@ CFLAGS = /include=($(INCDIR),[])/define=(PTHREADS=1)/name=(as_is,short)/float=ie
SOURCES = s_aaline.c s_aatriangle.c s_accum.c s_alpha.c \
s_bitmap.c s_blend.c s_buffers.c s_context.c s_copypix.c s_depth.c \
s_drawpix.c s_feedback.c s_fog.c s_imaging.c s_lines.c s_logic.c \
- s_masking.c s_nvfragprog.c s_pixeltex.c s_points.c s_readpix.c \
+ s_masking.c s_nvfragprog.c s_points.c s_readpix.c \
s_span.c s_stencil.c s_texstore.c s_texcombine.c s_texfilter.c \
s_triangle.c s_zoom.c s_atifragshader.c
@@ -30,7 +30,7 @@ OBJECTS = s_aaline.obj,s_aatriangle.obj,s_accum.obj,s_alpha.obj,\
s_buffers.obj,s_context.obj,s_atifragshader.obj,\
s_copypix.obj,s_depth.obj,s_drawpix.obj,s_feedback.obj,s_fog.obj,\
s_imaging.obj,s_lines.obj,s_logic.obj,s_masking.obj,s_nvfragprog.obj,\
- s_pixeltex.obj,s_points.obj,s_readpix.obj,s_span.obj,s_stencil.obj,\
+ s_points.obj,s_readpix.obj,s_span.obj,s_stencil.obj,\
s_texstore.obj,s_texcombine.obj,s_texfilter.obj,s_triangle.obj,s_zoom.obj
##### RULES #####
@@ -65,7 +65,6 @@ s_lines.obj : s_lines.c
s_logic.obj : s_logic.c
s_masking.obj : s_masking.c
s_nvfragprog.obj : s_nvfragprog.c
-s_pixeltex.obj : s_pixeltex.c
s_points.obj : s_points.c
s_readpix.obj : s_readpix.c
s_span.obj : s_span.c
diff --git a/src/mesa/swrast/s_copypix.c b/src/mesa/swrast/s_copypix.c
index 1718145e9a2..842b8d20c3b 100644
--- a/src/mesa/swrast/s_copypix.c
+++ b/src/mesa/swrast/s_copypix.c
@@ -35,7 +35,6 @@
#include "s_context.h"
#include "s_depth.h"
-#include "s_pixeltex.h"
#include "s_span.h"
#include "s_stencil.h"
#include "s_zoom.h"
@@ -216,13 +215,7 @@ copy_conv_rgba_pixels(GLcontext *ctx, GLint srcx, GLint srcy,
/* convert floats back to chan */
float_span_to_chan(width, (const GLfloat (*)[4]) src, span.array->rgba);
- if (ctx->Pixel.PixelTextureEnabled && ctx->Texture._EnabledUnits) {
- span.end = width;
- _swrast_pixel_texture(ctx, &span);
- }
-
/* write row to framebuffer */
-
dy = desty + row;
if (quick_draw && dy >= 0 && dy < (GLint) ctx->DrawBuffer->Height) {
drawRb->PutRow(ctx, drawRb, width, destx, dy, span.array->rgba, NULL);
@@ -359,11 +352,6 @@ copy_rgba_pixels(GLcontext *ctx, GLint srcx, GLint srcy,
span.array->rgba);
}
- if (ctx->Pixel.PixelTextureEnabled && ctx->Texture._EnabledUnits) {
- span.end = width;
- _swrast_pixel_texture(ctx, &span);
- }
-
/* Write color span */
if (quick_draw && dy >= 0 && dy < (GLint) ctx->DrawBuffer->Height) {
drawRb->PutRow(ctx, drawRb, width, destx, dy, span.array->rgba, NULL);
diff --git a/src/mesa/swrast/s_drawpix.c b/src/mesa/swrast/s_drawpix.c
index 6af80233483..c550b88e7d6 100644
--- a/src/mesa/swrast/s_drawpix.c
+++ b/src/mesa/swrast/s_drawpix.c
@@ -34,7 +34,6 @@
#include "s_context.h"
#include "s_drawpix.h"
-#include "s_pixeltex.h"
#include "s_span.h"
#include "s_stencil.h"
#include "s_zoom.h"
@@ -795,10 +794,6 @@ draw_rgba_pixels( GLcontext *ctx, GLint x, GLint y,
(ctx->Pixel.HistogramEnabled && ctx->Histogram.Sink))
continue;
- if (ctx->Pixel.PixelTextureEnabled && ctx->Texture._EnabledUnits) {
- _swrast_pixel_texture(ctx, &span);
- }
-
/* draw the span */
if (quickDraw) {
rb->PutRow(ctx, rb, span.end, span.x, span.y,
diff --git a/src/mesa/swrast/s_pixeltex.c b/src/mesa/swrast/s_pixeltex.c
deleted file mode 100644
index b4c919bf56c..00000000000
--- a/src/mesa/swrast/s_pixeltex.c
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
- * Mesa 3-D graphics library
- * Version: 6.3
- *
- * Copyright (C) 1999-2004 Brian Paul All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-
-/*
- * This file implements both the GL_SGIX_pixel_texture and
- * GL_SIGS_pixel_texture extensions. Luckily, they pretty much
- * overlap in functionality so we use the same state variables
- * and execution code for both.
- */
-
-
-#include "glheader.h"
-#include "colormac.h"
-#include "imports.h"
-
-#include "s_context.h"
-#include "s_pixeltex.h"
-
-
-/*
- * Convert RGBA values into strq texture coordinates.
- */
-static void
-pixeltexgen(GLcontext *ctx, GLuint n, const GLchan rgba[][4],
- GLfloat texcoord[][4])
-{
- if (ctx->Pixel.FragmentRgbSource == GL_CURRENT_RASTER_COLOR) {
- GLuint i;
- for (i = 0; i < n; i++) {
- texcoord[i][0] = ctx->Current.RasterColor[RCOMP];
- texcoord[i][1] = ctx->Current.RasterColor[GCOMP];
- texcoord[i][2] = ctx->Current.RasterColor[BCOMP];
- }
- }
- else {
- GLuint i;
- ASSERT(ctx->Pixel.FragmentRgbSource == GL_PIXEL_GROUP_COLOR_SGIS);
- for (i = 0; i < n; i++) {
- texcoord[i][0] = CHAN_TO_FLOAT(rgba[i][RCOMP]);
- texcoord[i][1] = CHAN_TO_FLOAT(rgba[i][GCOMP]);
- texcoord[i][2] = CHAN_TO_FLOAT(rgba[i][BCOMP]);
- }
- }
-
- if (ctx->Pixel.FragmentAlphaSource == GL_CURRENT_RASTER_COLOR) {
- GLuint i;
- for (i = 0; i < n; i++) {
- texcoord[i][3] = ctx->Current.RasterColor[ACOMP];
- }
- }
- else {
- GLuint i;
- ASSERT(ctx->Pixel.FragmentAlphaSource == GL_PIXEL_GROUP_COLOR_SGIS);
- for (i = 0; i < n; i++) {
- texcoord[i][3] = CHAN_TO_FLOAT(rgba[i][ACOMP]);
- }
- }
-}
-
-
-
-/*
- * Used by glDraw/CopyPixels: the incoming image colors are treated
- * as texture coordinates. Use those coords to texture the image.
- * This is for GL_SGIS_pixel_texture / GL_SGIX_pixel_texture.
- */
-void
-_swrast_pixel_texture(GLcontext *ctx, struct sw_span *span)
-{
- GLuint unit;
-
- ASSERT(!(span->arrayMask & SPAN_TEXTURE));
- span->arrayMask |= SPAN_TEXTURE;
- span->interpMask &= ~SPAN_TEXTURE;
-
- /* convert colors into texture coordinates */
- pixeltexgen( ctx, span->end,
- (const GLchan (*)[4]) span->array->rgba,
- span->array->texcoords[0] );
-
- /* copy the new texture units for all enabled units */
- for (unit = 1; unit < ctx->Const.MaxTextureUnits; unit++) {
- if (ctx->Texture.Unit[unit]._ReallyEnabled) {
- MEMCPY( span->array->texcoords[unit], span->array->texcoords[0],
- span->end * 4 * sizeof(GLfloat) );
- }
- }
-}
diff --git a/src/mesa/swrast/s_pixeltex.h b/src/mesa/swrast/s_pixeltex.h
deleted file mode 100644
index 6ef7a44df1e..00000000000
--- a/src/mesa/swrast/s_pixeltex.h
+++ /dev/null
@@ -1,38 +0,0 @@
-
-/*
- * Mesa 3-D graphics library
- * Version: 4.1
- *
- * Copyright (C) 1999-2002 Brian Paul All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-
-#ifndef S_PIXELTEX_H
-#define S_PIXELTEX_H
-
-#include "mtypes.h"
-#include "swrast.h"
-
-
-extern void
-_swrast_pixel_texture(GLcontext *ctx, struct sw_span *span);
-
-
-#endif
diff --git a/windows/VC6/mesa/mesa/mesa.dsp b/windows/VC6/mesa/mesa/mesa.dsp
index 95b05be531e..64f55cc5085 100644
--- a/windows/VC6/mesa/mesa/mesa.dsp
+++ b/windows/VC6/mesa/mesa/mesa.dsp
@@ -430,10 +430,6 @@ SOURCE=..\..\..\..\src\mesa\swrast\s_nvfragprog.c
# End Source File
# Begin Source File
-SOURCE=..\..\..\..\src\mesa\swrast\s_pixeltex.c
-# End Source File
-# Begin Source File
-
SOURCE=..\..\..\..\src\mesa\swrast\s_points.c
# End Source File
# Begin Source File
@@ -1103,10 +1099,6 @@ SOURCE=..\..\..\..\src\mesa\swrast\s_nvfragprog.h
# End Source File
# Begin Source File
-SOURCE=..\..\..\..\src\mesa\swrast\s_pixeltex.h
-# End Source File
-# Begin Source File
-
SOURCE=..\..\..\..\src\mesa\swrast\s_points.h
# End Source File
# Begin Source File
diff --git a/windows/VC7/mesa/mesa/mesa.vcproj b/windows/VC7/mesa/mesa/mesa.vcproj
index 3bb2fb3764a..7305e255673 100644
--- a/windows/VC7/mesa/mesa/mesa.vcproj
+++ b/windows/VC7/mesa/mesa/mesa.vcproj
@@ -378,9 +378,6 @@
RelativePath="..\..\..\..\src\mesa\swrast\s_nvfragprog.c">
</File>
<File
- RelativePath="..\..\..\..\src\mesa\swrast\s_pixeltex.c">
- </File>
- <File
RelativePath="..\..\..\..\src\mesa\swrast\s_points.c">
</File>
<File
@@ -895,9 +892,6 @@
RelativePath="..\..\..\..\src\mesa\swrast\s_nvfragprog.h">
</File>
<File
- RelativePath="..\..\..\..\src\mesa\swrast\s_pixeltex.h">
- </File>
- <File
RelativePath="..\..\..\..\src\mesa\swrast\s_points.h">
</File>
<File