summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/llvmpipe
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2020-07-01 13:19:47 -0700
committerEric Anholt <eric@anholt.net>2020-08-12 13:13:39 -0700
commit4064a6cd207811434e5400a613b3833fbda6b787 (patch)
tree1c7710219973394dc478d23abbdcb32404dcd1a6 /src/gallium/drivers/llvmpipe
parent6723addd8a70069517dd337939fe77ef6cea1a4c (diff)
util: Split the pack/unpack functions out of the format desc.
This gives the compiler a chance to GC pack/unpack functions separate from the format descriptions. For drivers that use everything, this is +10-20kb, while for libvulkan_intel it's -1.3MB. Bug: https://bugs.chromium.org/p/chromium/issues/detail?id=1048434 Acked-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5826>
Diffstat (limited to 'src/gallium/drivers/llvmpipe')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_test_format.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_test_format.c b/src/gallium/drivers/llvmpipe/lp_test_format.c
index a5a1528c667..583e5fc0b4d 100644
--- a/src/gallium/drivers/llvmpipe/lp_test_format.c
+++ b/src/gallium/drivers/llvmpipe/lp_test_format.c
@@ -367,6 +367,8 @@ test_all(unsigned verbose, FILE *fp)
for (use_cache = 0; use_cache < 2; use_cache++) {
for (format = 1; format < PIPE_FORMAT_COUNT; ++format) {
const struct util_format_description *format_desc;
+ const struct util_format_unpack_description *unpack =
+ util_format_unpack_description(format);
format_desc = util_format_description(format);
if (!format_desc) {
@@ -390,7 +392,7 @@ test_all(unsigned verbose, FILE *fp)
* precompiled fetch func for any format before we write LLVM code to
* fetch from it.
*/
- if (!format_desc->fetch_rgba_float)
+ if (!unpack->fetch_rgba_float)
continue;
/* only test twice with formats which can use cache */