mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-17 07:16:00 +00:00
GPU: Rename some awkwardly named functions (#10642)
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2024 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
@@ -546,7 +546,7 @@ Uint32 SDL_GPUTextureFormatTexelBlockSize(
|
||||
}
|
||||
}
|
||||
|
||||
SDL_bool SDL_SupportsGPUTextureFormat(
|
||||
SDL_bool SDL_GPUTextureSupportsFormat(
|
||||
SDL_GPUDevice *device,
|
||||
SDL_GPUTextureFormat format,
|
||||
SDL_GPUTextureType type,
|
||||
@@ -565,7 +565,7 @@ SDL_bool SDL_SupportsGPUTextureFormat(
|
||||
usage);
|
||||
}
|
||||
|
||||
SDL_bool SDL_SupportsGPUSampleCount(
|
||||
SDL_bool SDL_GPUTextureSupportsSampleCount(
|
||||
SDL_GPUDevice *device,
|
||||
SDL_GPUTextureFormat format,
|
||||
SDL_GPUSampleCount sampleCount)
|
||||
@@ -748,7 +748,7 @@ SDL_GPUTexture *SDL_CreateGPUTexture(
|
||||
SDL_assert_release(!"For cube textures: sampleCount must be SDL_GPU_SAMPLECOUNT_1");
|
||||
failed = true;
|
||||
}
|
||||
if (!SDL_SupportsGPUTextureFormat(device, textureCreateInfo->format, SDL_GPU_TEXTURETYPE_CUBE, textureCreateInfo->usageFlags)) {
|
||||
if (!SDL_GPUTextureSupportsFormat(device, textureCreateInfo->format, SDL_GPU_TEXTURETYPE_CUBE, textureCreateInfo->usageFlags)) {
|
||||
SDL_assert_release(!"For cube textures: the format is unsupported for the given usageFlags");
|
||||
failed = true;
|
||||
}
|
||||
@@ -766,7 +766,7 @@ SDL_GPUTexture *SDL_CreateGPUTexture(
|
||||
SDL_assert_release(!"For 3D textures: sampleCount must be SDL_GPU_SAMPLECOUNT_1");
|
||||
failed = true;
|
||||
}
|
||||
if (!SDL_SupportsGPUTextureFormat(device, textureCreateInfo->format, SDL_GPU_TEXTURETYPE_3D, textureCreateInfo->usageFlags)) {
|
||||
if (!SDL_GPUTextureSupportsFormat(device, textureCreateInfo->format, SDL_GPU_TEXTURETYPE_3D, textureCreateInfo->usageFlags)) {
|
||||
SDL_assert_release(!"For 3D textures: the format is unsupported for the given usageFlags");
|
||||
failed = true;
|
||||
}
|
||||
@@ -788,7 +788,7 @@ SDL_GPUTexture *SDL_CreateGPUTexture(
|
||||
failed = true;
|
||||
}
|
||||
}
|
||||
if (!SDL_SupportsGPUTextureFormat(device, textureCreateInfo->format, SDL_GPU_TEXTURETYPE_2D, textureCreateInfo->usageFlags)) {
|
||||
if (!SDL_GPUTextureSupportsFormat(device, textureCreateInfo->format, SDL_GPU_TEXTURETYPE_2D, textureCreateInfo->usageFlags)) {
|
||||
SDL_assert_release(!"For 2D textures: the format is unsupported for the given usageFlags");
|
||||
failed = true;
|
||||
}
|
||||
@@ -2039,7 +2039,7 @@ void SDL_EndGPUCopyPass(
|
||||
((CommandBufferCommonHeader *)COPYPASS_COMMAND_BUFFER)->copyPass.inProgress = false;
|
||||
}
|
||||
|
||||
void SDL_GenerateGPUMipmaps(
|
||||
void SDL_GenerateMipmapsForGPUTexture(
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
SDL_GPUTexture *texture)
|
||||
{
|
||||
@@ -2073,7 +2073,7 @@ void SDL_GenerateGPUMipmaps(
|
||||
texture);
|
||||
}
|
||||
|
||||
void SDL_BlitGPU(
|
||||
void SDL_BlitGPUTexture(
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
SDL_GPUBlitRegion *source,
|
||||
SDL_GPUBlitRegion *destination,
|
||||
@@ -2140,7 +2140,7 @@ void SDL_BlitGPU(
|
||||
|
||||
// Submission/Presentation
|
||||
|
||||
SDL_bool SDL_SupportsGPUSwapchainComposition(
|
||||
SDL_bool SDL_WindowSupportsGPUSwapchainComposition(
|
||||
SDL_GPUDevice *device,
|
||||
SDL_Window *window,
|
||||
SDL_GPUSwapchainComposition swapchainComposition)
|
||||
@@ -2161,7 +2161,7 @@ SDL_bool SDL_SupportsGPUSwapchainComposition(
|
||||
swapchainComposition);
|
||||
}
|
||||
|
||||
SDL_bool SDL_SupportsGPUPresentMode(
|
||||
SDL_bool SDL_WindowSupportsGPUPresentMode(
|
||||
SDL_GPUDevice *device,
|
||||
SDL_Window *window,
|
||||
SDL_GPUPresentMode presentMode)
|
||||
@@ -2182,7 +2182,7 @@ SDL_bool SDL_SupportsGPUPresentMode(
|
||||
presentMode);
|
||||
}
|
||||
|
||||
SDL_bool SDL_ClaimGPUWindow(
|
||||
SDL_bool SDL_ClaimWindowForGPUDevice(
|
||||
SDL_GPUDevice *device,
|
||||
SDL_Window *window)
|
||||
{
|
||||
@@ -2197,7 +2197,7 @@ SDL_bool SDL_ClaimGPUWindow(
|
||||
window);
|
||||
}
|
||||
|
||||
void SDL_UnclaimGPUWindow(
|
||||
void SDL_ReleaseWindowFromGPUDevice(
|
||||
SDL_GPUDevice *device,
|
||||
SDL_Window *window)
|
||||
{
|
||||
@@ -2207,7 +2207,7 @@ void SDL_UnclaimGPUWindow(
|
||||
return;
|
||||
}
|
||||
|
||||
device->UnclaimWindow(
|
||||
device->ReleaseWindow(
|
||||
device->driverData,
|
||||
window);
|
||||
}
|
||||
@@ -2286,7 +2286,7 @@ SDL_GPUTexture *SDL_AcquireGPUSwapchainTexture(
|
||||
pHeight);
|
||||
}
|
||||
|
||||
void SDL_SubmitGPU(
|
||||
void SDL_SubmitGPUCommandBuffer(
|
||||
SDL_GPUCommandBuffer *commandBuffer)
|
||||
{
|
||||
CommandBufferCommonHeader *commandBufferHeader = (CommandBufferCommonHeader *)commandBuffer;
|
||||
@@ -2313,7 +2313,7 @@ void SDL_SubmitGPU(
|
||||
commandBuffer);
|
||||
}
|
||||
|
||||
SDL_GPUFence *SDL_SubmitGPUAndAcquireFence(
|
||||
SDL_GPUFence *SDL_SubmitGPUCommandBufferAndAcquireFence(
|
||||
SDL_GPUCommandBuffer *commandBuffer)
|
||||
{
|
||||
CommandBufferCommonHeader *commandBufferHeader = (CommandBufferCommonHeader *)commandBuffer;
|
||||
@@ -2340,7 +2340,7 @@ SDL_GPUFence *SDL_SubmitGPUAndAcquireFence(
|
||||
commandBuffer);
|
||||
}
|
||||
|
||||
void SDL_WaitGPU(
|
||||
void SDL_WaitForGPUIdle(
|
||||
SDL_GPUDevice *device)
|
||||
{
|
||||
CHECK_DEVICE_MAGIC(device, );
|
||||
@@ -2349,7 +2349,7 @@ void SDL_WaitGPU(
|
||||
device->driverData);
|
||||
}
|
||||
|
||||
void SDL_WaitGPUForFences(
|
||||
void SDL_WaitForGPUFences(
|
||||
SDL_GPUDevice *device,
|
||||
SDL_bool waitAll,
|
||||
SDL_GPUFence **pFences,
|
||||
|
@@ -604,7 +604,7 @@ struct SDL_GPUDevice
|
||||
SDL_GPURenderer *driverData,
|
||||
SDL_Window *window);
|
||||
|
||||
void (*UnclaimWindow)(
|
||||
void (*ReleaseWindow)(
|
||||
SDL_GPURenderer *driverData,
|
||||
SDL_Window *window);
|
||||
|
||||
@@ -739,7 +739,7 @@ struct SDL_GPUDevice
|
||||
ASSIGN_DRIVER_FUNC(SupportsSwapchainComposition, name) \
|
||||
ASSIGN_DRIVER_FUNC(SupportsPresentMode, name) \
|
||||
ASSIGN_DRIVER_FUNC(ClaimWindow, name) \
|
||||
ASSIGN_DRIVER_FUNC(UnclaimWindow, name) \
|
||||
ASSIGN_DRIVER_FUNC(ReleaseWindow, name) \
|
||||
ASSIGN_DRIVER_FUNC(SetSwapchainParameters, name) \
|
||||
ASSIGN_DRIVER_FUNC(GetSwapchainTextureFormat, name) \
|
||||
ASSIGN_DRIVER_FUNC(AcquireCommandBuffer, name) \
|
||||
|
@@ -140,7 +140,7 @@ static const GUID D3D_IID_DXGI_DEBUG_ALL = { 0xe48ae283, 0xda80, 0x490b, { 0x87,
|
||||
// Forward Declarations
|
||||
|
||||
static void D3D11_Wait(SDL_GPURenderer *driverData);
|
||||
static void D3D11_UnclaimWindow(
|
||||
static void D3D11_ReleaseWindow(
|
||||
SDL_GPURenderer *driverData,
|
||||
SDL_Window *window);
|
||||
static void D3D11_INTERNAL_DestroyBlitPipelines(SDL_GPURenderer *driverData);
|
||||
@@ -898,7 +898,7 @@ static void D3D11_DestroyDevice(
|
||||
|
||||
// Release the window data
|
||||
for (Sint32 i = renderer->claimedWindowCount - 1; i >= 0; i -= 1) {
|
||||
D3D11_UnclaimWindow(device->driverData, renderer->claimedWindows[i]->window);
|
||||
D3D11_ReleaseWindow(device->driverData, renderer->claimedWindows[i]->window);
|
||||
}
|
||||
SDL_free(renderer->claimedWindows);
|
||||
|
||||
@@ -5161,7 +5161,7 @@ static void D3D11_INTERNAL_DestroySwapchain(
|
||||
}
|
||||
}
|
||||
|
||||
static void D3D11_UnclaimWindow(
|
||||
static void D3D11_ReleaseWindow(
|
||||
SDL_GPURenderer *driverData,
|
||||
SDL_Window *window)
|
||||
{
|
||||
|
@@ -843,7 +843,7 @@ struct D3D12UniformBuffer
|
||||
|
||||
// Foward function declarations
|
||||
|
||||
static void D3D12_UnclaimWindow(SDL_GPURenderer *driverData, SDL_Window *window);
|
||||
static void D3D12_ReleaseWindow(SDL_GPURenderer *driverData, SDL_Window *window);
|
||||
static void D3D12_Wait(SDL_GPURenderer *driverData);
|
||||
static void D3D12_WaitForFences(SDL_GPURenderer *driverData, bool waitAll, SDL_GPUFence **pFences, Uint32 fenceCount);
|
||||
static void D3D12_INTERNAL_ReleaseBlitPipelines(SDL_GPURenderer *driverData);
|
||||
@@ -1391,7 +1391,7 @@ static void D3D12_DestroyDevice(SDL_GPUDevice *device)
|
||||
|
||||
// Release window data
|
||||
for (Sint32 i = renderer->claimedWindowCount - 1; i >= 0; i -= 1) {
|
||||
D3D12_UnclaimWindow((SDL_GPURenderer *)renderer, renderer->claimedWindows[i]->window);
|
||||
D3D12_ReleaseWindow((SDL_GPURenderer *)renderer, renderer->claimedWindows[i]->window);
|
||||
}
|
||||
|
||||
D3D12_INTERNAL_DestroyRenderer(renderer);
|
||||
@@ -5724,7 +5724,7 @@ static void D3D12_GenerateMipmaps(
|
||||
dstRegion.w = container->header.info.width >> levelIndex;
|
||||
dstRegion.h = container->header.info.height >> levelIndex;
|
||||
|
||||
SDL_BlitGPU(
|
||||
SDL_BlitGPUTexture(
|
||||
commandBuffer,
|
||||
&srcRegion,
|
||||
&dstRegion,
|
||||
@@ -6357,7 +6357,7 @@ static bool D3D12_ClaimWindow(
|
||||
}
|
||||
}
|
||||
|
||||
static void D3D12_UnclaimWindow(
|
||||
static void D3D12_ReleaseWindow(
|
||||
SDL_GPURenderer *driverData,
|
||||
SDL_Window *window)
|
||||
{
|
||||
|
@@ -60,7 +60,7 @@
|
||||
// Forward Declarations
|
||||
|
||||
static void METAL_Wait(SDL_GPURenderer *driverData);
|
||||
static void METAL_UnclaimWindow(
|
||||
static void METAL_ReleaseWindow(
|
||||
SDL_GPURenderer *driverData,
|
||||
SDL_Window *window);
|
||||
static void METAL_INTERNAL_DestroyBlitResources(SDL_GPURenderer *driverData);
|
||||
@@ -617,7 +617,7 @@ static void METAL_DestroyDevice(SDL_GPUDevice *device)
|
||||
|
||||
// Release the window data
|
||||
for (Sint32 i = renderer->claimedWindowCount - 1; i >= 0; i -= 1) {
|
||||
METAL_UnclaimWindow(device->driverData, renderer->claimedWindows[i]->window);
|
||||
METAL_ReleaseWindow(device->driverData, renderer->claimedWindows[i]->window);
|
||||
}
|
||||
SDL_free(renderer->claimedWindows);
|
||||
|
||||
@@ -3439,7 +3439,7 @@ static bool METAL_ClaimWindow(
|
||||
}
|
||||
}
|
||||
|
||||
static void METAL_UnclaimWindow(
|
||||
static void METAL_ReleaseWindow(
|
||||
SDL_GPURenderer *driverData,
|
||||
SDL_Window *window)
|
||||
{
|
||||
|
@@ -1160,7 +1160,7 @@ struct VulkanRenderer
|
||||
|
||||
static Uint8 VULKAN_INTERNAL_DefragmentMemory(VulkanRenderer *renderer);
|
||||
static void VULKAN_INTERNAL_BeginCommandBuffer(VulkanRenderer *renderer, VulkanCommandBuffer *commandBuffer);
|
||||
static void VULKAN_UnclaimWindow(SDL_GPURenderer *driverData, SDL_Window *window);
|
||||
static void VULKAN_ReleaseWindow(SDL_GPURenderer *driverData, SDL_Window *window);
|
||||
static void VULKAN_Wait(SDL_GPURenderer *driverData);
|
||||
static void VULKAN_WaitForFences(SDL_GPURenderer *driverData, bool waitAll, SDL_GPUFence **pFences, Uint32 fenceCount);
|
||||
static void VULKAN_Submit(SDL_GPUCommandBuffer *commandBuffer);
|
||||
@@ -4788,7 +4788,7 @@ static void VULKAN_DestroyDevice(
|
||||
VULKAN_Wait(device->driverData);
|
||||
|
||||
for (Sint32 i = renderer->claimedWindowCount - 1; i >= 0; i -= 1) {
|
||||
VULKAN_UnclaimWindow(device->driverData, renderer->claimedWindows[i]->window);
|
||||
VULKAN_ReleaseWindow(device->driverData, renderer->claimedWindows[i]->window);
|
||||
}
|
||||
|
||||
SDL_free(renderer->claimedWindows);
|
||||
@@ -9740,7 +9740,7 @@ static bool VULKAN_ClaimWindow(
|
||||
}
|
||||
}
|
||||
|
||||
static void VULKAN_UnclaimWindow(
|
||||
static void VULKAN_ReleaseWindow(
|
||||
SDL_GPURenderer *driverData,
|
||||
SDL_Window *window)
|
||||
{
|
||||
|
Reference in New Issue
Block a user