mirror of
https://github.com/Kbz-8/Pulse.git
synced 2026-01-11 15:33:34 +00:00
32 lines
1.0 KiB
C
32 lines
1.0 KiB
C
// Copyright (C) 2024 kanel
|
|
// This file is part of "Pulse"
|
|
// For conditions of distribution and use, see copyright notice in LICENSE
|
|
|
|
#include <Pulse.h>
|
|
#include "PulseInternal.h"
|
|
|
|
PULSE_API PulseDevice PulseCreateDevice(PulseBackend backend, PulseDevice* forbiden_devices, uint32_t forbiden_devices_count)
|
|
{
|
|
PULSE_CHECK_HANDLE_RETVAL(backend, PULSE_NULL_HANDLE);
|
|
return backend->PFN_CreateDevice(backend, forbiden_devices, forbiden_devices_count);
|
|
}
|
|
|
|
PULSE_API void PulseDestroyDevice(PulseDevice device)
|
|
{
|
|
PULSE_CHECK_HANDLE(device);
|
|
device->PFN_DestroyDevice(device);
|
|
device->driver_data = PULSE_NULLPTR;
|
|
}
|
|
|
|
PULSE_API PulseBackendBits PulseGetBackendInUseByDevice(PulseDevice device)
|
|
{
|
|
PULSE_CHECK_HANDLE_RETVAL(device, PULSE_BACKEND_INVALID);
|
|
return device->backend->backend;
|
|
}
|
|
|
|
PULSE_API bool PulseDeviceSupportsShaderFormats(PulseDevice device, PulseShaderFormatsFlags shader_formats_used)
|
|
{
|
|
PULSE_CHECK_HANDLE_RETVAL(device, false);
|
|
return (device->backend->supported_shader_formats & shader_formats_used) != 0;
|
|
}
|