mesa: Use os_get_option() for MESA_*_OVERRIDE

This will allow for overriding via setprop mesa.*.override on android.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7763>
This commit is contained in:
Rob Clark
2020-11-24 16:54:52 -08:00
committed by Marge Bot
parent eeecc21d93
commit 688dda5e1d
3 changed files with 7 additions and 3 deletions

View File

@@ -44,6 +44,8 @@
* corrupt, etc) we will use a fallback path to compile and link the IR.
*/
#include "util/os_misc.h"
#include "compiler/shader_info.h"
#include "glsl_symbol_table.h"
#include "glsl_parser_extras.h"
@@ -188,7 +190,7 @@ shader_cache_read_program_metadata(struct gl_context *ctx,
* preprocessor could result in different output and we could load the
* wrong shader.
*/
char *ext_override = getenv("MESA_EXTENSION_OVERRIDE");
const char *ext_override = os_get_option("MESA_EXTENSION_OVERRIDE");
if (ext_override) {
ralloc_asprintf_append(&buf, "ext:%s", ext_override);
}