iris: Drop res variable in resolve_sampler_views
authorNanley Chery <nanley.g.chery@intel.com>
Tue, 8 Dec 2020 18:32:29 +0000 (10:32 -0800)
committerMarge Bot <eric+marge@anholt.net>
Wed, 9 Dec 2020 22:28:38 +0000 (22:28 +0000)
Instead of storing isv->res in a local variable, just use it directly to
increase consistency with similar field accesses.

Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7996>

src/gallium/drivers/iris/iris_resolve.c

index 276ad62..dd4d413 100644 (file)
@@ -94,22 +94,22 @@ resolve_sampler_views(struct iris_context *ice,
    while (views) {
       const int i = u_bit_scan(&views);
       struct iris_sampler_view *isv = shs->textures[i];
-      struct iris_resource *res = isv->res;
 
-      if (res->base.target != PIPE_BUFFER) {
+      if (isv->res->base.target != PIPE_BUFFER) {
          if (consider_framebuffer) {
-            disable_rb_aux_buffer(ice, draw_aux_buffer_disabled,
-                                  res, isv->view.base_level, isv->view.levels,
+            disable_rb_aux_buffer(ice, draw_aux_buffer_disabled, isv->res,
+                                  isv->view.base_level, isv->view.levels,
                                   "for sampling");
          }
 
-         iris_resource_prepare_texture(ice, res, isv->view.format,
+         iris_resource_prepare_texture(ice, isv->res, isv->view.format,
                                        isv->view.base_level, isv->view.levels,
                                        isv->view.base_array_layer,
                                        isv->view.array_len);
       }
 
-      iris_emit_buffer_barrier_for(batch, res->bo, IRIS_DOMAIN_OTHER_READ);
+      iris_emit_buffer_barrier_for(batch, isv->res->bo,
+                                   IRIS_DOMAIN_OTHER_READ);
    }
 }