Mesa (staging/20.3): meson: Don't add extra values to shader-cache
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Nov 25 06:16:17 UTC 2020
Module: Mesa
Branch: staging/20.3
Commit: 0a3935057263543f9199f01ed6bf09ca440c539b
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=0a3935057263543f9199f01ed6bf09ca440c539b
Author: Dylan Baker <dylan.c.baker at intel.com>
Date: Thu Nov 19 16:09:22 2020 -0800
meson: Don't add extra values to shader-cache
We're trying to move to using a feature here, adding more values breaks
that.
Fixes: 5de56937a3d009659076dc67de6a57379fc7a31b
("disk_cache: build option for disabled-by-default")
Reviewed-by: Eric Engestrom <eric at engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7699>
(cherry picked from commit 7ca4a478ad307e3e706e86b2786929a6a3b7dff8)
---
.pick_status.json | 2 +-
meson.build | 6 +++---
meson_options.txt | 10 ++++++++--
3 files changed, 12 insertions(+), 6 deletions(-)
diff --git a/.pick_status.json b/.pick_status.json
index c29fc1f8cdb..a69bc806786 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -769,7 +769,7 @@
"description": "meson: Don't add extra values to shader-cache",
"nominated": true,
"nomination_type": 1,
- "resolution": 0,
+ "resolution": 1,
"master_sha": null,
"because_sha": "5de56937a3d009659076dc67de6a57379fc7a31b"
},
diff --git a/meson.build b/meson.build
index d1c3541532c..b0107a2a32a 100644
--- a/meson.build
+++ b/meson.build
@@ -906,12 +906,12 @@ elif _shader_cache == 'false'
endif
if _shader_cache != 'disabled'
if host_machine.system() == 'windows'
- if ['enabled', 'default-disabled'].contains(_shader_cache)
+ if _shader_cache == 'enabled'
error('Shader Cache does not currently work on Windows')
endif
else
pre_args += '-DENABLE_SHADER_CACHE'
- if _shader_cache == 'default-disabled'
+ if not get_option('shader-cache-default')
pre_args += '-DSHADER_CACHE_DISABLE_BY_DEFAULT'
endif
with_shader_cache = true
@@ -1782,7 +1782,7 @@ if with_platform_x11
endif
endif
endif
- if (with_egl or
+ if (with_egl or
with_dri3 or (
with_gallium_vdpau or with_gallium_xvmc or with_gallium_xa or
with_gallium_omx != 'disabled'))
diff --git a/meson_options.txt b/meson_options.txt
index 1a64d0007c1..cb0d3f3d591 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -185,8 +185,14 @@ option(
'shader-cache',
type : 'combo',
value : 'auto',
- choices : ['auto', 'true', 'false', 'enabled', 'disabled', 'default-disabled'],
- description : 'Build with on-disk shader cache support. If set to default-disabled, the feature is only activated when environment variable MESA_GLSL_CACHE_DISABLE is set to false'
+ choices : ['auto', 'true', 'false', 'enabled', 'disabled'],
+ description : 'Build with on-disk shader cache support.',
+)
+option(
+ 'shader-cache-default',
+ type : 'boolean',
+ value : true,
+ description : 'If set to false, the feature is only activated when environment variable MESA_GLSL_CACHE_DISABLE is set to false',
)
option(
'vulkan-icd-dir',
More information about the mesa-commit
mailing list