struct anv_device *device,
const VkImageViewCreateInfo* pCreateInfo,
struct anv_cmd_buffer *cmd_buffer,
- uint32_t offset,
VkImageUsageFlags usage_mask)
{
ANV_FROM_HANDLE(anv_image, image, pCreateInfo->image);
iview->image = image;
iview->bo = image->bo;
- iview->offset = image->offset + surface->offset + offset;
+ iview->offset = image->offset + surface->offset;
iview->aspect_mask = pCreateInfo->subresourceRange.aspectMask;
iview->vk_format = pCreateInfo->format;
if (view == NULL)
return vk_error(VK_ERROR_OUT_OF_HOST_MEMORY);
- anv_image_view_init(view, device, pCreateInfo, NULL, 0, ~0);
+ anv_image_view_init(view, device, pCreateInfo, NULL, ~0);
*pView = anv_image_view_to_handle(view);
.layerCount = 1
},
},
- cmd_buffer, 0, VK_IMAGE_USAGE_SAMPLED_BIT);
+ cmd_buffer, VK_IMAGE_USAGE_SAMPLED_BIT);
const VkOffset3D dest_offset = {
.x = pRegions[r].dstOffsets[0].x,
.layerCount = 1
},
},
- cmd_buffer, 0, VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT);
+ cmd_buffer, VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT);
meta_emit_blit(cmd_buffer,
src_image, &src_iview,
* creating a dummy memory object etc. so there's really no point.
*/
anv_image_from_handle(*img)->bo = surf->bo;
- anv_image_from_handle(*img)->offset = surf->base_offset;
+ anv_image_from_handle(*img)->offset = surf->base_offset + offset;
anv_image_view_init(iview, cmd_buffer->device,
&(VkImageViewCreateInfo) {
.baseArrayLayer = 0,
.layerCount = 1
},
- }, cmd_buffer, offset, usage);
+ }, cmd_buffer, usage);
}
struct blit2d_src_temps {
.layerCount = 1
},
},
- cmd_buffer, 0, VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT);
+ cmd_buffer, VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT);
VkFramebuffer fb;
anv_CreateFramebuffer(device_h,
.layerCount = 1,
},
},
- cmd_buffer, 0, VK_IMAGE_USAGE_SAMPLED_BIT);
+ cmd_buffer, VK_IMAGE_USAGE_SAMPLED_BIT);
struct anv_image_view dest_iview;
anv_image_view_init(&dest_iview, cmd_buffer->device,
.layerCount = 1,
},
},
- cmd_buffer, 0, VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT);
+ cmd_buffer, VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT);
VkFramebuffer fb_h;
anv_CreateFramebuffer(device_h,
struct anv_device *device,
const VkImageViewCreateInfo* pCreateInfo,
struct anv_cmd_buffer *cmd_buffer,
- uint32_t offset,
VkImageUsageFlags usage_mask);
struct anv_buffer_view {