gmesa->drawOffset + \
(dPriv->x * gammascrn->cpp) + \
(dPriv->y * pitch)); \
- char *read_buf = (char *)(sPriv->pFB + \
- gmesa->readOffset + \
- (dPriv->x * gammascrn->cpp) + \
- (dPriv->y * pitch)); \
GLuint p; \
- (void) read_buf; (void) buf; (void) p
+ (void) buf; (void) p
/* FIXME! Depth/Stencil read/writes don't work ! */
#define LOCAL_DEPTH_VARS \
#define READ_RGBA( rgba, _x, _y ) \
do { \
- GLushort p = *(GLushort *)(read_buf + _x*2 + _y*pitch); \
+ GLushort p = *(GLushort *)(buf + _x*2 + _y*pitch); \
rgba[0] = (p >> 8) & 0xf8; \
rgba[1] = (p >> 3) & 0xfc; \
rgba[2] = (p << 3) & 0xf8; \
#define READ_RGBA( rgba, _x, _y ) \
do { \
- GLuint p = *(GLuint *)(read_buf + _x*4 + _y*pitch); \
+ GLuint p = *(GLuint *)(buf + _x*4 + _y*pitch); \
rgba[0] = (p >> 16) & 0xff; \
rgba[1] = (p >> 8) & 0xff; \
rgba[2] = (p >> 0) & 0xff; \
#define DBG 0
-#define GET_PTR(X,Y) (sPriv->pFB + drb->offset \
- + ((dPriv->y + (Y)) * drb->pitch + (dPriv->x + (X))) * drb->cpp)
-
#define LOCAL_VARS \
mach64ContextPtr mmesa = MACH64_CONTEXT(ctx); \
__DRIscreenPrivate *sPriv = mmesa->driScreen; \
#define TAG(x) mach64##x##_RGB565
#define TAG2(x,y) mach64##x##_RGB565##y
-#define GET_SRC_PTR(X,Y) GET_PTR(X,Y)
-#define GET_DST_PTR(X,Y) GET_SRC_PTR(X,Y)
+#define GET_PTR(X,Y) (sPriv->pFB + drb->offset \
+ + ((dPriv->y + (Y)) * drb->pitch + (dPriv->x + (X))) * drb->cpp)
#include "spantmp2.h"
#define TAG(x) mach64##x##_ARGB8888
#define TAG2(x,y) mach64##x##_ARGB8888##y
-#define GET_SRC_PTR(X,Y) GET_PTR(X,Y)
-#define GET_DST_PTR(X,Y) GET_SRC_PTR(X,Y)
+#define GET_PTR(X,Y) (sPriv->pFB + drb->offset \
+ + ((dPriv->y + (Y)) * drb->pitch + (dPriv->x + (X))) * drb->cpp)
#include "spantmp2.h"
#define DBG 0
-#define GET_PTR(X,Y) (sPriv->pFB + drb->flippedOffset \
- + ((dPriv->y + (Y)) * drb->flippedPitch + (dPriv->x + (X))) * drb->cpp)
-
#define HAVE_HW_DEPTH_SPANS 1
#define HAVE_HW_DEPTH_PIXELS 1
#define TAG(x) r128##x##_RGB565
#define TAG2(x,y) r128##x##_RGB565##y
-#define GET_SRC_PTR(X,Y) GET_PTR(X,Y)
-#define GET_DST_PTR(X,Y) GET_PTR(X,Y)
+#define GET_PTR(X,Y) (sPriv->pFB + drb->flippedOffset \
+ + ((dPriv->y + (Y)) * drb->flippedPitch + (dPriv->x + (X))) * drb->cpp)
#include "spantmp2.h"
#define TAG(x) r128##x##_ARGB8888
#define TAG2(x,y) r128##x##_ARGB8888##y
-#define GET_SRC_PTR(X,Y) GET_PTR(X,Y)
-#define GET_DST_PTR(X,Y) GET_PTR(X,Y)
+#define GET_PTR(X,Y) (sPriv->pFB + drb->flippedOffset \
+ + ((dPriv->y + (Y)) * drb->flippedPitch + (dPriv->x + (X))) * drb->cpp)
#include "spantmp2.h"
#define DBG 0
-#define GET_PTR(X,Y) (sPriv->pFB + drb->flippedOffset \
- + ((dPriv->y + (Y)) * drb->flippedPitch + (dPriv->x + (X))) * drb->cpp)
-
#define LOCAL_VARS \
r200ContextPtr rmesa = R200_CONTEXT(ctx); \
__DRIscreenPrivate *sPriv = rmesa->dri.screen; \
#define TAG(x) r200##x##_RGB565
#define TAG2(x,y) r200##x##_RGB565##y
-#define GET_SRC_PTR(X,Y) GET_PTR(X,Y)
-#define GET_DST_PTR(X,Y) GET_PTR(X,Y)
+#define GET_PTR(X,Y) (sPriv->pFB + drb->flippedOffset \
+ + ((dPriv->y + (Y)) * drb->flippedPitch + (dPriv->x + (X))) * drb->cpp)
#include "spantmp2.h"
/* 32 bit, ARGB8888 color spanline and pixel functions
#define TAG(x) r200##x##_ARGB8888
#define TAG2(x,y) r200##x##_ARGB8888##y
-#define GET_SRC_PTR(X,Y) GET_PTR(X,Y)
-#define GET_DST_PTR(X,Y) GET_PTR(X,Y)
+#define GET_PTR(X,Y) (sPriv->pFB + drb->flippedOffset \
+ + ((dPriv->y + (Y)) * drb->flippedPitch + (dPriv->x + (X))) * drb->cpp)
#include "spantmp2.h"
int p;
driRenderbuffer *drb =
(driRenderbuffer *) ctx->WinSysDrawBuffer->_ColorDrawBuffers[0][0];
- volatile int *read_buf =
+ volatile int *buf =
(volatile int *)(rmesa->dri.screen->pFB + drb->offset);
- p = *read_buf;
- *read_buf = p;
+ p = *buf;
+ *buf = p;
}
}
#define DBG 0
-#define GET_PTR(X,Y) (sPriv->pFB + drb->flippedOffset \
- + ((dPriv->y + (Y)) * drb->flippedPitch + (dPriv->x + (X))) * drb->cpp)
/*
* Eventually, try to remove all references to ctx/rmesa here.
#define TAG(x) radeon##x##_RGB565
#define TAG2(x,y) radeon##x##_RGB565##y
-#define GET_SRC_PTR(X,Y) GET_PTR(X, Y)
-#define GET_DST_PTR(X,Y) GET_PTR(X, Y)
+#define GET_PTR(X,Y) (sPriv->pFB + drb->flippedOffset \
+ + ((dPriv->y + (Y)) * drb->flippedPitch + (dPriv->x + (X))) * drb->cpp)
#include "spantmp2.h"
#define TAG(x) radeon##x##_ARGB8888
#define TAG2(x,y) radeon##x##_ARGB8888##y
-#define GET_SRC_PTR(X,Y) GET_PTR(X, Y)
-#define GET_DST_PTR(X,Y) GET_PTR(X, Y)
+#define GET_PTR(X,Y) (sPriv->pFB + drb->flippedOffset \
+ + ((dPriv->y + (Y)) * drb->flippedPitch + (dPriv->x + (X))) * drb->cpp)
#include "spantmp2.h"
static void radeonSpanRenderStart( GLcontext *ctx )
{
radeonContextPtr rmesa = RADEON_CONTEXT( ctx );
-
RADEON_FIREVERTICES( rmesa );
LOCK_HARDWARE( rmesa );
radeonWaitForIdleLocked( rmesa );
/* 16 bit, RGB565 color spanline and pixel functions
*/
-#define GET_SRC_PTR(_x, _y) (buf + (_x) * 2 + (_y) * pitch)
-#define GET_DST_PTR(_x, _y) GET_SRC_PTR(_x, _y);
+#define GET_PTR(_x, _y) (buf + (_x) * 2 + (_y) * pitch)
#define SPANTMP_PIXEL_FMT GL_RGB
#define SPANTMP_PIXEL_TYPE GL_UNSIGNED_SHORT_5_6_5
/* 32 bit, ARGB8888 color spanline and pixel functions
*/
-#define GET_SRC_PTR(_x, _y) (buf + (_x) * 4 + (_y) * pitch)
-#define GET_DST_PTR(_x, _y) GET_SRC_PTR(_x, _y);
+#define GET_PTR(_x, _y) (buf + (_x) * 4 + (_y) * pitch)
#define SPANTMP_PIXEL_FMT GL_BGRA
#define SPANTMP_PIXEL_TYPE GL_UNSIGNED_INT_8_8_8_8_REV