+ 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;
+
+ /* 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) );