diff options
author | Jason Ekstrand <[email protected]> | 2018-01-19 09:12:17 -0800 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2018-02-08 16:35:31 -0800 |
commit | 9876d6f0efd0484e7f0b2b69b91763bdfb9b19a3 (patch) | |
tree | bff521bb85f5dc420b37795dc3c313e2b917e895 /src | |
parent | c180c2c868f2fccde224a959b5dcba4486cc4c60 (diff) |
anv/blorp: Add src/dst_level helper variables in CmdCopyImage
Reviewed-by: Topi Pohjolainen <[email protected]>
Reviewed-by: Nanley Chery <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/intel/vulkan/anv_blorp.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/intel/vulkan/anv_blorp.c b/src/intel/vulkan/anv_blorp.c index ccb9d1883ea..e4e4135253b 100644 --- a/src/intel/vulkan/anv_blorp.c +++ b/src/intel/vulkan/anv_blorp.c @@ -247,6 +247,7 @@ void anv_CmdCopyImage( VkExtent3D extent = anv_sanitize_image_extent(src_image->type, pRegions[r].extent); + const uint32_t dst_level = pRegions[r].dstSubresource.mipLevel; unsigned dst_base_layer, layer_count; if (dst_image->type == VK_IMAGE_TYPE_3D) { dst_base_layer = pRegions[r].dstOffset.z; @@ -257,6 +258,7 @@ void anv_CmdCopyImage( anv_get_layerCount(dst_image, &pRegions[r].dstSubresource); } + const uint32_t src_level = pRegions[r].srcSubresource.mipLevel; unsigned src_base_layer; if (src_image->type == VK_IMAGE_TYPE_3D) { src_base_layer = pRegions[r].srcOffset.z; @@ -283,10 +285,8 @@ void anv_CmdCopyImage( ANV_AUX_USAGE_DEFAULT, &dst_surf); for (unsigned i = 0; i < layer_count; i++) { - blorp_copy(&batch, &src_surf, pRegions[r].srcSubresource.mipLevel, - src_base_layer + i, - &dst_surf, pRegions[r].dstSubresource.mipLevel, - dst_base_layer + i, + blorp_copy(&batch, &src_surf, src_level, src_base_layer + i, + &dst_surf, dst_level, dst_base_layer + i, srcOffset.x, srcOffset.y, dstOffset.x, dstOffset.y, extent.width, extent.height); @@ -300,10 +300,8 @@ void anv_CmdCopyImage( ANV_AUX_USAGE_DEFAULT, &dst_surf); for (unsigned i = 0; i < layer_count; i++) { - blorp_copy(&batch, &src_surf, pRegions[r].srcSubresource.mipLevel, - src_base_layer + i, - &dst_surf, pRegions[r].dstSubresource.mipLevel, - dst_base_layer + i, + blorp_copy(&batch, &src_surf, src_level, src_base_layer + i, + &dst_surf, dst_level, dst_base_layer + i, srcOffset.x, srcOffset.y, dstOffset.x, dstOffset.y, extent.width, extent.height); |