util: simplify util_format_get_nr_components helper
since the number of components is now stored in the pipe format description, we obviously no longer need to figure this out ourselves.
This commit is contained in:
parent
09a7c25e76
commit
e0f10a6fca
|
@ -423,14 +423,7 @@ static INLINE unsigned
|
|||
util_format_get_nr_components(enum pipe_format format)
|
||||
{
|
||||
const struct util_format_description *desc = util_format_description(format);
|
||||
unsigned chan;
|
||||
unsigned nr_comp = 0;
|
||||
for (chan = 0; chan < 4; chan++) {
|
||||
if (desc->channel[chan].size != 0) {
|
||||
nr_comp++;
|
||||
}
|
||||
}
|
||||
return nr_comp;
|
||||
return desc->nr_channels;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in New Issue