mirror of
https://github.com/Kbz-8/Pulse.git
synced 2026-01-11 15:33:34 +00:00
fixing metal backend
This commit is contained in:
@@ -59,8 +59,7 @@ 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)
|
||||||
@@ -77,8 +76,7 @@ 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))
|
||||||
PulseLogWarning(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
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ local backends = {
|
|||||||
option = "metal",
|
option = "metal",
|
||||||
default = is_plat("macosx", "iphoneos"),
|
default = is_plat("macosx", "iphoneos"),
|
||||||
custom = function()
|
custom = function()
|
||||||
|
add_frameworks("Metal")
|
||||||
add_files("Sources/Backends/Metal/**.m")
|
add_files("Sources/Backends/Metal/**.m")
|
||||||
end
|
end
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user