Revert "freedreno/ir3: Use get_once() for one-time init"

This reverts commit b4ad27a986.

Acked-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7760>
This commit is contained in:
Erik Faye-Lund 2020-11-24 23:34:51 +01:00 committed by Marge Bot
parent b8fb95ce01
commit 5461e21245

View file

@ -204,8 +204,9 @@ ir3_optimize_loop(nir_shader *s)
progress |= OPT(s, nir_copy_prop);
progress |= OPT(s, nir_opt_dce);
progress |= OPT(s, nir_opt_cse);
int gcm = get_once(env_var_as_unsigned("GCM", 0));
static int gcm = -1;
if (gcm == -1)
gcm = env_var_as_unsigned("GCM", 0);
if (gcm == 1)
progress |= OPT(s, nir_opt_gcm, true);
else if (gcm == 2)