From b7a7954edf21134ae82e49c674d657ea4e09c5be Mon Sep 17 00:00:00 2001 From: Caleb Cornett Date: Wed, 7 Aug 2024 20:47:43 -0500 Subject: [PATCH] Update Blit implementations to use vertexCount --- src/gpu/d3d11/SDL_gpu_d3d11.c | 6 +----- src/gpu/d3d12/SDL_gpu_d3d12.c | 8 ++------ src/gpu/metal/SDL_gpu_metal.m | 2 +- 3 files changed, 4 insertions(+), 12 deletions(-) diff --git a/src/gpu/d3d11/SDL_gpu_d3d11.c b/src/gpu/d3d11/SDL_gpu_d3d11.c index 64a4b1c703bc0..9413279074d9e 100644 --- a/src/gpu/d3d11/SDL_gpu_d3d11.c +++ b/src/gpu/d3d11/SDL_gpu_d3d11.c @@ -4317,11 +4317,7 @@ static void D3D11_Blit( &textureSamplerBinding, 1); - D3D11_DrawPrimitives( - commandBuffer, - 0, - 1); - + D3D11_DrawPrimitives(commandBuffer, 0, 3); D3D11_EndRenderPass(commandBuffer); } diff --git a/src/gpu/d3d12/SDL_gpu_d3d12.c b/src/gpu/d3d12/SDL_gpu_d3d12.c index 72350108f8357..f8b00f082989f 100644 --- a/src/gpu/d3d12/SDL_gpu_d3d12.c +++ b/src/gpu/d3d12/SDL_gpu_d3d12.c @@ -5267,11 +5267,7 @@ static void D3D12_Blit( &blitFragmentUniforms, sizeof(BlitFragmentUniforms)); - D3D12_DrawPrimitives( - commandBuffer, - 0, - 1); - + D3D12_DrawPrimitives(commandBuffer, 0, 3); D3D12_EndRenderPass(commandBuffer); } @@ -7406,4 +7402,4 @@ SDL_GpuDriver D3D12Driver = { D3D12_CreateDevice }; -#endif /* SDL_GPU_D12 */ +#endif /* SDL_GPU_D3D12 */ diff --git a/src/gpu/metal/SDL_gpu_metal.m b/src/gpu/metal/SDL_gpu_metal.m index 6c6b548be027a..0afe5ee240615 100644 --- a/src/gpu/metal/SDL_gpu_metal.m +++ b/src/gpu/metal/SDL_gpu_metal.m @@ -3048,7 +3048,7 @@ static void METAL_Blit( &textureSamplerBinding, 1); - METAL_DrawPrimitives(commandBuffer, 0, 1); + METAL_DrawPrimitives(commandBuffer, 0, 3); METAL_EndRenderPass(commandBuffer); }