Skip to content

Commit 90025e4

Browse files
authored
Avoid portability altogether and hence some crashes
1 parent 92e0d20 commit 90025e4

File tree

3 files changed

+1
-26
lines changed

3 files changed

+1
-26
lines changed

.ci/deploy-mac-arm64.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ mkdir -p "rpcs3.app/Contents/Resources/vulkan/icd.d" || true
1919
cp "$(realpath /opt/homebrew/lib/libMoltenVK.dylib)" "rpcs3.app/Contents/Frameworks/libMoltenVK.dylib"
2020
cp "$(realpath /opt/homebrew/etc/vulkan/icd.d/MoltenVK_icd.json)" "rpcs3.app/Contents/Resources/vulkan/icd.d/MoltenVK_icd.json"
2121
sed -i '' "s/lib\//Frameworks\//g" "rpcs3.app/Contents/Resources/vulkan/icd.d/MoltenVK_icd.json"
22+
sed -i '' "s/\"is_portability_driver\" : true/\"is_portability_driver\" : false/g" "rpcs3.app/Contents/Resources/vulkan/icd.d/MoltenVK_icd.json" # Hack to ensure detection
2223

2324
cp "$(realpath /opt/homebrew/opt/llvm@$LLVM_COMPILER_VER/lib/c++/libc++abi.1.0.dylib)" "rpcs3.app/Contents/Frameworks/libc++abi.1.dylib"
2425
cp "$(realpath /opt/homebrew/lib/libsharpyuv.0.dylib)" "rpcs3.app/Contents/lib/libsharpyuv.0.dylib"

rpcs3/Emu/RSX/VK/vkutils/device.cpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@
33
#include "util/logs.hpp"
44
#include "Emu/system_config.h"
55
#include <vulkan/vulkan_core.h>
6-
#ifdef __APPLE__
7-
#include <vulkan/vulkan_beta.h>
8-
#endif
96

107
namespace vk
118
{
@@ -558,10 +555,6 @@ namespace vk
558555
{
559556
requested_extensions.push_back(VK_EXT_DEVICE_FAULT_EXTENSION_NAME);
560557
}
561-
562-
#ifdef __APPLE__
563-
requested_extensions.push_back(VK_KHR_PORTABILITY_SUBSET_EXTENSION_NAME);
564-
#endif
565558

566559
enabled_features.robustBufferAccess = VK_TRUE;
567560
enabled_features.fullDrawIndexUint32 = VK_TRUE;

rpcs3/Emu/RSX/VK/vkutils/instance.cpp

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,6 @@ namespace vk
124124
}
125125

126126
#ifdef __APPLE__
127-
extensions.push_back(VK_KHR_PORTABILITY_ENUMERATION_EXTENSION_NAME);
128-
extensions.push_back(VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME);
129127
if (support.is_supported(VK_EXT_LAYER_SETTINGS_EXTENSION_NAME))
130128
{
131129
extensions.push_back(VK_EXT_LAYER_SETTINGS_EXTENSION_NAME);
@@ -188,32 +186,15 @@ namespace vk
188186
if (g_cfg.video.debug_output)
189187
layers.push_back("VK_LAYER_KHRONOS_validation");
190188
}
191-
#ifdef __APPLE__
192-
// MoltenVK's ICD will not be detected without these extensions enabled.
193-
else
194-
{
195-
extensions_loaded = true;
196-
extensions.push_back(VK_KHR_PORTABILITY_ENUMERATION_EXTENSION_NAME);
197-
extensions.push_back(VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME);
198-
}
199-
#endif
200189

201190
VkInstanceCreateInfo instance_info = {};
202191
instance_info.sType = VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO;
203192
instance_info.pApplicationInfo = &app;
204193
instance_info.enabledLayerCount = static_cast<u32>(layers.size());
205194
instance_info.ppEnabledLayerNames = layers.data();
206-
#ifdef __APPLE__
207-
instance_info.enabledExtensionCount = static_cast<u32>(extensions.size());
208-
instance_info.ppEnabledExtensionNames = extensions.data();
209-
#else
210195
instance_info.enabledExtensionCount = fast ? 0 : static_cast<u32>(extensions.size());
211196
instance_info.ppEnabledExtensionNames = fast ? nullptr : extensions.data();
212-
#endif
213197
instance_info.pNext = next_info;
214-
#ifdef __APPLE__
215-
instance_info.flags |= VK_INSTANCE_CREATE_ENUMERATE_PORTABILITY_BIT_KHR;
216-
#endif
217198

218199
if (VkResult result = vkCreateInstance(&instance_info, nullptr, &m_instance); result != VK_SUCCESS)
219200
{

0 commit comments

Comments
 (0)