diff options
author | Timothy Arceri <tarceri@itsqueeze.com> | 2024-06-28 10:33:31 +1000 |
---|---|---|
committer | Marge Bot <emma+marge@anholt.net> | 2024-07-17 05:19:03 +0000 |
commit | c9f26a9995c3c277acab3ee526cb7e1299910e5c (patch) | |
tree | 04fd0a1bc757566c0257c316c3b430bd92c5874d /src/compiler | |
parent | dde1a69929212b4cb7e0156e7e364d8b1fc5aeb8 (diff) |
glsl: fix cross validate globals
We want to skip the validation of compiler added global temps.
Reviewed-by: Alejandro PiƱeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30199>
Diffstat (limited to 'src/compiler')
-rw-r--r-- | src/compiler/glsl/gl_nir_linker.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/compiler/glsl/gl_nir_linker.c b/src/compiler/glsl/gl_nir_linker.c index bb7fa3610d6..df0f70e7fd2 100644 --- a/src/compiler/glsl/gl_nir_linker.c +++ b/src/compiler/glsl/gl_nir_linker.c @@ -1678,11 +1678,11 @@ cross_validate_globals(void *mem_ctx, const struct gl_constants *consts, if (glsl_without_array(var->type) == var->interface_type) continue; - /* Don't cross validate temporaries that are at global scope. These - * will eventually get pulled into the shaders 'main'. + /* Don't cross validate compiler temporaries that are at global scope. + * These will eventually get pulled into the shaders 'main'. */ - if (var->data.mode == nir_var_function_temp || - var->data.mode == nir_var_shader_temp) + if (var->data.mode == nir_var_shader_temp && + var->data.how_declared == nir_var_hidden) continue; /* If a global with this name has already been seen, verify that the |