nir: Drop our attempt at typed-based image mode validation
authorJason Ekstrand <jason@jlekstrand.net>
Fri, 15 Oct 2021 17:46:58 +0000 (12:46 -0500)
committerMarge Bot <eric+marge@anholt.net>
Fri, 15 Oct 2021 22:35:59 +0000 (22:35 +0000)
This is broken for bindless images declared as local variables.  It
turns out nir_variable::data::bindless is only used for uniforms and we
already assume anything in nir_var_function_temp or similar is bindless.
We could try to make a tricky assert but now that we have everything
else passing but now that we've got everyone converted the extra
validation probably isn't necessary.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13384>

src/compiler/nir/nir_validate.c

index c5283d5..d75fe95 100644 (file)
@@ -1518,9 +1518,6 @@ validate_var_decl(nir_variable *var, nir_variable_mode valid_modes,
    if (var->constant_initializer)
       validate_constant(var->constant_initializer, var->type, state);
 
-   if (glsl_type_contains_image(var->type) && !var->data.bindless)
-      validate_assert(state, var->data.mode == nir_var_mem_image);
-
    if (var->data.mode == nir_var_mem_image) {
       validate_assert(state, !var->data.bindless);
       validate_assert(state, glsl_type_is_image(glsl_without_array(var->type)));