dest_image->bo = dest_buffer->bo;
dest_image->offset = dest_buffer->offset + pRegions[r].destOffset;
- VkImageView src_view;
- anv_CreateImageView(vk_device,
+ struct anv_surface_view src_view;
+ anv_image_view_init(&src_view, cmd_buffer->device,
&(VkImageViewCreateInfo) {
.sType = VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO,
.image = (VkImage)src_image,
.arraySize = 1
},
.minLod = 0
- }, &src_view);
+ },
+ cmd_buffer);
- VkColorAttachmentView dest_view;
- anv_CreateColorAttachmentView(vk_device,
+ struct anv_surface_view dest_view;
+ anv_color_attachment_view_init(&dest_view, cmd_buffer->device,
&(VkColorAttachmentViewCreateInfo) {
.sType = VK_STRUCTURE_TYPE_COLOR_ATTACHMENT_VIEW_CREATE_INFO,
.image = (VkImage)dest_image,
.mipLevel = 0,
.baseArraySlice = 0,
.arraySize = 1,
- }, &dest_view);
+ },
+ cmd_buffer);
meta_emit_blit(cmd_buffer,
- (struct anv_surface_view *)src_view,
+ &src_view,
(VkOffset3D) { 0, 0, 0 },
(VkExtent3D) { pRegions[r].copySize, 0, 0 },
- (struct anv_surface_view *)dest_view,
+ &dest_view,
(VkOffset3D) { 0, 0, 0 },
(VkExtent3D) { pRegions[r].copySize, 0, 0 });
}
const VkImageCopy* pRegions)
{
struct anv_cmd_buffer *cmd_buffer = (struct anv_cmd_buffer *)cmdBuffer;
- VkDevice vk_device = (VkDevice) cmd_buffer->device;
struct anv_image *src_image = (struct anv_image *)srcImage;
struct anv_saved_state saved_state;
meta_prepare_blit(cmd_buffer, &saved_state);
for (unsigned r = 0; r < regionCount; r++) {
- VkImageView src_view;
- anv_CreateImageView(vk_device,
+ struct anv_surface_view src_view;
+ anv_image_view_init(&src_view, cmd_buffer->device,
&(VkImageViewCreateInfo) {
.sType = VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO,
.image = srcImage,
.arraySize = 1
},
.minLod = 0
- }, &src_view);
+ },
+ cmd_buffer);
- VkColorAttachmentView dest_view;
- anv_CreateColorAttachmentView(vk_device,
+ struct anv_surface_view dest_view;
+ anv_color_attachment_view_init(&dest_view, cmd_buffer->device,
&(VkColorAttachmentViewCreateInfo) {
.sType = VK_STRUCTURE_TYPE_COLOR_ATTACHMENT_VIEW_CREATE_INFO,
.image = destImage,
.mipLevel = pRegions[r].destSubresource.mipLevel,
.baseArraySlice = pRegions[r].destSubresource.arraySlice,
.arraySize = 1,
- }, &dest_view);
+ },
+ cmd_buffer);
meta_emit_blit(cmd_buffer,
- (struct anv_surface_view *)src_view,
+ &src_view,
pRegions[r].srcOffset,
pRegions[r].extent,
- (struct anv_surface_view *)dest_view,
+ &dest_view,
pRegions[r].destOffset,
pRegions[r].extent);
}
const VkImageBlit* pRegions)
{
struct anv_cmd_buffer *cmd_buffer = (struct anv_cmd_buffer *)cmdBuffer;
- VkDevice vk_device = (VkDevice) cmd_buffer->device;
struct anv_image *src_image = (struct anv_image *)srcImage;
struct anv_image *dest_image = (struct anv_image *)destImage;
struct anv_saved_state saved_state;
meta_prepare_blit(cmd_buffer, &saved_state);
for (unsigned r = 0; r < regionCount; r++) {
- VkImageView src_view;
- anv_CreateImageView(vk_device,
+ struct anv_surface_view src_view;
+ anv_image_view_init(&src_view, cmd_buffer->device,
&(VkImageViewCreateInfo) {
.sType = VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO,
.image = srcImage,
.arraySize = 1
},
.minLod = 0
- }, &src_view);
+ },
+ cmd_buffer);
- VkColorAttachmentView dest_view;
- anv_CreateColorAttachmentView(vk_device,
+ struct anv_surface_view dest_view;
+ anv_color_attachment_view_init(&dest_view, cmd_buffer->device,
&(VkColorAttachmentViewCreateInfo) {
.sType = VK_STRUCTURE_TYPE_COLOR_ATTACHMENT_VIEW_CREATE_INFO,
.image = destImage,
.mipLevel = pRegions[r].destSubresource.mipLevel,
.baseArraySlice = pRegions[r].destSubresource.arraySlice,
.arraySize = 1,
- }, &dest_view);
+ },
+ cmd_buffer);
meta_emit_blit(cmd_buffer,
- (struct anv_surface_view *)src_view,
+ &src_view,
pRegions[r].srcOffset,
pRegions[r].srcExtent,
- (struct anv_surface_view *)dest_view,
+ &dest_view,
pRegions[r].destOffset,
pRegions[r].destExtent);
}
src_image->bo = src_buffer->bo;
src_image->offset = src_buffer->offset + pRegions[r].bufferOffset;
- VkImageView src_view;
- anv_CreateImageView(vk_device,
+ struct anv_surface_view src_view;
+ anv_image_view_init(&src_view, cmd_buffer->device,
&(VkImageViewCreateInfo) {
.sType = VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO,
.image = (VkImage)src_image,
.arraySize = 1
},
.minLod = 0
- }, &src_view);
+ },
+ cmd_buffer);
- VkColorAttachmentView dest_view;
- anv_CreateColorAttachmentView(vk_device,
+ struct anv_surface_view dest_view;
+ anv_color_attachment_view_init(&dest_view, cmd_buffer->device,
&(VkColorAttachmentViewCreateInfo) {
.sType = VK_STRUCTURE_TYPE_COLOR_ATTACHMENT_VIEW_CREATE_INFO,
.image = (VkImage)dest_image,
.mipLevel = pRegions[r].imageSubresource.mipLevel,
.baseArraySlice = pRegions[r].imageSubresource.arraySlice,
.arraySize = 1,
- }, &dest_view);
+ },
+ cmd_buffer);
meta_emit_blit(cmd_buffer,
- (struct anv_surface_view *)src_view,
+ &src_view,
(VkOffset3D) { 0, 0, 0 },
pRegions[r].imageExtent,
- (struct anv_surface_view *)dest_view,
+ &dest_view,
pRegions[r].imageOffset,
pRegions[r].imageExtent);
}
meta_prepare_blit(cmd_buffer, &saved_state);
for (unsigned r = 0; r < regionCount; r++) {
- VkImageView src_view;
- anv_CreateImageView(vk_device,
+ struct anv_surface_view src_view;
+ anv_image_view_init(&src_view, cmd_buffer->device,
&(VkImageViewCreateInfo) {
.sType = VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO,
.image = srcImage,
.arraySize = 1
},
.minLod = 0
- }, &src_view);
+ },
+ cmd_buffer);
struct anv_image *dest_image;
anv_CreateImage(vk_device,
dest_image->bo = dest_buffer->bo;
dest_image->offset = dest_buffer->offset + pRegions[r].bufferOffset;
- VkColorAttachmentView dest_view;
- anv_CreateColorAttachmentView(vk_device,
+ struct anv_surface_view dest_view;
+ anv_color_attachment_view_init(&dest_view, cmd_buffer->device,
&(VkColorAttachmentViewCreateInfo) {
.sType = VK_STRUCTURE_TYPE_COLOR_ATTACHMENT_VIEW_CREATE_INFO,
.image = (VkImage)dest_image,
.mipLevel = 0,
.baseArraySlice = 0,
.arraySize = 1,
- }, &dest_view);
+ },
+ cmd_buffer);
meta_emit_blit(cmd_buffer,
- (struct anv_surface_view *)src_view,
+ &src_view,
pRegions[r].imageOffset,
pRegions[r].imageExtent,
- (struct anv_surface_view *)dest_view,
+ &dest_view,
(VkOffset3D) { 0, 0, 0 },
pRegions[r].imageExtent);
}