Mesa (mesa_7_5_branch): gallium: New pf_is_depth_and_stencil / pf_is_depth_or_stencil inlines.
Jose Fonseca
jrfonseca at kemper.freedesktop.org
Thu Jun 11 18:03:36 UTC 2009
Module: Mesa
Branch: mesa_7_5_branch
Commit: 3f2e006b759705abd7c409d30f9aeb1f2a75b83f
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=3f2e006b759705abd7c409d30f9aeb1f2a75b83f
Author: José Fonseca <jfonseca at vmware.com>
Date: Thu Jun 11 18:53:23 2009 +0100
gallium: New pf_is_depth_and_stencil / pf_is_depth_or_stencil inlines.
---
src/gallium/include/pipe/p_format.h | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
diff --git a/src/gallium/include/pipe/p_format.h b/src/gallium/include/pipe/p_format.h
index 187377f..e31538c 100644
--- a/src/gallium/include/pipe/p_format.h
+++ b/src/gallium/include/pipe/p_format.h
@@ -549,13 +549,23 @@ pf_get_2d_size(const struct pipe_format_block *block, size_t stride, unsigned he
}
static INLINE boolean
-pf_is_depth_stencil( enum pipe_format format )
+pf_is_depth_or_stencil( enum pipe_format format )
{
return (pf_get_component_bits( format, PIPE_FORMAT_COMP_Z ) +
pf_get_component_bits( format, PIPE_FORMAT_COMP_S )) != 0;
}
static INLINE boolean
+pf_is_depth_and_stencil( enum pipe_format format )
+{
+ return (pf_get_component_bits( format, PIPE_FORMAT_COMP_Z ) != 0 &&
+ pf_get_component_bits( format, PIPE_FORMAT_COMP_S ) != 0);
+}
+
+/** DEPRECATED: For backwards compatibility */
+#define pf_is_depth_stencil pf_is_depth_or_stencil
+
+static INLINE boolean
pf_is_compressed( enum pipe_format format )
{
return pf_layout(format) == PIPE_FORMAT_LAYOUT_DXT ? TRUE : FALSE;
More information about the mesa-commit
mailing list