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
This commit is contained in:
Sam Lantinga 2024-09-05 06:37:20 -07:00
parent e3fd581aca
commit 387774ab8a
59 changed files with 212 additions and 306 deletions

View File

@ -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" />

View File

@ -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" />

View File

@ -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>

View File

@ -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 */,

View File

@ -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@

View File

@ -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

View File

@ -211,66 +211,33 @@
#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
#define SDL_GPU_METAL 1
#define SDL_VIDEO_VULKAN 1
#define SDL_GPU_VULKAN 1
#define SDL_VIDEO_RENDER_GPU 1
#endif
#endif
#define SDL_GPU_METAL SDL_VIDEO_METAL
/* Enable system power support */
#define SDL_POWER_MACOSX 1

View File

@ -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

View File

@ -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

View File

@ -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
#if !defined(SDL_VIDEO_RENDER_D3D12)
#define SDL_VIDEO_RENDER_D3D12 1
#endif
#if !defined(SDL_GPU_D3D12)
#define SDL_GPU_D3D12 1
#endif
#define SDL_VIDEO_DRIVER_DUMMY 1
#define SDL_VIDEO_DRIVER_WINDOWS 1
#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
#define SDL_VIDEO_OPENGL 1
#define SDL_VIDEO_OPENGL_WGL 1
#define SDL_VIDEO_RENDER_OGL 1
/* Enable GPU support */
#define SDL_GPU_D3D12 1
#define SDL_VIDEO_RENDER_GPU 1
/* Enable system power support */
/*#define SDL_POWER_WINDOWS 1*/

View File

@ -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 SDL_VIDEO_RENDER_PS2 0
#endif
#ifndef SDL_VIDEO_RENDER_PSP
#define SDL_VIDEO_RENDER_PSP 0
#endif
#ifndef SDL_VIDEO_RENDER_VITA_GXM
#define SDL_VIDEO_RENDER_VITA_GXM 0
#endif
#ifndef SDL_VIDEO_RENDER_VULKAN
#define SDL_VIDEO_RENDER_VULKAN 0
#endif
#else // define all as 0
#ifdef SDL_RENDER_DISABLED
#undef SDL_VIDEO_RENDER_SW
#define SDL_VIDEO_RENDER_SW 0
#undef SDL_VIDEO_RENDER_D3D
#define SDL_VIDEO_RENDER_D3D 0
#undef SDL_VIDEO_RENDER_D3D11
#define SDL_VIDEO_RENDER_D3D11 0
#undef SDL_VIDEO_RENDER_D3D12
#define SDL_VIDEO_RENDER_D3D12 0
#undef SDL_VIDEO_RENDER_GPU
#undef SDL_VIDEO_RENDER_METAL
#define SDL_VIDEO_RENDER_METAL 0
#undef SDL_VIDEO_RENDER_OGL
#define SDL_VIDEO_RENDER_OGL 0
#undef SDL_VIDEO_RENDER_OGL_ES2
#define SDL_VIDEO_RENDER_OGL_ES2 0
#undef SDL_VIDEO_RENDER_PS2
#define SDL_VIDEO_RENDER_PS2 0
#undef SDL_VIDEO_RENDER_PSP
#define SDL_VIDEO_RENDER_PSP 0
#undef SDL_VIDEO_RENDER_VITA_GXM
#define SDL_VIDEO_RENDER_VITA_GXM 0
#undef SDL_VIDEO_RENDER_VULKAN
#define SDL_VIDEO_RENDER_VULKAN 0
#endif // SDL_RENDER_DISABLED
#define SDL_HAS_RENDER_DRIVER \
(SDL_VIDEO_RENDER_SW | \
SDL_VIDEO_RENDER_D3D | \
SDL_VIDEO_RENDER_D3D11 | \
SDL_VIDEO_RENDER_D3D12 | \
SDL_VIDEO_RENDER_METAL | \
SDL_VIDEO_RENDER_OGL | \
SDL_VIDEO_RENDER_OGL_ES2 | \
SDL_VIDEO_RENDER_PS2 | \
SDL_VIDEO_RENDER_PSP | \
SDL_VIDEO_RENDER_VITA_GXM | \
SDL_VIDEO_RENDER_VULKAN )
#if !defined(SDL_RENDER_DISABLED) && !SDL_HAS_RENDER_DRIVER
#error SDL_RENDER enabled without any backend drivers.
#endif
#ifdef SDL_GPU_DISABLED
#undef SDL_GPU_D3D11
#undef SDL_GPU_D3D12
#undef SDL_GPU_METAL
#undef SDL_GPU_VULKAN
#undef SDL_VIDEO_RENDER_GPU
#endif // SDL_GPU_DISABLED
#if !defined(HAVE_LIBC)
// If not using _any_ C runtime, these have to be defined before SDL_thread.h

