summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/r300/radeon_span.c
diff options
context:
space:
mode:
authorNicolai Haehnle <prefect_@gmx.net>2004-10-15 20:52:47 +0000
committerNicolai Haehnle <prefect_@gmx.net>2004-10-15 20:52:47 +0000
commit5696710f96f9517d24958208fb90a5a72d145a26 (patch)
treeece4fcb1b5a2143914637c31cd5be1fd2d53402d /src/mesa/drivers/dri/r300/radeon_span.c
parent06487945186f546094b78cc7021a2bc1e695c17b (diff)
Huge dumb drop. State:
- Color buffer clear is accelerated, but flickers (possibly caused by a recent DDX or Mesa change or bad merge) - Everything else uses software fallback rendering - There should be no clipping-related artifacts with the sw-clipspan-fixes.patch against Mesa (posted on dri-devel) - Multiple clients should be rock solid with a DDX patch that is soon to come (soon = within the next hour or so)
Diffstat (limited to 'src/mesa/drivers/dri/r300/radeon_span.c')
-rw-r--r--src/mesa/drivers/dri/r300/radeon_span.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/mesa/drivers/dri/r300/radeon_span.c b/src/mesa/drivers/dri/r300/radeon_span.c
index 9046320cc1..7b548754e6 100644
--- a/src/mesa/drivers/dri/r300/radeon_span.c
+++ b/src/mesa/drivers/dri/r300/radeon_span.c
@@ -70,8 +70,8 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
GLuint height = dPriv->h; \
GLuint xo = dPriv->x; \
GLuint yo = dPriv->y; \
- char *buf = (char *)(sPriv->pFB + radeon->radeonScreen->depthOffset); \
- GLuint pitch = radeon->radeonScreen->depthPitch; \
+ char *buf = (char *)(sPriv->pFB + radeonScreen->depthOffset); \
+ GLuint pitch = radeonScreen->depthPitch; \
(void) buf; (void) pitch
#define LOCAL_STENCIL_VARS LOCAL_DEPTH_VARS
@@ -248,10 +248,10 @@ do { \
/* 16-bit depth buffer functions
*/
#define WRITE_DEPTH( _x, _y, d ) \
- *(GLushort *)(buf + (_x + xo)*2 + (_y + yo)*pitch ) = d;
+ *(GLushort *)(buf + (_x + xo + (_y + yo)*pitch)*2 ) = d;
#define READ_DEPTH( d, _x, _y ) \
- d = *(GLushort *)(buf + (_x + xo)*2 + (_y + yo)*pitch );
+ d = *(GLushort *)(buf + (_x + xo + (_y + yo)*pitch)*2 );
#define TAG(x) radeon##x##_16_LINEAR
#include "depthtmp.h"
@@ -260,7 +260,7 @@ do { \
*/
#define WRITE_DEPTH( _x, _y, d ) \
do { \
- GLuint offset = (_x + xo)*4 + (_y + yo)*pitch; \
+ GLuint offset = (_x + xo + (_y + yo)*pitch)*4; \
GLuint tmp = *(GLuint *)(buf + offset); \
tmp &= 0xff000000; \
tmp |= ((d) & 0x00ffffff); \
@@ -268,7 +268,7 @@ do { \
} while (0)
#define READ_DEPTH( d, _x, _y ) \
- d = *(GLuint *)(buf + (_x + xo)*4 + (_y + yo)*pitch) & 0x00ffffff;
+ d = *(GLuint *)(buf + (_x + xo + (_y + yo)*pitch)*4) & 0x00ffffff;
#define TAG(x) radeon##x##_24_8_LINEAR
#include "depthtmp.h"
@@ -426,7 +426,6 @@ static void radeonSpanRenderFinish(GLcontext * ctx)
void radeonInitSpanFuncs(GLcontext * ctx)
{
- r200ContextPtr rmesa = R200_CONTEXT(ctx);
radeonContextPtr radeon = RADEON_CONTEXT(ctx);
struct swrast_device_driver *swdd =
_swrast_GetDeviceDriverReference(ctx);