adding device selection, buffer creation and pipeline creation to Metal backend

This commit is contained in:
2025-09-07 01:04:15 +02:00
parent 231e8f2687
commit e9f01cf268
27 changed files with 848 additions and 16 deletions

View File

@@ -9,7 +9,22 @@
#ifndef PULSE_METAL_H_
#define PULSE_METAL_H_
PulseBackendFlags MetalCheckSupport(PulseBackendFlags candidates, PulseShaderFormatsFlags shader_formats_used); // Return PULSE_BACKEND_METAL in case of success and PULSE_BACKEND_INVALID otherwise
#define METAL_RETRIEVE_DRIVER_DATA_AS(handle, cast) ((cast)handle->driver_data)
#define CHECK_METAL_RETVAL(backend, handle, error, retval) \
do { \
if(!(handle)) \
{ \
if(backend != PULSE_NULL_HANDLE && PULSE_IS_BACKEND_LOW_LEVEL_DEBUG(backend)) \
PulseLogError(backend, "(Metal) call to a Metal function failed"); \
PulseSetInternalError(error); \
return retval; \
} \
} while(0) \
#define CHECK_METAL(backend, handle, error) CHECK_METAL_RETVAL(backend, handle, error, )
PulseBackendFlags MetalCheckSupport(PulseBackendFlags candidates, PulseShaderFormatsFlags shader_formats_used); // Returns corresponding PULSE_BACKEND enum in case of success and PULSE_BACKEND_INVALID otherwise
#endif // PULSE_METAL_H_