Commit Graph

59 Commits

Author SHA1 Message Date
Henrik Rydgård 00b28e28dc Mac/iOS: Avoid a vulkan warning about primitive restart 2026-02-10 10:41:52 +01:00
Henrik Rydgård b4f7635719 Vulkan: Check the available present modes right after initializing the surface 2025-10-20 19:52:24 +02:00
Henrik Rydgård 80bd32325c Move the present mode from the CreateInfo to InitSwapchain 2025-10-20 16:33:34 +02:00
Henrik Rydgård 6338832015 Vulkan: Smoothly recreate the swapchain using oldSwapchain on "resize" on Windows 2025-10-20 15:42:34 +02:00
Henrik Rydgård 2cf0ffea73 Allow choosing the frame presentation mode in detail in Vulkan mode 2025-08-21 01:01:16 +02:00
Henrik Rydgård c0b7ecc686 Refactor: Unify the Vulkan init info logic 2025-08-21 01:01:16 +02:00
Henrik Rydgård 5e05a6d0ac Get rid of some more backward Common/Core dependencies 2025-08-06 00:16:35 +02:00
Henrik Rydgård 9137eedb7b Windows/Vulkan: Correctly handle minimizing and restoring the window
We can't create a swapchain in this case but we still want emulation to
keep running. So we ditch the last renderpass in VulkanQueueRunner but
run all the rest (if PauseWhenMinimized isn't set).

Now works without any validation errors or hangs.
2025-07-18 20:01:48 +02:00
Henrik Rydgård 67dfbfe97e Add developer setting to prevent loading overlays (and other 'implicit' Vulkan layers) 2025-04-10 18:56:05 +02:00
Henrik Rydgård 670ff21529 Make the Vulkan init flags a proper enum class 2025-04-10 18:16:05 +02:00
Henrik Rydgård 8c8b34aac4 Vulkan: Separate the instance and device API versions, for extension loading purposes 2024-09-25 18:38:31 +02:00
Henrik Rydgård b2d9ac54dd Make InfoField an "enum class", extract function FormatAPIVersion 2024-09-25 16:34:33 +02:00
Henrik Rydgård 7c817f3ecd Add helper for Vulkan struct chaining 2024-07-19 09:45:02 +02:00
Henrik Rydgård 138193a776 Add support for the EXT_provoking_vertex Vulkan extension, allowing us to skip software transform for this case. 2024-07-17 10:41:25 +02:00
Henrik Rydgård 9f1f75ddab Refactor: Merge the ChooseDevice function into CreateDevice 2024-07-17 10:31:49 +02:00
Henrik Rydgård fea6727ffd Add a convenience method to VulkanContext to reduce code duplication
Will need the exact same code for iOS.
2024-05-23 02:13:54 +02:00
Henrik Rydgård d28e9dc006 Minor cleanup 2024-04-06 17:03:40 +02:00
Henrik Rydgård ae6e0d182e Vulkan: Fix function loading regression affecting MSAA
When loading function that have been merged into core, use the core
names.
2024-04-05 17:28:37 +02:00
Henrik Rydgård 9f9881dfe3 Move some code, minor cleanup.
See #18987
2024-04-04 12:30:41 +02:00
Henrik Rydgård 32fe47d761 Fix or ignore some various Vulkan validation errors 2024-04-03 13:37:40 +02:00
Herman Semenov 5a0d54be83 [Common/Data/GPU/Input/System/UI] Added const reference for function params 2023-12-14 14:21:11 +03:00
Henrik Rydgård 2c751d39f8 Vulkan: Add simple delete count to GPU profiler, to make sure we don't have more resource churn
Also fix the render pass type name lookup table.
2023-10-12 09:02:45 +02:00
Henrik Rydgård 13cfd9c3d6 Add Mesa as a known GPU driver "vendor". 2023-08-17 22:06:03 +02:00
Henrik Rydgård 8e1dc35dd1 Vulkan: Show instance extensions, both enabled and available, in sysinfo 2023-08-03 18:56:47 +02:00
Henrik Rydgård 1c83c4a1fe Vulkan: Enable the present-id/present-wait/display-timing extensions
Doesn't actually use any of them yet, just making sure enabling them
doesn't cause any weird issues. They will be used for the future display
timing rewrite.
2023-07-14 10:43:47 +02:00
Henrik Rydgård c81ec8c74d List Vulkan present modes in system info, show the current one 2023-04-20 00:21:06 +02:00
Henrik Rydgård 56d792f422 Sketch the new VulkanPushPool 2023-03-15 01:25:00 +01:00
Henrik Rydgård cc9c01b1d0 Vulkan texture uploads: Take optimalBufferCopyRowPitchAlignment into account
Might marginally increase texture upload performance on some GPUs, but
mainly just the right thing to do.

For example, on Intel, this is 64.
2023-03-05 17:32:41 +01:00
Henrik Rydgård cf52324e9e Vulkan: Fix pipeline cache clearing.
Extracted from #16759 and bugfixed. Fixes a leak of Vulkan pipelines.

I guess another way would be to queue the variants for destruction at
the same time as we queue the callback, but I like this better.
2023-01-09 09:49:55 +01:00
Henrik Rydgård 25115fee7f Found a bug where we tried to look up queue family -1 when initializing the frame profiler. 2022-12-23 11:37:59 +01:00
Henrik Rydgård 31d5881c90 Enable support for Android Vulkan validation. Fix a minor validation error. 2022-12-22 11:13:52 +01:00
Henrik Rydgård 28e1b532bd Detect Apple/MoltenVK and allow multisampling. Unfortunately no support for sample rate shading. 2022-12-01 22:49:01 +01:00
Henrik Rydgård 8b9b80f044 Add path that uses CreateRenderpass2, we're gonna need it for depth resolve. 2022-12-01 22:49:00 +01:00
Henrik Rydgård 6daecb4e2b Add check for tiling GPUs. We'll use this to inform on what MSAA modes to support. 2022-12-01 22:48:59 +01:00
Henrik Rydgård 162290147f UWP build fix. Had to reshuffle some stuff and compile some Vulkan files. 2022-11-06 15:54:00 +01:00
Henrik Rydgård 31fd928a5c Name more image views. Very useful with a little patch to the Vulkan debug layers. 2022-10-27 11:05:59 +02:00
Henrik Rydgård fb250c4b29 More multiview work 2022-10-27 11:05:58 +02:00
Henrik Rydgård 1d8ab38ce5 Vulkan: Use v2 feature checks, and add check for multiview features.
Extracted from the multiview PR, and renamed some stuff.
2022-10-24 00:21:28 +02:00
catsout b0ceeede79 Vulkan: fix wayland swapchain size 1x1
From Vulkan spec,
surfaceCapabilities.currentExtent can be 0xFFFFFFFF(-1)

Define a callback to get drawsize from window creator

relate:
https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VkSurfaceCapabilitiesKHR.html
https://github.com/KhronosGroup/Vulkan-Docs/issues/590#issuecomment-347932321
2022-10-15 19:02:42 +08:00
Henrik Rydgård 14b5a1a7cd Fix pipeline lifetime issue, misc. 2022-09-08 00:38:32 +02:00
Henrik Rydgård 8dc8fae16d Vulkan: Add support for listing all the available surface formats in system info.
Enabling the EXT_swapchain_colorspace extension lets the driver expose
all the formats it really supports.

Used this to discover that my Galaxy S21 supports Display-P3 which is a wider
gamut than sRGB. Might be able to do some color boosting mode for fun.

Or, use this stuff to play around with HDR?
2022-01-25 19:22:49 +01:00
Henrik Rydgård df2f0df155 Make the Vulkan GPU log profiler a runtime developer setting.
I keep forgetting to disable the define on commit, this is a better
solution.
2021-12-19 22:50:14 +01:00
Henrik Rydgård 748b8287a6 Add format string support to Vulkan log-profiler 2021-12-19 22:21:34 +01:00
Unknown W. Brackets 148ca08047 Vulkan: Disable profiler by default again. 2021-12-19 09:12:58 -08:00
Henrik Rydgård 80ae4b039c Vulkan: Be more restrictive about texture upscaling on "slow" devices.
Applies the same rules as for software upscaling in this case.

Should fix the stutters seen in #15109
2021-12-16 21:00:49 +01:00
Henrik Rydgård 9755781704 Oops, accidentally enabled the logging GPU profiler by default. 2021-12-13 09:01:13 +01:00
Henrik Rydgård 10db19efc4 Add a 2x2 downsampled version of 4xBRZ as 2xBRZ (save memory bandwidth)
fmt
2021-12-12 23:19:29 +01:00
Henrik Rydgård 3833d935f4 Fixes when profiler is disabled.
Typo, validation fix

More fixes

Fix mipgen logging

Disable the logging profiler by default again

Important to use the macro
2021-12-12 12:42:40 +01:00
Henrik Rydgård 9945620504 Switch to macros to easily disable the new profiling. Add missing scope 2021-12-12 12:11:59 +01:00
Henrik Rydgård 55fe21db1e Add a simple GPU profiler to profile individual events, rather than full passes. 2021-12-12 12:11:54 +01:00