cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

timon
Adept I

Vulkan: vkCmdBlitImage blits only base layer even when layerCount > 1

In vulkan when we call vkCmdBlitImage with

baseArrayLayer = 0 and layerCount = 6 (for both srcSubresource and dstSubresource)

only the first layer gets blitted.

if I replace the call

                if (1) {

                    region.srcSubresource.baseArrayLayer = 0;

                    region.srcSubresource.layerCount = 6;

                    region.dstSubresource.baseArrayLayer = 0;

                    region.dstSubresource.layerCount = 6;

                    vkCmdBlitImage(cb.BE_Get(),

                        dstimage, VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL,

                        dstimage, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL,

                        1, &region,

                        VK_FILTER_LINEAR

                    );

                }

                else {//TODO @Timon seems like blitting multiple layers (using layerCount) doesn't work on amd?

                    VkImageBlit wtf[6];

                    for (int i = 0; i < 6; ++i) {

                        wtf = region;

                        wtf.srcSubresource.baseArrayLayer = i;

                        wtf.srcSubresource.layerCount = 1;

                        wtf.dstSubresource.baseArrayLayer = i;

                        wtf.dstSubresource.layerCount = 1;

                    }

                    vkCmdBlitImage(cb.BE_Get(),

                        dstimage, VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL,

                        dstimage, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL,

                        6, wtf,

                        VK_FILTER_LINEAR

                    );

                }

0 Likes
2 Replies
dwitczak
Staff

Apologies for the late answer. I'm going to have a look at this later today or tomorrow. Will get back to you as soon as I have more data to share.

In the meantime, I would appreciate if you could re-check this use case with the latest driver.

0 Likes

I was unable to reproduce this issue locally. Can you please provide an example application for further investigation?

0 Likes