mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-11 08:00:13 +01:00
util: simplify loop logic in util_format_get_first_non_void_channel()
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28800>
This commit is contained in:
parent
71b93f63dd
commit
b3e6ef964f
1 changed files with 2 additions and 5 deletions
|
|
@ -1556,12 +1556,9 @@ util_format_get_first_non_void_channel(enum pipe_format format)
|
|||
|
||||
for (i = 0; i < 4; i++)
|
||||
if (desc->channel[i].type != UTIL_FORMAT_TYPE_VOID)
|
||||
break;
|
||||
return i;
|
||||
|
||||
if (i == 4)
|
||||
return -1;
|
||||
|
||||
return i;
|
||||
return -1;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue