replace GET_SRC_PTR, GET_DST_PTR with GET_PTR
This commit is contained in:
@@ -19,12 +19,8 @@
|
||||
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 \
|
||||
@@ -71,7 +67,7 @@
|
||||
|
||||
#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; \
|
||||
@@ -103,7 +99,7 @@
|
||||
|
||||
#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; \
|
||||
|
||||
@@ -38,9 +38,6 @@
|
||||
|
||||
#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; \
|
||||
@@ -95,8 +92,8 @@
|
||||
|
||||
#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"
|
||||
|
||||
|
||||
@@ -109,8 +106,8 @@
|
||||
|
||||
#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"
|
||||
|
||||
|
||||
|
||||
@@ -44,9 +44,6 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
#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
|
||||
|
||||
@@ -88,8 +85,8 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
#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"
|
||||
|
||||
|
||||
@@ -100,8 +97,8 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
#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"
|
||||
|
||||
|
||||
|
||||
@@ -46,9 +46,6 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
#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; \
|
||||
@@ -89,8 +86,8 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
#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
|
||||
@@ -100,8 +97,8 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
#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"
|
||||
|
||||
|
||||
@@ -259,10 +256,10 @@ static void r200SpanRenderStart( GLcontext *ctx )
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -50,8 +50,6 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
#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.
|
||||
@@ -100,8 +98,8 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
#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"
|
||||
|
||||
|
||||
@@ -112,8 +110,8 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
#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"
|
||||
|
||||
|
||||
@@ -251,7 +249,6 @@ do { \
|
||||
static void radeonSpanRenderStart( GLcontext *ctx )
|
||||
{
|
||||
radeonContextPtr rmesa = RADEON_CONTEXT( ctx );
|
||||
|
||||
RADEON_FIREVERTICES( rmesa );
|
||||
LOCK_HARDWARE( rmesa );
|
||||
radeonWaitForIdleLocked( rmesa );
|
||||
|
||||
@@ -56,8 +56,7 @@
|
||||
|
||||
/* 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
|
||||
|
||||
@@ -68,8 +67,7 @@
|
||||
|
||||
/* 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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user