summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2010-02-23 18:23:15 -0700
committerBrian Paul <brianp@vmware.com>2010-02-23 18:57:18 -0700
commitf7830dc3916b355452f656dba955804fd7535544 (patch)
treef7e5d9d2026aba8316eee25c8514b6fc2297e173 /src
parent049b4c340575ebc788d9a009829980fafa587eff (diff)
st/glx: added PIPE_FORMAT_Z24S8_UNORM code
Diffstat (limited to 'src')
-rw-r--r--src/gallium/state_trackers/glx/xlib/xm_api.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/gallium/state_trackers/glx/xlib/xm_api.c b/src/gallium/state_trackers/glx/xlib/xm_api.c
index 4aac08a108..1798faa0f3 100644
--- a/src/gallium/state_trackers/glx/xlib/xm_api.c
+++ b/src/gallium/state_trackers/glx/xlib/xm_api.c
@@ -376,7 +376,8 @@ create_xmesa_buffer(Drawable d, BufferType type,
#endif
if (vis->mesa_visual.stencilBits == 8) {
- if (depthFormat == PIPE_FORMAT_S8Z24_UNORM)
+ if (depthFormat == PIPE_FORMAT_S8Z24_UNORM ||
+ depthFormat == PIPE_FORMAT_Z24S8_UNORM)
stencilFormat = depthFormat;
else
stencilFormat = PIPE_FORMAT_S8_UNORM;
@@ -388,6 +389,10 @@ create_xmesa_buffer(Drawable d, BufferType type,
/* use 24-bit Z, undefined stencil channel */
depthFormat = PIPE_FORMAT_X8Z24_UNORM;
}
+ else if (depthFormat == PIPE_FORMAT_Z24S8_UNORM) {
+ /* use 24-bit Z, undefined stencil channel */
+ depthFormat = PIPE_FORMAT_Z24X8_UNORM;
+ }
}