From: Chad Versace Date: Mon, 23 May 2011 20:47:17 +0000 (-0700) Subject: mesa: Add MESA_FORMAT_X8_Z24 to _mesa_choose_tex_format X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4e0654ec2924c941fe03f57665fbf44e1b600db8;p=mesa.git mesa: Add MESA_FORMAT_X8_Z24 to _mesa_choose_tex_format Prefer MESA_FORMAT_X8_Z24 over MESA_FORMAT_S8_Z24 for textures with internal format GL_DEPTH_COMPONENT*. i965 needs MESA_FORMAT_X8_Z24 for HiZ and separate stencil. Reviewed-by: Eric Anholt Reviewed-by: Kenneth Graunke Signed-off-by: Chad Versace --- diff --git a/src/mesa/main/texformat.c b/src/mesa/main/texformat.c index 456687b0c5c..8cbb021d8b0 100644 --- a/src/mesa/main/texformat.c +++ b/src/mesa/main/texformat.c @@ -217,10 +217,12 @@ _mesa_choose_tex_format( struct gl_context *ctx, GLint internalFormat, case GL_DEPTH_COMPONENT24: case GL_DEPTH_COMPONENT32: RETURN_IF_SUPPORTED(MESA_FORMAT_Z32); + RETURN_IF_SUPPORTED(MESA_FORMAT_X8_Z24); RETURN_IF_SUPPORTED(MESA_FORMAT_S8_Z24); break; case GL_DEPTH_COMPONENT16: RETURN_IF_SUPPORTED(MESA_FORMAT_Z16); + RETURN_IF_SUPPORTED(MESA_FORMAT_X8_Z24); RETURN_IF_SUPPORTED(MESA_FORMAT_S8_Z24); default: ; /* fallthrough */