mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Vulkan: Apply Themaister's patch, removing illegal pre-transitions of swapchain images. Fixes #11417
This commit is contained in:
parent
07e99d614d
commit
9b7061b383
1 changed files with 3 additions and 7 deletions
|
@ -174,13 +174,9 @@ void VulkanRenderManager::CreateBackbuffers() {
|
||||||
color_image_view.flags = 0;
|
color_image_view.flags = 0;
|
||||||
color_image_view.image = sc_buffer.image;
|
color_image_view.image = sc_buffer.image;
|
||||||
|
|
||||||
// Pre-set them to PRESENT_SRC_KHR, as the first thing we do after acquiring
|
// We leave the images as UNDEFINED, there's no need to pre-transition them as
|
||||||
// in image to render to will be to transition them away from that.
|
// the backbuffer renderpass starts out with them being auto-transitioned from UNDEFINED anyway.
|
||||||
TransitionImageLayout2(cmdInit, sc_buffer.image, 0, 1,
|
// Also, turns out it's illegal to transition un-acquired images, thanks Hans-Kristian. See #11417.
|
||||||
VK_IMAGE_ASPECT_COLOR_BIT,
|
|
||||||
VK_IMAGE_LAYOUT_UNDEFINED, VK_IMAGE_LAYOUT_PRESENT_SRC_KHR,
|
|
||||||
VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT,
|
|
||||||
0, VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT);
|
|
||||||
|
|
||||||
res = vkCreateImageView(vulkan_->GetDevice(), &color_image_view, nullptr, &sc_buffer.view);
|
res = vkCreateImageView(vulkan_->GetDevice(), &color_image_view, nullptr, &sc_buffer.view);
|
||||||
swapchainImages_.push_back(sc_buffer);
|
swapchainImages_.push_back(sc_buffer);
|
||||||
|
|
Loading…
Add table
Reference in a new issue