Vulkan: Replace Vulkan 1.0 functionality with 1.1 counterparts#13546
Vulkan: Replace Vulkan 1.0 functionality with 1.1 counterparts#13546TheTechnician27 wants to merge 1 commit intoPCSX2:masterfrom
Conversation
f950994 to
c5ff1bd
Compare
c5ff1bd to
abaf0c7
Compare
JordanTheToaster
left a comment
There was a problem hiding this comment.
Seems fine on Windows on Nvidia.
b7b9932 to
bbf2d2e
Compare
TellowKrinkle
left a comment
There was a problem hiding this comment.
I'd rather wait until we actually need the functionality of the newer versions to switch to them personally, but if you are going to do it...
I'm not a huge fan of storing vulkan query structs long term on GSDeviceVK. At least the v1 structs are just data, but the v2 structs have next pointer chains and stuff that are only relevant for filling them, yet we're storing them as info on the device, which just feels wrong. It also moves setting up the sType and next pointer chains far from the actual call to GetProperties. I know it doesn't actually hurt anything, but still. Personal preference would be to have our own struct that contains all the properties we care about, query with on-stack vk structs, and then copy the data we need into the GSDeviceVK. Example of me doing this for Dolphin
| { | ||
| VkPhysicalDeviceProperties props = {}; | ||
| vkGetPhysicalDeviceProperties(device, &props); | ||
| VkPhysicalDeviceProperties2 props2 = {VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2, nullptr, {}}; |
There was a problem hiding this comment.
| VkPhysicalDeviceProperties2 props2 = {VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2, nullptr, {}}; | |
| VkPhysicalDeviceProperties2 props2 = {VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2}; | |
| const VkPhysicalDeviceProperties& props = props2.properties; |
bbf2d2e to
9f46b71
Compare
Description of Changes
VKEntryPoints.inl, removes now-unused entry points.vkGetPhysicalDevicePropertiesandvkGetPhysicalDeviceMemoryPropertiesbecause /3rdparty/vulkan/include uses them, and thus PCSX2 will not compile without them.This should not impact accuracy or performance in any way, and there's almost no chance it resolves any bugs. This is just housekeeping, and anything else is gravy.
Rationale behind Changes
Decided to investigate a crash PCSX2 has when Windows machines with really outdated Vulkan drivers crash when loading the Settings window. After a while of not finding anything in the code, I decided to look at the Vulkan documentation. There isn't a snowball's chance in hell this PR fixes that, and I and have no way to reproduce it to test. Nevertheless, the documentation very clearly says we should be using the 1.1 versions of various structs and functions used in
GSDeviceVK.cpp. As an example:Thus, housekeeping.
Suggested Testing Steps
Did you use AI to help find, test, or implement this issue or feature?
No.