util: Remove format desc null check

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 14:51:14 +02:00 committed by Marge Bot
parent f10b9563dd
commit 74fe2c805f
1 changed files with 5 additions and 8 deletions

View File

@ -73,14 +73,11 @@ default_template(struct pipe_sampler_view *view,
if (format != PIPE_FORMAT_A8_UNORM) {
const struct util_format_description *desc = util_format_description(format);
assert(desc);
if (desc) {
if (desc->swizzle[1] == PIPE_SWIZZLE_0) {
view->swizzle_g = expand_green_blue;
}
if (desc->swizzle[2] == PIPE_SWIZZLE_0) {
view->swizzle_b = expand_green_blue;
}
if (desc->swizzle[1] == PIPE_SWIZZLE_0) {
view->swizzle_g = expand_green_blue;
}
if (desc->swizzle[2] == PIPE_SWIZZLE_0) {
view->swizzle_b = expand_green_blue;
}
}
}