From 2a027abfcfb353f85b09c7e5e1fbdf8242ebe8ef Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Tue, 19 Apr 2022 09:54:12 -0400 Subject: [PATCH] panfrost: Simplify attribute format expression Chew through a layer of indirection for clarity. Signed-off-by: Alyssa Rosenzweig Part-of: --- src/gallium/drivers/panfrost/pan_cmdstream.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/gallium/drivers/panfrost/pan_cmdstream.c b/src/gallium/drivers/panfrost/pan_cmdstream.c index 06cf1444d38..4e0b99175d1 100644 --- a/src/gallium/drivers/panfrost/pan_cmdstream.c +++ b/src/gallium/drivers/panfrost/pan_cmdstream.c @@ -3720,9 +3720,7 @@ panfrost_create_vertex_elements_state( for (int i = 0; i < num_elements; ++i) { enum pipe_format fmt = elements[i].src_format; - const struct util_format_description *desc = util_format_description(fmt); - so->formats[i] = dev->formats[desc->format].hw; - assert(so->formats[i]); + so->formats[i] = dev->formats[fmt].hw; } /* Let's also prepare vertex builtins */