Reverted SDL_Vulkan_GetInstanceExtensions() API change
This function is commonly used with Vulkan structures that use uint32_t, so we should keep the Uint32 signature.main
parent
edbcef11ff
commit
9db68f97f9
|
@ -149,15 +149,14 @@ extern DECLSPEC void SDLCALL SDL_Vulkan_UnloadLibrary(void);
|
|||
*
|
||||
* You should not free the returned array; it is owned by SDL.
|
||||
*
|
||||
* \param count A pointer to an int that will be filled with the number of
|
||||
* extensions returned.
|
||||
* \param count a pointer filled in with the number of extensions returned.
|
||||
* \returns An array of extension name strings on success, NULL on error.
|
||||
*
|
||||
* \since This function is available since SDL 3.0.0.
|
||||
*
|
||||
* \sa SDL_Vulkan_CreateSurface
|
||||
*/
|
||||
extern DECLSPEC char const* const* SDLCALL SDL_Vulkan_GetInstanceExtensions(int *count);
|
||||
extern DECLSPEC char const* const* SDLCALL SDL_Vulkan_GetInstanceExtensions(Uint32 *count);
|
||||
|
||||
/**
|
||||
* Create a Vulkan rendering surface for a window.
|
||||
|
|
|
@ -688,7 +688,7 @@ SDL_DYNAPI_PROC(int,SDL_UpdateWindowSurface,(SDL_Window *a),(a),return)
|
|||
SDL_DYNAPI_PROC(int,SDL_UpdateWindowSurfaceRects,(SDL_Window *a, const SDL_Rect *b, int c),(a,b,c),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_UpdateYUVTexture,(SDL_Texture *a, const SDL_Rect *b, const Uint8 *c, int d, const Uint8 *e, int f, const Uint8 *g, int h),(a,b,c,d,e,f,g,h),return)
|
||||
SDL_DYNAPI_PROC(SDL_bool,SDL_Vulkan_CreateSurface,(SDL_Window *a, VkInstance b, const struct VkAllocationCallbacks *c, VkSurfaceKHR *d),(a,b,c,d),return)
|
||||
SDL_DYNAPI_PROC(char const* const*,SDL_Vulkan_GetInstanceExtensions,(int *a),(a),return)
|
||||
SDL_DYNAPI_PROC(char const* const*,SDL_Vulkan_GetInstanceExtensions,(Uint32 *a),(a),return)
|
||||
SDL_DYNAPI_PROC(SDL_FunctionPointer,SDL_Vulkan_GetVkGetInstanceProcAddr,(void),(),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_Vulkan_LoadLibrary,(const char *a),(a),return)
|
||||
SDL_DYNAPI_PROC(void,SDL_Vulkan_UnloadLibrary,(void),(),)
|
||||
|
|
|
@ -1708,7 +1708,7 @@ static VkResult VULKAN_CreateDeviceResources(SDL_Renderer *renderer, SDL_Propert
|
|||
appInfo.apiVersion = VK_API_VERSION_1_0;
|
||||
instanceCreateInfo.sType = VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO;
|
||||
instanceCreateInfo.pApplicationInfo = &appInfo;
|
||||
char const *const *instanceExtensions = SDL_Vulkan_GetInstanceExtensions((int *)&instanceCreateInfo.enabledExtensionCount);
|
||||
char const *const *instanceExtensions = SDL_Vulkan_GetInstanceExtensions(&instanceCreateInfo.enabledExtensionCount);
|
||||
|
||||
const char **instanceExtensionsCopy = SDL_calloc(instanceCreateInfo.enabledExtensionCount + 2, sizeof(const char *));
|
||||
for (uint32_t i = 0; i < instanceCreateInfo.enabledExtensionCount; i++) {
|
||||
|
|
|
@ -5217,9 +5217,9 @@ void SDL_Vulkan_UnloadLibrary(void)
|
|||
}
|
||||
}
|
||||
|
||||
char const* const* SDL_Vulkan_GetInstanceExtensions(int *count)
|
||||
char const* const* SDL_Vulkan_GetInstanceExtensions(Uint32 *count)
|
||||
{
|
||||
return _this->Vulkan_GetInstanceExtensions(_this, (Uint32 *)count);
|
||||
return _this->Vulkan_GetInstanceExtensions(_this, count);
|
||||
}
|
||||
|
||||
SDL_bool SDL_Vulkan_CreateSurface(SDL_Window *window,
|
||||
|
|
|
@ -206,7 +206,7 @@ static int createInstance(VulkanVideoContext *context)
|
|||
VkApplicationInfo appInfo = { 0 };
|
||||
VkInstanceCreateInfo instanceCreateInfo = { 0 };
|
||||
VkResult result;
|
||||
char const *const *instanceExtensions = SDL_Vulkan_GetInstanceExtensions((int *)&instanceCreateInfo.enabledExtensionCount);
|
||||
char const *const *instanceExtensions = SDL_Vulkan_GetInstanceExtensions(&instanceCreateInfo.enabledExtensionCount);
|
||||
|
||||
appInfo.sType = VK_STRUCTURE_TYPE_APPLICATION_INFO;
|
||||
appInfo.apiVersion = VK_API_VERSION_1_3;
|
||||
|
|
|
@ -229,7 +229,7 @@ static void createInstance(void)
|
|||
instanceCreateInfo.sType = VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO;
|
||||
instanceCreateInfo.pApplicationInfo = &appInfo;
|
||||
|
||||
instanceCreateInfo.ppEnabledExtensionNames = SDL_Vulkan_GetInstanceExtensions((int *)&instanceCreateInfo.enabledExtensionCount);
|
||||
instanceCreateInfo.ppEnabledExtensionNames = SDL_Vulkan_GetInstanceExtensions(&instanceCreateInfo.enabledExtensionCount);
|
||||
result = vkCreateInstance(&instanceCreateInfo, NULL, &vulkanContext->instance);
|
||||
if (result != VK_SUCCESS) {
|
||||
vulkanContext->instance = VK_NULL_HANDLE;
|
||||
|
|
Loading…
Reference in New Issue