aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/radeon
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2009-07-08 11:16:56 +1000
committerDave Airlie <[email protected]>2009-07-15 14:23:13 +1000
commit9b17f041d12cfe9a34df43da93fc16e275a5c751 (patch)
tree8fc0dd7067f1fc620e7bb157de482cc311605f06 /src/mesa/drivers/dri/radeon
parent868aa160745ed0b3f1a83353ef2f3a8fcb5d235e (diff)
radeon: for tiling you really need to use GET/PUT VALUE not PTR.
since the surfaces aren't linear you can't just use GET_PTR
Diffstat (limited to 'src/mesa/drivers/dri/radeon')
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_span.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/radeon/radeon_span.c b/src/mesa/drivers/dri/radeon/radeon_span.c
index a6ea8f021e4..2530a82d596 100644
--- a/src/mesa/drivers/dri/radeon/radeon_span.c
+++ b/src/mesa/drivers/dri/radeon/radeon_span.c
@@ -295,7 +295,11 @@ s8z24_to_z24s8(uint32_t val)
#define TAG(x) radeon##x##_ARGB8888
#define TAG2(x,y) radeon##x##_ARGB8888##y
-#define GET_PTR(X,Y) radeon_ptr32(rrb, (X) + x_off, (Y) + y_off)
+#define GET_VALUE(_x, _y) (*(GLuint*)(radeon_ptr32(rrb, _x + x_off, _y + y_off)))
+#define PUT_VALUE(_x, _y, d) { \
+ GLuint *_ptr = (GLuint*)radeon_ptr32( rrb, _x + x_off, _y + y_off ); \
+ *_ptr = d; \
+} while (0)
#include "spantmp2.h"
/* ================================================================