From: José Fonseca Date: Tue, 31 Mar 2009 08:46:55 +0000 (+0100) Subject: gallium: Move pf_is_depth_stencil to p_format.h. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=382306c5732dd04f514bb1d8f2b050bd6d58a893;p=mesa.git gallium: Move pf_is_depth_stencil to p_format.h. --- diff --git a/src/gallium/include/pipe/p_format.h b/src/gallium/include/pipe/p_format.h index 3f65a604364..a279eefef9e 100644 --- a/src/gallium/include/pipe/p_format.h +++ b/src/gallium/include/pipe/p_format.h @@ -536,6 +536,13 @@ pf_get_nblocks(const struct pipe_format_block *block, unsigned width, unsigned h return pf_get_nblocksx(block, width)*pf_get_nblocksy(block, height); } +static INLINE boolean +pf_is_depth_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_compressed( enum pipe_format format ) { diff --git a/src/mesa/state_tracker/st_texture.h b/src/mesa/state_tracker/st_texture.h index 840b7e27cc0..28c2f580f68 100644 --- a/src/mesa/state_tracker/st_texture.h +++ b/src/mesa/state_tracker/st_texture.h @@ -99,12 +99,6 @@ st_get_stobj_texture(struct st_texture_object *stObj) return stObj ? stObj->pt : NULL; } -static INLINE GLboolean pf_is_depth_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; -} - extern struct pipe_texture * st_texture_create(struct st_context *st,