v3dv: handle multisampled image copies in the TLB path
vkCmdCopyImage can be used to copy multisampled images. We can easily support that on the TLB path, which copies full images. For partial copies we will need to amend our blit shader path to support multisampling resolve. Fixes: dEQP-VK.api.copy_and_blit.core.resolve_image.whole_copy_before_resolving.4_bit Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6766>
This commit is contained in:
committed by
Marge Bot
parent
8a1f6717e8
commit
006178165c
@@ -1051,6 +1051,8 @@ v3dv_CmdCopyImageToBuffer(VkCommandBuffer commandBuffer,
|
||||
V3DV_FROM_HANDLE(v3dv_image, image, srcImage);
|
||||
V3DV_FROM_HANDLE(v3dv_buffer, buffer, destBuffer);
|
||||
|
||||
assert(image->samples == VK_SAMPLE_COUNT_1_BIT);
|
||||
|
||||
for (uint32_t i = 0; i < regionCount; i++) {
|
||||
if (copy_image_to_buffer_tlb(cmd_buffer, buffer, image, &pRegions[i]))
|
||||
continue;
|
||||
@@ -1188,7 +1190,8 @@ copy_image_tlb(struct v3dv_cmd_buffer *cmd_buffer,
|
||||
const uint32_t width = DIV_ROUND_UP(region->extent.width, block_w);
|
||||
const uint32_t height = DIV_ROUND_UP(region->extent.height, block_h);
|
||||
|
||||
v3dv_job_start_frame(job, width, height, num_layers, 1, internal_bpp, false);
|
||||
v3dv_job_start_frame(job, width, height, num_layers, 1, internal_bpp,
|
||||
src->samples > VK_SAMPLE_COUNT_1_BIT);
|
||||
|
||||
struct framebuffer_data framebuffer;
|
||||
setup_framebuffer_data(&framebuffer, fb_format, internal_type,
|
||||
@@ -1332,6 +1335,8 @@ v3dv_CmdCopyImage(VkCommandBuffer commandBuffer,
|
||||
V3DV_FROM_HANDLE(v3dv_image, src, srcImage);
|
||||
V3DV_FROM_HANDLE(v3dv_image, dst, dstImage);
|
||||
|
||||
assert(src->samples == dst->samples);
|
||||
|
||||
for (uint32_t i = 0; i < regionCount; i++) {
|
||||
if (copy_image_tlb(cmd_buffer, dst, src, &pRegions[i]))
|
||||
continue;
|
||||
@@ -2636,6 +2641,8 @@ v3dv_CmdCopyBufferToImage(VkCommandBuffer commandBuffer,
|
||||
V3DV_FROM_HANDLE(v3dv_buffer, buffer, srcBuffer);
|
||||
V3DV_FROM_HANDLE(v3dv_image, image, dstImage);
|
||||
|
||||
assert(image->samples == VK_SAMPLE_COUNT_1_BIT);
|
||||
|
||||
for (uint32_t i = 0; i < regionCount; i++) {
|
||||
if (copy_buffer_to_image_tfu(cmd_buffer, image, buffer, &pRegions[i]))
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user