From a54f1970f147e9119ac78449dceebc54f0da5ec4 Mon Sep 17 00:00:00 2001 From: kd-11 Date: Sun, 11 Feb 2024 03:33:13 +0300 Subject: [PATCH] vk: Make more features "optional" - This allows some non-conformant drivers to at least finish swapchain creation. --- rpcs3/Emu/RSX/VK/vkutils/device.cpp | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/rpcs3/Emu/RSX/VK/vkutils/device.cpp b/rpcs3/Emu/RSX/VK/vkutils/device.cpp index 81efa8b0d0..91688c03a2 100644 --- a/rpcs3/Emu/RSX/VK/vkutils/device.cpp +++ b/rpcs3/Emu/RSX/VK/vkutils/device.cpp @@ -509,6 +509,13 @@ namespace vk enabled_features.shaderStorageBufferArrayDynamicIndexing = VK_TRUE; // Optionally disable unsupported stuff + if (!pgpu->features.fullDrawIndexUint32) + { + // There's really nothing we can do about PS3 draw indices, just pray your GPU doesn't crash. + rsx_log.error("Your GPU driver does not fully support 32-bit vertex indices. This may result in graphical corruption or crashes in some cases."); + enabled_features.fullDrawIndexUint32 = VK_FALSE; + } + if (!pgpu->features.shaderStorageImageMultisample || !pgpu->features.shaderStorageImageWriteWithoutFormat) { // Disable MSAA if any of these two features are unsupported @@ -554,6 +561,12 @@ namespace vk enabled_features.depthBounds = VK_FALSE; } + if (!pgpu->features.largePoints) + { + rsx_log.error("Your GPU does not support large points. Graphics may not render correctly."); + enabled_features.largePoints = VK_FALSE; + } + if (!pgpu->features.wideLines) { rsx_log.error("Your GPU does not support wide lines. Graphics may not render correctly."); @@ -579,13 +592,11 @@ namespace vk enabled_features.occlusionQueryPrecise = VK_FALSE; } -#ifdef __APPLE__ if (!pgpu->features.logicOp) { rsx_log.error("Your GPU does not support framebuffer logical operations. Graphics may not render correctly."); enabled_features.logicOp = VK_FALSE; } -#endif VkDeviceCreateInfo device = {}; device.sType = VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO;