mirror of
https://git.eden-emu.dev/eden-emu/eden
synced 2026-04-26 05:09:01 +02:00
[vulkan, mobile] Reworking per-mobile gpu configuration block
This commit is contained in:
parent
26c4656473
commit
0d518e7303
1 changed files with 13 additions and 6 deletions
|
|
@ -435,6 +435,7 @@ Device::Device(VkInstance instance_, vk::PhysicalDevice physical_, VkSurfaceKHR
|
||||||
const bool is_mvk = driver_id == VK_DRIVER_ID_MOLTENVK;
|
const bool is_mvk = driver_id == VK_DRIVER_ID_MOLTENVK;
|
||||||
const bool is_qualcomm = driver_id == VK_DRIVER_ID_QUALCOMM_PROPRIETARY;
|
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_turnip = driver_id == VK_DRIVER_ID_MESA_TURNIP;
|
||||||
|
const bool is_arm = driver_id == VK_DRIVER_ID_ARM_PROPRIETARY;
|
||||||
|
|
||||||
if (!is_suitable)
|
if (!is_suitable)
|
||||||
LOG_WARNING(Render_Vulkan, "Unsuitable driver - continuing anyways");
|
LOG_WARNING(Render_Vulkan, "Unsuitable driver - continuing anyways");
|
||||||
|
|
@ -485,13 +486,20 @@ Device::Device(VkInstance instance_, vk::PhysicalDevice physical_, VkSurfaceKHR
|
||||||
CollectPhysicalMemoryInfo();
|
CollectPhysicalMemoryInfo();
|
||||||
CollectToolingInfo();
|
CollectToolingInfo();
|
||||||
|
|
||||||
if (is_qualcomm) {
|
if (is_qualcomm || is_arm) {
|
||||||
|
const char* driver_name = is_qualcomm ? "Qualcomm" : "ARM Mali";
|
||||||
|
|
||||||
must_emulate_scaled_formats = true;
|
must_emulate_scaled_formats = true;
|
||||||
LOG_WARNING(Render_Vulkan,
|
LOG_WARNING(Render_Vulkan,
|
||||||
"Qualcomm drivers require scaled vertex format emulation; forcing fallback");
|
"{} drivers require scaled vertex format emulation; forcing fallback", driver_name);
|
||||||
|
|
||||||
|
if (is_qualcomm || is_arm) {
|
||||||
|
sets_per_pool = 1024;
|
||||||
|
LOG_INFO(Render_Vulkan, "{}: forcing {} sets per pool", driver_name, sets_per_pool);
|
||||||
|
}
|
||||||
|
|
||||||
LOG_WARNING(Render_Vulkan,
|
LOG_WARNING(Render_Vulkan,
|
||||||
"Disabling shader float controls and 64-bit integer features on Qualcomm proprietary drivers");
|
"Disabling shader float controls and 64-bit integer features on {} proprietary drivers", driver_name);
|
||||||
RemoveExtension(extensions.shader_float_controls, VK_KHR_SHADER_FLOAT_CONTROLS_EXTENSION_NAME);
|
RemoveExtension(extensions.shader_float_controls, VK_KHR_SHADER_FLOAT_CONTROLS_EXTENSION_NAME);
|
||||||
RemoveExtensionFeature(extensions.shader_atomic_int64, features.shader_atomic_int64,
|
RemoveExtensionFeature(extensions.shader_atomic_int64, features.shader_atomic_int64,
|
||||||
VK_KHR_SHADER_ATOMIC_INT64_EXTENSION_NAME);
|
VK_KHR_SHADER_ATOMIC_INT64_EXTENSION_NAME);
|
||||||
|
|
@ -499,10 +507,8 @@ Device::Device(VkInstance instance_, vk::PhysicalDevice physical_, VkSurfaceKHR
|
||||||
features.shader_atomic_int64.shaderSharedInt64Atomics = false;
|
features.shader_atomic_int64.shaderSharedInt64Atomics = false;
|
||||||
features.features.shaderInt64 = 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 defined(ANDROID) && defined(ARCHITECTURE_arm64)
|
||||||
|
if (is_qualcomm) {
|
||||||
// BCn patching only safe on Android 9+ (API 28+). Older versions crash on driver load.
|
// BCn patching only safe on Android 9+ (API 28+). Older versions crash on driver load.
|
||||||
const auto major = (properties.properties.driverVersion >> 24) << 2;
|
const auto major = (properties.properties.driverVersion >> 24) << 2;
|
||||||
const auto minor = (properties.properties.driverVersion >> 12) & 0xFFFU;
|
const auto minor = (properties.properties.driverVersion >> 12) & 0xFFFU;
|
||||||
|
|
@ -544,6 +550,7 @@ Device::Device(VkInstance instance_, vk::PhysicalDevice physical_, VkSurfaceKHR
|
||||||
api_level, major, minor);
|
api_level, major, minor);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is_nvidia) {
|
if (is_nvidia) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue