util/format: Remove format desc null checks
Signed-off-by: Konstantin Seurer <konstantin.seurer@gmail.com> Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17490>
This commit is contained in:
parent
7c79399597
commit
c48497593a
|
@ -100,11 +100,6 @@ util_format_is_float(enum pipe_format format)
|
|||
const struct util_format_description *desc = util_format_description(format);
|
||||
int i;
|
||||
|
||||
assert(desc);
|
||||
if (!desc) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
i = util_format_get_first_non_void_channel(format);
|
||||
if (i < 0) {
|
||||
return FALSE;
|
||||
|
@ -340,8 +335,6 @@ util_get_depth_format_mrd(const struct util_format_description *desc)
|
|||
double mrd = 1.0 / ((1 << 24) - 1);
|
||||
unsigned depth_channel;
|
||||
|
||||
assert(desc);
|
||||
|
||||
/*
|
||||
* Some depth formats do not store the depth component in the first
|
||||
* channel, detect the format and adjust the depth channel. Get the
|
||||
|
|
|
@ -41,16 +41,10 @@ test_all(void)
|
|||
for (src_format = 1; src_format < PIPE_FORMAT_COUNT; ++src_format) {
|
||||
const struct util_format_description *src_format_desc;
|
||||
src_format_desc = util_format_description(src_format);
|
||||
if (!src_format_desc) {
|
||||
continue;
|
||||
}
|
||||
|
||||
for (dst_format = 1; dst_format < PIPE_FORMAT_COUNT; ++dst_format) {
|
||||
const struct util_format_description *dst_format_desc;
|
||||
dst_format_desc = util_format_description(dst_format);
|
||||
if (!dst_format_desc) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (dst_format == src_format) {
|
||||
continue;
|
||||
|
|
Loading…
Reference in New Issue