diff options
| author | Stenzek <stenzek@gmail.com> | 2017-09-07 23:42:44 +1000 |
|---|---|---|
| committer | Stenzek <stenzek@gmail.com> | 2017-09-11 20:01:50 +1000 |
| commit | b7a099814a6cfcd1db4d7091e01bf4538be67e5e (patch) | |
| tree | 237df4737972fa492023305c8f8d02071dc14043 /Source/Core/VideoBackends/Vulkan/FramebufferManager.cpp | |
| parent | e5840908224c1bcf6d948ec11d56b918e3ebee89 (diff) | |
Vulkan: Clear contents of EFB convert framebuffer at create time
Fixes a validation layer warning when converting pixel formats.
Diffstat (limited to 'Source/Core/VideoBackends/Vulkan/FramebufferManager.cpp')
| -rw-r--r-- | Source/Core/VideoBackends/Vulkan/FramebufferManager.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Source/Core/VideoBackends/Vulkan/FramebufferManager.cpp b/Source/Core/VideoBackends/Vulkan/FramebufferManager.cpp index 8a7745732f..7ab7c6ecd3 100644 --- a/Source/Core/VideoBackends/Vulkan/FramebufferManager.cpp +++ b/Source/Core/VideoBackends/Vulkan/FramebufferManager.cpp @@ -362,6 +362,8 @@ bool FramebufferManager::CreateEFBFramebuffer() // Transition to state that can be used to clear m_efb_color_texture->TransitionToLayout(g_command_buffer_mgr->GetCurrentCommandBuffer(), VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL); + m_efb_convert_color_texture->TransitionToLayout(g_command_buffer_mgr->GetCurrentCommandBuffer(), + VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL); m_efb_depth_texture->TransitionToLayout(g_command_buffer_mgr->GetCurrentCommandBuffer(), VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL); @@ -373,6 +375,9 @@ bool FramebufferManager::CreateEFBFramebuffer() vkCmdClearColorImage(g_command_buffer_mgr->GetCurrentCommandBuffer(), m_efb_color_texture->GetImage(), VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, &clear_color, 1, &clear_color_range); + vkCmdClearColorImage(g_command_buffer_mgr->GetCurrentCommandBuffer(), + m_efb_convert_color_texture->GetImage(), + VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, &clear_color, 1, &clear_color_range); vkCmdClearDepthStencilImage(g_command_buffer_mgr->GetCurrentCommandBuffer(), m_efb_depth_texture->GetImage(), VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, &clear_depth, 1, &clear_depth_range); |
