[Mesa-dev] [PATCH 4/5] anv: Stop passing MOCS information into ISL

Jason Ekstrand jason at jlekstrand.net
Tue Aug 1 22:48:33 UTC 2017


As of a couple of commits ago, ISL is ignoring it.
---
 src/intel/vulkan/anv_device.c      |  1 -
 src/intel/vulkan/anv_image.c       | 12 ++++--------
 src/intel/vulkan/anv_private.h     |  2 --
 src/intel/vulkan/genX_cmd_buffer.c | 13 ++++---------
 src/intel/vulkan/genX_state.c      |  3 ---
 5 files changed, 8 insertions(+), 23 deletions(-)

diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c
index 70b5cd1..3be8c84 100644
--- a/src/intel/vulkan/anv_device.c
+++ b/src/intel/vulkan/anv_device.c
@@ -1967,7 +1967,6 @@ anv_fill_buffer_surface_state(struct anv_device *device, struct anv_state state,
 {
    isl_buffer_fill_state(&device->isl_dev, state.map,
                          .address = offset,
-                         .mocs = device->default_mocs,
                          .size = range,
                          .format = format,
                          .stride = stride);
diff --git a/src/intel/vulkan/anv_image.c b/src/intel/vulkan/anv_image.c
index 4f0a818..29c3d54 100644
--- a/src/intel/vulkan/anv_image.c
+++ b/src/intel/vulkan/anv_image.c
@@ -774,8 +774,7 @@ anv_CreateImageView(VkDevice _device,
                           .view = &view,
                           .clear_color = clear_color,
                           .aux_surf = &image->aux_surface.isl,
-                          .aux_usage = iview->optimal_sampler_aux_usage,
-                          .mocs = device->default_mocs);
+                          .aux_usage = iview->optimal_sampler_aux_usage);
 
       isl_surf_fill_state(&device->isl_dev,
                           iview->general_sampler_surface_state.map,
@@ -783,8 +782,7 @@ anv_CreateImageView(VkDevice _device,
                           .view = &view,
                           .clear_color = clear_color,
                           .aux_surf = &image->aux_surface.isl,
-                          .aux_usage = iview->general_sampler_aux_usage,
-                          .mocs = device->default_mocs);
+                          .aux_usage = iview->general_sampler_aux_usage);
 
       anv_state_flush(device, iview->optimal_sampler_surface_state);
       anv_state_flush(device, iview->general_sampler_surface_state);
@@ -806,8 +804,7 @@ anv_CreateImageView(VkDevice _device,
                           .surf = &surface->isl,
                           .view = &view,
                           .aux_surf = &image->aux_surface.isl,
-                          .aux_usage = image->aux_usage,
-                          .mocs = device->default_mocs);
+                          .aux_usage = image->aux_usage);
 
       if (isl_has_matching_typed_storage_image_format(&device->info,
                                                       format.isl_format)) {
@@ -823,8 +820,7 @@ anv_CreateImageView(VkDevice _device,
                              .surf = &surface->isl,
                              .view = &view,
                              .aux_surf = &image->aux_surface.isl,
-                             .aux_usage = image->aux_usage,
-                             .mocs = device->default_mocs);
+                             .aux_usage = image->aux_usage);
       } else {
          anv_fill_buffer_surface_state(device, iview->storage_surface_state,
                                        ISL_FORMAT_RAW,
diff --git a/src/intel/vulkan/anv_private.h b/src/intel/vulkan/anv_private.h
index 818f699..b7150a9 100644
--- a/src/intel/vulkan/anv_private.h
+++ b/src/intel/vulkan/anv_private.h
@@ -754,8 +754,6 @@ struct anv_device {
 
     struct anv_scratch_pool                     scratch_pool;
 
-    uint32_t                                    default_mocs;
-
     pthread_mutex_t                             mutex;
     pthread_cond_t                              queue_submit;
     bool                                        lost;
diff --git a/src/intel/vulkan/genX_cmd_buffer.c b/src/intel/vulkan/genX_cmd_buffer.c
index 280efcc..a23ab41 100644
--- a/src/intel/vulkan/genX_cmd_buffer.c
+++ b/src/intel/vulkan/genX_cmd_buffer.c
@@ -782,8 +782,7 @@ transition_color_buffer(struct anv_cmd_buffer *cmd_buffer,
                            },
                           .aux_surf = &image->aux_surface.isl,
                           .aux_usage = image->aux_usage == ISL_AUX_USAGE_NONE ?
-                                       ISL_AUX_USAGE_CCS_D : image->aux_usage,
-                          .mocs = cmd_buffer->device->default_mocs);
+                                       ISL_AUX_USAGE_CCS_D : image->aux_usage);
       add_image_relocs(cmd_buffer, image, VK_IMAGE_ASPECT_COLOR_BIT,
                        image->aux_usage == ISL_AUX_USAGE_CCS_E ?
                        ISL_AUX_USAGE_CCS_E : ISL_AUX_USAGE_CCS_D,
@@ -934,8 +933,7 @@ genX(cmd_buffer_setup_attachments)(struct anv_cmd_buffer *cmd_buffer,
                                 .view = &view,
                                 .aux_surf = &iview->image->aux_surface.isl,
                                 .aux_usage = state->attachments[i].aux_usage,
-                                .clear_color = clear_color,
-                                .mocs = cmd_buffer->device->default_mocs);
+                                .clear_color = clear_color);
 
             add_image_relocs(cmd_buffer, iview->image, iview->aspect_mask,
                              state->attachments[i].aux_usage,
@@ -958,8 +956,7 @@ genX(cmd_buffer_setup_attachments)(struct anv_cmd_buffer *cmd_buffer,
                                 .view = &view,
                                 .aux_surf = &iview->image->aux_surface.isl,
                                 .aux_usage = state->attachments[i].input_aux_usage,
-                                .clear_color = clear_color,
-                                .mocs = cmd_buffer->device->default_mocs);
+                                .clear_color = clear_color);
 
             add_image_relocs(cmd_buffer, iview->image, iview->aspect_mask,
                              state->attachments[i].input_aux_usage,
@@ -2764,9 +2761,7 @@ cmd_buffer_emit_depth_stencil(struct anv_cmd_buffer *cmd_buffer)
    if (dw == NULL)
       return;
 
-   struct isl_depth_stencil_hiz_emit_info info = {
-      .mocs = device->default_mocs,
-   };
+   struct isl_depth_stencil_hiz_emit_info info = { 0, };
 
    if (iview)
       info.view = &iview->isl;
diff --git a/src/intel/vulkan/genX_state.c b/src/intel/vulkan/genX_state.c
index 3e65832..26f03f5 100644
--- a/src/intel/vulkan/genX_state.c
+++ b/src/intel/vulkan/genX_state.c
@@ -36,9 +36,6 @@
 VkResult
 genX(init_device_state)(struct anv_device *device)
 {
-   GENX(MEMORY_OBJECT_CONTROL_STATE_pack)(NULL, &device->default_mocs,
-                                          &GENX(MOCS));
-
    struct anv_batch batch;
 
    uint32_t cmds[64];
-- 
2.5.0.400.gff86faf



More information about the mesa-dev mailing list