microsoft/clc: Remove dead image vars
authorJesse Natalie <jenatali@microsoft.com>
Mon, 27 Jun 2022 04:08:56 +0000 (21:08 -0700)
committerMarge Bot <emma+marge@anholt.net>
Mon, 27 Jun 2022 16:54:27 +0000 (16:54 +0000)
Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17246>

src/microsoft/clc/clc_compiler.c

index 04b3f77..bedaa3d 100644 (file)
@@ -978,7 +978,8 @@ clc_spirv_to_dxil(struct clc_libclc *lib,
 
    // Before removing dead uniforms, dedupe constant samplers to make more dead uniforms
    NIR_PASS_V(nir, clc_nir_dedupe_const_samplers);
-   NIR_PASS_V(nir, nir_remove_dead_variables, nir_var_uniform | nir_var_mem_ubo | nir_var_mem_constant | nir_var_function_temp, NULL);
+   NIR_PASS_V(nir, nir_remove_dead_variables, nir_var_uniform | nir_var_mem_ubo |
+              nir_var_mem_constant | nir_var_function_temp | nir_var_image, NULL);
 
    // Fill out inline sampler metadata, now that they've been deduped and dead ones removed
    nir_foreach_variable_with_modes(var, nir, nir_var_uniform) {