From 8e8019b49ab137403ba92aef3e286f4e27049ad5 Mon Sep 17 00:00:00 2001 From: "Xiang, Haihao" Date: Tue, 5 Aug 2008 11:28:54 +0800 Subject: dri: Fix write/read depth buffer issue under 16bpp mode. See bug #16646 --- src/mesa/drivers/dri/sis/sis_span.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/mesa/drivers/dri/sis') diff --git a/src/mesa/drivers/dri/sis/sis_span.c b/src/mesa/drivers/dri/sis/sis_span.c index ea6db6781d..7f205f3ca5 100644 --- a/src/mesa/drivers/dri/sis/sis_span.c +++ b/src/mesa/drivers/dri/sis/sis_span.c @@ -85,6 +85,8 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. /* 16 bit depthbuffer functions. */ +#define VALUE_TYPE GLushort + #define WRITE_DEPTH( _x, _y, d ) \ *(GLushort *)(buf + (_x)*2 + (_y)*srb->pitch) = d; @@ -97,6 +99,8 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. /* 32 bit depthbuffer functions. */ +#define VALUE_TYPE GLuint + #define WRITE_DEPTH( _x, _y, d ) \ *(GLuint *)(buf + (_x)*4 + (_y)*srb->pitch) = d; @@ -109,6 +113,8 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. /* 8/24 bit interleaved depth/stencil functions */ +#define VALUE_TYPE GLuint + #define WRITE_DEPTH( _x, _y, d ) { \ GLuint tmp = *(GLuint *)(buf + (_x)*4 + (_y)*srb->pitch); \ tmp &= 0xff000000; \ -- cgit v1.2.3