summaryrefslogtreecommitdiffstats
path: root/src/vulkan/anv_image.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vulkan/anv_image.c')
-rw-r--r--src/vulkan/anv_image.c57
1 files changed, 29 insertions, 28 deletions
diff --git a/src/vulkan/anv_image.c b/src/vulkan/anv_image.c
index 248df3d9b42..19004320298 100644
--- a/src/vulkan/anv_image.c
+++ b/src/vulkan/anv_image.c
@@ -374,9 +374,9 @@ VkResult anv_GetImageSubresourceLayout(
void
anv_surface_view_fini(struct anv_device *device,
- struct anv_surface_view *view)
+ struct anv_surface_view *sview)
{
- anv_state_pool_free(&device->surface_state_pool, view->surface_state);
+ anv_state_pool_free(&device->surface_state_pool, sview->surface_state);
}
VkResult
@@ -505,30 +505,31 @@ anv_DestroyImageView(VkDevice _device, VkImageView _iview)
ANV_FROM_HANDLE(anv_device, device, _device);
ANV_FROM_HANDLE(anv_image_view, iview, _iview);
- anv_surface_view_fini(device, &iview->view);
+ anv_surface_view_fini(device, &iview->surface_view);
anv_device_free(device, iview);
return VK_SUCCESS;
}
static void
-anv_depth_stencil_view_init(struct anv_depth_stencil_view *view,
+anv_depth_stencil_view_init(struct anv_depth_stencil_view *ds_view,
const VkAttachmentViewCreateInfo *pCreateInfo)
{
ANV_FROM_HANDLE(anv_image, image, pCreateInfo->image);
- view->base.attachment_type = ANV_ATTACHMENT_VIEW_TYPE_DEPTH_STENCIL;
+ ds_view->attachment_view.attachment_type =
+ ANV_ATTACHMENT_VIEW_TYPE_DEPTH_STENCIL;
/* XXX: We don't handle any of these */
anv_assert(pCreateInfo->mipLevel == 0);
anv_assert(pCreateInfo->baseArraySlice == 0);
anv_assert(pCreateInfo->arraySize == 1);
- view->image = image;
- view->format = anv_format_for_vk_format(pCreateInfo->format);
+ ds_view->image = image;
+ ds_view->format = anv_format_for_vk_format(pCreateInfo->format);
assert(anv_format_is_depth_or_stencil(image->format));
- assert(anv_format_is_depth_or_stencil(view->format));
+ assert(anv_format_is_depth_or_stencil(ds_view->format));
}
struct anv_surface *
@@ -578,17 +579,17 @@ anv_image_get_surface_for_color_attachment(struct anv_image *image)
}
void
-anv_color_attachment_view_init(struct anv_color_attachment_view *aview,
+anv_color_attachment_view_init(struct anv_color_attachment_view *cview,
struct anv_device *device,
const VkAttachmentViewCreateInfo* pCreateInfo,
struct anv_cmd_buffer *cmd_buffer)
{
switch (device->info.gen) {
case 7:
- gen7_color_attachment_view_init(aview, device, pCreateInfo, cmd_buffer);
+ gen7_color_attachment_view_init(cview, device, pCreateInfo, cmd_buffer);
break;
case 8:
- gen8_color_attachment_view_init(aview, device, pCreateInfo, cmd_buffer);
+ gen8_color_attachment_view_init(cview, device, pCreateInfo, cmd_buffer);
break;
default:
unreachable("unsupported gen\n");
@@ -608,44 +609,44 @@ anv_CreateAttachmentView(VkDevice _device,
anv_format_for_vk_format(pCreateInfo->format);
if (anv_format_is_depth_or_stencil(format)) {
- struct anv_depth_stencil_view *view =
- anv_device_alloc(device, sizeof(*view), 8,
+ struct anv_depth_stencil_view *ds_view =
+ anv_device_alloc(device, sizeof(*ds_view), 8,
VK_SYSTEM_ALLOC_TYPE_API_OBJECT);
- if (view == NULL)
+ if (ds_view == NULL)
return vk_error(VK_ERROR_OUT_OF_HOST_MEMORY);
- anv_depth_stencil_view_init(view, pCreateInfo);
+ anv_depth_stencil_view_init(ds_view, pCreateInfo);
- *pView = anv_attachment_view_to_handle(&view->base);
+ *pView = anv_attachment_view_to_handle(&ds_view->attachment_view);
} else {
- struct anv_color_attachment_view *view =
- anv_device_alloc(device, sizeof(*view), 8,
+ struct anv_color_attachment_view *cview =
+ anv_device_alloc(device, sizeof(*cview), 8,
VK_SYSTEM_ALLOC_TYPE_API_OBJECT);
- if (view == NULL)
+ if (cview == NULL)
return vk_error(VK_ERROR_OUT_OF_HOST_MEMORY);
- anv_color_attachment_view_init(view, device, pCreateInfo, NULL);
+ anv_color_attachment_view_init(cview, device, pCreateInfo, NULL);
- *pView = anv_attachment_view_to_handle(&view->base);
+ *pView = anv_attachment_view_to_handle(&cview->attachment_view);
}
return VK_SUCCESS;
}
VkResult
-anv_DestroyAttachmentView(VkDevice _device, VkAttachmentView _view)
+anv_DestroyAttachmentView(VkDevice _device, VkAttachmentView _aview)
{
ANV_FROM_HANDLE(anv_device, device, _device);
- ANV_FROM_HANDLE(anv_attachment_view, view, _view);
+ ANV_FROM_HANDLE(anv_attachment_view, aview, _aview);
- if (view->attachment_type == ANV_ATTACHMENT_VIEW_TYPE_COLOR) {
- struct anv_color_attachment_view *aview =
- (struct anv_color_attachment_view *)view;
+ if (aview->attachment_type == ANV_ATTACHMENT_VIEW_TYPE_COLOR) {
+ struct anv_color_attachment_view *cview =
+ (struct anv_color_attachment_view *) aview;
- anv_surface_view_fini(device, &aview->view);
+ anv_surface_view_fini(device, &cview->surface_view);
}
- anv_device_free(device, view);
+ anv_device_free(device, aview);
return VK_SUCCESS;
}