summaryrefslogtreecommitdiff
path: root/src/gallium
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2008-08-07 15:11:54 -0600
committerBrian Paul <brian.paul@tungstengraphics.com>2008-08-07 15:14:52 -0600
commitc1c4ff28f0af0b14ae64eb01ef1d087b987af2c1 (patch)
tree1cbf2f5e5d439e2960007fcc4a37f6c619eed0a8 /src/gallium
parentfdb7dc889f4251183915c811566ced083fdac40d (diff)
gallium: use PIPE_FORMAT_X8Z24_UNORM for 24-bit Z but no stencil
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/winsys/xlib/xm_api.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gallium/winsys/xlib/xm_api.c b/src/gallium/winsys/xlib/xm_api.c
index 8a32c54349..4e5441a13d 100644
--- a/src/gallium/winsys/xlib/xm_api.c
+++ b/src/gallium/winsys/xlib/xm_api.c
@@ -363,7 +363,12 @@ create_xmesa_buffer(XMesaDrawable d, BufferType type,
stencilFormat = PIPE_FORMAT_S8_UNORM;
}
else {
+ /* no stencil */
stencilFormat = PIPE_FORMAT_NONE;
+ if (depthFormat == PIPE_FORMAT_S8Z24_UNORM) {
+ /* use 24-bit Z, undefined stencil channel */
+ depthFormat = PIPE_FORMAT_X8Z24_UNORM;
+ }
}