|
|
|
@ -435,7 +435,6 @@ Device::Device(VkInstance instance_, vk::PhysicalDevice physical_, VkSurfaceKHR |
|
|
|
const bool is_mvk = driver_id == VK_DRIVER_ID_MOLTENVK; |
|
|
|
const bool is_qualcomm = driver_id == VK_DRIVER_ID_QUALCOMM_PROPRIETARY; |
|
|
|
const bool is_turnip = driver_id == VK_DRIVER_ID_MESA_TURNIP; |
|
|
|
const bool is_arm = driver_id == VK_DRIVER_ID_ARM_PROPRIETARY; |
|
|
|
|
|
|
|
if (!is_suitable) |
|
|
|
LOG_WARNING(Render_Vulkan, "Unsuitable driver - continuing anyways"); |
|
|
|
@ -486,18 +485,13 @@ Device::Device(VkInstance instance_, vk::PhysicalDevice physical_, VkSurfaceKHR |
|
|
|
CollectPhysicalMemoryInfo(); |
|
|
|
CollectToolingInfo(); |
|
|
|
|
|
|
|
if (is_qualcomm || is_arm) { |
|
|
|
const char* driver_name = is_qualcomm ? "Qualcomm" : "ARM Mali"; |
|
|
|
|
|
|
|
if (is_qualcomm) { |
|
|
|
must_emulate_scaled_formats = true; |
|
|
|
LOG_WARNING(Render_Vulkan, |
|
|
|
"{} drivers require scaled vertex format emulation; forcing fallback", driver_name); |
|
|
|
|
|
|
|
sets_per_pool = 1024; |
|
|
|
LOG_INFO(Render_Vulkan, "{}: forcing {} sets per pool", driver_name, sets_per_pool); |
|
|
|
"Qualcomm drivers require scaled vertex format emulation; forcing fallback"); |
|
|
|
|
|
|
|
LOG_WARNING(Render_Vulkan, |
|
|
|
"Disabling shader float controls and 64-bit integer features on {} proprietary drivers", driver_name); |
|
|
|
"Disabling shader float controls and 64-bit integer features on Qualcomm proprietary drivers"); |
|
|
|
RemoveExtension(extensions.shader_float_controls, VK_KHR_SHADER_FLOAT_CONTROLS_EXTENSION_NAME); |
|
|
|
RemoveExtensionFeature(extensions.shader_atomic_int64, features.shader_atomic_int64, |
|
|
|
VK_KHR_SHADER_ATOMIC_INT64_EXTENSION_NAME); |
|
|
|
@ -505,10 +499,12 @@ Device::Device(VkInstance instance_, vk::PhysicalDevice physical_, VkSurfaceKHR |
|
|
|
features.shader_atomic_int64.shaderSharedInt64Atomics = false; |
|
|
|
features.features.shaderInt64 = false; |
|
|
|
|
|
|
|
sets_per_pool = 1024; |
|
|
|
LOG_INFO(Render_Vulkan, "Qualcomm: forcing {} sets per pool", sets_per_pool); |
|
|
|
|
|
|
|
#if defined(ANDROID) && defined(ARCHITECTURE_arm64)
|
|
|
|
if (is_qualcomm) { |
|
|
|
// BCn patching only safe on Android 9+ (API 28+). Older versions crash on driver load.
|
|
|
|
const auto major = (properties.properties.driverVersion >> 22) << 2; |
|
|
|
const auto major = (properties.properties.driverVersion >> 24) << 2; |
|
|
|
const auto minor = (properties.properties.driverVersion >> 12) & 0xFFFU; |
|
|
|
const auto vendor = properties.properties.vendorID; |
|
|
|
const auto patch_status = adrenotools_get_bcn_type(major, minor, vendor); |
|
|
|
@ -547,7 +543,6 @@ Device::Device(VkInstance instance_, vk::PhysicalDevice physical_, VkSurfaceKHR |
|
|
|
"Adreno driver does not support BCn texture patching (Android API {}, Driver {}.{})", |
|
|
|
api_level, major, minor); |
|
|
|
} |
|
|
|
} |
|
|
|
#endif
|
|
|
|
} |
|
|
|
|
|
|
|
@ -1301,6 +1296,7 @@ void Device::RemoveUnsuitableExtensions() { |
|
|
|
dynamic_state3_line_stipple_enable = false; |
|
|
|
dynamic_state3_alpha_to_coverage = false; |
|
|
|
dynamic_state3_alpha_to_one = false; |
|
|
|
dynamic_state3_provoking_vertex_mode = false; |
|
|
|
} |
|
|
|
RemoveExtensionFeatureIfUnsuitable(extensions.extended_dynamic_state3, |
|
|
|
features.extended_dynamic_state3, |
|
|
|
|