mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-05-11 14:38:24 +02:00
GPU: Add const to some function parameters (#10694)
This commit is contained in:
@@ -775,7 +775,7 @@ typedef struct VulkanSwapchainData
|
||||
// Synchronization primitives
|
||||
VkSemaphore imageAvailableSemaphore[MAX_FRAMES_IN_FLIGHT];
|
||||
VkSemaphore renderFinishedSemaphore[MAX_FRAMES_IN_FLIGHT];
|
||||
VulkanFenceHandle *inFlightFences[MAX_FRAMES_IN_FLIGHT];
|
||||
SDL_GPUFence *inFlightFences[MAX_FRAMES_IN_FLIGHT];
|
||||
|
||||
Uint32 frameCounter;
|
||||
} VulkanSwapchainData;
|
||||
@@ -1206,7 +1206,7 @@ static Uint8 VULKAN_INTERNAL_DefragmentMemory(VulkanRenderer *renderer);
|
||||
static void VULKAN_INTERNAL_BeginCommandBuffer(VulkanRenderer *renderer, VulkanCommandBuffer *commandBuffer);
|
||||
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_WaitForFences(SDL_GPURenderer *driverData, bool waitAll, SDL_GPUFence *const *pFences, Uint32 fenceCount);
|
||||
static void VULKAN_Submit(SDL_GPUCommandBuffer *commandBuffer);
|
||||
static VulkanTexture *VULKAN_INTERNAL_CreateTexture(
|
||||
VulkanRenderer *renderer,
|
||||
@@ -3846,7 +3846,7 @@ static bool VULKAN_INTERNAL_InitializeGraphicsPipelineResourceLayout(
|
||||
|
||||
static bool VULKAN_INTERNAL_InitializeComputePipelineResourceLayout(
|
||||
VulkanRenderer *renderer,
|
||||
SDL_GPUComputePipelineCreateInfo *pipelineCreateInfo,
|
||||
const SDL_GPUComputePipelineCreateInfo *pipelineCreateInfo,
|
||||
VulkanComputePipelineResourceLayout *pipelineResourceLayout)
|
||||
{
|
||||
VkDescriptorSetLayoutBinding descriptorSetLayoutBindings[MAX_UNIFORM_BUFFERS_PER_STAGE];
|
||||
@@ -6060,9 +6060,9 @@ static VulkanTextureSubresource *VULKAN_INTERNAL_PrepareTextureSubresourceForWri
|
||||
static VkRenderPass VULKAN_INTERNAL_CreateRenderPass(
|
||||
VulkanRenderer *renderer,
|
||||
VulkanCommandBuffer *commandBuffer,
|
||||
SDL_GPUColorAttachmentInfo *colorAttachmentInfos,
|
||||
const SDL_GPUColorAttachmentInfo *colorAttachmentInfos,
|
||||
Uint32 colorAttachmentCount,
|
||||
SDL_GPUDepthStencilAttachmentInfo *depthStencilAttachmentInfo)
|
||||
const SDL_GPUDepthStencilAttachmentInfo *depthStencilAttachmentInfo)
|
||||
{
|
||||
VkResult vulkanResult;
|
||||
VkAttachmentDescription attachmentDescriptions[2 * MAX_COLOR_TARGET_BINDINGS + 1];
|
||||
@@ -6384,7 +6384,7 @@ static VkRenderPass VULKAN_INTERNAL_CreateTransientRenderPass(
|
||||
|
||||
static SDL_GPUGraphicsPipeline *VULKAN_CreateGraphicsPipeline(
|
||||
SDL_GPURenderer *driverData,
|
||||
SDL_GPUGraphicsPipelineCreateInfo *pipelineCreateInfo)
|
||||
const SDL_GPUGraphicsPipelineCreateInfo *pipelineCreateInfo)
|
||||
{
|
||||
VkResult vulkanResult;
|
||||
Uint32 i;
|
||||
@@ -6724,7 +6724,7 @@ static SDL_GPUGraphicsPipeline *VULKAN_CreateGraphicsPipeline(
|
||||
|
||||
static SDL_GPUComputePipeline *VULKAN_CreateComputePipeline(
|
||||
SDL_GPURenderer *driverData,
|
||||
SDL_GPUComputePipelineCreateInfo *pipelineCreateInfo)
|
||||
const SDL_GPUComputePipelineCreateInfo *pipelineCreateInfo)
|
||||
{
|
||||
VkShaderModuleCreateInfo shaderModuleCreateInfo;
|
||||
VkComputePipelineCreateInfo computePipelineCreateInfo;
|
||||
@@ -6825,7 +6825,7 @@ static SDL_GPUComputePipeline *VULKAN_CreateComputePipeline(
|
||||
|
||||
static SDL_GPUSampler *VULKAN_CreateSampler(
|
||||
SDL_GPURenderer *driverData,
|
||||
SDL_GPUSamplerCreateInfo *samplerCreateInfo)
|
||||
const SDL_GPUSamplerCreateInfo *samplerCreateInfo)
|
||||
{
|
||||
VulkanRenderer *renderer = (VulkanRenderer *)driverData;
|
||||
VulkanSampler *vulkanSampler = SDL_malloc(sizeof(VulkanSampler));
|
||||
@@ -6870,7 +6870,7 @@ static SDL_GPUSampler *VULKAN_CreateSampler(
|
||||
|
||||
static SDL_GPUShader *VULKAN_CreateShader(
|
||||
SDL_GPURenderer *driverData,
|
||||
SDL_GPUShaderCreateInfo *shaderCreateInfo)
|
||||
const SDL_GPUShaderCreateInfo *shaderCreateInfo)
|
||||
{
|
||||
VulkanShader *vulkanShader;
|
||||
VkResult vulkanResult;
|
||||
@@ -6925,7 +6925,7 @@ static bool VULKAN_SupportsSampleCount(
|
||||
|
||||
static SDL_GPUTexture *VULKAN_CreateTexture(
|
||||
SDL_GPURenderer *driverData,
|
||||
SDL_GPUTextureCreateInfo *textureCreateInfo)
|
||||
const SDL_GPUTextureCreateInfo *textureCreateInfo)
|
||||
{
|
||||
VulkanRenderer *renderer = (VulkanRenderer *)driverData;
|
||||
VkImageAspectFlags imageAspectFlags;
|
||||
@@ -7241,9 +7241,9 @@ static void VULKAN_ReleaseGraphicsPipeline(
|
||||
static VkRenderPass VULKAN_INTERNAL_FetchRenderPass(
|
||||
VulkanRenderer *renderer,
|
||||
VulkanCommandBuffer *commandBuffer,
|
||||
SDL_GPUColorAttachmentInfo *colorAttachmentInfos,
|
||||
const SDL_GPUColorAttachmentInfo *colorAttachmentInfos,
|
||||
Uint32 colorAttachmentCount,
|
||||
SDL_GPUDepthStencilAttachmentInfo *depthStencilAttachmentInfo)
|
||||
const SDL_GPUDepthStencilAttachmentInfo *depthStencilAttachmentInfo)
|
||||
{
|
||||
VulkanRenderPassHashTableValue *renderPassWrapper = NULL;
|
||||
VkRenderPass renderPassHandle;
|
||||
@@ -7323,9 +7323,9 @@ static VkRenderPass VULKAN_INTERNAL_FetchRenderPass(
|
||||
static VulkanFramebuffer *VULKAN_INTERNAL_FetchFramebuffer(
|
||||
VulkanRenderer *renderer,
|
||||
VkRenderPass renderPass,
|
||||
SDL_GPUColorAttachmentInfo *colorAttachmentInfos,
|
||||
const SDL_GPUColorAttachmentInfo *colorAttachmentInfos,
|
||||
Uint32 colorAttachmentCount,
|
||||
SDL_GPUDepthStencilAttachmentInfo *depthStencilAttachmentInfo,
|
||||
const SDL_GPUDepthStencilAttachmentInfo *depthStencilAttachmentInfo,
|
||||
Uint32 width,
|
||||
Uint32 height)
|
||||
{
|
||||
@@ -7465,7 +7465,7 @@ static VulkanFramebuffer *VULKAN_INTERNAL_FetchFramebuffer(
|
||||
|
||||
static void VULKAN_INTERNAL_SetCurrentViewport(
|
||||
VulkanCommandBuffer *commandBuffer,
|
||||
SDL_GPUViewport *viewport)
|
||||
const SDL_GPUViewport *viewport)
|
||||
{
|
||||
VulkanCommandBuffer *vulkanCommandBuffer = (VulkanCommandBuffer *)commandBuffer;
|
||||
|
||||
@@ -7482,7 +7482,7 @@ static void VULKAN_INTERNAL_SetCurrentViewport(
|
||||
|
||||
static void VULKAN_SetViewport(
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
SDL_GPUViewport *viewport)
|
||||
const SDL_GPUViewport *viewport)
|
||||
{
|
||||
VulkanCommandBuffer *vulkanCommandBuffer = (VulkanCommandBuffer *)commandBuffer;
|
||||
VulkanRenderer *renderer = (VulkanRenderer *)vulkanCommandBuffer->renderer;
|
||||
@@ -7500,7 +7500,7 @@ static void VULKAN_SetViewport(
|
||||
|
||||
static void VULKAN_INTERNAL_SetCurrentScissor(
|
||||
VulkanCommandBuffer *vulkanCommandBuffer,
|
||||
SDL_Rect *scissor)
|
||||
const SDL_Rect *scissor)
|
||||
{
|
||||
vulkanCommandBuffer->currentScissor.offset.x = scissor->x;
|
||||
vulkanCommandBuffer->currentScissor.offset.y = scissor->y;
|
||||
@@ -7510,7 +7510,7 @@ static void VULKAN_INTERNAL_SetCurrentScissor(
|
||||
|
||||
static void VULKAN_SetScissor(
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
SDL_Rect *scissor)
|
||||
const SDL_Rect *scissor)
|
||||
{
|
||||
VulkanCommandBuffer *vulkanCommandBuffer = (VulkanCommandBuffer *)commandBuffer;
|
||||
VulkanRenderer *renderer = (VulkanRenderer *)vulkanCommandBuffer->renderer;
|
||||
@@ -7529,7 +7529,7 @@ static void VULKAN_SetScissor(
|
||||
static void VULKAN_BindVertexSamplers(
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
Uint32 firstSlot,
|
||||
SDL_GPUTextureSamplerBinding *textureSamplerBindings,
|
||||
const SDL_GPUTextureSamplerBinding *textureSamplerBindings,
|
||||
Uint32 bindingCount)
|
||||
{
|
||||
VulkanCommandBuffer *vulkanCommandBuffer = (VulkanCommandBuffer *)commandBuffer;
|
||||
@@ -7554,7 +7554,7 @@ static void VULKAN_BindVertexSamplers(
|
||||
static void VULKAN_BindVertexStorageTextures(
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
Uint32 firstSlot,
|
||||
SDL_GPUTexture **storageTextures,
|
||||
SDL_GPUTexture *const *storageTextures,
|
||||
Uint32 bindingCount)
|
||||
{
|
||||
VulkanCommandBuffer *vulkanCommandBuffer = (VulkanCommandBuffer *)commandBuffer;
|
||||
@@ -7575,7 +7575,7 @@ static void VULKAN_BindVertexStorageTextures(
|
||||
static void VULKAN_BindVertexStorageBuffers(
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
Uint32 firstSlot,
|
||||
SDL_GPUBuffer **storageBuffers,
|
||||
SDL_GPUBuffer *const *storageBuffers,
|
||||
Uint32 bindingCount)
|
||||
{
|
||||
VulkanCommandBuffer *vulkanCommandBuffer = (VulkanCommandBuffer *)commandBuffer;
|
||||
@@ -7598,7 +7598,7 @@ static void VULKAN_BindVertexStorageBuffers(
|
||||
static void VULKAN_BindFragmentSamplers(
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
Uint32 firstSlot,
|
||||
SDL_GPUTextureSamplerBinding *textureSamplerBindings,
|
||||
const SDL_GPUTextureSamplerBinding *textureSamplerBindings,
|
||||
Uint32 bindingCount)
|
||||
{
|
||||
VulkanCommandBuffer *vulkanCommandBuffer = (VulkanCommandBuffer *)commandBuffer;
|
||||
@@ -7623,7 +7623,7 @@ static void VULKAN_BindFragmentSamplers(
|
||||
static void VULKAN_BindFragmentStorageTextures(
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
Uint32 firstSlot,
|
||||
SDL_GPUTexture **storageTextures,
|
||||
SDL_GPUTexture *const *storageTextures,
|
||||
Uint32 bindingCount)
|
||||
{
|
||||
VulkanCommandBuffer *vulkanCommandBuffer = (VulkanCommandBuffer *)commandBuffer;
|
||||
@@ -7645,7 +7645,7 @@ static void VULKAN_BindFragmentStorageTextures(
|
||||
static void VULKAN_BindFragmentStorageBuffers(
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
Uint32 firstSlot,
|
||||
SDL_GPUBuffer **storageBuffers,
|
||||
SDL_GPUBuffer *const *storageBuffers,
|
||||
Uint32 bindingCount)
|
||||
{
|
||||
VulkanCommandBuffer *vulkanCommandBuffer = (VulkanCommandBuffer *)commandBuffer;
|
||||
@@ -7794,9 +7794,9 @@ static void VULKAN_INTERNAL_PushUniformData(
|
||||
|
||||
static void VULKAN_BeginRenderPass(
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
SDL_GPUColorAttachmentInfo *colorAttachmentInfos,
|
||||
const SDL_GPUColorAttachmentInfo *colorAttachmentInfos,
|
||||
Uint32 colorAttachmentCount,
|
||||
SDL_GPUDepthStencilAttachmentInfo *depthStencilAttachmentInfo)
|
||||
const SDL_GPUDepthStencilAttachmentInfo *depthStencilAttachmentInfo)
|
||||
{
|
||||
VulkanCommandBuffer *vulkanCommandBuffer = (VulkanCommandBuffer *)commandBuffer;
|
||||
VulkanRenderer *renderer = (VulkanRenderer *)vulkanCommandBuffer->renderer;
|
||||
@@ -8061,7 +8061,7 @@ static void VULKAN_BindGraphicsPipeline(
|
||||
static void VULKAN_BindVertexBuffers(
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
Uint32 firstBinding,
|
||||
SDL_GPUBufferBinding *pBindings,
|
||||
const SDL_GPUBufferBinding *pBindings,
|
||||
Uint32 bindingCount)
|
||||
{
|
||||
VulkanCommandBuffer *vulkanCommandBuffer = (VulkanCommandBuffer *)commandBuffer;
|
||||
@@ -8091,7 +8091,7 @@ static void VULKAN_BindVertexBuffers(
|
||||
|
||||
static void VULKAN_BindIndexBuffer(
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
SDL_GPUBufferBinding *pBinding,
|
||||
const SDL_GPUBufferBinding *pBinding,
|
||||
SDL_GPUIndexElementSize indexElementSize)
|
||||
{
|
||||
VulkanCommandBuffer *vulkanCommandBuffer = (VulkanCommandBuffer *)commandBuffer;
|
||||
@@ -8191,9 +8191,9 @@ static void VULKAN_EndRenderPass(
|
||||
|
||||
static void VULKAN_BeginComputePass(
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
SDL_GPUStorageTextureWriteOnlyBinding *storageTextureBindings,
|
||||
const SDL_GPUStorageTextureWriteOnlyBinding *storageTextureBindings,
|
||||
Uint32 storageTextureBindingCount,
|
||||
SDL_GPUStorageBufferWriteOnlyBinding *storageBufferBindings,
|
||||
const SDL_GPUStorageBufferWriteOnlyBinding *storageBufferBindings,
|
||||
Uint32 storageBufferBindingCount)
|
||||
{
|
||||
VulkanCommandBuffer *vulkanCommandBuffer = (VulkanCommandBuffer *)commandBuffer;
|
||||
@@ -8278,7 +8278,7 @@ static void VULKAN_BindComputePipeline(
|
||||
static void VULKAN_BindComputeStorageTextures(
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
Uint32 firstSlot,
|
||||
SDL_GPUTexture **storageTextures,
|
||||
SDL_GPUTexture *const *storageTextures,
|
||||
Uint32 bindingCount)
|
||||
{
|
||||
VulkanCommandBuffer *vulkanCommandBuffer = (VulkanCommandBuffer *)commandBuffer;
|
||||
@@ -8315,7 +8315,7 @@ static void VULKAN_BindComputeStorageTextures(
|
||||
static void VULKAN_BindComputeStorageBuffers(
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
Uint32 firstSlot,
|
||||
SDL_GPUBuffer **storageBuffers,
|
||||
SDL_GPUBuffer *const *storageBuffers,
|
||||
Uint32 bindingCount)
|
||||
{
|
||||
VulkanCommandBuffer *vulkanCommandBuffer = (VulkanCommandBuffer *)commandBuffer;
|
||||
@@ -8749,8 +8749,8 @@ static void VULKAN_BeginCopyPass(
|
||||
|
||||
static void VULKAN_UploadToTexture(
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
SDL_GPUTextureTransferInfo *source,
|
||||
SDL_GPUTextureRegion *destination,
|
||||
const SDL_GPUTextureTransferInfo *source,
|
||||
const SDL_GPUTextureRegion *destination,
|
||||
bool cycle)
|
||||
{
|
||||
VulkanCommandBuffer *vulkanCommandBuffer = (VulkanCommandBuffer *)commandBuffer;
|
||||
@@ -8805,8 +8805,8 @@ static void VULKAN_UploadToTexture(
|
||||
|
||||
static void VULKAN_UploadToBuffer(
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
SDL_GPUTransferBufferLocation *source,
|
||||
SDL_GPUBufferRegion *destination,
|
||||
const SDL_GPUTransferBufferLocation *source,
|
||||
const SDL_GPUBufferRegion *destination,
|
||||
bool cycle)
|
||||
{
|
||||
VulkanCommandBuffer *vulkanCommandBuffer = (VulkanCommandBuffer *)commandBuffer;
|
||||
@@ -8849,8 +8849,8 @@ static void VULKAN_UploadToBuffer(
|
||||
|
||||
static void VULKAN_DownloadFromTexture(
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
SDL_GPUTextureRegion *source,
|
||||
SDL_GPUTextureTransferInfo *destination)
|
||||
const SDL_GPUTextureRegion *source,
|
||||
const SDL_GPUTextureTransferInfo *destination)
|
||||
{
|
||||
VulkanCommandBuffer *vulkanCommandBuffer = (VulkanCommandBuffer *)commandBuffer;
|
||||
VulkanRenderer *renderer = vulkanCommandBuffer->renderer;
|
||||
@@ -8905,8 +8905,8 @@ static void VULKAN_DownloadFromTexture(
|
||||
|
||||
static void VULKAN_DownloadFromBuffer(
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
SDL_GPUBufferRegion *source,
|
||||
SDL_GPUTransferBufferLocation *destination)
|
||||
const SDL_GPUBufferRegion *source,
|
||||
const SDL_GPUTransferBufferLocation *destination)
|
||||
{
|
||||
VulkanCommandBuffer *vulkanCommandBuffer = (VulkanCommandBuffer *)commandBuffer;
|
||||
VulkanRenderer *renderer = vulkanCommandBuffer->renderer;
|
||||
@@ -8945,8 +8945,8 @@ static void VULKAN_DownloadFromBuffer(
|
||||
|
||||
static void VULKAN_CopyTextureToTexture(
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
SDL_GPUTextureLocation *source,
|
||||
SDL_GPUTextureLocation *destination,
|
||||
const SDL_GPUTextureLocation *source,
|
||||
const SDL_GPUTextureLocation *destination,
|
||||
Uint32 w,
|
||||
Uint32 h,
|
||||
Uint32 d,
|
||||
@@ -9023,8 +9023,8 @@ static void VULKAN_CopyTextureToTexture(
|
||||
|
||||
static void VULKAN_CopyBufferToBuffer(
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
SDL_GPUBufferLocation *source,
|
||||
SDL_GPUBufferLocation *destination,
|
||||
const SDL_GPUBufferLocation *source,
|
||||
const SDL_GPUBufferLocation *destination,
|
||||
Uint32 size,
|
||||
bool cycle)
|
||||
{
|
||||
@@ -9177,8 +9177,8 @@ static void VULKAN_EndCopyPass(
|
||||
|
||||
static void VULKAN_Blit(
|
||||
SDL_GPUCommandBuffer *commandBuffer,
|
||||
SDL_GPUBlitRegion *source,
|
||||
SDL_GPUBlitRegion *destination,
|
||||
const SDL_GPUBlitRegion *source,
|
||||
const SDL_GPUBlitRegion *destination,
|
||||
SDL_FlipMode flipMode,
|
||||
SDL_GPUFilter filterMode,
|
||||
bool cycle)
|
||||
@@ -9803,7 +9803,7 @@ static void VULKAN_ReleaseWindow(
|
||||
if (windowData->swapchainData->inFlightFences[i] != NULL) {
|
||||
VULKAN_ReleaseFence(
|
||||
driverData,
|
||||
(SDL_GPUFence *)windowData->swapchainData->inFlightFences[i]);
|
||||
windowData->swapchainData->inFlightFences[i]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9839,7 +9839,7 @@ static bool VULKAN_INTERNAL_RecreateSwapchain(
|
||||
if (windowData->swapchainData->inFlightFences[i] != NULL) {
|
||||
VULKAN_ReleaseFence(
|
||||
(SDL_GPURenderer *)renderer,
|
||||
(SDL_GPUFence *)windowData->swapchainData->inFlightFences[i]);
|
||||
windowData->swapchainData->inFlightFences[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -9893,12 +9893,12 @@ static SDL_GPUTexture *VULKAN_AcquireSwapchainTexture(
|
||||
VULKAN_WaitForFences(
|
||||
(SDL_GPURenderer *)renderer,
|
||||
true,
|
||||
(SDL_GPUFence **)&swapchainData->inFlightFences[swapchainData->frameCounter],
|
||||
&swapchainData->inFlightFences[swapchainData->frameCounter],
|
||||
1);
|
||||
} else {
|
||||
if (!VULKAN_QueryFence(
|
||||
(SDL_GPURenderer *)renderer,
|
||||
(SDL_GPUFence *)swapchainData->inFlightFences[swapchainData->frameCounter])) {
|
||||
swapchainData->inFlightFences[swapchainData->frameCounter])) {
|
||||
/*
|
||||
* In MAILBOX or IMMEDIATE mode, if the least recent fence is not signaled,
|
||||
* return NULL to indicate that rendering should be skipped
|
||||
@@ -9909,7 +9909,7 @@ static SDL_GPUTexture *VULKAN_AcquireSwapchainTexture(
|
||||
|
||||
VULKAN_ReleaseFence(
|
||||
(SDL_GPURenderer *)renderer,
|
||||
(SDL_GPUFence *)swapchainData->inFlightFences[swapchainData->frameCounter]);
|
||||
swapchainData->inFlightFences[swapchainData->frameCounter]);
|
||||
|
||||
swapchainData->inFlightFences[swapchainData->frameCounter] = NULL;
|
||||
}
|
||||
@@ -10346,7 +10346,7 @@ static void VULKAN_INTERNAL_CleanCommandBuffer(
|
||||
static void VULKAN_WaitForFences(
|
||||
SDL_GPURenderer *driverData,
|
||||
bool waitAll,
|
||||
SDL_GPUFence **pFences,
|
||||
SDL_GPUFence *const *pFences,
|
||||
Uint32 fenceCount)
|
||||
{
|
||||
VulkanRenderer *renderer = (VulkanRenderer *)driverData;
|
||||
@@ -10537,7 +10537,7 @@ static void VULKAN_Submit(
|
||||
presentData->windowData);
|
||||
} else {
|
||||
// If presenting, the swapchain is using the in-flight fence
|
||||
presentData->windowData->swapchainData->inFlightFences[presentData->windowData->swapchainData->frameCounter] = vulkanCommandBuffer->inFlightFence;
|
||||
presentData->windowData->swapchainData->inFlightFences[presentData->windowData->swapchainData->frameCounter] = (SDL_GPUFence*)vulkanCommandBuffer->inFlightFence;
|
||||
|
||||
(void)SDL_AtomicIncRef(&vulkanCommandBuffer->inFlightFence->referenceCount);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user