anv: use os_get_option instead of getenv
so that the queue count override logic can catch Android system properties. Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org> Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29492>
This commit is contained in:
@@ -2125,12 +2125,12 @@ anv_override_engine_counts(int *gc_count, int *g_count, int *c_count, int *v_cou
|
||||
int g_override = -1;
|
||||
int c_override = -1;
|
||||
int v_override = -1;
|
||||
char *env = getenv("ANV_QUEUE_OVERRIDE");
|
||||
const char *env_ = os_get_option("ANV_QUEUE_OVERRIDE");
|
||||
|
||||
if (env == NULL)
|
||||
if (env_ == NULL)
|
||||
return;
|
||||
|
||||
env = strdup(env);
|
||||
char *env = strdup(env_);
|
||||
char *save = NULL;
|
||||
char *next = strtok_r(env, ",", &save);
|
||||
while (next != NULL) {
|
||||
|
@@ -1451,12 +1451,12 @@ anv_override_engine_counts(int *gc_count, int *g_count, int *c_count)
|
||||
int gc_override = -1;
|
||||
int g_override = -1;
|
||||
int c_override = -1;
|
||||
char *env = getenv("ANV_QUEUE_OVERRIDE");
|
||||
const char *env_ = os_get_option("ANV_QUEUE_OVERRIDE");
|
||||
|
||||
if (env == NULL)
|
||||
if (env_ == NULL)
|
||||
return;
|
||||
|
||||
env = strdup(env);
|
||||
char *env = strdup(env_);
|
||||
char *save = NULL;
|
||||
char *next = strtok_r(env, ",", &save);
|
||||
while (next != NULL) {
|
||||
|
Reference in New Issue
Block a user