This commit is contained in:
2025-03-21 21:31:15 +01:00
parent d18a38f928
commit 35d1c0ff7f
13 changed files with 225 additions and 9 deletions

View File

@@ -20,6 +20,9 @@
#ifdef PULSE_ENABLE_SOFTWARE_BACKEND
#include "Backends/Software/Soft.h"
#endif
#ifdef PULSE_ENABLE_OPENGL_BACKEND
#include "Backends/OpenGL/OpenGL.h"
#endif
// Ordered by default preference
static const PulseCheckBackendSupportPFN backends_supports[] = {
@@ -32,6 +35,10 @@ static const PulseCheckBackendSupportPFN backends_supports[] = {
#ifdef PULSE_ENABLE_WEBGPU_BACKEND
WebGPUCheckSupport,
#endif
#ifdef PULSE_ENABLE_OPENGL_BACKEND
OpenGLCheckSupport,
OpenGLESCheckSupport,
#endif
#ifdef PULSE_ENABLE_SOFTWARE_BACKEND
SoftCheckSupport,
#endif
@@ -49,7 +56,7 @@ void PulseSetInternalError(PulseErrorType error)
void PulseLogBackend(PulseBackend backend, PulseDebugMessageSeverity type, const char* message, const char* file, const char* function, int line, ...)
{
(void)file; // May be used later
PULSE_UNUSED(file); // May be used later
if(backend == PULSE_NULL_HANDLE)
return;
if(!backend->PFN_UserDebugCallback)
@@ -108,6 +115,10 @@ static PulseBackend PulseGetBackendFromFlag(PulseBackendBits flag)
#ifdef PULSE_ENABLE_SOFTWARE_BACKEND
case PULSE_BACKEND_SOFTWARE: return &SoftwareDriver;
#endif
#ifdef PULSE_ENABLE_OPENGL_BACKEND
case PULSE_BACKEND_OPENGL: return &OpenGLDriver;
case PULSE_BACKEND_OPENGL_ES: return &OpenGLESDriver;
#endif
default: break;
}