fixing metal backend

This commit is contained in:
2025-09-07 01:23:51 +02:00
parent c16635fe47
commit 9c2f644b0e
2 changed files with 3 additions and 4 deletions

View File

@@ -59,8 +59,7 @@ PulseDevice MetalCreateDevice(PulseBackend backend, PulseDevice* forbiden_device
MetalDevice* metal_device = (MetalDevice*)calloc(1, sizeof(MetalDevice));
PULSE_CHECK_ALLOCATION_RETVAL(metal_device, PULSE_NULL_HANDLE);
//#ifdef PULSE_PLAT_MACOS
#if 0
#ifdef PULSE_PLAT_MACOS
uint64_t best = 0;
NSArray<id<MTLDevice>>* devices = MTLCopyAllDevices();
for(id<MTLDevice> candidate in devices)
@@ -77,8 +76,7 @@ PulseDevice MetalCreateDevice(PulseBackend backend, PulseDevice* forbiden_device
#endif
if(!metal_device->device)
{
//#ifdef PULSE_PLAT_MACOS
#if 0
#ifdef PULSE_PLAT_MACOS
if(PULSE_IS_BACKEND_HIGH_LEVEL_DEBUG(backend))
PulseLogWarning(backend, "(Metal) failed to select device, falling back on default device");
#endif

View File

@@ -18,6 +18,7 @@ local backends = {
option = "metal",
default = is_plat("macosx", "iphoneos"),
custom = function()
add_frameworks("Metal")
add_files("Sources/Backends/Metal/**.m")
end
},