Skip to content

Commit b356250

Browse files
committed
Revert "gfx/common/vulkan: force MVK_CONFIG_USE_MTLHEAP=0 on Apple to avoid placement-heap crash"
This reverts commit ea87b48.
1 parent ea87b48 commit b356250

1 file changed

Lines changed: 0 additions & 14 deletions

File tree

gfx/common/vulkan_common.c

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2498,20 +2498,6 @@ bool vulkan_context_init(gfx_ctx_vulkan_data_t *vk,
24982498
int use_mab = settings->bools.video_use_metal_arg_buffers;
24992499
setenv("MVK_CONFIG_USE_METAL_ARGUMENT_BUFFERS", use_mab ? "1" : "0", 1);
25002500
}
2501-
/* MoltenVK 1.3.0 flipped MVK_CONFIG_USE_MTLHEAP to active by default
2502-
* for all non-AMD GPUs, so VkDeviceMemory now allocates from a
2503-
* placement MTLHeap. Placement heaps require macOS 13+ and a GPU
2504-
* that reports supportsPlacementHeaps; older Intel Macs (Mac GPU
2505-
* family 2 on macOS 12 and earlier) abort at swapchain-image
2506-
* allocation time with:
2507-
* -[MTLHeapDescriptorInternal validateWithDevice:]:
2508-
* failed assertion `Placement heap type is not supported.'
2509-
* Force the path off here so the assertion can never fire. The
2510-
* value "0" is interpreted as boolean-false by 1.2.x and as the
2511-
* MVK_CONFIG_USE_MTLHEAP_NEVER enum value by 1.3.x, so it is
2512-
* forward- and backward-compatible. See libretro/RetroArch#18985. */
2513-
if (!getenv("MVK_CONFIG_USE_MTLHEAP"))
2514-
setenv("MVK_CONFIG_USE_MTLHEAP", "0", 1);
25152501
/* Try Vulkan loader first (enables validation layers if installed).
25162502
* Falls back to MoltenVK directly if loader not available. */
25172503
vulkan_library = dylib_load("libvulkan.dylib");

0 commit comments

Comments
 (0)