mirror of
https://github.com/Kbz-8/Pulse.git
synced 2026-01-11 07:23:35 +00:00
fixing metal backend
This commit is contained in:
@@ -59,7 +59,8 @@ PulseDevice MetalCreateDevice(PulseBackend backend, PulseDevice* forbiden_device
|
|||||||
MetalDevice* metal_device = (MetalDevice*)calloc(1, sizeof(MetalDevice));
|
MetalDevice* metal_device = (MetalDevice*)calloc(1, sizeof(MetalDevice));
|
||||||
PULSE_CHECK_ALLOCATION_RETVAL(metal_device, PULSE_NULL_HANDLE);
|
PULSE_CHECK_ALLOCATION_RETVAL(metal_device, PULSE_NULL_HANDLE);
|
||||||
|
|
||||||
#ifdef PULSE_PLAT_MACOS
|
//#ifdef PULSE_PLAT_MACOS
|
||||||
|
#if 0
|
||||||
uint64_t best = 0;
|
uint64_t best = 0;
|
||||||
NSArray<id<MTLDevice>>* devices = MTLCopyAllDevices();
|
NSArray<id<MTLDevice>>* devices = MTLCopyAllDevices();
|
||||||
for(id<MTLDevice> candidate in devices)
|
for(id<MTLDevice> candidate in devices)
|
||||||
@@ -76,9 +77,10 @@ PulseDevice MetalCreateDevice(PulseBackend backend, PulseDevice* forbiden_device
|
|||||||
#endif
|
#endif
|
||||||
if(!metal_device->device)
|
if(!metal_device->device)
|
||||||
{
|
{
|
||||||
#ifdef PULSE_PLAT_MACOS
|
//#ifdef PULSE_PLAT_MACOS
|
||||||
|
#if 0
|
||||||
if(PULSE_IS_BACKEND_HIGH_LEVEL_DEBUG(backend))
|
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
|
#endif
|
||||||
id<MTLDevice> device = MTLCreateSystemDefaultDevice();
|
id<MTLDevice> device = MTLCreateSystemDefaultDevice();
|
||||||
if(!MetalIsDeviceForbidden(device, forbiden_devices, forbiden_devices_count))
|
if(!MetalIsDeviceForbidden(device, forbiden_devices, forbiden_devices_count))
|
||||||
|
|||||||
Reference in New Issue
Block a user