Commit 010eec49 authored by Laszlo Agocs's avatar Laszlo Agocs
Browse files

vk: fix msaa texture store op (when no resolve)

parent df36bb5a
......@@ -600,7 +600,9 @@ int main(int argc, char **argv)
QPlainTextEdit *info = new QPlainTextEdit(
QLatin1String("This application tests rendering with the same QRhi instance (and so the same Vulkan/Metal/D3D device or OpenGL context) "
"to multiple windows via multiple QRhiSwapChain objects, from the same one thread. Some resources are reused across all windows."
"to multiple windows via multiple QRhiSwapChain objects, from the same one thread. Some resources are shared across all windows."
"\n\nNote that the behavior may differ depending on the underlying graphics API implementation and the number of windows.\n"
"(e.g. weird OpenGL rendering speeds with multiple windows with some drivers is out of Qt's control)"
"\n\nUsing API: ") + graphicsApiName());
info->setReadOnly(true);
layout->addWidget(info);
......
......@@ -810,7 +810,7 @@ bool QRhiVulkan::createOffscreenRenderPass(VkRenderPass *rp,
attDesc.format = vkformat;
attDesc.samples = samples;
attDesc.loadOp = preserveColor ? VK_ATTACHMENT_LOAD_OP_LOAD : VK_ATTACHMENT_LOAD_OP_CLEAR;
attDesc.storeOp = samples > VK_SAMPLE_COUNT_1_BIT ? VK_ATTACHMENT_STORE_OP_DONT_CARE : VK_ATTACHMENT_STORE_OP_STORE;
attDesc.storeOp = colorAttachments[i].resolveTexture ? VK_ATTACHMENT_STORE_OP_DONT_CARE : VK_ATTACHMENT_STORE_OP_STORE;
attDesc.stencilLoadOp = VK_ATTACHMENT_LOAD_OP_DONT_CARE;
attDesc.stencilStoreOp = VK_ATTACHMENT_STORE_OP_DONT_CARE;
attDesc.initialLayout = preserveColor ? VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL : VK_IMAGE_LAYOUT_UNDEFINED;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment