diff options
author | Marek Olšák <maraeo@gmail.com> | 2010-03-09 20:12:52 +0100 |
---|---|---|
committer | Marek Olšák <maraeo@gmail.com> | 2010-03-09 20:12:52 +0100 |
commit | bf50d40f1ba68a0f19ca06196af99c01efce1e76 (patch) | |
tree | 597da0accd17ee6350159d60e9f9cf691668cecc /src/gallium/drivers/r300/r300_state_inlines.h | |
parent | 2ccae040a458ad0f95ee46916e2ea467d5cf9d02 (diff) | |
download | external_mesa3d-bf50d40f1ba68a0f19ca06196af99c01efce1e76.zip external_mesa3d-bf50d40f1ba68a0f19ca06196af99c01efce1e76.tar.gz external_mesa3d-bf50d40f1ba68a0f19ca06196af99c01efce1e76.tar.bz2 |
r300g: kill pf_component_count
Diffstat (limited to 'src/gallium/drivers/r300/r300_state_inlines.h')
-rw-r--r-- | src/gallium/drivers/r300/r300_state_inlines.h | 29 |
1 files changed, 1 insertions, 28 deletions
diff --git a/src/gallium/drivers/r300/r300_state_inlines.h b/src/gallium/drivers/r300/r300_state_inlines.h index af78278..a32924e 100644 --- a/src/gallium/drivers/r300/r300_state_inlines.h +++ b/src/gallium/drivers/r300/r300_state_inlines.h @@ -348,39 +348,12 @@ static INLINE uint32_t r300_translate_gb_pipes(int pipe_count) return 0; } -/* Utility function to count the number of components in RGBAZS formats. - * XXX should go to util or p_format.h */ -static INLINE unsigned pf_component_count(enum pipe_format format) { - unsigned count = 0; - - if (util_format_get_component_bits(format, UTIL_FORMAT_COLORSPACE_RGB, 0)) { - count++; - } - if (util_format_get_component_bits(format, UTIL_FORMAT_COLORSPACE_RGB, 1)) { - count++; - } - if (util_format_get_component_bits(format, UTIL_FORMAT_COLORSPACE_RGB, 2)) { - count++; - } - if (util_format_get_component_bits(format, UTIL_FORMAT_COLORSPACE_RGB, 3)) { - count++; - } - if (util_format_get_component_bits(format, UTIL_FORMAT_COLORSPACE_ZS, 0)) { - count++; - } - if (util_format_get_component_bits(format, UTIL_FORMAT_COLORSPACE_ZS, 1)) { - count++; - } - - return count; -} - /* Translate pipe_formats into PSC vertex types. */ static INLINE uint16_t r300_translate_vertex_data_type(enum pipe_format format) { uint32_t result = 0; const struct util_format_description *desc; - unsigned components = pf_component_count(format); + unsigned components = util_format_get_nr_components(format); desc = util_format_description(format); |