Add the SDL_GPU API

Project Lead: Evan Hemsley <evan@moonside.games>

Co-designer, Metal Port, Console Ports:

Co-authored-by: Caleb Cornett <caleb.cornett@outlook.com>

Production, QA, Debug:

Co-authored-by: Ethan Lee <flibitijibibo@gmail.com>

SDL_Render Driver, Bugfixes:

Co-authored-by: Andrei Alexeyev <akari@taisei-project.org>

Additional D3D12 Programming, Bugfixes:

Co-authored-by: Bart van der Werf <bluelive@gmail.com>

Bugfixes and Feedback:

Co-authored-by: Zakary Strange <zakarystrange@gmail.com>
Co-authored-by: meyraud705 <meyraud705@gmail.com>
Co-authored-by: Joshua T. Fisher <playmer@gmail.com>
Co-authored-by: Topi Ritala <ritalat@fastmail.com>
Co-authored-by: David Gow <david@ingeniumdigital.com>

Original API Proposal:

Co-authored-by: Ryan C. Gordon <icculus@icculus.org>
This commit is contained in:
cosmonaut 2024-03-18 11:43:23 -07:00 committed by Sam Lantinga
parent 8ddb099d3e
commit 2e7d5bb429
96 changed files with 60218 additions and 66 deletions

View file

