Вулкан разрешить вложение перевернуто - PullRequest
0 голосов
/ 16 января 2020

enter image description here

Я использую pResolveAttachment для реализации MSAA с Vulkan на Android, но результат переворачивается.

    VkSubpassDescription subpassDesc;
    subpassDesc.flags = 0;
    subpassDesc.pipelineBindPoint = VK_PIPELINE_BIND_POINT_GRAPHICS;
    subpassDesc.inputAttachmentCount = 0;
    subpassDesc.pInputAttachments = nullptr;
    subpassDesc.colorAttachmentCount = colorAttachmentCount;
    subpassDesc.pColorAttachments = attachmentRefs.data();
    subpassDesc.pResolveAttachments = resolveAttachmentCount > 0 ? resolveReferences.data() : nullptr;
    subpassDesc.pDepthStencilAttachment = depthStencilAttachment;
    subpassDesc.preserveAttachmentCount = 0;
    subpassDesc.pPreserveAttachments = nullptr;

// TIPS
resolveReferences[resolveAttachmentCount].attachment = attachmentCount;
resolveReferences[resolveAttachmentCount].layout = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL;

resolveAttachmentCount++;

....

subpassDesc.pResolveAttachments = resolveAttachmentCount > 0 ? resolveReferences.data() : nullptr;
...