summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/llvmpipe
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2020-09-07 16:30:15 +1000
committerDave Airlie <airlied@redhat.com>2020-09-09 09:21:41 +1000
commit4df0eef18898584b6d59efb08ebe83e3cb2cf500 (patch)
tree2fca7f6f7d18e08baa3b7a720d221b51b717a9af /src/gallium/drivers/llvmpipe
parentfefeaeef0605d60f1e268870a85dd673b07c7a3d (diff)
llvmpipe: include gallivm perf flags in shader cache.
Otherwise if you set perf flags, then don't set them, they won't take affect. Fixes: 6c0c61cb48e8 ("llvmpipe: add infrastructure for disk cache support") Reviewed-by: Roland Scheidegger <sroland@vmware.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6630>
Diffstat (limited to 'src/gallium/drivers/llvmpipe')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_screen.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_screen.c b/src/gallium/drivers/llvmpipe/lp_screen.c
index fb4d9835af7..2367af870c4 100644
--- a/src/gallium/drivers/llvmpipe/lp_screen.c
+++ b/src/gallium/drivers/llvmpipe/lp_screen.c
@@ -801,6 +801,7 @@ llvmpipe_get_timestamp(struct pipe_screen *_screen)
static void lp_disk_cache_create(struct llvmpipe_screen *screen)
{
struct mesa_sha1 ctx;
+ unsigned gallivm_perf = gallivm_get_perf_flags();
unsigned char sha1[20];
char cache_id[20 * 2 + 1];
_mesa_sha1_init(&ctx);
@@ -809,6 +810,7 @@ static void lp_disk_cache_create(struct llvmpipe_screen *screen)
!disk_cache_get_function_identifier(LLVMLinkInMCJIT, &ctx))
return;
+ _mesa_sha1_update(&ctx, &gallivm_perf, sizeof(gallivm_perf));
_mesa_sha1_final(&ctx, sha1);
disk_cache_format_hex_id(cache_id, sha1, 20 * 2);