anv/meta: Use the uncompressed rectangle when blitting
[mesa.git] / src / vulkan / anv_nir_apply_pipeline_layout.c
index 96b9f21fd09dbb00de652557e7c23b6116a81394..b7b8bd18ef9601305ddfc306afdecac9c0501afa 100644 (file)
@@ -203,6 +203,11 @@ lower_tex(nir_tex_instr *tex, struct apply_pipeline_layout_state *state)
    lower_tex_deref(tex, tex->sampler, &tex->sampler_index,
                    nir_tex_src_sampler_offset, state);
 
+   /* The backend only ever uses this to mark used surfaces.  We don't care
+    * about that little optimization so it just needs to be non-zero.
+    */
+   tex->texture_array_size = 1;
+
    if (tex->texture)
       cleanup_tex_deref(tex, tex->texture);
    cleanup_tex_deref(tex, tex->sampler);
@@ -262,11 +267,11 @@ anv_nir_apply_pipeline_layout(nir_shader *shader,
       .layout = layout,
    };
 
-   nir_foreach_overload(shader, overload) {
-      if (overload->impl) {
-         nir_builder_init(&state.builder, overload->impl);
-         nir_foreach_block(overload->impl, apply_pipeline_layout_block, &state);
-         nir_metadata_preserve(overload->impl, nir_metadata_block_index |
+   nir_foreach_function(shader, function) {
+      if (function->impl) {
+         nir_builder_init(&state.builder, function->impl);
+         nir_foreach_block(function->impl, apply_pipeline_layout_block, &state);
+         nir_metadata_preserve(function->impl, nir_metadata_block_index |
                                                nir_metadata_dominance);
       }
    }