From 18cb8f23222422c7fb9764362e659d15ec0b64eb Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 1 Jul 2020 13:33:21 -0700 Subject: [PATCH] util: Mark util_format_description() as a const function. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit It will return the same table every time with no other side effects, so we want it to be CSEed. Saves 3.5k on my aarch64 GL drivers, almost 9k on turnip, but weirdly increases my x86 GL driver collection by ~3k. Reviewed-by: Marek Olšák Part-of: --- src/util/format/u_format.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/format/u_format.h b/src/util/format/u_format.h index f13dc9fc0d8..532b32561c1 100644 --- a/src/util/format/u_format.h +++ b/src/util/format/u_format.h @@ -426,7 +426,7 @@ struct util_format_description const struct util_format_description * -util_format_description(enum pipe_format format); +util_format_description(enum pipe_format format) ATTRIBUTE_CONST; /* -- 2.30.2