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:
committed by
Marge Bot
parent
71b93f63dd
commit
b3e6ef964f
@@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user