aboutsummaryrefslogtreecommitdiffstats
path: root/src/util/format
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2020-07-01 13:33:21 -0700
committerMarge Bot <[email protected]>2020-07-07 18:19:22 +0000
commit18cb8f23222422c7fb9764362e659d15ec0b64eb (patch)
treea831ce086c8d42686d13969b2c14fe299dacbef3 /src/util/format
parent9300a14ffbac490906f62a638f9d8d6546298bfc (diff)
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 <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5728>
Diffstat (limited to 'src/util/format')
-rw-r--r--src/util/format/u_format.h2
1 files changed, 1 insertions, 1 deletions
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;
/*