Mesa (master): mesa: Add MESA_FORMAT_X8_Z24 to _mesa_choose_tex_format
Chad Versace
chadversary at kemper.freedesktop.org
Wed May 25 14:44:29 UTC 2011
Module: Mesa
Branch: master
Commit: 4e0654ec2924c941fe03f57665fbf44e1b600db8
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=4e0654ec2924c941fe03f57665fbf44e1b600db8
Author: Chad Versace <chad at chad-versace.us>
Date: Mon May 23 13:47:17 2011 -0700
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 <eric at anholt.net>
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
Signed-off-by: Chad Versace <chad at chad-versace.us>
---
src/mesa/main/texformat.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/src/mesa/main/texformat.c b/src/mesa/main/texformat.c
index 456687b..8cbb021 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 */
More information about the mesa-commit
mailing list