working on command lists

This commit is contained in:
2024-10-13 19:37:58 +02:00
parent 370f0b0f11
commit 0b417483f3
22 changed files with 486 additions and 119 deletions

View File

@@ -90,23 +90,6 @@ typedef enum PulseDebugMessageSeverity
PULSE_DEBUG_MESSAGE_SEVERITY_ERROR
} PulseDebugMessageSeverity;
typedef enum PulseDebugMessageType
{
PULSE_DEBUG_MESSAGE_TYPE_GENERAL,
PULSE_DEBUG_MESSAGE_TYPE_PERFORMANCE
} PulseDebugMessageType;
typedef enum PulseErrorType
{
PULSE_ERROR_NONE,
PULSE_ERROR_BACKENDS_CANDIDATES_SHADER_FORMAT_MISMATCH,
PULSE_ERROR_INITIALIZATION_FAILED,
PULSE_ERROR_INVALID_HANDLE,
PULSE_ERROR_ALLOCATION_FAILED,
PULSE_ERROR_DEVICE_LOST,
} PulseErrorType;
typedef enum PulseImageType
{
PULSE_IMAGE_TYPE_2D,
@@ -264,7 +247,7 @@ typedef struct PulseImageRegion
} PulseImageRegion;
// Functions
typedef void (*PulseDebugCallbackPFN)(PulseDebugMessageSeverity, PulseDebugMessageType, const char*);
typedef void (*PulseDebugCallbackPFN)(PulseDebugMessageSeverity, const char*);
PULSE_API PulseBackend PulseLoadBackend(PulseBackendFlags backend_candidates, PulseShaderFormatsFlags shader_formats_used, PulseDebugLevel debug_level);
PULSE_API void PulseUnloadBackend(PulseBackend backend);
@@ -289,15 +272,12 @@ PULSE_API void PulseEndGeneralPass(PulseGeneralPass pass);
PULSE_API PulseFence PulseCreateFence(PulseDevice device);
PULSE_API void PulseDestroyFence(PulseDevice device, PulseFence fence);
PULSE_API bool PulseIsFenceReady(PulseDevice device, PulseFence fence);
PULSE_API bool PulseWaitForFences(PulseDevice device, PulseFence* const* fences, uint32_t fences_count, bool wait_for_all);
PULSE_API bool PulseWaitForFences(PulseDevice device, const PulseFence* fences, uint32_t fences_count, bool wait_for_all);
PULSE_API PulseComputePipeline PulseCreateComputePipeline(PulseDevice device, const PulseComputePipelineCreateInfo* info);
PULSE_API void PulseDestroyComputePipeline(PulseDevice device, PulseComputePipeline pipeline);
PULSE_API void PulseBindComputePipeline(PulseComputePass pass, PulseComputePipeline pipeline);
PULSE_API PulseErrorType PulseGetLastErrorType(); // /!\ Warning /!\ Call to this function resets the internal last error variable
PULSE_API const char* PulseVerbaliseErrorType(PulseErrorType error);
#ifdef __cplusplus
}
#endif

View File

@@ -44,10 +44,13 @@ extern "C" {
#define PULSE_PLAT_WINDOWS
#elif defined(__linux__)
#define PULSE_PLAT_LINUX
#define PULSE_PLAT_POSIX
#elif defined(__APPLE__) && defined(__MACH__)
#define PULSE_PLAT_MACOS
#define PULSE_PLAT_POSIX
#elif defined(unix) || defined(__unix__) || defined(__unix)
#define PULSE_PLAT_UNIX
#define PULSE_PLAT_POSIX
#else
#error "Unknown environment (not Windows, not Linux, not MacOS, not Unix)"
#endif