diff options
author | Xiang, Haihao <haihao.xiang@intel.com> | 2008-08-05 11:28:54 +0800 |
---|---|---|
committer | Xiang, Haihao <haihao.xiang@intel.com> | 2008-08-05 11:34:26 +0800 |
commit | 8e8019b49ab137403ba92aef3e286f4e27049ad5 (patch) | |
tree | 2bd99df8f04c891a4da08c8fd971fb95598eae51 /src/mesa/drivers/dri/intel | |
parent | a3024caff1c790cf9f24476926aa62198f1e7b53 (diff) |
dri: Fix write/read depth buffer issue under 16bpp mode. See bug #16646
Diffstat (limited to 'src/mesa/drivers/dri/intel')
-rw-r--r-- | src/mesa/drivers/dri/intel/intel_span.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_span.c b/src/mesa/drivers/dri/intel/intel_span.c index df4f5927a0..742b1b8735 100644 --- a/src/mesa/drivers/dri/intel/intel_span.c +++ b/src/mesa/drivers/dri/intel/intel_span.c @@ -99,7 +99,6 @@ #define GET_PTR(X,Y) (buf + ((Y) * irb->pfPitch + (X)) * 4) #include "spantmp2.h" - #define LOCAL_DEPTH_VARS \ struct intel_context *intel = intel_context(ctx); \ struct intel_renderbuffer *irb = intel_renderbuffer(rb); \ @@ -115,6 +114,8 @@ /** ** 16-bit depthbuffer functions. **/ +#define VALUE_TYPE GLushort + #define WRITE_DEPTH( _x, _y, d ) \ ((GLushort *)buf)[(_x) + (_y) * pitch] = d; @@ -132,6 +133,8 @@ ** The wrappers in main/depthstencil.c are used to extract the depth ** and stencil values. **/ +#define VALUE_TYPE GLuint + /* Change ZZZS -> SZZZ */ #define WRITE_DEPTH( _x, _y, d ) { \ GLuint tmp = ((d) >> 8) | ((d) << 24); \ |