Commit Graph

21 Commits

Author SHA1 Message Date
Philip Rebohle 421d7d9077 Revert "[vulkan] Use fence for acquiring a swap chain image"
Breaks things and we don't really need this right now anyway.
2023-01-16 23:16:38 +01:00
Philip Rebohle 1482715fd1 [vulkan] Use fence for acquiring a swap chain image
In practice, drivers will block here anyway.
2023-01-16 16:20:56 +01:00
Joshua Ashton e5418a956a [vulkan] Add setHdrMetadata method to Presenter 2022-12-19 22:15:18 +01:00
Joshua Ashton 50054d4675 [vulkan] Add supportsColorSpace method to Presenter 2022-12-19 22:15:18 +01:00
Joshua Ashton fd661d587e [vulkan] Simplify args to Presenter GetSupported* methods 2022-12-19 22:15:18 +01:00
Philip Rebohle 03dca539cb [vulkan,d3d9,d3d11] Move surface creation to swap chain implementation 2022-11-07 14:14:05 +01:00
Philip Rebohle 61025c0079
[dxvk] Don't disable frame rate limiter if vsync is enabled
This only works if we know the actual refresh rate of the display.
However, in a wine virtual desktop or with proton's fshack, this
is often not the case, so we'd see a 60 Hz mode on a high-refresh
rate display and never actually enable the limiter.
2022-08-17 01:53:24 +02:00
Philip Rebohle b537f19a3c [vulkan] Add frame rate limiter to Vulkan presenter 2021-06-12 13:50:08 +02:00
Philip Rebohle 0fe8f2e40c
[vulkan] Acquire next image immediately after presentation
vkAcquireNextImageKHR is a blocking call, so doing this immediately after
presentation may reduce the amount of time that passes between the application
requesing presentation and presentation actually happening on the Vulkan device.

Idea based on PR #2075.
2021-06-01 04:52:09 +02:00
Philip Rebohle 0b88d0deab
[vulkan] Remove getSyncSemaphores from presenter
Instead, return the semaphores in acquireNextImage.
2021-06-01 04:32:50 +02:00
Philip Rebohle 253884a8c7
[vulkan] Remove fence from presenter
We don't use these anywhere.
2021-06-01 03:51:16 +02:00
Philip Rebohle 2d0c9127f3
[vulkan] Don't create a swap chain if the window size is 0
This can actually happen on win32, and creating a zero-sized swap
chain is illegal.
2019-12-15 11:32:43 +01:00
Philip Rebohle 575a267f07
[vulkan] Support exclusive fullscreen control in presenter 2019-12-05 13:10:11 +01:00
Philip Rebohle 9c26fad40e
[vulkan] Add feature bit for exclusive fullscreen control 2019-12-05 13:05:54 +01:00
Philip Rebohle dc13f48318
[dxvk] Enable VK_EXT_full_screen_exclusive if available
Also pulls in VK_KHR_get_surface_capabilities2 as a dependency.
2019-12-05 13:05:51 +01:00
Philip Rebohle ceddbaf7c4
[dxvk] Fix synchronization around vkDeviceWaitIdle
From the spec:
	"Host access to all VkQueue objects created
	from device must be externally synchronized"

We were not doing that, which could cause hangs and
all sorts of issues when recreating the swap chain
on Nvidia GPUs.
2019-11-19 23:34:14 +01:00
Chip Davis e633dbc06f [vulkan] Recreate the surface on surface loss.
According to the Vulkan spec:

> Several WSI functions return `VK_ERROR_SURFACE_LOST_KHR` if the
> surface becomes no longer available. After such an error, the surface
> (and any child swapchain, if one exists) **should** be destroyed, as
> there is no way to restore them to a not-lost state.

So if we get this error, we need to recreate the surface in addition to
the swapchain.
2019-04-02 17:26:48 +02:00
Philip Rebohle b6804a95b7
[vulkan] Create per-swap image fences for presenter 2019-02-25 13:34:49 +01:00
Philip Rebohle a6d1fe07f2
[vulkan] Add helper method to wait for presenter fence 2019-02-25 13:34:49 +01:00
Philip Rebohle 2231caaa9e
[vulkan] Add optional fence paratemer to acquireNextImage
We'll reset the fence prior to acquisition, so that the user of
this API won't have to do it.
2019-02-25 13:34:46 +01:00
Philip Rebohle 979ccf23e3
[vulkan] Implement new Vulkan presenter / swap chain 2018-11-28 12:44:11 +01:00