Commit Graph

10 Commits

Author SHA1 Message Date
ATrivialAtomic
c367401fd6 vulkan_context.cpp - update to match commit 9d8ab81 2025-04-02 12:03:10 -04:00
Martin Piatka
f648c2753c disp/vulkan: Fix suboptimal swapchain handling
When vkAcquireNextImage() returns VK_SUBOPTIMAL_KHR it means that a valid
usable image was still acquired and that means that the
acquire_samaphore is pending and signalled as normal.

This means we cannot just recreate the swapchain and reuse it to acquire
an image from the new swapchain as VulkanDisplay::display_queued_image()
was doing, because the spec states that the semaphore must be unsignaled
and not pending.

The fix here is to render and display the suboptimal image as normal and
set a flag to immediately return swapchain_image_out_of_date to trigger
a swapchain recreation on the next frame.
2025-03-20 13:23:11 +01:00
Martin Piatka
f4504e1f52 vulkan_context: Fix debug callback deprecation warn 2025-03-11 13:29:48 +01:00
Martin Pulec
2c070b9777 Vulkan >=301 compat 2024-11-12 16:39:42 +01:00
Martin Pulec
6f5f514ecd Vulkan raspi compilation fixes
fixed armhf build, possibly also other 32-bit architectures

This also reverts 02cd247978.
2023-10-13 11:23:22 +02:00
Martin Pulec
cac1d11190 updated copyrights of files changed in 2023 2023-02-09 09:19:50 +01:00
Martin Pulec
b7ebc2a8bd silenced Coverity warnings (Vulkan + one GL)
Most of them are innocent (like suggestion to pass reference instead of
object copy).
2023-01-19 11:12:36 +01:00
Martin Pulec
88df636be9 Vulkan: renamed log_msg to vulkan_log_msg
The former would interfere with UltraGrids log_msg() function whenever
both headeres are included.
2023-01-19 10:10:12 +01:00
Martin Pulec
789a4ad72b vulkan: accept "integate" and "discrete" for gpu
Currently, discrete GPU is always chosen if available but when display
is connected through a different GPU and the discrete card is NVIDIA,
colors are swapped as in #274. Detecting GPU with connected display is
not trivial and requires VK_KHR_display, which is not widely supported
by graphic drivers.

This is a small usability change that helps to workaround the problem by
allowing `:gpu=integrated` instead of passing the numeric index of the
card.
2023-01-16 12:32:55 +01:00
Martin Beľa
84bc6e6846 [vulkan] Add vulkan_sdl2 source files 2022-11-07 23:28:06 +01:00