summaryrefslogtreecommitdiffstats
path: root/src/mesa/swrast
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/swrast')
-rw-r--r--src/mesa/swrast/s_depthstencil.c3
-rw-r--r--src/mesa/swrast/s_renderbuffer.c84
-rw-r--r--src/mesa/swrast/s_spantemp.h26
-rw-r--r--src/mesa/swrast/s_texrender.c62
4 files changed, 0 insertions, 175 deletions
diff --git a/src/mesa/swrast/s_depthstencil.c b/src/mesa/swrast/s_depthstencil.c
index e2558c4859a..e48177ec159 100644
--- a/src/mesa/swrast/s_depthstencil.c
+++ b/src/mesa/swrast/s_depthstencil.c
@@ -303,7 +303,6 @@ new_z24_renderbuffer_wrapper(struct gl_context *ctx,
z24rb->GetRow = get_row_z24;
z24rb->GetValues = get_values_z24;
z24rb->PutRow = put_row_z24;
- z24rb->PutRowRGB = NULL;
z24rb->PutValues = put_values_z24;
return z24rb;
@@ -457,7 +456,6 @@ new_z32f_renderbuffer_wrapper(struct gl_context *ctx,
z32frb->GetRow = get_row_z32f;
z32frb->GetValues = get_values_z32f;
z32frb->PutRow = put_row_z32f;
- z32frb->PutRowRGB = NULL;
z32frb->PutValues = put_values_z32f;
return z32frb;
@@ -709,7 +707,6 @@ new_s8_renderbuffer_wrapper(struct gl_context *ctx, struct gl_renderbuffer *dsrb
s8rb->GetRow = get_row_s8;
s8rb->GetValues = get_values_s8;
s8rb->PutRow = put_row_s8;
- s8rb->PutRowRGB = NULL;
s8rb->PutValues = put_values_s8;
return s8rb;
diff --git a/src/mesa/swrast/s_renderbuffer.c b/src/mesa/swrast/s_renderbuffer.c
index 881f3e6337b..1a7cb36d92a 100644
--- a/src/mesa/swrast/s_renderbuffer.c
+++ b/src/mesa/swrast/s_renderbuffer.c
@@ -431,26 +431,6 @@ put_row_ubyte3(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count,
static void
-put_row_rgb_ubyte3(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count,
- GLint x, GLint y, const void *values, const GLubyte *mask)
-{
- /* note: incoming values are RGB+A! */
- const GLubyte *src = (const GLubyte *) values;
- GLubyte *dst = (GLubyte *) rb->Data + 3 * (y * rb->RowStride + x);
- GLuint i;
- ASSERT(rb->Format == MESA_FORMAT_RGB888);
- ASSERT(rb->DataType == GL_UNSIGNED_BYTE);
- for (i = 0; i < count; i++) {
- if (!mask || mask[i]) {
- dst[i * 3 + 0] = src[i * 3 + 0];
- dst[i * 3 + 1] = src[i * 3 + 1];
- dst[i * 3 + 2] = src[i * 3 + 2];
- }
- }
-}
-
-
-static void
put_values_ubyte3(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count,
const GLint x[], const GLint y[], const void *values,
const GLubyte *mask)
@@ -518,28 +498,6 @@ put_row_ubyte4(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count,
static void
-put_row_rgb_ubyte4(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count,
- GLint x, GLint y, const void *values, const GLubyte *mask)
-{
- /* Store RGB values in RGBA buffer */
- const GLubyte *src = (const GLubyte *) values;
- GLubyte *dst = (GLubyte *) rb->Data + 4 * (y * rb->RowStride + x);
- GLuint i;
- ASSERT(rb->DataType == GL_UNSIGNED_BYTE);
- ASSERT(rb->Format == MESA_FORMAT_RGBA8888 ||
- rb->Format == MESA_FORMAT_RGBA8888_REV);
- for (i = 0; i < count; i++) {
- if (!mask || mask[i]) {
- dst[i * 4 + 0] = src[i * 3 + 0];
- dst[i * 4 + 1] = src[i * 3 + 1];
- dst[i * 4 + 2] = src[i * 3 + 2];
- dst[i * 4 + 3] = 0xff;
- }
- }
-}
-
-
-static void
put_values_ubyte4(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count,
const GLint x[], const GLint y[], const void *values,
const GLubyte *mask)
@@ -604,31 +562,6 @@ put_row_ushort4(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count
static void
-put_row_rgb_ushort4(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count,
- GLint x, GLint y, const void *values, const GLubyte *mask)
-{
- /* Put RGB values in RGBA buffer */
- const GLushort *src = (const GLushort *) values;
- GLushort *dst = (GLushort *) rb->Data + 4 * (y * rb->RowStride + x);
- ASSERT(rb->DataType == GL_UNSIGNED_SHORT || rb->DataType == GL_SHORT);
- if (mask) {
- GLuint i;
- for (i = 0; i < count; i++) {
- if (mask[i]) {
- dst[i * 4 + 0] = src[i * 3 + 0];
- dst[i * 4 + 1] = src[i * 3 + 1];
- dst[i * 4 + 2] = src[i * 3 + 2];
- dst[i * 4 + 3] = 0xffff;
- }
- }
- }
- else {
- memcpy(dst, src, 4 * count * sizeof(GLushort));
- }
-}
-
-
-static void
put_values_ushort4(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count,
const GLint x[], const GLint y[], const void *values,
const GLubyte *mask)
@@ -1018,7 +951,6 @@ _swrast_set_renderbuffer_accessors(struct gl_renderbuffer *rb)
rb->GetRow = get_row_ubyte3;
rb->GetValues = get_values_ubyte3;
rb->PutRow = put_row_ubyte3;
- rb->PutRowRGB = put_row_rgb_ubyte3;
rb->PutValues = put_values_ubyte3;
break;
@@ -1027,7 +959,6 @@ _swrast_set_renderbuffer_accessors(struct gl_renderbuffer *rb)
rb->DataType = GL_UNSIGNED_BYTE;
rb->GetValues = get_values_ubyte4;
rb->PutRow = put_row_ubyte4;
- rb->PutRowRGB = put_row_rgb_ubyte4;
rb->PutValues = put_values_ubyte4;
break;
@@ -1036,7 +967,6 @@ _swrast_set_renderbuffer_accessors(struct gl_renderbuffer *rb)
rb->GetValues = get_values_r8;
rb->GetRow = get_row_r8;
rb->PutRow = put_row_generic;
- rb->PutRowRGB = put_row_generic;
rb->PutValues = put_values_generic;
break;
@@ -1045,7 +975,6 @@ _swrast_set_renderbuffer_accessors(struct gl_renderbuffer *rb)
rb->GetValues = get_values_rg88;
rb->GetRow = get_row_rg88;
rb->PutRow = put_row_generic;
- rb->PutRowRGB = put_row_generic;
rb->PutValues = put_values_generic;
break;
@@ -1054,7 +983,6 @@ _swrast_set_renderbuffer_accessors(struct gl_renderbuffer *rb)
rb->GetValues = get_values_r16;
rb->GetRow = get_row_r16;
rb->PutRow = put_row_generic;
- rb->PutRowRGB = put_row_generic;
rb->PutValues = put_values_generic;
break;
@@ -1063,7 +991,6 @@ _swrast_set_renderbuffer_accessors(struct gl_renderbuffer *rb)
rb->GetValues = get_values_rg1616;
rb->GetRow = get_row_rg1616;
rb->PutRow = put_row_generic;
- rb->PutRowRGB = put_row_generic;
rb->PutValues = put_values_generic;
break;
@@ -1071,7 +998,6 @@ _swrast_set_renderbuffer_accessors(struct gl_renderbuffer *rb)
rb->DataType = GL_SHORT;
rb->GetValues = get_values_ushort4;
rb->PutRow = put_row_ushort4;
- rb->PutRowRGB = put_row_rgb_ushort4;
rb->PutValues = put_values_ushort4;
break;
@@ -1079,7 +1005,6 @@ _swrast_set_renderbuffer_accessors(struct gl_renderbuffer *rb)
rb->DataType = GL_UNSIGNED_BYTE;
rb->GetValues = get_values_ubyte;
rb->PutRow = put_row_ubyte;
- rb->PutRowRGB = NULL;
rb->PutValues = put_values_ubyte;
break;
@@ -1087,7 +1012,6 @@ _swrast_set_renderbuffer_accessors(struct gl_renderbuffer *rb)
rb->DataType = GL_UNSIGNED_SHORT;
rb->GetValues = get_values_ushort;
rb->PutRow = put_row_ushort;
- rb->PutRowRGB = NULL;
rb->PutValues = put_values_ushort;
break;
@@ -1097,7 +1021,6 @@ _swrast_set_renderbuffer_accessors(struct gl_renderbuffer *rb)
rb->DataType = GL_UNSIGNED_INT;
rb->GetValues = get_values_uint;
rb->PutRow = put_row_uint;
- rb->PutRowRGB = NULL;
rb->PutValues = put_values_uint;
break;
@@ -1106,7 +1029,6 @@ _swrast_set_renderbuffer_accessors(struct gl_renderbuffer *rb)
rb->DataType = GL_UNSIGNED_INT_24_8_EXT;
rb->GetValues = get_values_uint;
rb->PutRow = put_row_uint;
- rb->PutRowRGB = NULL;
rb->PutValues = put_values_uint;
break;
@@ -1114,7 +1036,6 @@ _swrast_set_renderbuffer_accessors(struct gl_renderbuffer *rb)
rb->GetRow = get_row_generic;
rb->GetValues = get_values_generic;
rb->PutRow = put_row_generic;
- rb->PutRowRGB = NULL;
rb->PutValues = put_values_generic;
break;
@@ -1122,7 +1043,6 @@ _swrast_set_renderbuffer_accessors(struct gl_renderbuffer *rb)
rb->GetRow = get_row_i_float32;
rb->GetValues = get_values_i_float32;
rb->PutRow = put_row_generic;
- rb->PutRowRGB = NULL;
rb->PutValues = put_values_generic;
break;
@@ -1130,7 +1050,6 @@ _swrast_set_renderbuffer_accessors(struct gl_renderbuffer *rb)
rb->GetRow = get_row_l_float32;
rb->GetValues = get_values_l_float32;
rb->PutRow = put_row_generic;
- rb->PutRowRGB = NULL;
rb->PutValues = put_values_generic;
break;
@@ -1138,7 +1057,6 @@ _swrast_set_renderbuffer_accessors(struct gl_renderbuffer *rb)
rb->GetRow = get_row_a_float32;
rb->GetValues = get_values_a_float32;
rb->PutRow = put_row_a_float32;
- rb->PutRowRGB = NULL;
rb->PutValues = put_values_a_float32;
break;
@@ -1146,7 +1064,6 @@ _swrast_set_renderbuffer_accessors(struct gl_renderbuffer *rb)
rb->GetRow = get_row_rg_float32;
rb->GetValues = get_values_rg_float32;
rb->PutRow = put_row_generic;
- rb->PutRowRGB = NULL;
rb->PutValues = put_values_generic;
break;
@@ -1154,7 +1071,6 @@ _swrast_set_renderbuffer_accessors(struct gl_renderbuffer *rb)
rb->GetRow = get_row_r_float32;
rb->GetValues = get_values_r_float32;
rb->PutRow = put_row_generic;
- rb->PutRowRGB = NULL;
rb->PutValues = put_values_generic;
break;
diff --git a/src/mesa/swrast/s_spantemp.h b/src/mesa/swrast/s_spantemp.h
index ff26856679c..2d2561b6f1e 100644
--- a/src/mesa/swrast/s_spantemp.h
+++ b/src/mesa/swrast/s_spantemp.h
@@ -117,32 +117,6 @@ NAME(put_row)( struct gl_context *ctx, struct gl_renderbuffer *rb,
static void
-NAME(put_row_rgb)( struct gl_context *ctx, struct gl_renderbuffer *rb,
- GLuint count, GLint x, GLint y,
- const void *values, const GLubyte mask[] )
-{
-#ifdef SPAN_VARS
- SPAN_VARS
-#endif
- const RB_TYPE (*src)[3] = (const RB_TYPE (*)[3]) values;
- GLuint i;
- INIT_PIXEL_PTR(pixel, x, y);
- for (i = 0; i < count; i++) {
- if (!mask || mask[i]) {
-#ifdef STORE_PIXEL_RGB
- STORE_PIXEL_RGB(pixel, x + i, y, src[i]);
-#else
- STORE_PIXEL(pixel, x + i, y, src[i]);
-#endif
- }
- INC_PIXEL_PTR(pixel);
- }
- (void) rb;
- (void) ctx;
-}
-
-
-static void
NAME(put_values)( struct gl_context *ctx, struct gl_renderbuffer *rb,
GLuint count, const GLint x[], const GLint y[],
const void *values, const GLubyte mask[] )
diff --git a/src/mesa/swrast/s_texrender.c b/src/mesa/swrast/s_texrender.c
index 08ceb4dbf15..52342020536 100644
--- a/src/mesa/swrast/s_texrender.c
+++ b/src/mesa/swrast/s_texrender.c
@@ -235,67 +235,6 @@ texture_put_row(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count
}
}
-/**
- * Put row of RGB values into a renderbuffer that wraps a texture image.
- */
-static void
-texture_put_row_rgb(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count,
- GLint x, GLint y, const void *values, const GLubyte *mask)
-{
- struct texture_renderbuffer *trb = texture_renderbuffer(rb);
- const GLint z = trb->Zoffset;
- GLuint i;
-
- y += trb->Yoffset;
-
- if (rb->DataType == CHAN_TYPE) {
- const GLchan *rgb = (const GLchan *) values;
- for (i = 0; i < count; i++) {
- if (!mask || mask[i]) {
- trb->Store(trb->TexImage, x + i, y, z, rgb);
- }
- rgb += 3;
- }
- }
- else if (rb->DataType == GL_UNSIGNED_SHORT) {
- const GLushort *zValues = (const GLushort *) values;
- for (i = 0; i < count; i++) {
- if (!mask || mask[i]) {
- trb->Store(trb->TexImage, x + i, y, z, zValues + i);
- }
- }
- }
- else if (rb->DataType == GL_UNSIGNED_INT) {
- const GLuint *zValues = (const GLuint *) values;
- for (i = 0; i < count; i++) {
- if (!mask || mask[i]) {
- trb->Store(trb->TexImage, x + i, y, z, zValues + i);
- }
- }
- }
- else if (rb->DataType == GL_UNSIGNED_INT_24_8_EXT) {
- const GLuint *zValues = (const GLuint *) values;
- for (i = 0; i < count; i++) {
- if (!mask || mask[i]) {
- GLfloat flt = (GLfloat) ((zValues[i] >> 8) * (1.0 / 0xffffff));
- trb->Store(trb->TexImage, x + i, y, z, &flt);
- }
- }
- }
- else if (rb->DataType == GL_UNSIGNED_INT_8_24_REV_MESA) {
- const GLuint *zValues = (const GLuint *) values;
- for (i = 0; i < count; i++) {
- if (!mask || mask[i]) {
- GLfloat flt = (GLfloat) ((zValues[i] & 0xffffff) * (1.0 / 0xffffff));
- trb->Store(trb->TexImage, x + i, y, z, &flt);
- }
- }
- }
- else {
- _mesa_problem(ctx, "invalid rb->DataType in texture_put_row");
- }
-}
-
static void
texture_put_values(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count,
@@ -399,7 +338,6 @@ wrap_texture(struct gl_context *ctx, struct gl_renderbuffer_attachment *att)
trb->Base.GetRow = texture_get_row;
trb->Base.GetValues = texture_get_values;
trb->Base.PutRow = texture_put_row;
- trb->Base.PutRowRGB = texture_put_row_rgb;
trb->Base.PutValues = texture_put_values;
/* update attachment point */