summaryrefslogtreecommitdiff
path: root/src/gallium/winsys/xlib/xm_api.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/winsys/xlib/xm_api.c')
-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;
+ }
}