From 387774ab8a32151d12f3e76653d5b5bc070a28ce Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Thu, 5 Sep 2024 06:37:20 -0700
Subject: [PATCH] Build config flags are either defined or undefined, never 0
This is for consistency with CMake build configuration
Also added SDL_VIDEO_RENDER_GPU to the non-CMake build configurations
---
VisualC-GDK/SDL/SDL.vcxproj | 5 ++
VisualC/SDL/SDL.vcxproj | 3 +
VisualC/SDL/SDL.vcxproj.filters | 9 +++
Xcode/SDL/SDL.xcodeproj/project.pbxproj | 39 +++++++++--
include/build_config/SDL_build_config.h.cmake | 2 +-
.../build_config/SDL_build_config_android.h | 11 ++-
include/build_config/SDL_build_config_macos.h | 59 ++++------------
.../build_config/SDL_build_config_windows.h | 58 +++++-----------
.../build_config/SDL_build_config_wingdk.h | 53 +++++---------
include/build_config/SDL_build_config_xbox.h | 29 +++-----
src/SDL_internal.h | 69 +++----------------
src/core/winrt/SDL_winrtapp_direct3d.cpp | 4 +-
src/events/SDL_pen_c.h | 2 -
src/filesystem/gdk/SDL_sysfilesystem.cpp | 2 -
src/gpu/SDL_gpu.c | 2 +-
src/gpu/d3d11/SDL_gpu_d3d11.c | 2 +-
src/gpu/d3d12/SDL_gpu_d3d12.c | 2 +-
src/gpu/metal/SDL_gpu_metal.m | 2 +-
src/gpu/vulkan/SDL_gpu_vulkan.c | 2 +-
src/render/SDL_d3dmath.c | 7 +-
src/render/SDL_d3dmath.h | 8 ++-
src/render/SDL_render.c | 43 +++++-------
src/render/direct3d/SDL_render_d3d.c | 6 +-
src/render/direct3d/SDL_shaders_d3d.c | 2 +-
src/render/direct3d11/SDL_render_d3d11.c | 4 +-
src/render/direct3d11/SDL_render_winrt.cpp | 2 +-
src/render/direct3d11/SDL_render_winrt.h | 2 +-
src/render/direct3d11/SDL_shaders_d3d11.c | 2 +-
src/render/direct3d12/SDL_render_d3d12.c | 4 +-
.../direct3d12/SDL_render_d3d12_xbox.cpp | 4 +-
src/render/direct3d12/SDL_shaders_d3d12.c | 4 +-
.../direct3d12/SDL_shaders_d3d12_xboxone.cpp | 5 +-
.../SDL_shaders_d3d12_xboxseries.cpp | 5 +-
src/render/metal/SDL_render_metal.m | 2 +-
src/render/opengl/SDL_render_gl.c | 2 +-
src/render/opengl/SDL_shaders_gl.c | 2 +-
src/render/opengles2/SDL_render_gles2.c | 2 +-
src/render/opengles2/SDL_shaders_gles2.c | 2 +-
src/render/opengles2/SDL_shaders_gles2.h | 2 +-
src/render/ps2/SDL_render_ps2.c | 2 +-
src/render/psp/SDL_render_psp.c | 2 +-
src/render/sdlgpu/SDL_pipeline_gpu.c | 4 +-
src/render/sdlgpu/SDL_render_gpu.c | 5 +-
src/render/sdlgpu/SDL_shaders_gpu.c | 2 +-
src/render/software/SDL_blendfillrect.c | 2 +-
src/render/software/SDL_blendline.c | 2 +-
src/render/software/SDL_blendpoint.c | 2 +-
src/render/software/SDL_drawline.c | 2 +-
src/render/software/SDL_drawpoint.c | 2 +-
src/render/software/SDL_render_sw.c | 2 +-
src/render/software/SDL_rotate.c | 2 +-
src/render/software/SDL_triangle.c | 2 +-
src/render/vitagxm/SDL_render_vita_gxm.c | 2 +-
.../vitagxm/SDL_render_vita_gxm_memory.c | 2 +-
.../vitagxm/SDL_render_vita_gxm_tools.c | 2 +-
src/render/vulkan/SDL_render_vulkan.c | 2 +-
src/render/vulkan/SDL_shaders_vulkan.c | 2 +-
src/video/vita/SDL_vitamessagebox.c | 6 +-
src/video/x11/SDL_x11xinput2.c | 4 +-
59 files changed, 211 insertions(+), 305 deletions(-)
diff --git a/VisualC-GDK/SDL/SDL.vcxproj b/VisualC-GDK/SDL/SDL.vcxproj
index fa470003ceb66..8c5d6202a98ab 100644
--- a/VisualC-GDK/SDL/SDL.vcxproj
+++ b/VisualC-GDK/SDL/SDL.vcxproj
@@ -765,6 +765,9 @@
<ClCompile Include="..\..\src\render\direct3d\SDL_render_d3d.c" />
<ClCompile Include="..\..\src\render\direct3d11\SDL_render_d3d11.c" />
<ClCompile Include="..\..\src\render\direct3d\SDL_shaders_d3d.c" />
+ <ClCompile Include="..\..\src\render\sdlgpu\SDL_pipeline_gpu.c" />
+ <ClCompile Include="..\..\src\render\sdlgpu\SDL_render_gpu.c" />
+ <ClCompile Include="..\..\src\render\sdlgpu\SDL_shaders_gpu.c" />
<ClCompile Include="..\..\src\render\opengl\SDL_render_gl.c" />
<ClCompile Include="..\..\src\render\opengl\SDL_shaders_gl.c" />
<ClCompile Include="..\..\src\render\opengles2\SDL_render_gles2.c" />
@@ -781,6 +784,8 @@
<ClCompile Include="..\..\src\render\software\SDL_render_sw.c" />
<ClCompile Include="..\..\src\render\software\SDL_rotate.c" />
<ClCompile Include="..\..\src\render\software\SDL_triangle.c" />
+ <ClCompile Include="..\..\src\render\vulkan\SDL_render_vulkan.c" />
+ <ClCompile Include="..\..\src\render\vulkan\SDL_shaders_vulkan.c" />
<ClCompile Include="..\..\src\SDL.c" />
<ClCompile Include="..\..\src\SDL_assert.c" />
<ClCompile Include="..\..\src\SDL_list.c" />
diff --git a/VisualC/SDL/SDL.vcxproj b/VisualC/SDL/SDL.vcxproj
index e1cbf90bf592d..77b40f7d93fbb 100644
--- a/VisualC/SDL/SDL.vcxproj
+++ b/VisualC/SDL/SDL.vcxproj
@@ -621,6 +621,9 @@
<ClCompile Include="..\..\src\render\direct3d\SDL_render_d3d.c" />
<ClCompile Include="..\..\src\render\direct3d11\SDL_render_d3d11.c" />
<ClCompile Include="..\..\src\render\direct3d\SDL_shaders_d3d.c" />
+ <ClCompile Include="..\..\src\render\sdlgpu\SDL_pipeline_gpu.c" />
+ <ClCompile Include="..\..\src\render\sdlgpu\SDL_render_gpu.c" />
+ <ClCompile Include="..\..\src\render\sdlgpu\SDL_shaders_gpu.c" />
<ClCompile Include="..\..\src\render\opengl\SDL_render_gl.c" />
<ClCompile Include="..\..\src\render\opengl\SDL_shaders_gl.c" />
<ClCompile Include="..\..\src\render\opengles2\SDL_render_gles2.c" />
diff --git a/VisualC/SDL/SDL.vcxproj.filters b/VisualC/SDL/SDL.vcxproj.filters
index f7794e85666c6..f33c927c8f1b5 100644
--- a/VisualC/SDL/SDL.vcxproj.filters
+++ b/VisualC/SDL/SDL.vcxproj.filters
@@ -1488,6 +1488,15 @@
<ClCompile Include="..\..\src\render\direct3d11\SDL_shaders_d3d11.c">
<Filter>render\direct3d11</Filter>
</ClCompile>
+ <ClCompile Include="..\..\src\render\sdlgpu\SDL_pipeline_gpu.c">
+ <Filter>render\sdlgpu</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\src\render\sdlgpu\SDL_render_gpu.c">
+ <Filter>render\sdlgpu</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\src\render\sdlgpu\SDL_shaders_gpu.c">
+ <Filter>render\sdlgpu</Filter>
+ </ClCompile>
<ClCompile Include="..\..\src\render\opengl\SDL_render_gl.c">
<Filter>render\opengl</Filter>
</ClCompile>
diff --git a/Xcode/SDL/SDL.xcodeproj/project.pbxproj b/Xcode/SDL/SDL.xcodeproj/project.pbxproj
index e478bb82c7ce3..677d08af738b8 100644
--- a/Xcode/SDL/SDL.xcodeproj/project.pbxproj
+++ b/Xcode/SDL/SDL.xcodeproj/project.pbxproj
@@ -44,6 +44,7 @@
000095FA1BDE436CF3AF0000 /* SDL_time.c in Sources */ = {isa = PBXBuildFile; fileRef = 0000641A9BAC11AB3FBE0000 /* SDL_time.c */; };
000098E9DAA43EF6FF7F0000 /* SDL_camera.c in Sources */ = {isa = PBXBuildFile; fileRef = 0000035D38C3899C7EFD0000 /* SDL_camera.c */; };
0000A4DA2F45A31DC4F00000 /* SDL_sysmain_callbacks.m in Sources */ = {isa = PBXBuildFile; fileRef = 0000BB287BA0A0178C1A0000 /* SDL_sysmain_callbacks.m */; platformFilters = (ios, maccatalyst, macos, tvos, watchos, ); };
+ 0000D5B526B85DE7AB1C0000 /* SDL_cocoapen.m in Sources */ = {isa = PBXBuildFile; fileRef = 0000CCA310B73A7B59910000 /* SDL_cocoapen.m */; };
007317A40858DECD00B2BC32 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0073179D0858DECD00B2BC32 /* Cocoa.framework */; platformFilters = (macos, ); };
007317A60858DECD00B2BC32 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0073179F0858DECD00B2BC32 /* IOKit.framework */; platformFilters = (ios, maccatalyst, macos, ); };
00CFA89D106B4BA100758660 /* ForceFeedback.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 00CFA89C106B4BA100758660 /* ForceFeedback.framework */; platformFilters = (macos, ); };
@@ -445,6 +446,12 @@
F3990E062A788303000D8759 /* SDL_hidapi_ios.h in Headers */ = {isa = PBXBuildFile; fileRef = F3990E032A788303000D8759 /* SDL_hidapi_ios.h */; };
F3990E072A78833C000D8759 /* hid.m in Sources */ = {isa = PBXBuildFile; fileRef = A75FDAA523E2792500529352 /* hid.m */; };
F3A4909E2554D38600E92A8B /* SDL_hidapi_ps5.c in Sources */ = {isa = PBXBuildFile; fileRef = F3A4909D2554D38500E92A8B /* SDL_hidapi_ps5.c */; };
+ F3A9AE982C8A13C100AAC390 /* SDL_gpu_util.h in Headers */ = {isa = PBXBuildFile; fileRef = F3A9AE922C8A13C100AAC390 /* SDL_gpu_util.h */; };
+ F3A9AE992C8A13C100AAC390 /* SDL_render_gpu.c in Sources */ = {isa = PBXBuildFile; fileRef = F3A9AE932C8A13C100AAC390 /* SDL_render_gpu.c */; };
+ F3A9AE9A2C8A13C100AAC390 /* SDL_shaders_gpu.c in Sources */ = {isa = PBXBuildFile; fileRef = F3A9AE942C8A13C100AAC390 /* SDL_shaders_gpu.c */; };
+ F3A9AE9B2C8A13C100AAC390 /* SDL_pipeline_gpu.h in Headers */ = {isa = PBXBuildFile; fileRef = F3A9AE952C8A13C100AAC390 /* SDL_pipeline_gpu.h */; };
+ F3A9AE9C2C8A13C100AAC390 /* SDL_pipeline_gpu.c in Sources */ = {isa = PBXBuildFile; fileRef = F3A9AE962C8A13C100AAC390 /* SDL_pipeline_gpu.c */; };
+ F3A9AE9D2C8A13C100AAC390 /* SDL_shaders_gpu.h in Headers */ = {isa = PBXBuildFile; fileRef = F3A9AE972C8A13C100AAC390 /* SDL_shaders_gpu.h */; };
F3B38CCF296E2E52005DA6D3 /* SDL_main_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = F3B38CCA296E2E52005DA6D3 /* SDL_main_impl.h */; settings = {ATTRIBUTES = (Public, ); }; };
F3B38CD3296E2E52005DA6D3 /* SDL_platform_defines.h in Headers */ = {isa = PBXBuildFile; fileRef = F3B38CCB296E2E52005DA6D3 /* SDL_platform_defines.h */; settings = {ATTRIBUTES = (Public, ); }; };
F3B38CD7296E2E52005DA6D3 /* SDL_init.h in Headers */ = {isa = PBXBuildFile; fileRef = F3B38CCC296E2E52005DA6D3 /* SDL_init.h */; settings = {ATTRIBUTES = (Public, ); }; };
@@ -533,8 +540,6 @@
F3FA5A242B59ACE000FEAD97 /* yuv_rgb_lsx.h in Headers */ = {isa = PBXBuildFile; fileRef = F3FA5A1B2B59ACE000FEAD97 /* yuv_rgb_lsx.h */; };
F3FA5A252B59ACE000FEAD97 /* yuv_rgb_common.h in Headers */ = {isa = PBXBuildFile; fileRef = F3FA5A1C2B59ACE000FEAD97 /* yuv_rgb_common.h */; };
FA73671D19A540EF004122E4 /* CoreVideo.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA73671C19A540EF004122E4 /* CoreVideo.framework */; platformFilters = (ios, maccatalyst, macos, tvos, watchos, ); };
- 0000E5D7110DFF81FF660000 /* SDL_cocoapen.h in Headers */ = {isa = PBXBuildFile; fileRef = 00002F2F5496FA184A0F0000 /* SDL_cocoapen.h */; };
- 0000D5B526B85DE7AB1C0000 /* SDL_cocoapen.m in Sources */ = {isa = PBXBuildFile; fileRef = 0000CCA310B73A7B59910000 /* SDL_cocoapen.m */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
@@ -563,6 +568,7 @@
/* Begin PBXFileReference section */
0000035D38C3899C7EFD0000 /* SDL_camera.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_camera.c; sourceTree = "<group>"; };
00002B010DB1A70931C20000 /* SDL_filesystem.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_filesystem.c; sourceTree = "<group>"; };
+ 00002F2F5496FA184A0F0000 /* SDL_cocoapen.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_cocoapen.h; sourceTree = "<group>"; };
00003260407E1002EAC10000 /* SDL_main_callbacks.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_main_callbacks.h; sourceTree = "<group>"; };
00003F472C51CE7DF6160000 /* SDL_systime.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_systime.c; sourceTree = "<group>"; };
00005BD74B46358B33A20000 /* SDL_camera_dummy.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_camera_dummy.c; sourceTree = "<group>"; };
@@ -575,6 +581,7 @@
00009366FB9FBBD54C390000 /* SDL_main_callbacks.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_main_callbacks.c; sourceTree = "<group>"; };
0000B6ADCD88CAD6610F0000 /* SDL_hashtable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_hashtable.h; sourceTree = "<group>"; };
0000BB287BA0A0178C1A0000 /* SDL_sysmain_callbacks.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDL_sysmain_callbacks.m; sourceTree = "<group>"; };
+ 0000CCA310B73A7B59910000 /* SDL_cocoapen.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDL_cocoapen.m; sourceTree = "<group>"; };
0000F4E6AA3EF99DA3C80000 /* SDL_sysfsops.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_sysfsops.c; sourceTree = "<group>"; };
0000F6C6A072ED4E3D660000 /* SDL_dialog_utils.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_dialog_utils.c; sourceTree = "<group>"; };
0073179D0858DECD00B2BC32 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; };
@@ -1004,6 +1011,12 @@
F3990E022A788303000D8759 /* SDL_hidapi_mac.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_hidapi_mac.h; sourceTree = "<group>"; };
F3990E032A788303000D8759 /* SDL_hidapi_ios.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_hidapi_ios.h; sourceTree = "<group>"; };
F3A4909D2554D38500E92A8B /* SDL_hidapi_ps5.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_hidapi_ps5.c; sourceTree = "<group>"; };
+ F3A9AE922C8A13C100AAC390 /* SDL_gpu_util.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_gpu_util.h; sourceTree = "<group>"; };
+ F3A9AE932C8A13C100AAC390 /* SDL_render_gpu.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_render_gpu.c; sourceTree = "<group>"; };
+ F3A9AE942C8A13C100AAC390 /* SDL_shaders_gpu.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_shaders_gpu.c; sourceTree = "<group>"; };
+ F3A9AE952C8A13C100AAC390 /* SDL_pipeline_gpu.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_pipeline_gpu.h; sourceTree = "<group>"; };
+ F3A9AE962C8A13C100AAC390 /* SDL_pipeline_gpu.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_pipeline_gpu.c; sourceTree = "<group>"; };
+ F3A9AE972C8A13C100AAC390 /* SDL_shaders_gpu.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_shaders_gpu.h; sourceTree = "<group>"; };
F3ADAB8D2576F0B300A6B1D9 /* SDL_sysurl.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDL_sysurl.m; sourceTree = "<group>"; };
F3B38CCA296E2E52005DA6D3 /* SDL_main_impl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_main_impl.h; path = SDL3/SDL_main_impl.h; sourceTree = "<group>"; };
F3B38CCB296E2E52005DA6D3 /* SDL_platform_defines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_platform_defines.h; path = SDL3/SDL_platform_defines.h; sourceTree = "<group>"; };
@@ -1096,8 +1109,6 @@
F59C710600D5CB5801000001 /* SDL.info */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = SDL.info; sourceTree = "<group>"; };
F5A2EF3900C6A39A01000001 /* BUGS.txt */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; name = BUGS.txt; path = ../../BUGS.txt; sourceTree = SOURCE_ROOT; };
FA73671C19A540EF004122E4 /* CoreVideo.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreVideo.framework; path = System/Library/Frameworks/CoreVideo.framework; sourceTree = SDKROOT; };
- 00002F2F5496FA184A0F0000 /* SDL_cocoapen.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_cocoapen.h; path = SDL_cocoapen.h; sourceTree = "<group>"; };
- 0000CCA310B73A7B59910000 /* SDL_cocoapen.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SDL_cocoapen.m; path = SDL_cocoapen.m; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@@ -2096,6 +2107,7 @@
A7D8A8DD23E2514000DCD162 /* metal */,
A7D8A90C23E2514000DCD162 /* opengl */,
A7D8A90323E2514000DCD162 /* opengles2 */,
+ F3A9AE912C8A139C00AAC390 /* sdlgpu */,
A7D8A8EF23E2514000DCD162 /* software */,
A7D8A8FF23E2514000DCD162 /* SDL_d3dmath.c */,
A7D8A8DC23E2514000DCD162 /* SDL_d3dmath.h */,
@@ -2335,6 +2347,19 @@
path = dummy;
sourceTree = "<group>";
};
+ F3A9AE912C8A139C00AAC390 /* sdlgpu */ = {
+ isa = PBXGroup;
+ children = (
+ F3A9AE922C8A13C100AAC390 /* SDL_gpu_util.h */,
+ F3A9AE962C8A13C100AAC390 /* SDL_pipeline_gpu.c */,
+ F3A9AE952C8A13C100AAC390 /* SDL_pipeline_gpu.h */,
+ F3A9AE932C8A13C100AAC390 /* SDL_render_gpu.c */,
+ F3A9AE942C8A13C100AAC390 /* SDL_shaders_gpu.c */,
+ F3A9AE972C8A13C100AAC390 /* SDL_shaders_gpu.h */,
+ );
+ path = sdlgpu;
+ sourceTree = "<group>";
+ };
F3ADAB8C2576F08500A6B1D9 /* ios */ = {
isa = PBXGroup;
children = (
@@ -2376,6 +2401,7 @@
F3F7D9C52933074E00816151 /* SDL_assert.h in Headers */,
A7D8B61723E2514300DCD162 /* SDL_assert_c.h in Headers */,
F3F7D9292933074E00816151 /* SDL_atomic.h in Headers */,
+ F3A9AE9D2C8A13C100AAC390 /* SDL_shaders_gpu.h in Headers */,
F3F7D8ED2933074E00816151 /* SDL_audio.h in Headers */,
A7D8B7A023E2514400DCD162 /* SDL_audio_c.h in Headers */,
F32DDACF2AB795A30041EAA5 /* SDL_audio_channel_converters.h in Headers */,
@@ -2430,6 +2456,7 @@
A7D8AB1C23E2514100DCD162 /* SDL_dynapi_procs.h in Headers */,
E4F7981C2AD8D85500669F54 /* SDL_dynapi_unsupported.h in Headers */,
F3F7D9252933074E00816151 /* SDL_egl.h in Headers */,
+ F3A9AE982C8A13C100AAC390 /* SDL_gpu_util.h in Headers */,
A7D8ABD923E2514100DCD162 /* SDL_egl_c.h in Headers */,
F3F7D93D2933074E00816151 /* SDL_endian.h in Headers */,
F3F7D9352933074E00816151 /* SDL_error.h in Headers */,
@@ -2603,6 +2630,7 @@
A7D8B26023E2514200DCD162 /* vulkan.h in Headers */,
A7D8B2B423E2514200DCD162 /* vulkan_android.h in Headers */,
A7D8B2A823E2514200DCD162 /* vulkan_core.h in Headers */,
+ F3A9AE9B2C8A13C100AAC390 /* SDL_pipeline_gpu.h in Headers */,
E41D20152BA9577D003073FA /* SDL_storage.h in Headers */,
F37E18522BA50E760098C111 /* SDL_dialog.h in Headers */,
A7D8B27223E2514200DCD162 /* vulkan_fuchsia.h in Headers */,
@@ -2752,6 +2780,7 @@
A7D8B41C23E2514300DCD162 /* SDL_systls.c in Sources */,
9846B07C287A9020000C35C8 /* SDL_hidapi_shield.c in Sources */,
F31013C72C24E98200FBE946 /* SDL_keymap.c in Sources */,
+ F3A9AE992C8A13C100AAC390 /* SDL_render_gpu.c in Sources */,
A7D8BBD923E2574800DCD162 /* SDL_uikitmessagebox.m in Sources */,
F32DDAD42AB795A30041EAA5 /* SDL_audioresample.c in Sources */,
F3FA5A212B59ACE000FEAD97 /* yuv_rgb_std.c in Sources */,
@@ -2808,6 +2837,7 @@
A7D8ADF223E2514100DCD162 /* SDL_blit_A.c in Sources */,
A7D8BBDD23E2574800DCD162 /* SDL_uikitmodes.m in Sources */,
A7D8BA3723E2514400DCD162 /* SDL_d3dmath.c in Sources */,
+ F3A9AE9C2C8A13C100AAC390 /* SDL_pipeline_gpu.c in Sources */,
75E0915A241EA924004729E1 /* SDL_virtualjoystick.c in Sources */,
A7D8ABEB23E2514100DCD162 /* SDL_nullvideo.c in Sources */,
F3990E072A78833C000D8759 /* hid.m in Sources */,
@@ -2881,6 +2911,7 @@
A7D8BB0923E2514500DCD162 /* k_tan.c in Sources */,
A7D8B8A823E2514400DCD162 /* SDL_diskaudio.c in Sources */,
56A2373329F9C113003CCA5F /* SDL_sysrwlock.c in Sources */,
+ F3A9AE9A2C8A13C100AAC390 /* SDL_shaders_gpu.c in Sources */,
566E26CF246274CC00718109 /* SDL_syslocale.m in Sources */,
A7D8AFC023E2514200DCD162 /* SDL_egl.c in Sources */,
A7D8AC3323E2514100DCD162 /* SDL_RLEaccel.c in Sources */,
diff --git a/include/build_config/SDL_build_config.h.cmake b/include/build_config/SDL_build_config.h.cmake
index 7300f777f8b49..ea05ee31c633c 100644
--- a/include/build_config/SDL_build_config.h.cmake
+++ b/include/build_config/SDL_build_config.h.cmake
@@ -419,6 +419,7 @@
#cmakedefine SDL_VIDEO_RENDER_D3D @SDL_VIDEO_RENDER_D3D@
#cmakedefine SDL_VIDEO_RENDER_D3D11 @SDL_VIDEO_RENDER_D3D11@
#cmakedefine SDL_VIDEO_RENDER_D3D12 @SDL_VIDEO_RENDER_D3D12@
+#cmakedefine SDL_VIDEO_RENDER_GPU @SDL_VIDEO_RENDER_GPU@
#cmakedefine SDL_VIDEO_RENDER_METAL @SDL_VIDEO_RENDER_METAL@
#cmakedefine SDL_VIDEO_RENDER_VULKAN @SDL_VIDEO_RENDER_VULKAN@
#cmakedefine SDL_VIDEO_RENDER_OGL @SDL_VIDEO_RENDER_OGL@
@@ -426,7 +427,6 @@
#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@
diff --git a/include/build_config/SDL_build_config_android.h b/include/build_config/SDL_build_config_android.h
index ddb1585479695..ee567986f64b6 100644
--- a/include/build_config/SDL_build_config_android.h
+++ b/include/build_config/SDL_build_config_android.h
@@ -187,17 +187,14 @@
#define SDL_VIDEO_RENDER_OGL_ES2 1
/* Enable Vulkan support */
-/* Android does not support Vulkan in native code using the "armeabi" ABI. */
#if defined(__ARM_ARCH) && __ARM_ARCH < 7
-#define SDL_VIDEO_VULKAN 0
+/* Android does not support Vulkan in native code using the "armeabi" ABI. */
#else
#define SDL_VIDEO_VULKAN 1
-#ifndef SDL_VIDEO_RENDER_VULKAN
-#define SDL_VIDEO_RENDER_VULKAN 1
+#define SDL_VIDEO_RENDER_VULKAN 1
+#define SDL_GPU_VULKAN 1
+#define SDL_VIDEO_RENDER_GPU 1
#endif
-#endif
-
-#define SDL_GPU_VULKAN SDL_VIDEO_VULKAN
/* Enable system power support */
#define SDL_POWER_ANDROID 1
diff --git a/include/build_config/SDL_build_config_macos.h b/include/build_config/SDL_build_config_macos.h
index cf6229e130388..61fc8e8414fa3 100644
--- a/include/build_config/SDL_build_config_macos.h
+++ b/include/build_config/SDL_build_config_macos.h
@@ -211,67 +211,34 @@
#define SDL_VIDEO_DRIVER_X11_SUPPORTS_GENERIC_EVENTS 1
#endif
-#ifndef SDL_VIDEO_RENDER_OGL
#define SDL_VIDEO_RENDER_OGL 1
-#endif
-
-#ifndef SDL_VIDEO_RENDER_OGL_ES2
#define SDL_VIDEO_RENDER_OGL_ES2 1
-#endif
/* Metal only supported on 64-bit architectures with 10.11+ */
#if TARGET_RT_64_BIT && (MAC_OS_X_VERSION_MAX_ALLOWED >= 101100)
-#define SDL_PLATFORM_SUPPORTS_METAL 1
-#else
-#define SDL_PLATFORM_SUPPORTS_METAL 0
+#define SDL_PLATFORM_SUPPORTS_METAL 1
#endif
-#ifndef SDL_VIDEO_RENDER_METAL
-#if SDL_PLATFORM_SUPPORTS_METAL
-#define SDL_VIDEO_RENDER_METAL 1
-#else
-#define SDL_VIDEO_RENDER_METAL 0
-#endif
+#ifdef SDL_PLATFORM_SUPPORTS_METAL
+#define SDL_VIDEO_RENDER_METAL 1
#endif
/* Enable OpenGL support */
-#ifndef SDL_VIDEO_OPENGL
-#define SDL_VIDEO_OPENGL 1
-#endif
-#ifndef SDL_VIDEO_OPENGL_ES2
-#define SDL_VIDEO_OPENGL_ES2 1
-#endif
-#ifndef SDL_VIDEO_OPENGL_EGL
-#define SDL_VIDEO_OPENGL_EGL 1
-#endif
-#ifndef SDL_VIDEO_OPENGL_CGL
-#define SDL_VIDEO_OPENGL_CGL 1
-#endif
-#ifndef SDL_VIDEO_OPENGL_GLX
-#define SDL_VIDEO_OPENGL_GLX 1
-#endif
+#define SDL_VIDEO_OPENGL 1
+#define SDL_VIDEO_OPENGL_ES2 1
+#define SDL_VIDEO_OPENGL_EGL 1
+#define SDL_VIDEO_OPENGL_CGL 1
+#define SDL_VIDEO_OPENGL_GLX 1
/* Enable Vulkan and Metal support */
-#ifndef SDL_VIDEO_VULKAN
-#if SDL_PLATFORM_SUPPORTS_METAL
-#define SDL_VIDEO_VULKAN 1
-#else
-#define SDL_VIDEO_VULKAN 0
-#endif
-#endif
-
-#define SDL_GPU_VULKAN SDL_VIDEO_VULKAN
-
-#ifndef SDL_VIDEO_METAL
-#if SDL_PLATFORM_SUPPORTS_METAL
+#ifdef SDL_PLATFORM_SUPPORTS_METAL
#define SDL_VIDEO_METAL 1
-#else
-#define SDL_VIDEO_METAL 0
-#endif
+#define SDL_GPU_METAL 1
+#define SDL_VIDEO_VULKAN 1
+#define SDL_GPU_VULKAN 1
+#define SDL_VIDEO_RENDER_GPU 1
#endif
-#define SDL_GPU_METAL SDL_VIDEO_METAL
-
/* Enable system power support */
#define SDL_POWER_MACOSX 1
diff --git a/include/build_config/SDL_build_config_windows.h b/include/build_config/SDL_build_config_windows.h
index 8a6eece1f6702..47723fb28594e 100644
--- a/include/build_config/SDL_build_config_windows.h
+++ b/include/build_config/SDL_build_config_windows.h
@@ -201,7 +201,7 @@ typedef unsigned int uintptr_t;
#define HAVE_SINF 1
#define HAVE_SQRTF 1
#define HAVE_TANF 1
-#if defined(_MSC_VER)
+#ifdef _MSC_VER
/* These functions were added with the VC++ 2013 C runtime library */
#if _MSC_VER >= 1800
#define HAVE_STRTOLL 1
@@ -273,56 +273,34 @@ typedef unsigned int uintptr_t;
#define SDL_TIMER_WINDOWS 1
/* Enable various video drivers */
-#define SDL_VIDEO_DRIVER_DUMMY 1
-#define SDL_VIDEO_DRIVER_OFFSCREEN 1
-#define SDL_VIDEO_DRIVER_WINDOWS 1
-
-#ifndef SDL_VIDEO_RENDER_D3D
-#define SDL_VIDEO_RENDER_D3D 1
-#endif
-#if !defined(SDL_VIDEO_RENDER_D3D11) && defined(HAVE_D3D11_H)
-#define SDL_VIDEO_RENDER_D3D11 1
-#endif
-#if !defined(SDL_VIDEO_RENDER_D3D12)
-#define SDL_VIDEO_RENDER_D3D12 1
+#define SDL_VIDEO_DRIVER_DUMMY 1
+#define SDL_VIDEO_DRIVER_OFFSCREEN 1
+#define SDL_VIDEO_DRIVER_WINDOWS 1
+#define SDL_VIDEO_RENDER_D3D 1
+#ifdef HAVE_D3D11_H
+#define SDL_VIDEO_RENDER_D3D11 1
#endif
+#define SDL_VIDEO_RENDER_D3D12 1
/* Enable OpenGL support */
-#ifndef SDL_VIDEO_OPENGL
-#define SDL_VIDEO_OPENGL 1
-#endif
-#ifndef SDL_VIDEO_OPENGL_WGL
-#define SDL_VIDEO_OPENGL_WGL 1
-#endif
-#ifndef SDL_VIDEO_RENDER_OGL
-#define SDL_VIDEO_RENDER_OGL 1
-#endif
-#ifndef SDL_VIDEO_RENDER_OGL_ES2
-#define SDL_VIDEO_RENDER_OGL_ES2 1
-#endif
-#ifndef SDL_VIDEO_OPENGL_ES2
-#define SDL_VIDEO_OPENGL_ES2 1
-#endif
-#ifndef SDL_VIDEO_OPENGL_EGL
-#define SDL_VIDEO_OPENGL_EGL 1
-#endif
+#define SDL_VIDEO_OPENGL 1
+#define SDL_VIDEO_OPENGL_WGL 1
+#define SDL_VIDEO_RENDER_OGL 1
+#define SDL_VIDEO_RENDER_OGL_ES2 1
+#define SDL_VIDEO_OPENGL_ES2 1
+#define SDL_VIDEO_OPENGL_EGL 1
/* Enable Vulkan support */
#define SDL_VIDEO_VULKAN 1
+#define SDL_VIDEO_RENDER_VULKAN 1
-#if !defined(SDL_GPU_D3D11) && defined(HAVE_D3D11_H)
+/* Enable GPU support */
+#ifdef HAVE_D3D11_H
#define SDL_GPU_D3D11 1
#endif
-#if !defined(SDL_GPU_D3D12)
#define SDL_GPU_D3D12 1
-#endif
-#if !defined(SDL_GPU_VULKAN) && defined(SDL_VIDEO_VULKAN)
#define SDL_GPU_VULKAN 1
-#endif
-
-#ifndef SDL_VIDEO_RENDER_VULKAN
-#define SDL_VIDEO_RENDER_VULKAN 1
-#endif
+#define SDL_VIDEO_RENDER_GPU 1
/* Enable system power support */
#define SDL_POWER_WINDOWS 1
diff --git a/include/build_config/SDL_build_config_wingdk.h b/include/build_config/SDL_build_config_wingdk.h
index 8a89414d13352..061b4413334cc 100644
--- a/include/build_config/SDL_build_config_wingdk.h
+++ b/include/build_config/SDL_build_config_wingdk.h
@@ -139,7 +139,7 @@
#define HAVE_SINF 1
#define HAVE_SQRTF 1
#define HAVE_TANF 1
-#if defined(_MSC_VER)
+#ifdef _MSC_VER
/* These functions were added with the VC++ 2013 C runtime library */
#define HAVE_STRTOLL 1
#define HAVE_STRTOULL 1
@@ -196,52 +196,33 @@
#define SDL_TIMER_WINDOWS 1
/* Enable various video drivers */
-#define SDL_VIDEO_DRIVER_DUMMY 1
-#define SDL_VIDEO_DRIVER_WINDOWS 1
-
-#ifndef SDL_VIDEO_RENDER_D3D
-#define SDL_VIDEO_RENDER_D3D 1
-#endif
-#if !defined(SDL_VIDEO_RENDER_D3D11) && defined(HAVE_D3D11_H)
-#define SDL_VIDEO_RENDER_D3D11 1
-#endif
-#if !defined(SDL_VIDEO_RENDER_D3D12)
-#define SDL_VIDEO_RENDER_D3D12 1
+#define SDL_VIDEO_DRIVER_DUMMY 1
+#define SDL_VIDEO_DRIVER_WINDOWS 1
+#define SDL_VIDEO_RENDER_D3D 1
+#ifdef HAVE_D3D11_H
+#define SDL_VIDEO_RENDER_D3D11 1
#endif
+#define SDL_VIDEO_RENDER_D3D12 1
/* Enable OpenGL support */
-#ifndef SDL_VIDEO_OPENGL
-#define SDL_VIDEO_OPENGL 1
-#endif
-#ifndef SDL_VIDEO_OPENGL_WGL
-#define SDL_VIDEO_OPENGL_WGL 1
-#endif
-#ifndef SDL_VIDEO_RENDER_OGL
-#define SDL_VIDEO_RENDER_OGL 1
-#endif
-#ifndef SDL_VIDEO_RENDER_OGL_ES2
-#define SDL_VIDEO_RENDER_OGL_ES2 1
-#endif
-#ifndef SDL_VIDEO_OPENGL_ES2
-#define SDL_VIDEO_OPENGL_ES2 1
-#endif
-#ifndef SDL_VIDEO_OPENGL_EGL
-#define SDL_VIDEO_OPENGL_EGL 1
-#endif
+#define SDL_VIDEO_OPENGL 1
+#define SDL_VIDEO_OPENGL_WGL 1
+#define SDL_VIDEO_RENDER_OGL 1
+#define SDL_VIDEO_RENDER_OGL_ES2 1
+#define SDL_VIDEO_OPENGL_ES2 1
+#define SDL_VIDEO_OPENGL_EGL 1
/* Enable Vulkan support */
#define SDL_VIDEO_VULKAN 1
+#define SDL_VIDEO_RENDER_VULKAN 1
-
-#if !defined(SDL_GPU_D3D11) && defined(HAVE_D3D11_H)
+/* Enable GPU support */
+#ifdef HAVE_D3D11_H
#define SDL_GPU_D3D11 1
#endif
-#if !defined(SDL_GPU_D3D12)
#define SDL_GPU_D3D12 1
-#endif
-#if !defined(SDL_GPU_VULKAN) && defined(SDL_VIDEO_VULKAN)
#define SDL_GPU_VULKAN 1
-#endif
+#define SDL_VIDEO_RENDER_GPU 1
/* Enable system power support */
#define SDL_POWER_WINDOWS 1
diff --git a/include/build_config/SDL_build_config_xbox.h b/include/build_config/SDL_build_config_xbox.h
index 750667142e75b..2ad0eb7d4e043 100644
--- a/include/build_config/SDL_build_config_xbox.h
+++ b/include/build_config/SDL_build_config_xbox.h
@@ -138,7 +138,7 @@
#define HAVE_SINF 1
#define HAVE_SQRTF 1
#define HAVE_TANF 1
-#if defined(_MSC_VER)
+#ifdef _MSC_VER
/* These functions were added with the VC++ 2013 C runtime library */
#define HAVE_STRTOLL 1
#define HAVE_STRTOULL 1
@@ -193,27 +193,18 @@
#define SDL_TIMER_WINDOWS 1
/* Enable various video drivers */
-#define SDL_VIDEO_DRIVER_DUMMY 1
-#define SDL_VIDEO_DRIVER_WINDOWS 1
+#define SDL_VIDEO_DRIVER_DUMMY 1
+#define SDL_VIDEO_DRIVER_WINDOWS 1
+#define SDL_VIDEO_RENDER_D3D12 1
-#if !defined(SDL_VIDEO_RENDER_D3D12)
-#define SDL_VIDEO_RENDER_D3D12 1
-#endif
+/* Enable OpenGL support */
+#define SDL_VIDEO_OPENGL 1
+#define SDL_VIDEO_OPENGL_WGL 1
+#define SDL_VIDEO_RENDER_OGL 1
-#if !defined(SDL_GPU_D3D12)
+/* Enable GPU support */
#define SDL_GPU_D3D12 1
-#endif
-
-/* Enable OpenGL support */
-#ifndef SDL_VIDEO_OPENGL
-#define SDL_VIDEO_OPENGL 1
-#endif
-#ifndef SDL_VIDEO_OPENGL_WGL
-#define SDL_VIDEO_OPENGL_WGL 1
-#endif
-#ifndef SDL_VIDEO_RENDER_OGL
-#define SDL_VIDEO_RENDER_OGL 1
-#endif
+#define SDL_VIDEO_RENDER_GPU 1
/* Enable system power support */
/*#define SDL_POWER_WINDOWS 1*/
diff --git a/src/SDL_internal.h b/src/SDL_internal.h
index c44f631fc6c1e..a86aa561ac70f 100644
--- a/src/SDL_internal.h
+++ b/src/SDL_internal.h
@@ -191,79 +191,28 @@
#define SDL_HAVE_YUV !SDL_LEAN_AND_MEAN
#endif
-#ifndef SDL_RENDER_DISABLED
-// define the not defined ones as 0
-#ifndef SDL_VIDEO_RENDER_D3D
-#define SDL_VIDEO_RENDER_D3D 0
-#endif
-#ifndef SDL_VIDEO_RENDER_D3D11
-#define SDL_VIDEO_RENDER_D3D11 0
-#endif
-#ifndef SDL_VIDEO_RENDER_D3D12
-#define SDL_VIDEO_RENDER_D3D12 0
-#endif
-#ifndef SDL_VIDEO_RENDER_METAL
-#define SDL_VIDEO_RENDER_METAL 0
-#endif
-#ifndef SDL_VIDEO_RENDER_OGL
-#define SDL_VIDEO_RENDER_OGL 0
-#endif
-#ifndef SDL_VIDEO_RENDER_OGL_ES2
-#define SDL_VIDEO_RENDER_OGL_ES2 0
-#endif
-#ifndef SDL_VIDEO_RENDER_PS2
-#define S
(Patch may be truncated, please check the link at the top of this post.)