Browse Source

Disabling BGR5 emulation format on 8 Elite stock drivers

flatopsfixes23485
CamilleLaVey 2 months ago
parent
commit
5a03ef7fba
  1. 40
      src/video_core/vulkan_common/vulkan_device.cpp

40
src/video_core/vulkan_common/vulkan_device.cpp

@ -715,10 +715,26 @@ Device::Device(VkInstance instance_, vk::PhysicalDevice physical_, VkSurfaceKHR
has_broken_compute = has_broken_compute =
CheckBrokenCompute(properties.driver.driverID, properties.properties.driverVersion) && CheckBrokenCompute(properties.driver.driverID, properties.properties.driverVersion) &&
!Settings::values.enable_compute_pipelines.GetValue(); !Settings::values.enable_compute_pipelines.GetValue();
if (is_intel_anv || (is_qualcomm && !is_s8gen2)) {
LOG_WARNING(Render_Vulkan, "Driver does not support native BGR format");
// Qualcomm driver version where VK_KHR_maintenance5 and A1B5G5R5 become reliable
// Check if VK_KHR_maintenance5 is supported
constexpr uint32_t QUALCOMM_FIXED_DRIVER_VERSION = VK_MAKE_VERSION(512, 800, 1);
bool has_maintenance5 = HasExtension(VK_KHR_MAINTENANCE_5_EXTENSION_NAME);
must_emulate_bgr565 = false; // Default: assume emulation required
if (is_intel_anv) {
LOG_WARNING(Render_Vulkan, "Intel ANV driver does not support native BGR format");
must_emulate_bgr565 = true;
} else if (is_qualcomm) {
if (has_maintenance5 && properties.properties.driverVersion >= QUALCOMM_FIXED_DRIVER_VERSION) {
LOG_INFO(Render_Vulkan, "Qualcomm driver supports VK_KHR_maintenance5, disabling BGR emulation");
must_emulate_bgr565 = false;
} else {
LOG_WARNING(Render_Vulkan, "Qualcomm driver doesn't support native BGR, emulating formats");
must_emulate_bgr565 = true; must_emulate_bgr565 = true;
} }
}
}
if (extensions.push_descriptor && is_intel_anv) { if (extensions.push_descriptor && is_intel_anv) {
const u32 version = (properties.properties.driverVersion << 3) >> 3; const u32 version = (properties.properties.driverVersion << 3) >> 3;
if (version >= VK_MAKE_API_VERSION(0, 22, 3, 0) && if (version >= VK_MAKE_API_VERSION(0, 22, 3, 0) &&
@ -1067,6 +1083,26 @@ bool Device::GetSuitability(bool requires_swapchain) {
loaded_extensions.insert("VK_KHR_maintenance4"); loaded_extensions.insert("VK_KHR_maintenance4");
extensions.maintenance4 = true; extensions.maintenance4 = true;
} }
if (supported_extensions.contains("VK_KHR_maintenance5")) {
loaded_extensions.insert("VK_KHR_maintenance5");
extensions.maintenance4 = true;
}
if (supported_extensions.contains("VK_KHR_maintenance6")) {
loaded_extensions.insert("VK_KHR_maintenance6");
extensions.maintenance4 = true;
}
if (supported_extensions.contains("VK_KHR_maintenance7")) {
loaded_extensions.insert("VK_KHR_maintenance7");
extensions.maintenance4 = true;
}
if (supported_extensions.contains("VK_KHR_maintenance8")) {
loaded_extensions.insert("VK_KHR_maintenance8");
extensions.maintenance4 = true;
}
if (supported_extensions.contains("VK_KHR_maintenance9")) {
loaded_extensions.insert("VK_KHR_maintenance9");
extensions.maintenance4 = true;
}
#undef FEATURE_EXTENSION #undef FEATURE_EXTENSION
#undef EXTENSION #undef EXTENSION

Loading…
Cancel
Save