mirror of https://github.com/snes9xgit/snes9x.git
Vulkan: Use mailbox when available. Suppress debug messages.
This commit is contained in:
parent
e3f1790711
commit
58bdb3efa0
|
@ -176,7 +176,7 @@ bool Swapchain::create(unsigned int desired_num_swapchain_images, int new_width,
|
||||||
.setImageUsage(vk::ImageUsageFlagBits::eColorAttachment | vk::ImageUsageFlagBits::eTransferSrc)
|
.setImageUsage(vk::ImageUsageFlagBits::eColorAttachment | vk::ImageUsageFlagBits::eTransferSrc)
|
||||||
.setCompositeAlpha(vk::CompositeAlphaFlagBitsKHR::eOpaque)
|
.setCompositeAlpha(vk::CompositeAlphaFlagBitsKHR::eOpaque)
|
||||||
.setClipped(true)
|
.setClipped(true)
|
||||||
.setPresentMode(vsync ? vk::PresentModeKHR::eFifo : vk::PresentModeKHR::eImmediate)
|
.setPresentMode(vsync ? vk::PresentModeKHR::eFifo : tearing_present_mode)
|
||||||
.setSurface(surface)
|
.setSurface(surface)
|
||||||
.setPreTransform(vk::SurfaceTransformFlagBitsKHR::eIdentity)
|
.setPreTransform(vk::SurfaceTransformFlagBitsKHR::eIdentity)
|
||||||
.setImageArrayLayers(1)
|
.setImageArrayLayers(1)
|
||||||
|
@ -191,7 +191,6 @@ bool Swapchain::create(unsigned int desired_num_swapchain_images, int new_width,
|
||||||
}
|
}
|
||||||
catch (std::exception &e)
|
catch (std::exception &e)
|
||||||
{
|
{
|
||||||
printf("%s\n", e.what());
|
|
||||||
swapchain_object.reset();
|
swapchain_object.reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -270,7 +269,7 @@ bool Swapchain::begin_frame()
|
||||||
vk::ResultValue<uint32_t> result_value(vk::Result::eSuccess, 0);
|
vk::ResultValue<uint32_t> result_value(vk::Result::eSuccess, 0);
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
result_value = device.acquireNextImageKHR(swapchain_object.get(), 33333333, frame.acquire.get());
|
result_value = device.acquireNextImageKHR(swapchain_object.get(), UINT64_MAX, frame.acquire.get());
|
||||||
}
|
}
|
||||||
catch (vk::OutOfDateKHRError)
|
catch (vk::OutOfDateKHRError)
|
||||||
{
|
{
|
||||||
|
@ -280,7 +279,6 @@ bool Swapchain::begin_frame()
|
||||||
if (result_value.result == vk::Result::eErrorOutOfDateKHR ||
|
if (result_value.result == vk::Result::eErrorOutOfDateKHR ||
|
||||||
result_value.result == vk::Result::eSuboptimalKHR)
|
result_value.result == vk::Result::eSuboptimalKHR)
|
||||||
{
|
{
|
||||||
// printf("Out of date\n");
|
|
||||||
recreate();
|
recreate();
|
||||||
return begin_frame();
|
return begin_frame();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue