Revert "nir: Use get_once() helper for one-time init's"
This reverts commit c9062df1d5
.
Acked-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7760>
This commit is contained in:

committed by
Marge Bot

parent
5461e21245
commit
86662655ec
@@ -1532,7 +1532,12 @@ validate_function_impl(nir_function_impl *impl, validate_state *state)
|
||||
validate_assert(state, state->ssa_srcs->entries == 0);
|
||||
_mesa_set_clear(state->ssa_srcs, NULL);
|
||||
|
||||
if (get_once(env_var_as_boolean("NIR_VALIDATE_SSA_DOMINANCE", false)))
|
||||
static int validate_dominance = -1;
|
||||
if (validate_dominance < 0) {
|
||||
validate_dominance =
|
||||
env_var_as_boolean("NIR_VALIDATE_SSA_DOMINANCE", false);
|
||||
}
|
||||
if (validate_dominance)
|
||||
validate_ssa_dominance(impl, state);
|
||||
}
|
||||
|
||||
@@ -1606,7 +1611,10 @@ dump_errors(validate_state *state, const char *when)
|
||||
void
|
||||
nir_validate_shader(nir_shader *shader, const char *when)
|
||||
{
|
||||
if (!get_once(env_var_as_boolean("NIR_VALIDATE", true)))
|
||||
static int should_validate = -1;
|
||||
if (should_validate < 0)
|
||||
should_validate = env_var_as_boolean("NIR_VALIDATE", true);
|
||||
if (!should_validate)
|
||||
return;
|
||||
|
||||
validate_state state;
|
||||
|
Reference in New Issue
Block a user