diff options
author | Brian Paul <[email protected]> | 2011-12-24 08:54:26 -0700 |
---|---|---|
committer | Brian Paul <[email protected]> | 2011-12-24 08:54:26 -0700 |
commit | fc41473b9f7d1171a2921a825807889b8fcbcaaf (patch) | |
tree | 436f32a8177ad21b34660d14023312a8a02380bd /src/mesa/drivers/dri/common | |
parent | c4b5f0cadb18bad22b4c28424723a09832209c6f (diff) |
mesa: remove gl_renderbufer::PutMonoRow() and PutMonoValues()
The former was only used for clearing buffers. The later wasn't used
anywhere! Remove them and all implementations of those functions.
Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/common')
-rw-r--r-- | src/mesa/drivers/dri/common/depthtmp.h | 59 | ||||
-rw-r--r-- | src/mesa/drivers/dri/common/spantmp2.h | 118 | ||||
-rw-r--r-- | src/mesa/drivers/dri/common/stenciltmp.h | 58 |
3 files changed, 0 insertions, 235 deletions
diff --git a/src/mesa/drivers/dri/common/depthtmp.h b/src/mesa/drivers/dri/common/depthtmp.h index c6e2bb75c16..31ebc68ee82 100644 --- a/src/mesa/drivers/dri/common/depthtmp.h +++ b/src/mesa/drivers/dri/common/depthtmp.h @@ -71,63 +71,6 @@ static void TAG(WriteDepthSpan)( struct gl_context *ctx, } -#if HAVE_HW_DEPTH_SPANS -/* implement MonoWriteDepthSpan() in terms of WriteDepthSpan() */ -static void -TAG(WriteMonoDepthSpan)( struct gl_context *ctx, struct gl_renderbuffer *rb, - GLuint n, GLint x, GLint y, - const void *value, const GLubyte mask[] ) -{ - const GLuint depthVal = *((GLuint *) value); - GLuint depths[MAX_WIDTH]; - GLuint i; - for (i = 0; i < n; i++) - depths[i] = depthVal; - TAG(WriteDepthSpan)(ctx, rb, n, x, y, depths, mask); -} -#else -static void TAG(WriteMonoDepthSpan)( struct gl_context *ctx, - struct gl_renderbuffer *rb, - GLuint n, GLint x, GLint y, - const void *value, - const GLubyte mask[] ) -{ - HW_WRITE_LOCK() - { - const GLuint depth = *((GLuint *) value); - GLint x1; - GLint n1; - LOCAL_DEPTH_VARS; - - y = Y_FLIP( y ); - - HW_CLIPLOOP() - { - GLint i = 0; - CLIPSPAN( x, y, n, x1, n1, i ); - - if ( DBG ) fprintf( stderr, "%s %d..%d (x1 %d) = %u\n", - __FUNCTION__, (int)i, (int)n1, (int)x1, (GLuint)depth ); - - if ( mask ) { - for ( ; n1>0 ; i++, x1++, n1-- ) { - if ( mask[i] ) WRITE_DEPTH( x1, y, depth ); - } - } else { - for ( ; n1>0 ; x1++, n1-- ) { - WRITE_DEPTH( x1, y, depth ); - } - } - } - HW_ENDCLIPLOOP(); - } - HW_WRITE_UNLOCK(); - - (void) ctx; -} -#endif - - static void TAG(WriteDepthPixels)( struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint n, @@ -259,9 +202,7 @@ static void TAG(InitDepthPointers)(struct gl_renderbuffer *rb) rb->GetValues = TAG(ReadDepthPixels); rb->PutRow = TAG(WriteDepthSpan); rb->PutRowRGB = NULL; - rb->PutMonoRow = TAG(WriteMonoDepthSpan); rb->PutValues = TAG(WriteDepthPixels); - rb->PutMonoValues = NULL; } diff --git a/src/mesa/drivers/dri/common/spantmp2.h b/src/mesa/drivers/dri/common/spantmp2.h index 83cfbb16409..6030ca18a7e 100644 --- a/src/mesa/drivers/dri/common/spantmp2.h +++ b/src/mesa/drivers/dri/common/spantmp2.h @@ -63,9 +63,6 @@ #define PUT_VALUE(_x, _y, _v) *(volatile GLushort *)(GET_PTR(_x, _y)) = (_v) #endif /* GET_VALUE */ -#define INIT_MONO_PIXEL(p, color) \ - p = PACK_COLOR_565( color[0], color[1], color[2] ) - #define WRITE_RGBA( _x, _y, r, g, b, a ) \ PUT_VALUE(_x, _y, ((((int)r & 0xf8) << 8) | \ (((int)g & 0xfc) << 3) | \ @@ -97,9 +94,6 @@ #define PUT_VALUE(_x, _y, _v) *(volatile GLushort *)(GET_PTR(_x, _y)) = (_v) #endif /* GET_VALUE */ -#define INIT_MONO_PIXEL(p, color) \ - p = PACK_COLOR_565_REV( color[0], color[1], color[2] ) - #define WRITE_RGBA( _x, _y, r, g, b, a ) \ PUT_VALUE(_x, _y, PACK_COLOR_565_REV( r, g, b )) @@ -130,9 +124,6 @@ #define PUT_VALUE(_x, _y, _v) *(volatile GLushort *)(GET_PTR(_x, _y)) = (_v) #endif /* GET_VALUE */ -#define INIT_MONO_PIXEL(p, color) \ - p = PACK_COLOR_4444_REV(color[3], color[0], color[1], color[2]) - #define WRITE_RGBA( _x, _y, r, g, b, a ) \ PUT_VALUE(_x, _y, PACK_COLOR_4444_REV(a, r, g, b)) \ @@ -163,9 +154,6 @@ #define PUT_VALUE(_x, _y, _v) *(volatile GLushort *)(GET_PTR(_x, _y)) = (_v) #endif /* GET_VALUE */ -#define INIT_MONO_PIXEL(p, color) \ - p = PACK_COLOR_4444(color[3], color[0], color[1], color[2]) - #define WRITE_RGBA( _x, _y, r, g, b, a ) \ PUT_VALUE(_x, _y, PACK_COLOR_4444(a, r, g, b)) \ @@ -196,9 +184,6 @@ #define PUT_VALUE(_x, _y, _v) *(volatile GLushort *)(GET_PTR(_x, _y)) = (_v) #endif /* GET_VALUE */ -#define INIT_MONO_PIXEL(p, color) \ - p = PACK_COLOR_1555(color[3], color[0], color[1], color[2]) - #define WRITE_RGBA( _x, _y, r, g, b, a ) \ PUT_VALUE(_x, _y, PACK_COLOR_1555(a, r, g, b)) \ @@ -228,9 +213,6 @@ #define PUT_VALUE(_x, _y, _v) *(volatile GLushort *)(GET_PTR(_x, _y)) = (_v) #endif /* GET_VALUE */ -#define INIT_MONO_PIXEL(p, color) \ - p = PACK_COLOR_1555_REV(color[3], color[0], color[1], color[2]) - #define WRITE_RGBA( _x, _y, r, g, b, a ) \ PUT_VALUE(_x, _y, PACK_COLOR_1555_REV(a, r, g, b)) \ @@ -261,9 +243,6 @@ #define PUT_VALUE(_x, _y, _v) *(volatile GLuint *)(GET_PTR(_x, _y)) = (_v) #endif /* GET_VALUE */ -# define INIT_MONO_PIXEL(p, color) \ - p = PACK_COLOR_8888(color[3], color[0], color[1], color[2]) - # define WRITE_RGBA(_x, _y, r, g, b, a) \ PUT_VALUE(_x, _y, ((r << 16) | \ (g << 8) | \ @@ -316,9 +295,6 @@ #define PUT_VALUE(_x, _y, _v) *(volatile GLuint *)(GET_PTR(_x, _y)) = (_v) #endif /* GET_VALUE */ -# define INIT_MONO_PIXEL(p, color) \ - p = PACK_COLOR_8888(color[2], color[1], color[0], color[3]) - # define WRITE_RGBA(_x, _y, r, g, b, a) \ PUT_VALUE(_x, _y, ((r << 8) | \ (g << 16) | \ @@ -374,9 +350,6 @@ #define PUT_VALUE(_x, _y, _v) *(volatile GLuint *)(GET_PTR(_x, _y)) = (_v) #endif /* GET_VALUE */ -# define INIT_MONO_PIXEL(p, color) \ - p = PACK_COLOR_8888(0xff, color[0], color[1], color[2]) - # define WRITE_RGBA(_x, _y, r, g, b, a) \ PUT_VALUE(_x, _y, ((r << 16) | \ (g << 8) | \ @@ -428,9 +401,6 @@ #define PUT_VALUE(_x, _y, _v) *(volatile GLubyte *)(GET_PTR(_x, _y)) = (_v) #endif /* GET_VALUE */ -# define INIT_MONO_PIXEL(p, color) \ - p = color[3] - # define WRITE_RGBA(_x, _y, r, g, b, a) \ PUT_VALUE(_x, _y, a | (r & 0 /* quiet warnings */)) @@ -594,91 +564,6 @@ static void TAG(WriteRGBAPixels)( struct gl_context *ctx, } -static void TAG(WriteMonoRGBASpan)( struct gl_context *ctx, - struct gl_renderbuffer *rb, - GLuint n, GLint x, GLint y, - const void *value, const GLubyte mask[] ) -{ - (void) ctx; - - HW_WRITE_LOCK() - { - const GLubyte *color = (const GLubyte *) value; - GLint x1; - GLint n1; - LOCAL_VARS; - INIT_MONO_PIXEL(p, color); - - y = Y_FLIP( y ); - - if (DBG) fprintf(stderr, "WriteMonoRGBASpan\n"); - - HW_WRITE_CLIPLOOP() - { - GLint i = 0; - CLIPSPAN(x,y,n,x1,n1,i); - if (mask) - { - for (;n1>0;i++,x1++,n1--) - if (mask[i]) - WRITE_PIXEL( x1, y, p ); - } - else - { - for (;n1>0;i++,x1++,n1--) - WRITE_PIXEL( x1, y, p ); - } - } - HW_ENDCLIPLOOP(); - } - HW_WRITE_UNLOCK(); -} - - -static void TAG(WriteMonoRGBAPixels)( struct gl_context *ctx, - struct gl_renderbuffer *rb, - GLuint n, - const GLint x[], const GLint y[], - const void *value, - const GLubyte mask[] ) -{ - (void) ctx; - - HW_WRITE_LOCK() - { - const GLubyte *color = (const GLubyte *) value; - GLint i; - LOCAL_VARS; - INIT_MONO_PIXEL(p, color); - - if (DBG) fprintf(stderr, "WriteMonoRGBAPixels\n"); - - HW_WRITE_CLIPLOOP() - { - if (mask) - { - for (i=0;i<n;i++) - if (mask[i]) { - int fy = Y_FLIP(y[i]); - if (CLIPPIXEL( x[i], fy )) - WRITE_PIXEL( x[i], fy, p ); - } - } - else - { - for (i=0;i<n;i++) { - int fy = Y_FLIP(y[i]); - if (CLIPPIXEL( x[i], fy )) - WRITE_PIXEL( x[i], fy, p ); - } - } - } - HW_ENDCLIPLOOP(); - } - HW_WRITE_UNLOCK(); -} - - static void TAG(ReadRGBASpan)( struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint n, GLint x, GLint y, void *values) @@ -879,9 +764,7 @@ static void TAG(InitPointers)(struct gl_renderbuffer *rb) { rb->PutRow = TAG(WriteRGBASpan); rb->PutRowRGB = TAG(WriteRGBSpan); - rb->PutMonoRow = TAG(WriteMonoRGBASpan); rb->PutValues = TAG(WriteRGBAPixels); - rb->PutMonoValues = TAG(WriteMonoRGBAPixels); rb->GetValues = TAG(ReadRGBAPixels); #if defined(GET_PTR) @@ -923,7 +806,6 @@ static void TAG(InitPointers)(struct gl_renderbuffer *rb) } -#undef INIT_MONO_PIXEL #undef WRITE_PIXEL #undef WRITE_RGBA #undef READ_RGBA diff --git a/src/mesa/drivers/dri/common/stenciltmp.h b/src/mesa/drivers/dri/common/stenciltmp.h index fef09720895..e4e39c73034 100644 --- a/src/mesa/drivers/dri/common/stenciltmp.h +++ b/src/mesa/drivers/dri/common/stenciltmp.h @@ -61,62 +61,6 @@ static void TAG(WriteStencilSpan)( struct gl_context *ctx, HW_WRITE_UNLOCK(); } -#if HAVE_HW_STENCIL_SPANS -/* implement MonoWriteDepthSpan() in terms of WriteDepthSpan() */ -static void -TAG(WriteMonoStencilSpan)( struct gl_context *ctx, struct gl_renderbuffer *rb, - GLuint n, GLint x, GLint y, - const void *value, const GLubyte mask[] ) -{ - const GLuint stenVal = *((GLuint *) value); - GLuint stens[MAX_WIDTH]; - GLuint i; - for (i = 0; i < n; i++) - stens[i] = stenVal; - TAG(WriteStencilSpan)(ctx, rb, n, x, y, stens, mask); -} -#else /* HAVE_HW_STENCIL_SPANS */ -static void TAG(WriteMonoStencilSpan)( struct gl_context *ctx, - struct gl_renderbuffer *rb, - GLuint n, GLint x, GLint y, - const void *value, - const GLubyte mask[] ) -{ - HW_WRITE_LOCK() - { - const GLubyte stencil = *((const GLubyte *) value); - GLint x1; - GLint n1; - LOCAL_STENCIL_VARS; - - y = Y_FLIP(y); - - HW_CLIPLOOP() - { - GLint i = 0; - CLIPSPAN(x,y,n,x1,n1,i); - - if (DBG) fprintf(stderr, "WriteStencilSpan %d..%d (x1 %d)\n", - (int)i, (int)n1, (int)x1); - - if (mask) - { - for (;n1>0;i++,x1++,n1--) - if (mask[i]) - WRITE_STENCIL( x1, y, stencil ); - } - else - { - for (;n1>0;i++,x1++,n1--) - WRITE_STENCIL( x1, y, stencil ); - } - } - HW_ENDCLIPLOOP(); - } - HW_WRITE_UNLOCK(); -} -#endif /* !HAVE_HW_STENCIL_SPANS */ - static void TAG(WriteStencilPixels)( struct gl_context *ctx, struct gl_renderbuffer *rb, @@ -234,9 +178,7 @@ static void TAG(InitStencilPointers)(struct gl_renderbuffer *rb) rb->GetValues = TAG(ReadStencilPixels); rb->PutRow = TAG(WriteStencilSpan); rb->PutRowRGB = NULL; - rb->PutMonoRow = TAG(WriteMonoStencilSpan); rb->PutValues = TAG(WriteStencilPixels); - rb->PutMonoValues = NULL; } |