panfrost: Shrink pan_draw_mode return type
authorAlyssa Rosenzweig <alyssa@collabora.com>
Thu, 20 May 2021 17:11:02 +0000 (13:11 -0400)
committerMarge Bot <eric+marge@anholt.net>
Tue, 1 Jun 2021 19:10:28 +0000 (19:10 +0000)
Let gcc emit ldrb instead of ldr for the table. Found by perf, but total
waste of time >_>

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11074>

src/gallium/drivers/panfrost/pan_context.c

index b638e8d..6fb085e 100644 (file)
@@ -131,7 +131,7 @@ panfrost_set_frontend_noop(struct pipe_context *pipe, bool enable)
 
 #define DEFINE_CASE(c) case PIPE_PRIM_##c: return MALI_DRAW_MODE_##c;
 
-static int
+static uint8_t
 pan_draw_mode(enum pipe_prim_type mode)
 {
         switch (mode) {