anv/image: Rename nonrt_surface_state
authorChad Versace <chad.versace@intel.com>
Thu, 4 Feb 2016 19:41:59 +0000 (11:41 -0800)
committerChad Versace <chad.versace@intel.com>
Thu, 4 Feb 2016 20:20:51 +0000 (12:20 -0800)
Let's call it what it is, not what it is not. Rename it to
'sampler_surface_state'.

src/vulkan/anv_cmd_buffer.c
src/vulkan/anv_image.c
src/vulkan/anv_private.h

index 0966e7658bfb95d5118383a9cfb474f240d5a501..a0f9bab8e1ed35213a1986a575994b6db145303d 100644 (file)
@@ -801,7 +801,7 @@ anv_cmd_buffer_emit_binding_table(struct anv_cmd_buffer *cmd_buffer,
       case VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER:
       case VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE:
       case VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT:
-         surface_state = desc->image_view->nonrt_surface_state;
+         surface_state = desc->image_view->sampler_surface_state;
          assert(surface_state.alloc_size);
          bo = desc->image_view->bo;
          bo_offset = desc->image_view->offset;
index 6cc5700c21edbb19aab291fcad4c9ed2314f0720..be91cdc5d92f2084519a0c79b5b3e3dc6dc9e3e3 100644 (file)
@@ -216,7 +216,7 @@ anv_image_create(VkDevice _device,
    image->tiling = pCreateInfo->tiling;
 
    if (image->usage & VK_IMAGE_USAGE_SAMPLED_BIT) {
-      image->needs_nonrt_surface_state = true;
+      image->needs_sampler_surface_state = true;
    }
 
    if (image->usage & VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT) {
@@ -570,14 +570,14 @@ anv_image_view_init(struct anv_image_view *iview,
       .depth  = anv_minify(iview->level_0_extent.depth , range->baseMipLevel),
    };
 
-   if (image->needs_nonrt_surface_state) {
-      iview->nonrt_surface_state = alloc_surface_state(device, cmd_buffer);
+   if (image->needs_sampler_surface_state) {
+      iview->sampler_surface_state = alloc_surface_state(device, cmd_buffer);
 
-      anv_fill_image_surface_state(device, iview->nonrt_surface_state,
+      anv_fill_image_surface_state(device, iview->sampler_surface_state,
                                    iview, &mCreateInfo,
                                    VK_IMAGE_USAGE_SAMPLED_BIT);
    } else {
-      iview->nonrt_surface_state.alloc_size = 0;
+      iview->sampler_surface_state.alloc_size = 0;
    }
 
    if (image->needs_color_rt_surface_state) {
@@ -641,9 +641,9 @@ anv_DestroyImageView(VkDevice _device, VkImageView _iview,
                           iview->color_rt_surface_state);
    }
 
-   if (iview->image->needs_nonrt_surface_state) {
+   if (iview->image->needs_sampler_surface_state) {
       anv_state_pool_free(&device->surface_state_pool,
-                          iview->nonrt_surface_state);
+                          iview->sampler_surface_state);
    }
 
    if (iview->image->needs_storage_surface_state) {
index ad51b1fa4729e0b19be8e78a5414d42c85974f44..8c4136b8cfd5d94368650605ff4bec8d54967d67 100644 (file)
@@ -1552,7 +1552,7 @@ struct anv_image {
    struct anv_bo *bo;
    VkDeviceSize offset;
 
-   bool needs_nonrt_surface_state:1;
+   bool needs_sampler_surface_state:1;
    bool needs_color_rt_surface_state:1;
    bool needs_storage_surface_state:1;
 
@@ -1595,8 +1595,8 @@ struct anv_image_view {
    /** RENDER_SURFACE_STATE when using image as a color render target. */
    struct anv_state color_rt_surface_state;
 
-   /** RENDER_SURFACE_STATE when using image as a non render target. */
-   struct anv_state nonrt_surface_state;
+   /** RENDER_SURFACE_STATE when using image as a sampler surface. */
+   struct anv_state sampler_surface_state;
 
    /** RENDER_SURFACE_STATE when using image as a storage image. */
    struct anv_state storage_surface_state;