From a4c6dedb27897ae1340983b5d12927e0a9fb2212 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Mon, 16 Jan 2012 11:29:58 -0700 Subject: [PATCH] radeon: remove obsolete GetRow/PutRow code --- src/mesa/drivers/dri/radeon/radeon_fbo.c | 12 -- src/mesa/drivers/dri/radeon/radeon_span.c | 155 ---------------------- 2 files changed, 167 deletions(-) diff --git a/src/mesa/drivers/dri/radeon/radeon_fbo.c b/src/mesa/drivers/dri/radeon/radeon_fbo.c index 314065703ba..a0d79560818 100644 --- a/src/mesa/drivers/dri/radeon/radeon_fbo.c +++ b/src/mesa/drivers/dri/radeon/radeon_fbo.c @@ -456,16 +456,6 @@ radeon_unmap_renderbuffer(struct gl_context *ctx, rrb->map_bo = NULL; } -static void * -radeon_get_pointer(struct gl_context *ctx, struct gl_renderbuffer *rb, - GLint x, GLint y) -{ - radeon_print(RADEON_TEXTURE, RADEON_TRACE, - "%s(%p, rb %p) \n", - __func__, ctx, rb); - - return NULL; -} /** * Called via glRenderbufferStorageEXT() to set the format and allocate @@ -756,7 +746,6 @@ radeon_create_renderbuffer(gl_format format, __DRIdrawable *driDrawPriv) rrb->base.Delete = radeon_delete_renderbuffer; rrb->base.AllocStorage = radeon_alloc_window_storage; - rrb->base.GetPointer = radeon_get_pointer; rrb->bo = NULL; return rrb; @@ -781,7 +770,6 @@ radeon_new_renderbuffer(struct gl_context * ctx, GLuint name) rrb->base.Delete = radeon_delete_renderbuffer; rrb->base.AllocStorage = radeon_alloc_renderbuffer_storage; - rrb->base.GetPointer = radeon_get_pointer; return &rrb->base; } diff --git a/src/mesa/drivers/dri/radeon/radeon_span.c b/src/mesa/drivers/dri/radeon/radeon_span.c index 569aca92ce4..be5a91340fa 100644 --- a/src/mesa/drivers/dri/radeon/radeon_span.c +++ b/src/mesa/drivers/dri/radeon/radeon_span.c @@ -49,120 +49,6 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include "radeon_common.h" #include "radeon_span.h" -#define DBG 0 - -#if defined(BYTE_ORDER) && defined(BIG_ENDIAN) && BYTE_ORDER == BIG_ENDIAN -#if defined(__linux__) -#include -#define CPU_TO_LE16( x ) bswap_16( x ) -#define LE16_TO_CPU( x ) bswap_16( x ) -#endif /* __linux__ */ -#else -#define CPU_TO_LE16( x ) ( x ) -#define LE16_TO_CPU( x ) ( x ) -#endif - -static void radeonSetSpanFunctions(struct radeon_renderbuffer *rrb); - -/* - * Note that all information needed to access pixels in a renderbuffer - * should be obtained through the gl_renderbuffer parameter, not per-context - * information. - */ -#define LOCAL_VARS \ - struct radeon_renderbuffer *rrb = (void *) rb; \ - int minx = 0, miny = 0; \ - int maxx = rb->Width; \ - int maxy = rb->Height; \ - void *buf = rb->Map; \ - int pitch = rb->RowStrideBytes; \ - GLuint p; \ - (void)p; - -#define Y_FLIP(_y) (_y) - -#define HW_LOCK() -#define HW_UNLOCK() -#define HW_CLIPLOOP() -#define HW_ENDCLIPLOOP() - -/* ================================================================ - * Color buffer - */ - -/* 16 bit, RGB565 color spanline and pixel functions - */ -#define SPANTMP_PIXEL_FMT GL_RGB -#define SPANTMP_PIXEL_TYPE GL_UNSIGNED_SHORT_5_6_5 -#define TAG(x) radeon##x##_RGB565 -#define TAG2(x,y) radeon##x##_RGB565##y -#include "spantmp2.h" - -#define SPANTMP_PIXEL_FMT GL_RGB -#define SPANTMP_PIXEL_TYPE GL_UNSIGNED_SHORT_5_6_5_REV -#define TAG(x) radeon##x##_RGB565_REV -#define TAG2(x,y) radeon##x##_RGB565_REV##y -#include "spantmp2.h" - -/* 16 bit, ARGB1555 color spanline and pixel functions - */ -#define SPANTMP_PIXEL_FMT GL_BGRA -#define SPANTMP_PIXEL_TYPE GL_UNSIGNED_SHORT_1_5_5_5_REV -#define TAG(x) radeon##x##_ARGB1555 -#define TAG2(x,y) radeon##x##_ARGB1555##y -#include "spantmp2.h" - -#define SPANTMP_PIXEL_FMT GL_BGRA -#define SPANTMP_PIXEL_TYPE GL_UNSIGNED_SHORT_1_5_5_5 -#define TAG(x) radeon##x##_ARGB1555_REV -#define TAG2(x,y) radeon##x##_ARGB1555_REV##y -#include "spantmp2.h" - -/* 16 bit, RGBA4 color spanline and pixel functions - */ -#define SPANTMP_PIXEL_FMT GL_BGRA -#define SPANTMP_PIXEL_TYPE GL_UNSIGNED_SHORT_4_4_4_4_REV -#define TAG(x) radeon##x##_ARGB4444 -#define TAG2(x,y) radeon##x##_ARGB4444##y -#include "spantmp2.h" - -#define SPANTMP_PIXEL_FMT GL_BGRA -#define SPANTMP_PIXEL_TYPE GL_UNSIGNED_SHORT_4_4_4_4 -#define TAG(x) radeon##x##_ARGB4444_REV -#define TAG2(x,y) radeon##x##_ARGB4444_REV##y -#include "spantmp2.h" - -/* 32 bit, xRGB8888 color spanline and pixel functions - */ -#define SPANTMP_PIXEL_FMT GL_BGRA -#define SPANTMP_PIXEL_TYPE GL_UNSIGNED_INT_8_8_8_8_REV -#define TAG(x) radeon##x##_xRGB8888 -#define TAG2(x,y) radeon##x##_xRGB8888##y -#include "spantmp2.h" - -/* 32 bit, ARGB8888 color spanline and pixel functions - */ -#define SPANTMP_PIXEL_FMT GL_BGRA -#define SPANTMP_PIXEL_TYPE GL_UNSIGNED_INT_8_8_8_8_REV -#define TAG(x) radeon##x##_ARGB8888 -#define TAG2(x,y) radeon##x##_ARGB8888##y -#include "spantmp2.h" - -/* 32 bit, BGRx8888 color spanline and pixel functions - */ -#define SPANTMP_PIXEL_FMT GL_BGRA -#define SPANTMP_PIXEL_TYPE GL_UNSIGNED_INT_8_8_8_8 -#define TAG(x) radeon##x##_BGRx8888 -#define TAG2(x,y) radeon##x##_BGRx8888##y -#include "spantmp2.h" - -/* 32 bit, BGRA8888 color spanline and pixel functions - */ -#define SPANTMP_PIXEL_FMT GL_BGRA -#define SPANTMP_PIXEL_TYPE GL_UNSIGNED_INT_8_8_8_8 -#define TAG(x) radeon##x##_BGRA8888 -#define TAG2(x,y) radeon##x##_BGRA8888##y -#include "spantmp2.h" static void radeon_renderbuffer_map(struct gl_context *ctx, struct gl_renderbuffer *rb) @@ -181,8 +67,6 @@ radeon_renderbuffer_map(struct gl_context *ctx, struct gl_renderbuffer *rb) rb->Map = map; rb->RowStride = stride / _mesa_get_format_bytes(rb->Format); rb->RowStrideBytes = stride; - - radeonSetSpanFunctions(rrb); } static void @@ -194,8 +78,6 @@ radeon_renderbuffer_unmap(struct gl_context *ctx, struct gl_renderbuffer *rb) ctx->Driver.UnmapRenderbuffer(ctx, rb); - rb->GetRow = NULL; - rb->PutRow = NULL; rb->Map = NULL; rb->RowStride = 0; rb->RowStrideBytes = 0; @@ -275,40 +157,3 @@ void radeonInitSpanFuncs(struct gl_context * ctx) swdd->SpanRenderFinish = radeonSpanRenderFinish; } -/** - * Plug in the Get/Put routines for the given driRenderbuffer. - */ -static void radeonSetSpanFunctions(struct radeon_renderbuffer *rrb) -{ - if (rrb->base.Format == MESA_FORMAT_RGB565) { - radeonInitPointers_RGB565(&rrb->base); - } else if (rrb->base.Format == MESA_FORMAT_RGB565_REV) { - radeonInitPointers_RGB565_REV(&rrb->base); - } else if (rrb->base.Format == MESA_FORMAT_XRGB8888) { - radeonInitPointers_xRGB8888(&rrb->base); - } else if (rrb->base.Format == MESA_FORMAT_XRGB8888_REV) { - radeonInitPointers_BGRx8888(&rrb->base); - } else if (rrb->base.Format == MESA_FORMAT_ARGB8888) { - radeonInitPointers_ARGB8888(&rrb->base); - } else if (rrb->base.Format == MESA_FORMAT_ARGB8888_REV) { - radeonInitPointers_BGRA8888(&rrb->base); - } else if (rrb->base.Format == MESA_FORMAT_ARGB4444) { - radeonInitPointers_ARGB4444(&rrb->base); - } else if (rrb->base.Format == MESA_FORMAT_ARGB4444_REV) { - radeonInitPointers_ARGB4444_REV(&rrb->base); - } else if (rrb->base.Format == MESA_FORMAT_ARGB1555) { - radeonInitPointers_ARGB1555(&rrb->base); - } else if (rrb->base.Format == MESA_FORMAT_ARGB1555_REV) { - radeonInitPointers_ARGB1555_REV(&rrb->base); - } else if (rrb->base.Format == MESA_FORMAT_Z16) { - _swrast_set_renderbuffer_accessors(&rrb->base); - } else if (rrb->base.Format == MESA_FORMAT_X8_Z24) { - _swrast_set_renderbuffer_accessors(&rrb->base); - } else if (rrb->base.Format == MESA_FORMAT_S8_Z24) { - _swrast_set_renderbuffer_accessors(&rrb->base); - } else if (rrb->base.Format == MESA_FORMAT_S8) { - _swrast_set_renderbuffer_accessors(&rrb->base); - } else { - fprintf(stderr, "radeonSetSpanFunctions: bad format: 0x%04X\n", rrb->base.Format); - } -} -- 2.30.2