fixing metal backend

This commit is contained in:
2025-09-07 01:21:20 +02:00
parent 86c29f2242
commit c16635fe47

View File

@@ -59,7 +59,8 @@ 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
//#ifdef PULSE_PLAT_MACOS
#if 0
uint64_t best = 0;
NSArray<id<MTLDevice>>* devices = MTLCopyAllDevices();
for(id<MTLDevice> candidate in devices)
@@ -76,9 +77,10 @@ PulseDevice MetalCreateDevice(PulseBackend backend, PulseDevice* forbiden_device
#endif
if(!metal_device->device)
{
#ifdef PULSE_PLAT_MACOS
//#ifdef PULSE_PLAT_MACOS
#if 0
if(PULSE_IS_BACKEND_HIGH_LEVEL_DEBUG(backend))
PulseLogError(backend, "(Metal) failed to select device, falling back on default device");
PulseLogWarning(backend, "(Metal) failed to select device, falling back on default device");
#endif
id<MTLDevice> device = MTLCreateSystemDefaultDevice();
if(!MetalIsDeviceForbidden(device, forbiden_devices, forbiden_devices_count))