gpu: Update GPU support queries to better match naming conventions

This commit is contained in:
Ethan Lee 2024-09-13 23:08:44 -04:00
parent d21c1de651
commit 16ff7503b7
5 changed files with 13 additions and 13 deletions

View File

@ -1688,7 +1688,7 @@ typedef struct SDL_GPUStorageTextureWriteOnlyBinding
*
* \sa SDL_CreateGPUDevice
*/
extern SDL_DECLSPEC SDL_bool SDLCALL SDL_QueryGPUSupport(
extern SDL_DECLSPEC SDL_bool SDLCALL SDL_GPUSupportsShaderFormats(
SDL_GPUShaderFormat format_flags,
const char *name);
@ -1702,7 +1702,7 @@ extern SDL_DECLSPEC SDL_bool SDLCALL SDL_QueryGPUSupport(
*
* \sa SDL_CreateGPUDeviceWithProperties
*/
extern SDL_DECLSPEC SDL_bool SDLCALL SDL_QueryGPUSupportWithProperties(
extern SDL_DECLSPEC SDL_bool SDLCALL SDL_GPUSupportsProperties(
SDL_PropertiesID props);
/**
@ -1720,7 +1720,7 @@ extern SDL_DECLSPEC SDL_bool SDLCALL SDL_QueryGPUSupportWithProperties(
* \sa SDL_GetGPUShaderFormats
* \sa SDL_GetGPUDeviceDriver
* \sa SDL_DestroyGPUDevice
* \sa SDL_QueryGPUSupport
* \sa SDL_GPUSupportsShaderFormats
*/
extern SDL_DECLSPEC SDL_GPUDevice *SDLCALL SDL_CreateGPUDevice(
SDL_GPUShaderFormat format_flags,
@ -1767,7 +1767,7 @@ extern SDL_DECLSPEC SDL_GPUDevice *SDLCALL SDL_CreateGPUDevice(
* \sa SDL_GetGPUShaderFormats
* \sa SDL_GetGPUDeviceDriver
* \sa SDL_DestroyGPUDevice
* \sa SDL_QueryGPUSupportWithProperties
* \sa SDL_GPUSupportsProperties
*/
extern SDL_DECLSPEC SDL_GPUDevice *SDLCALL SDL_CreateGPUDeviceWithProperties(
SDL_PropertiesID props);

View File

@ -192,6 +192,8 @@ SDL3_0.0.0 {
SDL_GL_SetSwapInterval;
SDL_GL_SwapWindow;
SDL_GL_UnloadLibrary;
SDL_GPUSupportsProperties;
SDL_GPUSupportsShaderFormats;
SDL_GPUTextureFormatTexelBlockSize;
SDL_GPUTextureSupportsFormat;
SDL_GPUTextureSupportsSampleCount;
@ -675,8 +677,6 @@ SDL3_0.0.0 {
SDL_PushGPUVertexUniformData;
SDL_PutAudioStreamData;
SDL_QueryGPUFence;
SDL_QueryGPUSupport;
SDL_QueryGPUSupportWithProperties;
SDL_Quit;
SDL_QuitSubSystem;
SDL_RaiseWindow;

View File

@ -217,6 +217,8 @@
#define SDL_GL_SetSwapInterval SDL_GL_SetSwapInterval_REAL
#define SDL_GL_SwapWindow SDL_GL_SwapWindow_REAL
#define SDL_GL_UnloadLibrary SDL_GL_UnloadLibrary_REAL
#define SDL_GPUSupportsProperties SDL_GPUSupportsProperties_REAL
#define SDL_GPUSupportsShaderFormats SDL_GPUSupportsShaderFormats_REAL
#define SDL_GPUTextureFormatTexelBlockSize SDL_GPUTextureFormatTexelBlockSize_REAL
#define SDL_GPUTextureSupportsFormat SDL_GPUTextureSupportsFormat_REAL
#define SDL_GPUTextureSupportsSampleCount SDL_GPUTextureSupportsSampleCount_REAL
@ -700,8 +702,6 @@
#define SDL_PushGPUVertexUniformData SDL_PushGPUVertexUniformData_REAL
#define SDL_PutAudioStreamData SDL_PutAudioStreamData_REAL
#define SDL_QueryGPUFence SDL_QueryGPUFence_REAL
#define SDL_QueryGPUSupport SDL_QueryGPUSupport_REAL
#define SDL_QueryGPUSupportWithProperties SDL_QueryGPUSupportWithProperties_REAL
#define SDL_Quit SDL_Quit_REAL
#define SDL_QuitSubSystem SDL_QuitSubSystem_REAL
#define SDL_RaiseWindow SDL_RaiseWindow_REAL

View File

@ -237,6 +237,8 @@ SDL_DYNAPI_PROC(SDL_bool,SDL_GL_SetAttribute,(SDL_GLattr a, int b),(a,b),return)
SDL_DYNAPI_PROC(SDL_bool,SDL_GL_SetSwapInterval,(int a),(a),return)
SDL_DYNAPI_PROC(SDL_bool,SDL_GL_SwapWindow,(SDL_Window *a),(a),return)
SDL_DYNAPI_PROC(void,SDL_GL_UnloadLibrary,(void),(),)
SDL_DYNAPI_PROC(SDL_bool,SDL_GPUSupportsProperties,(SDL_PropertiesID a),(a),return)
SDL_DYNAPI_PROC(SDL_bool,SDL_GPUSupportsShaderFormats,(SDL_GPUShaderFormat a, const char *b),(a,b),return)
SDL_DYNAPI_PROC(Uint32,SDL_GPUTextureFormatTexelBlockSize,(SDL_GPUTextureFormat a),(a),return)
SDL_DYNAPI_PROC(SDL_bool,SDL_GPUTextureSupportsFormat,(SDL_GPUDevice *a, SDL_GPUTextureFormat b, SDL_GPUTextureType c, SDL_GPUTextureUsageFlags d),(a,b,c,d),return)
SDL_DYNAPI_PROC(SDL_bool,SDL_GPUTextureSupportsSampleCount,(SDL_GPUDevice *a, SDL_GPUTextureFormat b, SDL_GPUSampleCount c),(a,b,c),return)
@ -711,8 +713,6 @@ SDL_DYNAPI_PROC(void,SDL_PushGPUFragmentUniformData,(SDL_GPUCommandBuffer *a, Ui
SDL_DYNAPI_PROC(void,SDL_PushGPUVertexUniformData,(SDL_GPUCommandBuffer *a, Uint32 b, const void *c, Uint32 d),(a,b,c,d),)
SDL_DYNAPI_PROC(SDL_bool,SDL_PutAudioStreamData,(SDL_AudioStream *a, const void *b, int c),(a,b,c),return)
SDL_DYNAPI_PROC(SDL_bool,SDL_QueryGPUFence,(SDL_GPUDevice *a, SDL_GPUFence *b),(a,b),return)
SDL_DYNAPI_PROC(SDL_bool,SDL_QueryGPUSupport,(SDL_GPUShaderFormat a, const char *b),(a,b),return)
SDL_DYNAPI_PROC(SDL_bool,SDL_QueryGPUSupportWithProperties,(SDL_PropertiesID a),(a),return)
SDL_DYNAPI_PROC(void,SDL_Quit,(void),(),)
SDL_DYNAPI_PROC(void,SDL_QuitSubSystem,(SDL_InitFlags a),(a),)
SDL_DYNAPI_PROC(SDL_bool,SDL_RaiseWindow,(SDL_Window *a),(a),return)

View File

@ -468,7 +468,7 @@ static void SDL_GPU_FillProperties(
SDL_SetStringProperty(props, SDL_PROP_GPU_DEVICE_CREATE_NAME_STRING, name);
}
SDL_bool SDL_QueryGPUSupport(
SDL_bool SDL_GPUSupportsShaderFormats(
SDL_GPUShaderFormat format_flags,
const char *name)
{
@ -476,7 +476,7 @@ SDL_bool SDL_QueryGPUSupport(
bool result;
SDL_PropertiesID props = SDL_CreateProperties();
SDL_GPU_FillProperties(props, format_flags, SDL_FALSE, name);
result = SDL_QueryGPUSupportWithProperties(props);
result = SDL_GPUSupportsProperties(props);
SDL_DestroyProperties(props);
return result;
#else
@ -485,7 +485,7 @@ SDL_bool SDL_QueryGPUSupport(
#endif
}
SDL_bool SDL_QueryGPUSupportWithProperties(SDL_PropertiesID props)
SDL_bool SDL_GPUSupportsProperties(SDL_PropertiesID props)
{
#ifndef SDL_GPU_DISABLED
return (SDL_GPUSelectBackend(props) != NULL);