aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/unichrome/via_span.c
diff options
context:
space:
mode:
authorXiang, Haihao <[email protected]>2008-08-05 11:28:54 +0800
committerXiang, Haihao <[email protected]>2008-08-05 11:34:26 +0800
commit8e8019b49ab137403ba92aef3e286f4e27049ad5 (patch)
tree2bd99df8f04c891a4da08c8fd971fb95598eae51 /src/mesa/drivers/dri/unichrome/via_span.c
parenta3024caff1c790cf9f24476926aa62198f1e7b53 (diff)
dri: Fix write/read depth buffer issue under 16bpp mode. See bug #16646
Diffstat (limited to 'src/mesa/drivers/dri/unichrome/via_span.c')
-rw-r--r--src/mesa/drivers/dri/unichrome/via_span.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/unichrome/via_span.c b/src/mesa/drivers/dri/unichrome/via_span.c
index 3a16dadd238..15e29c52cd9 100644
--- a/src/mesa/drivers/dri/unichrome/via_span.c
+++ b/src/mesa/drivers/dri/unichrome/via_span.c
@@ -86,6 +86,7 @@
#define LOCAL_STENCIL_VARS LOCAL_DEPTH_VARS
+#define VALUE_TYPE GLushort
#define WRITE_DEPTH(_x, _y, d) \
*(GLushort *)(buf + (_x) * 2 + (_y) * depth_pitch) = d;
@@ -98,6 +99,8 @@
/* 32 bit depthbuffer functions.
*/
+#define VALUE_TYPE GLuint
+
#define WRITE_DEPTH(_x, _y, d) \
*(GLuint *)(buf + (_x) * 4 + (_y) * depth_pitch) = d;
@@ -111,6 +114,8 @@
/* 24/8 bit interleaved depth/stencil functions
*/
+#define VALUE_TYPE GLuint
+
#define WRITE_DEPTH( _x, _y, d ) { \
GLuint tmp = *(GLuint *)(buf + (_x)*4 + (_y)*depth_pitch); \
tmp &= 0x000000ff; \