@ -1085,3 +1085,84 @@
#define SDL_wcsnstr SDL_wcsnstr_REAL
#define SDL_wcsstr SDL_wcsstr_REAL
#define SDL_wcstol SDL_wcstol_REAL
#define SDL_CreateGpuDevice SDL_CreateGpuDevice_REAL
#define SDL_CreateGpuDeviceWithProperties SDL_CreateGpuDeviceWithProperties_REAL
#define SDL_DestroyGpuDevice SDL_DestroyGpuDevice_REAL
#define SDL_GetGpuDriver SDL_GetGpuDriver_REAL
#define SDL_CreateGpuComputePipeline SDL_CreateGpuComputePipeline_REAL
#define SDL_CreateGpuGraphicsPipeline SDL_CreateGpuGraphicsPipeline_REAL
#define SDL_CreateGpuSampler SDL_CreateGpuSampler_REAL
#define SDL_CreateGpuShader SDL_CreateGpuShader_REAL
#define SDL_CreateGpuTexture SDL_CreateGpuTexture_REAL
#define SDL_CreateGpuBuffer SDL_CreateGpuBuffer_REAL
#define SDL_CreateGpuTransferBuffer SDL_CreateGpuTransferBuffer_REAL
#define SDL_SetGpuBufferName SDL_SetGpuBufferName_REAL
#define SDL_SetGpuTextureName SDL_SetGpuTextureName_REAL
#define SDL_InsertGpuDebugLabel SDL_InsertGpuDebugLabel_REAL
#define SDL_PushGpuDebugGroup SDL_PushGpuDebugGroup_REAL
#define SDL_PopGpuDebugGroup SDL_PopGpuDebugGroup_REAL
#define SDL_ReleaseGpuTexture SDL_ReleaseGpuTexture_REAL
#define SDL_ReleaseGpuSampler SDL_ReleaseGpuSampler_REAL
#define SDL_ReleaseGpuBuffer SDL_ReleaseGpuBuffer_REAL
#define SDL_ReleaseGpuTransferBuffer SDL_ReleaseGpuTransferBuffer_REAL
#define SDL_ReleaseGpuComputePipeline SDL_ReleaseGpuComputePipeline_REAL
#define SDL_ReleaseGpuShader SDL_ReleaseGpuShader_REAL
#define SDL_ReleaseGpuGraphicsPipeline SDL_ReleaseGpuGraphicsPipeline_REAL
#define SDL_BeginGpuRenderPass SDL_BeginGpuRenderPass_REAL
#define SDL_BindGpuGraphicsPipeline SDL_BindGpuGraphicsPipeline_REAL
#define SDL_SetGpuViewport SDL_SetGpuViewport_REAL
#define SDL_SetGpuScissor SDL_SetGpuScissor_REAL
#define SDL_BindGpuVertexBuffers SDL_BindGpuVertexBuffers_REAL
#define SDL_BindGpuIndexBuffer SDL_BindGpuIndexBuffer_REAL
#define SDL_BindGpuVertexSamplers SDL_BindGpuVertexSamplers_REAL
#define SDL_BindGpuVertexStorageTextures SDL_BindGpuVertexStorageTextures_REAL
#define SDL_BindGpuVertexStorageBuffers SDL_BindGpuVertexStorageBuffers_REAL
#define SDL_BindGpuFragmentSamplers SDL_BindGpuFragmentSamplers_REAL
#define SDL_BindGpuFragmentStorageTextures SDL_BindGpuFragmentStorageTextures_REAL
#define SDL_BindGpuFragmentStorageBuffers SDL_BindGpuFragmentStorageBuffers_REAL
#define SDL_PushGpuVertexUniformData SDL_PushGpuVertexUniformData_REAL
#define SDL_PushGpuFragmentUniformData SDL_PushGpuFragmentUniformData_REAL
#define SDL_DrawGpuIndexedPrimitives SDL_DrawGpuIndexedPrimitives_REAL
#define SDL_DrawGpuPrimitives SDL_DrawGpuPrimitives_REAL
#define SDL_DrawGpuPrimitivesIndirect SDL_DrawGpuPrimitivesIndirect_REAL
#define SDL_DrawGpuIndexedPrimitivesIndirect SDL_DrawGpuIndexedPrimitivesIndirect_REAL
#define SDL_EndGpuRenderPass SDL_EndGpuRenderPass_REAL
#define SDL_BeginGpuComputePass SDL_BeginGpuComputePass_REAL
#define SDL_BindGpuComputePipeline SDL_BindGpuComputePipeline_REAL
#define SDL_BindGpuComputeStorageTextures SDL_BindGpuComputeStorageTextures_REAL
#define SDL_BindGpuComputeStorageBuffers SDL_BindGpuComputeStorageBuffers_REAL
#define SDL_PushGpuComputeUniformData SDL_PushGpuComputeUniformData_REAL
#define SDL_DispatchGpuCompute SDL_DispatchGpuCompute_REAL
#define SDL_DispatchGpuComputeIndirect SDL_DispatchGpuComputeIndirect_REAL
#define SDL_EndGpuComputePass SDL_EndGpuComputePass_REAL
#define SDL_MapGpuTransferBuffer SDL_MapGpuTransferBuffer_REAL
#define SDL_UnmapGpuTransferBuffer SDL_UnmapGpuTransferBuffer_REAL
#define SDL_BeginGpuCopyPass SDL_BeginGpuCopyPass_REAL
#define SDL_UploadToGpuTexture SDL_UploadToGpuTexture_REAL
#define SDL_UploadToGpuBuffer SDL_UploadToGpuBuffer_REAL
#define SDL_CopyGpuTextureToTexture SDL_CopyGpuTextureToTexture_REAL
#define SDL_CopyGpuBufferToBuffer SDL_CopyGpuBufferToBuffer_REAL
#define SDL_GenerateGpuMipmaps SDL_GenerateGpuMipmaps_REAL
#define SDL_DownloadFromGpuTexture SDL_DownloadFromGpuTexture_REAL
#define SDL_DownloadFromGpuBuffer SDL_DownloadFromGpuBuffer_REAL
#define SDL_EndGpuCopyPass SDL_EndGpuCopyPass_REAL
#define SDL_BlitGpu SDL_BlitGpu_REAL
#define SDL_SupportsGpuSwapchainComposition SDL_SupportsGpuSwapchainComposition_REAL
#define SDL_SupportsGpuPresentMode SDL_SupportsGpuPresentMode_REAL
#define SDL_ClaimGpuWindow SDL_ClaimGpuWindow_REAL
#define SDL_UnclaimGpuWindow SDL_UnclaimGpuWindow_REAL
#define SDL_SetGpuSwapchainParameters SDL_SetGpuSwapchainParameters_REAL
#define SDL_GetGpuSwapchainTextureFormat SDL_GetGpuSwapchainTextureFormat_REAL
#define SDL_AcquireGpuCommandBuffer SDL_AcquireGpuCommandBuffer_REAL
#define SDL_AcquireGpuSwapchainTexture SDL_AcquireGpuSwapchainTexture_REAL
#define SDL_SubmitGpu SDL_SubmitGpu_REAL
#define SDL_SubmitGpuAndAcquireFence SDL_SubmitGpuAndAcquireFence_REAL
#define SDL_WaitGpu SDL_WaitGpu_REAL
#define SDL_WaitGpuForFences SDL_WaitGpuForFences_REAL
#define SDL_QueryGpuFence SDL_QueryGpuFence_REAL
#define SDL_ReleaseGpuFence SDL_ReleaseGpuFence_REAL
#define SDL_GpuTextureFormatTexelBlockSize SDL_GpuTextureFormatTexelBlockSize_REAL
#define SDL_SupportsGpuTextureFormat SDL_SupportsGpuTextureFormat_REAL
#define SDL_SupportsGpuSampleCount SDL_SupportsGpuSampleCount_REAL
#define SDL_GDKSuspendGpu SDL_GDKSuspendGpu_REAL
#define SDL_GDKResumeGpu SDL_GDKResumeGpu_REAL