clover/nir: Don't remove texture variables
authorJason Ekstrand <jason@jlekstrand.net>
Fri, 15 Oct 2021 21:55:46 +0000 (16:55 -0500)
committerMarge Bot <eric+marge@anholt.net>
Sat, 16 Oct 2021 05:49:34 +0000 (05:49 +0000)
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13389>

src/gallium/frontends/clover/nir/invocation.cpp

index 09a7dad..f7802aa 100644 (file)
@@ -421,7 +421,9 @@ nir_shader *clover::nir::load_libclc_nir(const device &dev, std::string &r_log)
 static bool
 can_remove_var(nir_variable *var, void *data)
 {
-   return !(var->type->is_sampler() || var->type->is_image());
+   return !(var->type->is_sampler() ||
+            var->type->is_texture() ||
+            var->type->is_image());
 }
 
 binary clover::nir::spirv_to_nir(const binary &mod, const device &dev,