diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/compiler/nir/nir_validate.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/compiler/nir/nir_validate.c b/src/compiler/nir/nir_validate.c index e5f5b8acc60..63e85cf6037 100644 --- a/src/compiler/nir/nir_validate.c +++ b/src/compiler/nir/nir_validate.c @@ -1124,6 +1124,12 @@ dump_errors(validate_state *state) void nir_validate_shader(nir_shader *shader) { + 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; init_validate_state(&state); |