GPU: Revise swapchain acquisition (#11633)

---------

Co-authored-by: Lucas Murray <22484+lmurray@users.noreply.github.com>
This commit is contained in:
Evan Hemsley
2024-12-11 11:16:35 -08:00
committed by GitHub
parent bbd4eeb287
commit 3ee39f6c3f
9 changed files with 337 additions and 51 deletions

View File

@@ -811,6 +811,17 @@ struct SDL_GPUDevice
Uint32 *swapchainTextureWidth,
Uint32 *swapchainTextureHeight);
bool (*WaitForSwapchain)(
SDL_GPURenderer *driverData,
SDL_Window *window);
bool (*WaitAndAcquireSwapchainTexture)(
SDL_GPUCommandBuffer *commandBuffer,
SDL_Window *window,
SDL_GPUTexture **swapchainTexture,
Uint32 *swapchainTextureWidth,
Uint32 *swapchainTextureHeight);
bool (*Submit)(
SDL_GPUCommandBuffer *commandBuffer);
@@ -937,6 +948,8 @@ struct SDL_GPUDevice
ASSIGN_DRIVER_FUNC(GetSwapchainTextureFormat, name) \
ASSIGN_DRIVER_FUNC(AcquireCommandBuffer, name) \
ASSIGN_DRIVER_FUNC(AcquireSwapchainTexture, name) \
ASSIGN_DRIVER_FUNC(WaitForSwapchain, name) \
ASSIGN_DRIVER_FUNC(WaitAndAcquireSwapchainTexture, name)\
ASSIGN_DRIVER_FUNC(Submit, name) \
ASSIGN_DRIVER_FUNC(SubmitAndAcquireFence, name) \
ASSIGN_DRIVER_FUNC(Cancel, name) \