diff options
author | Brian Paul <[email protected]> | 2008-08-07 15:11:54 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2008-08-07 15:14:52 -0600 |
commit | c1c4ff28f0af0b14ae64eb01ef1d087b987af2c1 (patch) | |
tree | 1cbf2f5e5d439e2960007fcc4a37f6c619eed0a8 /src/gallium/winsys | |
parent | fdb7dc889f4251183915c811566ced083fdac40d (diff) |
gallium: use PIPE_FORMAT_X8Z24_UNORM for 24-bit Z but no stencil
Diffstat (limited to 'src/gallium/winsys')
-rw-r--r-- | src/gallium/winsys/xlib/xm_api.c | 5 |
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 8a32c54349b..4e5441a13d2 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; + } } |