View File

@ -53,7 +53,7 @@ extern "C" {
#include "SDL_winrtapp_common.h"
#include "SDL_winrtapp_direct3d.h"
#if SDL_VIDEO_RENDER_D3D11
#ifdef SDL_VIDEO_RENDER_D3D11
/* Calling IDXGIDevice3::Trim on the active Direct3D 11.x device is necessary
* when Windows 8.1 apps are about to get suspended.
*/
@ -609,7 +609,7 @@ void SDL_WinRTApp::OnSuspending(Platform::Object ^ sender, SuspendingEventArgs ^
// Let the Direct3D 11 renderer prepare for the app to be backgrounded.
// This is necessary for Windows 8.1, possibly elsewhere in the future.
// More details at: http://msdn.microsoft.com/en-us/library/windows/apps/Hh994929.aspx
#if SDL_VIDEO_RENDER_D3D11
#ifdef SDL_VIDEO_RENDER_D3D11
if (WINRT_GlobalSDLWindow) {
SDL_Renderer *renderer = SDL_GetRenderer(WINRT_GlobalSDLWindow);
if (renderer && (SDL_strcmp(renderer->name, "direct3d11") == 0)) {

View File

@ -95,5 +95,3 @@ extern bool SDL_InitPen(void);
extern void SDL_QuitPen(void);
#endif // SDL_pen_c_h_
// vi: set ts=4 sw=4 expandtab:

View File

@ -141,5 +141,3 @@ char *SDL_SYS_GetUserFolder(SDL_Folder folder)
SDL_Unsupported();
return NULL;
}
// vi: set ts=4 sw=4 expandtab:

View File

@ -127,7 +127,7 @@ static const SDL_GPUBootstrap *backends[] = {
#ifdef SDL_GPU_D3D12
&D3D12Driver,
#endif
#if defined(SDL_GPU_VULKAN) && SDL_GPU_VULKAN
#ifdef SDL_GPU_VULKAN
&VulkanDriver,
#endif
#ifdef SDL_GPU_D3D11

View File

@ -21,7 +21,7 @@
#include "SDL_internal.h"
#if SDL_GPU_D3D11
#ifdef SDL_GPU_D3D11
#define D3D11_NO_HELPERS
#define CINTERFACE

View File

@ -21,7 +21,7 @@
#include "SDL_internal.h"
#if SDL_GPU_D3D12
#ifdef SDL_GPU_D3D12
#include "../../video/directx/SDL_d3d12.h"
#include "../SDL_sysgpu.h"

View File

@ -21,7 +21,7 @@
#include "SDL_internal.h"
#if SDL_GPU_METAL
#ifdef SDL_GPU_METAL
#include <Metal/Metal.h>
#include <QuartzCore/CoreAnimation.h>

View File

@ -21,7 +21,7 @@
#include "SDL_internal.h"
#if SDL_GPU_VULKAN
#ifdef SDL_GPU_VULKAN
// Needed for VK_KHR_portability_subset
#define VK_ENABLE_BETA_EXTENSIONS

View File

@ -20,7 +20,10 @@
*/
#include "SDL_internal.h"
#if (SDL_VIDEO_RENDER_D3D || SDL_VIDEO_RENDER_D3D11 || SDL_VIDEO_RENDER_D3D12 || SDL_VIDEO_RENDER_VULKAN)
#if defined(SDL_VIDEO_RENDER_D3D) || \
defined(SDL_VIDEO_RENDER_D3D11) || \
defined(SDL_VIDEO_RENDER_D3D12) || \
defined(SDL_VIDEO_RENDER_VULKAN)
#include "SDL_d3dmath.h"
@ -129,4 +132,4 @@ Float4X4 MatrixRotationZ(float r)
return m;
}
#endif // (SDL_VIDEO_RENDER_D3D || SDL_VIDEO_RENDER_D3D11 || SDL_VIDEO_RENDER_D3D12)
#endif // SDL_VIDEO_RENDER_D3D || SDL_VIDEO_RENDER_D3D11 || SDL_VIDEO_RENDER_D3D12 || SDL_VIDEO_RENDER_VULKAN

View File

@ -20,7 +20,11 @@
*/
#include "SDL_internal.h"
#if (SDL_VIDEO_RENDER_D3D || SDL_VIDEO_RENDER_D3D11 || SDL_VIDEO_RENDER_D3D12 || SDL_VIDEO_RENDER_VULKAN || SDL_VIDEO_RENDER_GPU)
#if defined(SDL_VIDEO_RENDER_D3D) || \
defined(SDL_VIDEO_RENDER_D3D11) || \
defined(SDL_VIDEO_RENDER_D3D12) || \
defined(SDL_VIDEO_RENDER_GPU) || \
defined(SDL_VIDEO_RENDER_VULKAN)
// Set up for C function definitions, even when using C++
#ifdef __cplusplus
@ -78,4 +82,4 @@ extern Float4X4 MatrixRotationZ(float r);
}
#endif
#endif // (SDL_VIDEO_RENDER_D3D || SDL_VIDEO_RENDER_D3D11 || SDL_VIDEO_RENDER_D3D12 || SDL_VIDEO_RENDER_VULKAN)
#endif // SDL_VIDEO_RENDER_D3D || SDL_VIDEO_RENDER_D3D11 || SDL_VIDEO_RENDER_D3D12 || SDL_VIDEO_RENDER_VULKAN

View File

@ -104,47 +104,46 @@ this should probably be removed at some point in the future. --ryan. */
SDL_COMPOSE_BLENDMODE(SDL_BLENDFACTOR_DST_COLOR, SDL_BLENDFACTOR_ONE_MINUS_SRC_ALPHA, SDL_BLENDOPERATION_ADD, \
SDL_BLENDFACTOR_ZERO, SDL_BLENDFACTOR_ONE, SDL_BLENDOPERATION_ADD)
#ifndef SDL_RENDER_DISABLED
static const SDL_RenderDriver *render_drivers[] = {
// Temporarily list the GPU renderer first so we get testing feedback
#if SDL_VIDEO_RENDER_GPU
#ifdef SDL_VIDEO_RENDER_GPU
&GPU_RenderDriver,
#endif
#if SDL_VIDEO_RENDER_D3D11
#ifdef SDL_VIDEO_RENDER_D3D11
&D3D11_RenderDriver,
#endif
#if SDL_VIDEO_RENDER_D3D12
#ifdef SDL_VIDEO_RENDER_D3D12
&D3D12_RenderDriver,
#endif
#if SDL_VIDEO_RENDER_D3D
#ifdef SDL_VIDEO_RENDER_D3D
&D3D_RenderDriver,
#endif
#if SDL_VIDEO_RENDER_METAL
#ifdef SDL_VIDEO_RENDER_METAL
&METAL_RenderDriver,
#endif
#if SDL_VIDEO_RENDER_OGL
#ifdef SDL_VIDEO_RENDER_OGL
&GL_RenderDriver,
#endif
#if SDL_VIDEO_RENDER_OGL_ES2
#ifdef SDL_VIDEO_RENDER_OGL_ES2
&GLES2_RenderDriver,
#endif
#if SDL_VIDEO_RENDER_PS2
#ifdef SDL_VIDEO_RENDER_PS2
&PS2_RenderDriver,
#endif
#if SDL_VIDEO_RENDER_PSP
#ifdef SDL_VIDEO_RENDER_PSP
&PSP_RenderDriver,
#endif
#if SDL_VIDEO_RENDER_VITA_GXM
#ifdef SDL_VIDEO_RENDER_VITA_GXM
&VITA_GXM_RenderDriver,
#endif
#if SDL_VIDEO_RENDER_VULKAN
#ifdef SDL_VIDEO_RENDER_VULKAN
&VULKAN_RenderDriver,
#endif
#if SDL_VIDEO_RENDER_SW
#ifdef SDL_VIDEO_RENDER_SW
&SW_RenderDriver,
#endif
NULL
};
#endif // !SDL_RENDER_DISABLED
static SDL_Renderer *SDL_renderers;
@ -800,11 +799,7 @@ static bool UpdateLogicalPresentation(SDL_Renderer *renderer);
int SDL_GetNumRenderDrivers(void)
{
#ifndef SDL_RENDER_DISABLED
return SDL_arraysize(render_drivers);
#else
return 0;
#endif
return SDL_arraysize(render_drivers) - 1;
}
const char *SDL_GetRenderDriver(int index)
@ -1000,7 +995,7 @@ SDL_Renderer *SDL_CreateRendererWithProperties(SDL_PropertiesID props)
}
if (surface) {
#if SDL_VIDEO_RENDER_SW
#ifdef SDL_VIDEO_RENDER_SW
const bool rc = SW_CreateRendererForSurface(renderer, surface, props);
#else
const bool rc = SDL_SetError("SDL not built with software renderer");
@ -1172,7 +1167,7 @@ SDL_Renderer *SDL_CreateRenderer(SDL_Window *window, const char *name)
SDL_Renderer *SDL_CreateSoftwareRenderer(SDL_Surface *surface)
{
#if SDL_VIDEO_RENDER_SW
#ifdef SDL_VIDEO_RENDER_SW
SDL_Renderer *renderer;
if (!surface) {
@ -4423,7 +4418,7 @@ SDL_bool SDL_RenderGeometry(SDL_Renderer *renderer,
}
}
#if SDL_VIDEO_RENDER_SW
#ifdef SDL_VIDEO_RENDER_SW
static bool remap_one_indice(
int prev,
int k,
@ -4894,7 +4889,7 @@ SDL_bool SDL_RenderGeometryRaw(SDL_Renderer *renderer,
}
// For the software renderer, try to reinterpret triangles as SDL_Rect
#if SDL_VIDEO_RENDER_SW
#ifdef SDL_VIDEO_RENDER_SW
if (renderer->software && texture_address_mode == SDL_TEXTURE_ADDRESS_CLAMP) {
return SDL_SW_RenderGeometryRaw(renderer, texture,
xy, xy_stride, color, color_stride, uv, uv_stride, num_vertices,
@ -5340,7 +5335,7 @@ SDL_bool SDL_SetRenderVSync(SDL_Renderer *renderer, int vsync)
renderer->wanted_vsync = vsync ? true : false;
// for the software renderer, forward the call to the WindowTexture renderer
#if SDL_VIDEO_RENDER_SW
#ifdef SDL_VIDEO_RENDER_SW
if (renderer->software) {
if (!renderer->window) {
if (!vsync) {

View File

@ -20,7 +20,7 @@
*/
#include "SDL_internal.h"
#if SDL_VIDEO_RENDER_D3D
#ifdef SDL_VIDEO_RENDER_D3D
#include "../../core/windows/SDL_windows.h"
@ -29,10 +29,8 @@
#include "../../video/windows/SDL_windowsvideo.h"
#include "../../video/SDL_pixels_c.h"
#if SDL_VIDEO_RENDER_D3D
#define D3D_DEBUG_INFO
#include <d3d9.h>
#endif
#include "SDL_shaders_d3d.h"
@ -1776,4 +1774,4 @@ static bool D3D_CreateRenderer(SDL_Renderer *renderer, SDL_Window *window, SDL_P
SDL_RenderDriver D3D_RenderDriver = {
D3D_CreateRenderer, "direct3d"
};
#endif // SDL_VIDEO_RENDER_D3D && !SDL_RENDER_DISABLED
#endif // SDL_VIDEO_RENDER_D3D

View File

@ -20,7 +20,7 @@
*/
#include "SDL_internal.h"
#if SDL_VIDEO_RENDER_D3D
#ifdef SDL_VIDEO_RENDER_D3D
#include "../../core/windows/SDL_windows.h"

View File

@ -20,7 +20,7 @@
*/
#include "SDL_internal.h"
#if SDL_VIDEO_RENDER_D3D11
#ifdef SDL_VIDEO_RENDER_D3D11
#define COBJMACROS
#include "../../core/windows/SDL_windows.h"
@ -2893,4 +2893,4 @@ SDL_RenderDriver D3D11_RenderDriver = {
D3D11_CreateRenderer, "direct3d11"
};
#endif // SDL_VIDEO_RENDER_D3D11 && !SDL_RENDER_DISABLED
#endif // SDL_VIDEO_RENDER_D3D11

View File

@ -20,7 +20,7 @@
*/
#include "SDL_internal.h"
#if SDL_VIDEO_RENDER_D3D11
#ifdef SDL_VIDEO_RENDER_D3D11
#include "../../video/winrt/SDL_winrtvideo_cpp.h"
extern "C" {

View File

@ -20,7 +20,7 @@
*/
#include "SDL_internal.h"
#if SDL_VIDEO_RENDER_D3D11
#ifdef SDL_VIDEO_RENDER_D3D11
#ifdef __cplusplus
extern "C" {

View File

@ -20,7 +20,7 @@
*/
#include "SDL_internal.h"
#if SDL_VIDEO_RENDER_D3D11
#ifdef SDL_VIDEO_RENDER_D3D11
#define COBJMACROS
#include "../../core/windows/SDL_windows.h"

View File

@ -20,7 +20,7 @@
*/
#include "SDL_internal.h"
#if SDL_VIDEO_RENDER_D3D12
#ifdef SDL_VIDEO_RENDER_D3D12
#define SDL_D3D12_NUM_BUFFERS 2
#define SDL_D3D12_NUM_VERTEX_BUFFERS 256
@ -3286,4 +3286,4 @@ SDL_RenderDriver D3D12_RenderDriver = {
}
#endif
#endif // SDL_VIDEO_RENDER_D3D12 && !SDL_RENDER_DISABLED
#endif // SDL_VIDEO_RENDER_D3D12

View File

@ -20,7 +20,7 @@
*/
#include "../../SDL_internal.h"
#if SDL_VIDEO_RENDER_D3D12 && (defined(SDL_PLATFORM_XBOXONE) || defined(SDL_PLATFORM_XBOXSERIES))
#if defined(SDL_VIDEO_RENDER_D3D12) && (defined(SDL_PLATFORM_XBOXONE) || defined(SDL_PLATFORM_XBOXSERIES))
#include "SDL_render_d3d12_xbox.h"
#include "../../core/windows/SDL_windows.h"
#include <XGameRuntime.h>
@ -171,4 +171,4 @@ void D3D12_XBOX_GetResolution(Uint32 *width, Uint32 *height)
}
}
#endif
#endif // SDL_VIDEO_RENDER_D3D12 && (SDL_PLATFORM_XBOXONE || SDL_PLATFORM_XBOXSERIES)

View File

@ -20,7 +20,7 @@
*/
#include "SDL_internal.h"
#if SDL_VIDEO_RENDER_D3D12 && !defined(SDL_PLATFORM_XBOXONE) && !defined(SDL_PLATFORM_XBOXSERIES)
#if defined(SDL_VIDEO_RENDER_D3D12) && !defined(SDL_PLATFORM_XBOXONE) && !defined(SDL_PLATFORM_XBOXSERIES)
#include "../../core/windows/SDL_windows.h"
#include "../../video/directx/SDL_d3d12.h"
@ -122,4 +122,4 @@ void D3D12_GetRootSignatureData(D3D12_RootSignature rootSig, D3D12_SHADER_BYTECO
outBytecode->BytecodeLength = D3D12_rootsigs[rootSig].rs_shader_size;
}
#endif // SDL_VIDEO_RENDER_D3D12 && !defined(SDL_PLATFORM_XBOXONE) && !defined(SDL_PLATFORM_XBOXSERIES)
#endif // SDL_VIDEO_RENDER_D3D12 && !SDL_PLATFORM_XBOXONE && !SDL_PLATFORM_XBOXSERIES

View File

@ -20,7 +20,7 @@
*/
#include "../../SDL_internal.h"
#if SDL_VIDEO_RENDER_D3D12 && defined(SDL_PLATFORM_XBOXONE)
#if defined(SDL_VIDEO_RENDER_D3D12) && defined(SDL_PLATFORM_XBOXONE)
#include <SDL3/SDL_stdinc.h>
@ -128,6 +128,5 @@ void D3D12_GetRootSignatureData(D3D12_RootSignature rootSig, D3D12_SHADER_BYTECO
outBytecode->BytecodeLength = D3D12_rootsigs[rootSig].rs_shader_size;
}
#endif // SDL_VIDEO_RENDER_D3D12 && defined(SDL_PLATFORM_XBOXONE)
#endif // SDL_VIDEO_RENDER_D3D12 && SDL_PLATFORM_XBOXONE
// vi: set ts=4 sw=4 expandtab:

View File

@ -20,7 +20,7 @@
*/
#include "../../SDL_internal.h"
#if SDL_VIDEO_RENDER_D3D12 && defined(SDL_PLATFORM_XBOXSERIES)
#if defined(SDL_VIDEO_RENDER_D3D12) && defined(SDL_PLATFORM_XBOXSERIES)
#include <SDL3/SDL_stdinc.h>
@ -129,6 +129,5 @@ void D3D12_GetRootSignatureData(D3D12_RootSignature rootSig, D3D12_SHADER_BYTECO
outBytecode->BytecodeLength = D3D12_rootsigs[rootSig].rs_shader_size;
}
#endif // SDL_VIDEO_RENDER_D3D12 && defined(SDL_PLATFORM_XBOXSERIES)
#endif // SDL_VIDEO_RENDER_D3D12 && SDL_PLATFORM_XBOXSERIES
// vi: set ts=4 sw=4 expandtab:

View File

@ -20,7 +20,7 @@
*/
#include "SDL_internal.h"
#if SDL_VIDEO_RENDER_METAL
#ifdef SDL_VIDEO_RENDER_METAL
#include "../SDL_sysrender.h"
#include "../../video/SDL_pixels_c.h"

View File

@ -20,7 +20,7 @@
*/
#include "SDL_internal.h"
#if SDL_VIDEO_RENDER_OGL
#ifdef SDL_VIDEO_RENDER_OGL
#include "../../video/SDL_sysvideo.h" // For SDL_RecreateWindow
#include <SDL3/SDL_opengl.h>
#include "../SDL_sysrender.h"

View File

@ -20,7 +20,7 @@
*/
#include "SDL_internal.h"
#if SDL_VIDEO_RENDER_OGL
#ifdef SDL_VIDEO_RENDER_OGL
#include <SDL3/SDL_opengl.h>
#include "SDL_shaders_gl.h"

View File

@ -20,7 +20,7 @@
*/
#include "SDL_internal.h"
#if SDL_VIDEO_RENDER_OGL_ES2
#ifdef SDL_VIDEO_RENDER_OGL_ES2
#include "../../video/SDL_sysvideo.h" // For SDL_RecreateWindow
#include <SDL3/SDL_opengles2.h>

View File

@ -20,7 +20,7 @@
*/
#include "SDL_internal.h"
#if SDL_VIDEO_RENDER_OGL_ES2
#ifdef SDL_VIDEO_RENDER_OGL_ES2
#include <SDL3/SDL_opengles2.h>
#include "SDL_shaders_gles2.h"

View File

@ -23,7 +23,7 @@
#ifndef SDL_shaders_gles2_h_
#define SDL_shaders_gles2_h_
#if SDL_VIDEO_RENDER_OGL_ES2
#ifdef SDL_VIDEO_RENDER_OGL_ES2
typedef enum
{

View File

@ -20,7 +20,7 @@
*/
#include "SDL_internal.h"
#if SDL_VIDEO_RENDER_PS2
#ifdef SDL_VIDEO_RENDER_PS2
#include "../SDL_sysrender.h"

View File

@ -20,7 +20,7 @@
*/
#include "SDL_internal.h"
#if SDL_VIDEO_RENDER_PSP
#ifdef SDL_VIDEO_RENDER_PSP
#include "../SDL_sysrender.h"

View File

@ -20,7 +20,7 @@
*/
#include "SDL_internal.h"
#if SDL_VIDEO_RENDER_GPU
#ifdef SDL_VIDEO_RENDER_GPU
#include "SDL_gpu_util.h"
#include "SDL_pipeline_gpu.h"
@ -222,4 +222,4 @@ SDL_GPUGraphicsPipeline *GPU_GetPipeline(GPU_PipelineCache *cache, GPU_Shaders *
return pipeline;
}
#endif
#endif // SDL_VIDEO_RENDER_GPU

View File

@ -20,7 +20,8 @@
*/
#include "SDL_internal.h"
#if SDL_VIDEO_RENDER_GPU
#ifdef SDL_VIDEO_RENDER_GPU
#include "../../video/SDL_pixels_c.h"
#include "../SDL_d3dmath.h"
#include "../SDL_sysrender.h"
@ -252,7 +253,7 @@ static bool GPU_UpdateTexture(SDL_Renderer *renderer, SDL_Texture *texture,
if (!SDL_size_mul_check_overflow(rect->w, texturebpp, &row_size) ||
!SDL_size_mul_check_overflow(rect->h, row_size, &data_size)) {
return SDL_SetError("update size overflow");
return SDL_SetError("update size overflow");
}
SDL_GPUTransferBufferCreateInfo tbci;

View File

@ -20,7 +20,7 @@
*/
#include "SDL_internal.h"
#if SDL_VIDEO_RENDER_GPU
#ifdef SDL_VIDEO_RENDER_GPU
#include "SDL_shaders_gpu.h"

View File

@ -20,7 +20,7 @@
*/
#include "SDL_internal.h"
#if SDL_VIDEO_RENDER_SW
#ifdef SDL_VIDEO_RENDER_SW
#include "SDL_draw.h"
#include "SDL_blendfillrect.h"

View File

@ -20,7 +20,7 @@
*/
#include "SDL_internal.h"
#if SDL_VIDEO_RENDER_SW
#ifdef SDL_VIDEO_RENDER_SW
#include "SDL_draw.h"
#include "SDL_blendline.h"

View File

@ -20,7 +20,7 @@
*/
#include "SDL_internal.h"
#if SDL_VIDEO_RENDER_SW
#ifdef SDL_VIDEO_RENDER_SW
#include "SDL_draw.h"
#include "SDL_blendpoint.h"

View File

@ -20,7 +20,7 @@
*/
#include "SDL_internal.h"
#if SDL_VIDEO_RENDER_SW
#ifdef SDL_VIDEO_RENDER_SW
#include "SDL_draw.h"
#include "SDL_drawline.h"

View File

@ -20,7 +20,7 @@
*/
#include "SDL_internal.h"
#if SDL_VIDEO_RENDER_SW
#ifdef SDL_VIDEO_RENDER_SW
#include "SDL_draw.h"
#include "SDL_drawpoint.h"

View File

@ -20,7 +20,7 @@
*/
#include "SDL_internal.h"
#if SDL_VIDEO_RENDER_SW
#ifdef SDL_VIDEO_RENDER_SW
#include "../SDL_sysrender.h"
#include "SDL_render_sw_c.h"

View File

@ -30,7 +30,7 @@ Andreas Schiffler -- aschiffler at ferzkopp dot net
*/
#include "SDL_internal.h"
#if SDL_VIDEO_RENDER_SW
#ifdef SDL_VIDEO_RENDER_SW
#if defined(SDL_PLATFORM_WIN32) || defined(SDL_PLATFORM_GDK)
#include "../../core/windows/SDL_windows.h"

View File

@ -20,7 +20,7 @@
*/
#include "SDL_internal.h"
#if SDL_VIDEO_RENDER_SW
#ifdef SDL_VIDEO_RENDER_SW
#include <limits.h>

View File

@ -20,7 +20,7 @@
*/
#include "SDL_internal.h"
#if SDL_VIDEO_RENDER_VITA_GXM
#ifdef SDL_VIDEO_RENDER_VITA_GXM
#include "../SDL_sysrender.h"

View File

@ -21,7 +21,7 @@
#include "SDL_internal.h"
#if SDL_VIDEO_RENDER_VITA_GXM
#ifdef SDL_VIDEO_RENDER_VITA_GXM
#include "SDL_render_vita_gxm_memory.h"

View File

@ -20,7 +20,7 @@
*/
#include "SDL_internal.h"
#if SDL_VIDEO_RENDER_VITA_GXM
#ifdef SDL_VIDEO_RENDER_VITA_GXM
#include "../SDL_sysrender.h"

View File

@ -20,7 +20,7 @@
*/
#include "SDL_internal.h"
#if SDL_VIDEO_RENDER_VULKAN
#ifdef SDL_VIDEO_RENDER_VULKAN
#define SDL_VULKAN_FRAME_QUEUE_DEPTH 2
#define SDL_VULKAN_NUM_VERTEX_BUFFERS 256

View File

@ -20,7 +20,7 @@
*/
#include "SDL_internal.h"
#if SDL_VIDEO_RENDER_VULKAN
#ifdef SDL_VIDEO_RENDER_VULKAN
#include "SDL_shaders_vulkan.h"

View File

@ -26,13 +26,13 @@
#include "SDL_vitamessagebox.h"
#include <psp2/message_dialog.h>
#if SDL_VIDEO_RENDER_VITA_GXM
#ifdef SDL_VIDEO_RENDER_VITA_GXM
#include "../../render/vitagxm/SDL_render_vita_gxm_tools.h"
#endif // SDL_VIDEO_RENDER_VITA_GXM
bool VITA_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonID)
{
#if SDL_VIDEO_RENDER_VITA_GXM
#ifdef SDL_VIDEO_RENDER_VITA_GXM
SceMsgDialogParam param;
SceMsgDialogUserMessageParam msgParam;
SceMsgDialogButtonsParam buttonParam;
@ -119,7 +119,7 @@ bool VITA_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonID
(void)messageboxdata;
(void)buttonID;
return SDL_Unsupported();
#endif
#endif // SDL_VIDEO_RENDER_VITA_GXM
}
#endif // SDL_VIDEO_DRIVER_VITA

View File

@ -440,7 +440,7 @@ void X11_HandleXinput2Event(SDL_VideoDevice *_this, XGenericEventCookie *cookie)
case XI_Motion:
{
const XIDeviceEvent *xev = (const XIDeviceEvent *)cookie->data;
#if SDL_VIDEO_DRIVER_X11_XINPUT2_SUPPORTS_MULTITOUCH
#ifdef SDL_VIDEO_DRIVER_X11_XINPUT2_SUPPORTS_MULTITOUCH
bool pointer_emulated = ((xev->flags & XIPointerEmulated) != 0);
#else
bool pointer_emulated = false;
@ -478,7 +478,7 @@ void X11_HandleXinput2Event(SDL_VideoDevice *_this, XGenericEventCookie *cookie)
}
} break;
#if SDL_VIDEO_DRIVER_X11_XINPUT2_SUPPORTS_MULTITOUCH
#ifdef SDL_VIDEO_DRIVER_X11_XINPUT2_SUPPORTS_MULTITOUCH
case XI_TouchBegin:
{
const XIDeviceEvent *xev = (const XIDeviceEvent *)cookie->data;