From: Chad Versace Date: Thu, 4 Feb 2016 19:41:59 +0000 (-0800) Subject: anv/image: Rename nonrt_surface_state X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=42b9320fbf67844d97f054db1a427894c444edf3;p=mesa.git anv/image: Rename nonrt_surface_state Let's call it what it is, not what it is not. Rename it to 'sampler_surface_state'. --- diff --git a/src/vulkan/anv_cmd_buffer.c b/src/vulkan/anv_cmd_buffer.c index 0966e7658bf..a0f9bab8e1e 100644 --- a/src/vulkan/anv_cmd_buffer.c +++ b/src/vulkan/anv_cmd_buffer.c @@ -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; diff --git a/src/vulkan/anv_image.c b/src/vulkan/anv_image.c index 6cc5700c21e..be91cdc5d92 100644 --- a/src/vulkan/anv_image.c +++ b/src/vulkan/anv_image.c @@ -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) { diff --git a/src/vulkan/anv_private.h b/src/vulkan/anv_private.h index ad51b1fa472..8c4136b8cfd 100644 --- a/src/vulkan/anv_private.h +++ b/src/vulkan/anv_private.h @@ -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;