GPU: Expose debug information from devices

Co-authored-by: Nikita Kogut <glinka1202@gmail.com>
This commit is contained in:
Lucas Murray
2025-04-02 17:29:29 +11:00
committed by Sam Lantinga
parent 008690d016
commit f78aa4d8ea
9 changed files with 326 additions and 26 deletions

View File

@@ -459,10 +459,12 @@ typedef struct SDL_GPURenderer SDL_GPURenderer;
struct SDL_GPUDevice
{
// Quit
// Device
void (*DestroyDevice)(SDL_GPUDevice *device);
SDL_PropertiesID (*GetDeviceDebugProperties)(SDL_GPUDevice *device);
// State Creation
SDL_GPUComputePipeline *(*CreateComputePipeline)(
@@ -894,6 +896,7 @@ struct SDL_GPUDevice
result->func = name##_##func;
#define ASSIGN_DRIVER(name) \
ASSIGN_DRIVER_FUNC(DestroyDevice, name) \
ASSIGN_DRIVER_FUNC(GetDeviceDebugProperties, name) \
ASSIGN_DRIVER_FUNC(CreateComputePipeline, name) \
ASSIGN_DRIVER_FUNC(CreateGraphicsPipeline, name) \
ASSIGN_DRIVER_FUNC(CreateSampler, name) \