mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-10 14:51:51 +00:00
Fixes vulkan crash when multisampling is enabled
This commit is contained in:
parent
e4485b01f8
commit
89f5428a9a
1 changed files with 2 additions and 2 deletions
|
@ -152,14 +152,14 @@ std::unique_ptr<VulkanRenderPass> VkRenderPassSetup::CreateRenderPass(int clearT
|
|||
for (int i = 1; i < PassKey.DrawBuffers; i++)
|
||||
{
|
||||
builder.AddAttachment(
|
||||
drawBufferFormats[i], buffers->GetSceneSamples(),
|
||||
drawBufferFormats[i], (VkSampleCountFlagBits)PassKey.Samples,
|
||||
(clearTargets & CT_Color) ? VK_ATTACHMENT_LOAD_OP_CLEAR : VK_ATTACHMENT_LOAD_OP_LOAD, VK_ATTACHMENT_STORE_OP_STORE,
|
||||
VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL, VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL);
|
||||
}
|
||||
if (PassKey.DepthStencil)
|
||||
{
|
||||
builder.AddDepthStencilAttachment(
|
||||
buffers->SceneDepthStencilFormat, PassKey.DrawBufferFormat == VK_FORMAT_R8G8B8A8_UNORM ? VK_SAMPLE_COUNT_1_BIT : buffers->GetSceneSamples(),
|
||||
buffers->SceneDepthStencilFormat, (VkSampleCountFlagBits)PassKey.Samples,
|
||||
(clearTargets & CT_Depth) ? VK_ATTACHMENT_LOAD_OP_CLEAR : VK_ATTACHMENT_LOAD_OP_LOAD, VK_ATTACHMENT_STORE_OP_STORE,
|
||||
(clearTargets & CT_Stencil) ? VK_ATTACHMENT_LOAD_OP_CLEAR : VK_ATTACHMENT_LOAD_OP_LOAD, VK_ATTACHMENT_STORE_OP_STORE,
|
||||
VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL, VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL);
|
||||
|
|
Loading…
Reference in a new issue