diff options
author | Ben Skeggs <skeggsb@gmail.com> | 2007-11-20 19:09:47 +1100 |
---|---|---|
committer | Ben Skeggs <skeggsb@gmail.com> | 2007-11-20 19:09:47 +1100 |
commit | 85d626508ad9f8deef251058c12b03d46468a962 (patch) | |
tree | 45ee2f6d6c22f7acd615c3d98eb26fa7e05cdf0d /src/mesa/state_tracker/st_format.c | |
parent | 04fcee96b1ad9caf5b903a0ca72a1929ba2aae50 (diff) |
Add support for Z24_S8 to GL state tracker.
Diffstat (limited to 'src/mesa/state_tracker/st_format.c')
-rw-r--r-- | src/mesa/state_tracker/st_format.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_format.c b/src/mesa/state_tracker/st_format.c index ddba650941..c6b5bc968f 100644 --- a/src/mesa/state_tracker/st_format.c +++ b/src/mesa/state_tracker/st_format.c @@ -320,6 +320,9 @@ default_depth_format( if (pipe->is_format_supported( pipe, PIPE_FORMAT_S8_Z24 )) { return PIPE_FORMAT_S8_Z24; } + if (pipe->is_format_supported( pipe, PIPE_FORMAT_Z24_S8 )) { + return PIPE_FORMAT_Z24_S8; + } return PIPE_FORMAT_NONE; } @@ -486,6 +489,8 @@ st_choose_pipe_format(struct pipe_context *pipe, GLint internalFormat, case GL_DEPTH_COMPONENT24: if (pipe->is_format_supported( pipe, PIPE_FORMAT_S8_Z24 )) return PIPE_FORMAT_S8_Z24; + if (pipe->is_format_supported( pipe, PIPE_FORMAT_Z24_S8 )) + return PIPE_FORMAT_Z24_S8; /* fall-through */ case GL_DEPTH_COMPONENT32: if (pipe->is_format_supported( pipe, PIPE_FORMAT_U_Z32 )) @@ -503,12 +508,16 @@ st_choose_pipe_format(struct pipe_context *pipe, GLint internalFormat, return PIPE_FORMAT_U_S8; if (pipe->is_format_supported( pipe, PIPE_FORMAT_S8_Z24 )) return PIPE_FORMAT_S8_Z24; + if (pipe->is_format_supported( pipe, PIPE_FORMAT_Z24_S8 )) + return PIPE_FORMAT_Z24_S8; return PIPE_FORMAT_NONE; case GL_DEPTH_STENCIL_EXT: case GL_DEPTH24_STENCIL8_EXT: if (pipe->is_format_supported( pipe, PIPE_FORMAT_S8_Z24 )) return PIPE_FORMAT_S8_Z24; + if (pipe->is_format_supported( pipe, PIPE_FORMAT_Z24_S8 )) + return PIPE_FORMAT_Z24_S8; return PIPE_FORMAT_NONE; default: |