r600: Remove format desc null checks

Signed-off-by: Konstantin Seurer <konstantin.seurer@gmail.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:18:33 +02:00 committed by Marge Bot
parent ad6553eae9
commit 66344fae4d
3 changed files with 0 additions and 12 deletions

View file

@ -2780,11 +2780,6 @@ void *r600_create_vertex_fetch_shader(struct pipe_context *ctx,
&format, &num_format, &format_comp, &endian);
desc = util_format_description(elements[i].src_format);
if (!desc) {
r600_bytecode_clear(&bc);
R600_ERR("unknown format %d\n", elements[i].src_format);
return NULL;
}
if (elements[i].src_offset > 65535) {
r600_bytecode_clear(&bc);

View file

@ -90,9 +90,6 @@ static inline bool r600_is_buffer_format_supported(enum pipe_format format, bool
if (format == PIPE_FORMAT_R11G11B10_FLOAT)
return true;
if (!desc)
return false;
/* Find the first non-VOID channel. */
for (i = 0; i < 4; i++) {
if (desc->channel[i].type != UTIL_FORMAT_TYPE_VOID)

View file

@ -2797,8 +2797,6 @@ uint32_t r600_translate_texformat(struct pipe_screen *screen,
format = PIPE_FORMAT_A4R4_UNORM;
desc = util_format_description(format);
if (!desc)
goto out_unknown;
/* Depth and stencil swizzling is handled separately. */
if (desc->colorspace != UTIL_FORMAT_COLORSPACE_ZS) {
@ -3164,8 +3162,6 @@ uint32_t r600_translate_colorformat(enum amd_gfx_level chip, enum pipe_format fo
const struct util_format_description *desc = util_format_description(format);
int channel = util_format_get_first_non_void_channel(format);
bool is_float;
if (!desc)
return ~0U;
#define HAS_SIZE(x,y,z,w) \
(desc->channel[0].size == (x) && desc->channel[1].size == (y) && \