Amend use of non-standard compiler syntax

This commit is contained in:
Daniel Ludwig 2024-09-06 17:34:24 +02:00 committed by Ozkan Sezer
parent 0a8bf663b7
commit 0a44ea1b0b
4 changed files with 31 additions and 5 deletions

View File

@ -3199,7 +3199,10 @@ static SDL_GPUCommandBuffer *D3D11_AcquireCommandBuffer(
commandBuffer = D3D11_INTERNAL_GetInactiveCommandBufferFromPool(renderer);
commandBuffer->graphicsPipeline = NULL;
commandBuffer->stencilRef = 0;
commandBuffer->blendConstants = (SDL_FColor){ 1.0f, 1.0f, 1.0f, 1.0f };
commandBuffer->blendConstants.r = 1.0f;
commandBuffer->blendConstants.g = 1.0f;
commandBuffer->blendConstants.b = 1.0f;
commandBuffer->blendConstants.a = 1.0f;
commandBuffer->computePipeline = NULL;
for (i = 0; i < MAX_COLOR_TARGET_BINDINGS; i += 1) {
commandBuffer->colorTargetResolveTexture[i] = NULL;
@ -3617,9 +3620,15 @@ static void D3D11_BeginRenderPass(
commandBuffer,
0);
SDL_FColor blendConstants;
blendConstants.r = 1.0f;
blendConstants.g = 1.0f;
blendConstants.b = 1.0f;
blendConstants.a = 1.0f;
D3D11_SetBlendConstants(
commandBuffer,
(SDL_FColor){ 1.0f, 1.0f, 1.0f, 1.0f });
blendConstants);
}
static void D3D11_BindGraphicsPipeline(

View File

@ -3950,9 +3950,15 @@ static void D3D12_BeginRenderPass(
commandBuffer,
0);
SDL_FColor blendConstants;
blendConstants.r = 1.0f;
blendConstants.g = 1.0f;
blendConstants.b = 1.0f;
blendConstants.a = 1.0f;
D3D12_SetBlendConstants(
commandBuffer,
(SDL_FColor){ 1.0f, 1.0f, 1.0f, 1.0f });
blendConstants);
}
static void D3D12_INTERNAL_TrackUniformBuffer(

View File

@ -2153,6 +2153,7 @@ static void METAL_BeginRenderPass(
Uint32 vpHeight = UINT_MAX;
SDL_GPUViewport viewport;
SDL_Rect scissorRect;
SDL_FColor blendConstants;
for (Uint32 i = 0; i < numColorTargets; i += 1) {
MetalTextureContainer *container = (MetalTextureContainer *)colorTargetInfos[i].texture;
@ -2268,9 +2269,13 @@ static void METAL_BeginRenderPass(
scissorRect.h = vpHeight;
METAL_SetScissor(commandBuffer, &scissorRect);
blendConstants.r = 1.0f;
blendConstants.g = 1.0f;
blendConstants.b = 1.0f;
blendConstants.a = 1.0f;
METAL_SetBlendConstants(
commandBuffer,
(SDL_FColor){ 1.0f, 1.0f, 1.0f, 1.0f });
blendConstants);
METAL_SetStencilReference(
commandBuffer,

View File

@ -7863,6 +7863,7 @@ static void VULKAN_BeginRenderPass(
Uint32 i;
SDL_GPUViewport defaultViewport;
SDL_Rect defaultScissor;
SDL_FColor defaultBlendConstants;
Uint32 framebufferWidth = UINT32_MAX;
Uint32 framebufferHeight = UINT32_MAX;
@ -8056,9 +8057,14 @@ static void VULKAN_BeginRenderPass(
vulkanCommandBuffer,
&defaultScissor);
defaultBlendConstants.r = 1.0f;
defaultBlendConstants.g = 1.0f;
defaultBlendConstants.b = 1.0f;
defaultBlendConstants.a = 1.0f;
VULKAN_INTERNAL_SetCurrentBlendConstants(
vulkanCommandBuffer,
(SDL_FColor){ 1.0f, 1.0f, 1.0f, 1.0f });
defaultBlendConstants);
VULKAN_INTERNAL_SetCurrentStencilReference(
vulkanCommandBuffer,