Skip to content

Commit

Permalink
Update Blit implementations to use vertexCount (thatcosmonaut#143)
Browse files Browse the repository at this point in the history
  • Loading branch information
TheSpydog authored and flibitijibibo committed Aug 16, 2024
1 parent 5dbfccd commit 2cbded2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 12 deletions.
6 changes: 1 addition & 5 deletions src/gpu/d3d11/SDL_gpu_d3d11.c
Original file line number Diff line number Diff line change
Expand Up @@ -4317,11 +4317,7 @@ static void D3D11_Blit(
&textureSamplerBinding,
1);

D3D11_DrawPrimitives(
commandBuffer,
0,
1);

D3D11_DrawPrimitives(commandBuffer, 0, 3);
D3D11_EndRenderPass(commandBuffer);
}

Expand Down
8 changes: 2 additions & 6 deletions src/gpu/d3d12/SDL_gpu_d3d12.c
Original file line number Diff line number Diff line change
Expand Up @@ -5267,11 +5267,7 @@ static void D3D12_Blit(
&blitFragmentUniforms,
sizeof(BlitFragmentUniforms));

D3D12_DrawPrimitives(
commandBuffer,
0,
1);

D3D12_DrawPrimitives(commandBuffer, 0, 3);
D3D12_EndRenderPass(commandBuffer);
}

Expand Down Expand Up @@ -7406,4 +7402,4 @@ SDL_GpuDriver D3D12Driver = {
D3D12_CreateDevice
};

#endif /* SDL_GPU_D12 */
#endif /* SDL_GPU_D3D12 */
2 changes: 1 addition & 1 deletion src/gpu/metal/SDL_gpu_metal.m
Original file line number Diff line number Diff line change
Expand Up @@ -3048,7 +3048,7 @@ static void METAL_Blit(
&textureSamplerBinding,
1);

METAL_DrawPrimitives(commandBuffer, 0, 1);
METAL_DrawPrimitives(commandBuffer, 0, 3);
METAL_EndRenderPass(commandBuffer);
}

Expand Down

0 comments on commit 2cbded2

Please sign in to comment.