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

@@ -426,6 +426,7 @@
#cmakedefine SDL_VIDEO_RENDER_PS2 @SDL_VIDEO_RENDER_PS2@
#cmakedefine SDL_VIDEO_RENDER_PSP @SDL_VIDEO_RENDER_PSP@
#cmakedefine SDL_VIDEO_RENDER_VITA_GXM @SDL_VIDEO_RENDER_VITA_GXM@
#cmakedefine SDL_VIDEO_RENDER_GPU @SDL_VIDEO_RENDER_GPU@
/* Enable OpenGL support */
#cmakedefine SDL_VIDEO_OPENGL @SDL_VIDEO_OPENGL@
@@ -445,6 +446,12 @@
/* Enable Metal support */
#cmakedefine SDL_VIDEO_METAL @SDL_VIDEO_METAL@
/* Enable GPU support */
#cmakedefine SDL_GPU_D3D11 @SDL_GPU_D3D11@
#cmakedefine SDL_GPU_D3D12 @SDL_GPU_D3D12@
#cmakedefine SDL_GPU_VULKAN @SDL_GPU_VULKAN@
#cmakedefine SDL_GPU_METAL @SDL_GPU_METAL@
/* Enable system power support */
#cmakedefine SDL_POWER_ANDROID @SDL_POWER_ANDROID@
#cmakedefine SDL_POWER_LINUX @SDL_POWER_LINUX@

View File

@@ -197,6 +197,8 @@
#endif
#endif
#define SDL_GPU_VULKAN SDL_VIDEO_VULKAN
/* Enable system power support */
#define SDL_POWER_ANDROID 1

View File

@@ -260,6 +260,8 @@
#endif
#endif
#define SDL_GPU_VULKAN SDL_VIDEO_VULKAN
#ifndef SDL_VIDEO_METAL
#if SDL_PLATFORM_SUPPORTS_METAL
#define SDL_VIDEO_METAL 1
@@ -268,6 +270,8 @@
#endif
#endif
#define SDL_GPU_METAL SDL_VIDEO_METAL
/* Enable system power support */
#define SDL_POWER_MACOSX 1

View File

@@ -310,6 +310,12 @@ typedef unsigned int uintptr_t;
/* Enable Vulkan support */
#define SDL_VIDEO_VULKAN 1
#define SDL_GPU_D3D11 HAVE_D3D11_H
#if !defined(SDL_GPU_D3D12)
#define SDL_GPU_D3D12 1
#endif
#define SDL_GPU_VULKAN SDL_VIDEO_VULKAN
#ifndef SDL_VIDEO_RENDER_VULKAN
#define SDL_VIDEO_RENDER_VULKAN 1
#endif

View File

@@ -232,6 +232,12 @@
/* Enable Vulkan support */
#define SDL_VIDEO_VULKAN 1
#define SDL_GPU_D3D11 HAVE_D3D11_H
#if !defined(SDL_GPU_D3D12)
#define SDL_GPU_D3D12 1
#endif
#define SDL_GPU_VULKAN SDL_VIDEO_VULKAN
/* Enable system power support */
#define SDL_POWER_WINDOWS 1

View File

@@ -200,6 +200,10 @@
#define SDL_VIDEO_RENDER_D3D12 1
#endif
#if !defined(SDL_GPU_D3D12)
#define SDL_GPU_D3D12 1
#endif
/* Enable OpenGL support */
#ifndef SDL_VIDEO_OPENGL
#define SDL_VIDEO_OPENGL 1