summaryrefslogtreecommitdiff
path: root/src/gallium/include/pipe/p_format.h
diff options
context:
space:
mode:
authorMichal Krol <michal@vmware.com>2009-12-03 11:17:37 +0100
committerMichal Krol <michal@vmware.com>2009-12-03 11:17:37 +0100
commitcceeab39ea541b1be1521114316d660a77769c2a (patch)
tree15cd3f121b20cb37edee1312bff5a7ebe4d7dd01 /src/gallium/include/pipe/p_format.h
parent6df42d80234d13676fc3207cf44f0e371e3372b5 (diff)
Move pf_get_bits/size() to u_format auxiliary module.
Diffstat (limited to 'src/gallium/include/pipe/p_format.h')
-rw-r--r--src/gallium/include/pipe/p_format.h36
1 files changed, 0 insertions, 36 deletions
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
@@ -423,42 +423,6 @@ static INLINE uint pf_get_component_bits( enum pipe_format format, uint comp )
}
/**
- * 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.
*
* The chars-per-pixel concept falls apart with compressed and yuv images, where