From: Eric Anholt Date: Wed, 1 Jul 2020 20:33:21 +0000 (-0700) Subject: util: Mark util_format_description() as a const function. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=18cb8f23222422c7fb9764362e659d15ec0b64eb;p=mesa.git util: Mark util_format_description() as a const function. 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: --- 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; /*