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>
* 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"
* 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);
}
* \brief Extension handling
*/
+#include "util/os_misc.h"
#include "glheader.h"
void
_mesa_one_time_init_extension_overrides(void)
{
- const char *env_const = getenv("MESA_EXTENSION_OVERRIDE");
+ const char *env_const = os_get_option("MESA_EXTENSION_OVERRIDE");
char *env;
char *ext;
size_t offset;
#include <stdio.h>
#include "context.h"
+#include "util/os_misc.h"
#include "util/simple_mtx.h"
#include "mtypes.h"
if (override[api].version < 0) {
override[api].version = 0;
- version_str = getenv(env_var);
+ version_str = os_get_option(env_var);
if (version_str) {
override[api].fc_suffix = check_for_ending(version_str, "FC");
override[api].compat_suffix = check_for_ending(version_str, "COMPAT");