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:
Konstantin Seurer 2022-07-12 15:42:12 +02:00 committed by Marge Bot
parent 7c79399597
commit c48497593a
2 changed files with 0 additions and 13 deletions

View File

@ -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

View File

@ -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;