diff options
author | Jason Ekstrand <[email protected]> | 2016-03-31 09:32:05 -0700 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2016-04-08 15:58:45 -0700 |
commit | b377c1d08ed16ca0abeabc86e8d651036eea3145 (patch) | |
tree | 337c144a40e4e55be79b34fed65943bffdff433d | |
parent | f9a2570a06949810b10395d81c19f6295d76c530 (diff) |
anv/image: Remove the offset parameter from image_view_init
The only place we were using this was in meta_blit2d which always creates a
new image anyway so we can just use the image offset.
Reviewed-by: Nanley Chery <[email protected]>
-rw-r--r-- | src/intel/vulkan/anv_image.c | 5 | ||||
-rw-r--r-- | src/intel/vulkan/anv_meta_blit.c | 4 | ||||
-rw-r--r-- | src/intel/vulkan/anv_meta_blit2d.c | 4 | ||||
-rw-r--r-- | src/intel/vulkan/anv_meta_clear.c | 2 | ||||
-rw-r--r-- | src/intel/vulkan/anv_meta_resolve.c | 4 | ||||
-rw-r--r-- | src/intel/vulkan/anv_private.h | 1 |
6 files changed, 9 insertions, 11 deletions
diff --git a/src/intel/vulkan/anv_image.c b/src/intel/vulkan/anv_image.c index 759c8612005..db109625316 100644 --- a/src/intel/vulkan/anv_image.c +++ b/src/intel/vulkan/anv_image.c @@ -464,7 +464,6 @@ anv_image_view_init(struct anv_image_view *iview, 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); @@ -495,7 +494,7 @@ anv_image_view_init(struct anv_image_view *iview, 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; @@ -614,7 +613,7 @@ anv_CreateImageView(VkDevice _device, 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); diff --git a/src/intel/vulkan/anv_meta_blit.c b/src/intel/vulkan/anv_meta_blit.c index 218499a8787..b726b94c3cd 100644 --- a/src/intel/vulkan/anv_meta_blit.c +++ b/src/intel/vulkan/anv_meta_blit.c @@ -384,7 +384,7 @@ void anv_CmdBlitImage( .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, @@ -434,7 +434,7 @@ void anv_CmdBlitImage( .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, diff --git a/src/intel/vulkan/anv_meta_blit2d.c b/src/intel/vulkan/anv_meta_blit2d.c index 49646dd0374..68ade55d8ea 100644 --- a/src/intel/vulkan/anv_meta_blit2d.c +++ b/src/intel/vulkan/anv_meta_blit2d.c @@ -131,7 +131,7 @@ create_iview(struct anv_cmd_buffer *cmd_buffer, * 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) { @@ -146,7 +146,7 @@ create_iview(struct anv_cmd_buffer *cmd_buffer, .baseArrayLayer = 0, .layerCount = 1 }, - }, cmd_buffer, offset, usage); + }, cmd_buffer, usage); } struct blit2d_src_temps { diff --git a/src/intel/vulkan/anv_meta_clear.c b/src/intel/vulkan/anv_meta_clear.c index a24e59950be..a03701c684b 100644 --- a/src/intel/vulkan/anv_meta_clear.c +++ b/src/intel/vulkan/anv_meta_clear.c @@ -813,7 +813,7 @@ anv_cmd_clear_image(struct anv_cmd_buffer *cmd_buffer, .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, diff --git a/src/intel/vulkan/anv_meta_resolve.c b/src/intel/vulkan/anv_meta_resolve.c index 3e7c7d39ba5..8c1bdc06f84 100644 --- a/src/intel/vulkan/anv_meta_resolve.c +++ b/src/intel/vulkan/anv_meta_resolve.c @@ -758,7 +758,7 @@ void anv_CmdResolveImage( .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, @@ -775,7 +775,7 @@ void anv_CmdResolveImage( .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, diff --git a/src/intel/vulkan/anv_private.h b/src/intel/vulkan/anv_private.h index a394fe8a683..99d3934ddda 100644 --- a/src/intel/vulkan/anv_private.h +++ b/src/intel/vulkan/anv_private.h @@ -1667,7 +1667,6 @@ void anv_image_view_init(struct anv_image_view *view, struct anv_device *device, const VkImageViewCreateInfo* pCreateInfo, struct anv_cmd_buffer *cmd_buffer, - uint32_t offset, VkImageUsageFlags usage_mask); struct anv_buffer_view { |