diff options
author | Chad Versace <[email protected]> | 2015-10-07 07:30:52 -0700 |
---|---|---|
committer | Chad Versace <[email protected]> | 2015-10-07 09:10:25 -0700 |
commit | 6dea1a9ba1acd7a957feb9ad43504e7accc4f8f8 (patch) | |
tree | f7bf651297b6dfe787f3706f7040f7db0e35eef1 /src | |
parent | 03dd72279f871c242a47bc4d03aef128bd5ae792 (diff) |
vk/0.170.2: Merge VkAttachmentView into VkImageView
Diffstat (limited to 'src')
-rw-r--r-- | src/vulkan/anv_device.c | 3 | ||||
-rw-r--r-- | src/vulkan/anv_image.c | 34 | ||||
-rw-r--r-- | src/vulkan/anv_meta.c | 21 |
3 files changed, 7 insertions, 51 deletions
diff --git a/src/vulkan/anv_device.c b/src/vulkan/anv_device.c index e7f74266e68..b10cc4512b4 100644 --- a/src/vulkan/anv_device.c +++ b/src/vulkan/anv_device.c @@ -1968,8 +1968,7 @@ VkResult anv_CreateFramebuffer( framebuffer->attachment_count = pCreateInfo->attachmentCount; for (uint32_t i = 0; i < pCreateInfo->attachmentCount; i++) { - VkAttachmentView _aview = pCreateInfo->pAttachments[i].view; - VkImageView _iview = { _aview.handle }; + VkImageView _iview = pCreateInfo->pAttachments[i]; framebuffer->attachments[i] = anv_image_view_from_handle(_iview); } diff --git a/src/vulkan/anv_image.c b/src/vulkan/anv_image.c index 5973be1391b..8522d0e8318 100644 --- a/src/vulkan/anv_image.c +++ b/src/vulkan/anv_image.c @@ -617,23 +617,7 @@ anv_image_get_surface_for_aspect_mask(struct anv_image *image, VkImageAspectFlag } } -VkResult -anv_CreateAttachmentView(VkDevice _device, - const VkAttachmentViewCreateInfo *info, - VkAttachmentView *pView) -{ - ANV_FROM_HANDLE(anv_device, device, _device); - struct anv_image_view *iview; - - assert(info->sType == VK_STRUCTURE_TYPE_ATTACHMENT_VIEW_CREATE_INFO); - - iview = anv_device_alloc(device, sizeof(*iview), 8, - VK_SYSTEM_ALLOC_TYPE_API_OBJECT); - if (iview == NULL) - return vk_error(VK_ERROR_OUT_OF_HOST_MEMORY); - - const struct anv_format *format = anv_format_for_vk_format(info->format); - +#if 0 VkImageAspectFlags aspect_mask = 0; if (format->depth_format) aspect_mask |= VK_IMAGE_ASPECT_DEPTH_BIT; @@ -663,18 +647,4 @@ anv_CreateAttachmentView(VkDevice _device, }, }, NULL); - - pView->handle = anv_image_view_to_handle(iview).handle; - - return VK_SUCCESS; -} - -void -anv_DestroyAttachmentView(VkDevice _device, VkAttachmentView _aview) -{ - ANV_FROM_HANDLE(anv_device, device, _device); - VkImageView _iview = { .handle = _aview.handle }; - ANV_FROM_HANDLE(anv_image_view, iview, _iview); - - anv_image_view_destroy(device, iview); -} +#endif diff --git a/src/vulkan/anv_meta.c b/src/vulkan/anv_meta.c index c7c50ef87a9..a0b7070ebfe 100644 --- a/src/vulkan/anv_meta.c +++ b/src/vulkan/anv_meta.c @@ -738,10 +738,6 @@ meta_emit_blit(struct anv_cmd_buffer *cmd_buffer, VkExtent3D dest_extent) { struct anv_device *device = cmd_buffer->device; - - VkImageView dest_iview_h = anv_image_view_to_handle(dest_iview); - VkAttachmentView dest_aview_h = { .handle = dest_iview_h.handle }; - VkDescriptorPool dummy_desc_pool = { .handle = 1 }; struct blit_vb_data { @@ -837,11 +833,8 @@ meta_emit_blit(struct anv_cmd_buffer *cmd_buffer, &(VkFramebufferCreateInfo) { .sType = VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO, .attachmentCount = 1, - .pAttachments = (VkAttachmentBindInfo[]) { - { - .view = dest_aview_h, - .layout = VK_IMAGE_LAYOUT_GENERAL - } + .pAttachments = (VkImageView[]) { + anv_image_view_to_handle(dest_iview), }, .width = dest_iview->extent.width, .height = dest_iview->extent.height, @@ -1639,19 +1632,13 @@ void anv_CmdClearColorImage( }, cmd_buffer); - VkImageView iview_h = anv_image_view_to_handle(&iview); - VkAttachmentView aview_h = { .handle = iview_h.handle }; - VkFramebuffer fb; anv_CreateFramebuffer(anv_device_to_handle(cmd_buffer->device), &(VkFramebufferCreateInfo) { .sType = VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO, .attachmentCount = 1, - .pAttachments = (VkAttachmentBindInfo[]) { - { - .view = aview_h, - .layout = VK_IMAGE_LAYOUT_GENERAL - } + .pAttachments = (VkImageView[]) { + anv_image_view_to_handle(&iview), }, .width = iview.extent.width, .height = iview.extent.height, |