diff options
author | Dave Airlie <[email protected]> | 2017-02-19 16:33:13 +1000 |
---|---|---|
committer | Dave Airlie <[email protected]> | 2017-02-19 20:28:22 +1000 |
commit | efc89edf5a81e31a7c9be3d851dcd7dc896ab888 (patch) | |
tree | f7f82031e9a90566121fbe61185827db0f9f9615 /src | |
parent | 2b3c490e23a6cd7f4f6bb489267c2b9b4fde5b20 (diff) |
radv: pass subresourceRange by pointer.
This struct is 5 dwords, we should really just pass a pointer
to it.
Signed-off-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/amd/vulkan/radv_cmd_buffer.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/amd/vulkan/radv_cmd_buffer.c b/src/amd/vulkan/radv_cmd_buffer.c index 57d55b34e36..661d9828251 100644 --- a/src/amd/vulkan/radv_cmd_buffer.c +++ b/src/amd/vulkan/radv_cmd_buffer.c @@ -40,7 +40,7 @@ static void radv_handle_image_transition(struct radv_cmd_buffer *cmd_buffer, VkImageLayout dst_layout, uint32_t src_family, uint32_t dst_family, - VkImageSubresourceRange range, + const VkImageSubresourceRange *range, VkImageAspectFlags pending_clears); const struct radv_dynamic_state default_dynamic_state = { @@ -1426,7 +1426,7 @@ static void radv_handle_subpass_image_transition(struct radv_cmd_buffer *cmd_buf radv_handle_image_transition(cmd_buffer, view->image, cmd_buffer->state.attachments[idx].current_layout, - att.layout, 0, 0, range, + att.layout, 0, 0, &range, cmd_buffer->state.attachments[idx].pending_clear_aspects); cmd_buffer->state.attachments[idx].current_layout = att.layout; @@ -2641,7 +2641,7 @@ static void radv_handle_depth_image_transition(struct radv_cmd_buffer *cmd_buffe struct radv_image *image, VkImageLayout src_layout, VkImageLayout dst_layout, - VkImageSubresourceRange range, + const VkImageSubresourceRange *range, VkImageAspectFlags pending_clears) { if (dst_layout == VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL && @@ -2662,12 +2662,12 @@ static void radv_handle_depth_image_transition(struct radv_cmd_buffer *cmd_buffe !radv_layout_has_htile(image, dst_layout)) || (radv_layout_is_htile_compressed(image, src_layout) && !radv_layout_is_htile_compressed(image, dst_layout))) { + VkImageSubresourceRange local_range = *range; + local_range.aspectMask = VK_IMAGE_ASPECT_DEPTH_BIT; + local_range.baseMipLevel = 0; + local_range.levelCount = 1; - range.aspectMask = VK_IMAGE_ASPECT_DEPTH_BIT; - range.baseMipLevel = 0; - range.levelCount = 1; - - radv_decompress_depth_image_inplace(cmd_buffer, image, &range); + radv_decompress_depth_image_inplace(cmd_buffer, image, &local_range); } } @@ -2692,7 +2692,7 @@ static void radv_handle_cmask_image_transition(struct radv_cmd_buffer *cmd_buffe VkImageLayout dst_layout, unsigned src_queue_mask, unsigned dst_queue_mask, - VkImageSubresourceRange range, + const VkImageSubresourceRange *range, VkImageAspectFlags pending_clears) { if (src_layout == VK_IMAGE_LAYOUT_UNDEFINED) { @@ -2729,7 +2729,7 @@ static void radv_handle_dcc_image_transition(struct radv_cmd_buffer *cmd_buffer, VkImageLayout dst_layout, unsigned src_queue_mask, unsigned dst_queue_mask, - VkImageSubresourceRange range, + const VkImageSubresourceRange *range, VkImageAspectFlags pending_clears) { if (src_layout == VK_IMAGE_LAYOUT_UNDEFINED) { @@ -2746,7 +2746,7 @@ static void radv_handle_image_transition(struct radv_cmd_buffer *cmd_buffer, VkImageLayout dst_layout, uint32_t src_family, uint32_t dst_family, - VkImageSubresourceRange range, + const VkImageSubresourceRange *range, VkImageAspectFlags pending_clears) { if (image->exclusive && src_family != dst_family) { @@ -2845,7 +2845,7 @@ void radv_CmdPipelineBarrier( pImageMemoryBarriers[i].newLayout, pImageMemoryBarriers[i].srcQueueFamilyIndex, pImageMemoryBarriers[i].dstQueueFamilyIndex, - pImageMemoryBarriers[i].subresourceRange, + &pImageMemoryBarriers[i].subresourceRange, 0); } @@ -2981,7 +2981,7 @@ void radv_CmdWaitEvents(VkCommandBuffer commandBuffer, pImageMemoryBarriers[i].newLayout, pImageMemoryBarriers[i].srcQueueFamilyIndex, pImageMemoryBarriers[i].dstQueueFamilyIndex, - pImageMemoryBarriers[i].subresourceRange, + &pImageMemoryBarriers[i].subresourceRange, 0); } |