From cceeab39ea541b1be1521114316d660a77769c2a Mon Sep 17 00:00:00 2001 From: Michal Krol Date: Thu, 3 Dec 2009 11:17:37 +0100 Subject: Move pf_get_bits/size() to u_format auxiliary module. --- src/gallium/include/pipe/p_format.h | 36 ------------------------------------ 1 file changed, 36 deletions(-) (limited to 'src/gallium/include/pipe') diff --git a/src/gallium/include/pipe/p_format.h b/src/gallium/include/pipe/p_format.h index 3be5b18a25..5fd073c95f 100644 --- a/src/gallium/include/pipe/p_format.h +++ b/src/gallium/include/pipe/p_format.h @@ -422,42 +422,6 @@ static INLINE uint pf_get_component_bits( enum pipe_format format, uint comp ) return size << (pf_mixed_scale8( format ) * 3); } -/** - * Return total bits needed for the pixel format. - */ -static INLINE uint pf_get_bits( enum pipe_format format ) -{ - switch (pf_layout(format)) { - case PIPE_FORMAT_LAYOUT_RGBAZS: - case PIPE_FORMAT_LAYOUT_MIXED: - return - pf_get_component_bits( format, PIPE_FORMAT_COMP_0 ) + - pf_get_component_bits( format, PIPE_FORMAT_COMP_1 ) + - pf_get_component_bits( format, PIPE_FORMAT_COMP_R ) + - pf_get_component_bits( format, PIPE_FORMAT_COMP_G ) + - pf_get_component_bits( format, PIPE_FORMAT_COMP_B ) + - pf_get_component_bits( format, PIPE_FORMAT_COMP_A ) + - pf_get_component_bits( format, PIPE_FORMAT_COMP_Z ) + - pf_get_component_bits( format, PIPE_FORMAT_COMP_S ); - case PIPE_FORMAT_LAYOUT_YCBCR: - assert( format == PIPE_FORMAT_YCBCR || format == PIPE_FORMAT_YCBCR_REV ); - /* return effective bits per pixel */ - return 16; - default: - assert( 0 ); - return 0; - } -} - -/** - * Return bytes per pixel for the given format. - */ -static INLINE uint pf_get_size( enum pipe_format format ) -{ - assert(pf_get_bits(format) % 8 == 0); - return pf_get_bits(format) / 8; -} - /** * Describe accurately the pixel format. * -- cgit v1.2.3