Use a hacked MoltenVK that can be loaded (but doesn't work) on iOS 12.

See https://github.com/KhronosGroup/MoltenVK/issues/2240
This commit is contained in:
Henrik Rydgård 2024-05-26 16:22:27 +02:00
parent f2837e3b55
commit 6817858d61
6 changed files with 17 additions and 17 deletions

View File

@ -379,12 +379,12 @@ void VulkanSetAvailable(bool available) {
} }
bool VulkanMayBeAvailable() { bool VulkanMayBeAvailable() {
#if PPSSPP_PLATFORM(IOS_APP_STORE) #if PPSSPP_PLATFORM(IOS)
g_vulkanAvailabilityChecked = true; g_vulkanAvailabilityChecked = true;
g_vulkanMayBeAvailable = true; g_vulkanMayBeAvailable = System_GetPropertyInt(SYSPROP_SYSTEMVERSION) >= 13;
return true; INFO_LOG(SYSTEM, "VulkanMayBeAvailable: Detected version: %d", System_GetPropertyInt(SYSPROP_SYSTEMVERSION));
return g_vulkanMayBeAvailable;
#else #else
// Unsupported in VR at the moment // Unsupported in VR at the moment
if (IsVREnabled()) { if (IsVREnabled()) {
return false; return false;

View File

@ -515,7 +515,7 @@ int Config::NextValidBackend() {
return iGPUBackend; return iGPUBackend;
} }
bool Config::IsBackendEnabled(GPUBackend backend, bool validate) { bool Config::IsBackendEnabled(GPUBackend backend) {
std::vector<std::string> split; std::vector<std::string> split;
SplitString(sDisabledGPUBackends, ',', split); SplitString(sDisabledGPUBackends, ',', split);
@ -534,10 +534,8 @@ bool Config::IsBackendEnabled(GPUBackend backend, bool validate) {
if (backend != GPUBackend::OPENGL) if (backend != GPUBackend::OPENGL)
return false; return false;
#elif PPSSPP_PLATFORM(WINDOWS) #elif PPSSPP_PLATFORM(WINDOWS)
if (validate) { if (backend == GPUBackend::DIRECT3D11 && !DoesVersionMatchWindows(6, 0, 0, 0, true))
if (backend == GPUBackend::DIRECT3D11 && !DoesVersionMatchWindows(6, 0, 0, 0, true)) return false;
return false;
}
#else #else
if (backend == GPUBackend::DIRECT3D11 || backend == GPUBackend::DIRECT3D9) if (backend == GPUBackend::DIRECT3D11 || backend == GPUBackend::DIRECT3D9)
return false; return false;
@ -547,11 +545,9 @@ bool Config::IsBackendEnabled(GPUBackend backend, bool validate) {
if (backend == GPUBackend::OPENGL) if (backend == GPUBackend::OPENGL)
return false; return false;
#endif #endif
if (validate) { INFO_LOG(SYSTEM, "Checking for VK");
if (backend == GPUBackend::VULKAN && !VulkanMayBeAvailable()) if (backend == GPUBackend::VULKAN && !VulkanMayBeAvailable())
return false; return false;
}
return true; return true;
} }

View File

@ -602,7 +602,7 @@ public:
bool IsPortrait() const; bool IsPortrait() const;
int NextValidBackend(); int NextValidBackend();
bool IsBackendEnabled(GPUBackend backend, bool validate = true); bool IsBackendEnabled(GPUBackend backend);
bool UseFullScreen() const { bool UseFullScreen() const {
if (iForceFullScreen != -1) if (iForceFullScreen != -1)

@ -1 +1 @@
Subproject commit ad018e8664d343dd1e6d7a6ce712c64a6f8fee2a Subproject commit 0bf904d2d1d159eb95bdefcd8432eee79ee1da14

View File

@ -1,3 +1,7 @@
Updating with a self-built MoltenVK
===================================
cp -r ../dev/build-molten/MoltenVK/Package/Release/MoltenVK/static/MoltenVK.xcframework ios/MoltenVK
The Old iOS Build Instructions The Old iOS Build Instructions
============================== ==============================

View File

@ -561,7 +561,7 @@ int main(int argc, char *argv[])
{ {
// SetCurrentThreadName("MainThread"); // SetCurrentThreadName("MainThread");
version = [[[UIDevice currentDevice] systemVersion] UTF8String]; version = [[[UIDevice currentDevice] systemVersion] UTF8String];
if (2 != sscanf(version.c_str(), "%d", &g_iosVersionMajor)) { if (1 != sscanf(version.c_str(), "%d", &g_iosVersionMajor)) {
// Just set it to 14.0 if the parsing fails for whatever reason. // Just set it to 14.0 if the parsing fails for whatever reason.
g_iosVersionMajor = 14; g_iosVersionMajor = 14;
} }