Mesa (texformat-rework): r600: fix depth span macros for format changes
Alex Deucher
agd5f at kemper.freedesktop.org
Thu Oct 22 18:50:50 UTC 2009
Module: Mesa
Branch: texformat-rework
Commit: dd36006a4eb1cb08dc49af3075c215e6eea46e75
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=dd36006a4eb1cb08dc49af3075c215e6eea46e75
Author: Alex Deucher <alexdeucher at gmail.com>
Date: Thu Oct 22 14:48:45 2009 -0400
r600: fix depth span macros for format changes
---
src/mesa/drivers/dri/radeon/radeon_span.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/mesa/drivers/dri/radeon/radeon_span.c b/src/mesa/drivers/dri/radeon/radeon_span.c
index 2add8c3..2bc7d31 100644
--- a/src/mesa/drivers/dri/radeon/radeon_span.c
+++ b/src/mesa/drivers/dri/radeon/radeon_span.c
@@ -603,12 +603,12 @@ do { \
GLuint *_ptr = (GLuint*)r600_ptr_depth( rrb, _x + x_off, _y + y_off ); \
GLuint tmp = *_ptr; \
tmp &= 0xff000000; \
- tmp |= (((d) >> 8) & 0x00ffffff); \
+ tmp |= ((d) & 0x00ffffff); \
*_ptr = tmp; \
_ptr = (GLuint*)r600_ptr_stencil(rrb, _x + x_off, _y + y_off); \
tmp = *_ptr; \
tmp &= 0xffffff00; \
- tmp |= (d) & 0xff; \
+ tmp |= ((d) >> 24) & 0xff; \
*_ptr = tmp; \
} while (0)
#elif defined(RADEON_R200)
@@ -633,8 +633,8 @@ do { \
#elif defined(RADEON_R600)
#define READ_DEPTH( d, _x, _y ) \
do { \
- d = ((*(GLuint*)(r600_ptr_depth(rrb, _x + x_off, _y + y_off))) << 8) & 0xffffff00; \
- d |= (*(GLuint*)(r600_ptr_stencil(rrb, _x + x_off, _y + y_off))) & 0x000000ff; \
+ d = (*(GLuint*)(r600_ptr_depth(rrb, _x + x_off, _y + y_off))) & 0x00ffffff; \
+ d |= ((*(GLuint*)(r600_ptr_stencil(rrb, _x + x_off, _y + y_off))) << 24) & 0xff000000; \
}while(0)
#elif defined(RADEON_R200)
#define READ_DEPTH( d, _x, _y ) \
More information about the mesa-commit
mailing list