Skip to content

Commit

Permalink
GPU metal: fix BindVertexBuffers with 2 or more buffers
Browse files Browse the repository at this point in the history
  • Loading branch information
Akaricchi committed Sep 13, 2024
1 parent 0160e9e commit e6d686d
Showing 1 changed file with 1 addition and 1 deletion.
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 @@ -2371,7 +2371,7 @@ static void METAL_BindVertexBuffers(
MetalCommandBuffer *metalCommandBuffer = (MetalCommandBuffer *)commandBuffer;
id<MTLBuffer> metalBuffers[MAX_VERTEX_BUFFERS];
NSUInteger bufferOffsets[MAX_VERTEX_BUFFERS];
NSRange range = NSMakeRange(METAL_INTERNAL_GetVertexBufferIndex(firstBinding), numBindings);
NSRange range = NSMakeRange(METAL_INTERNAL_GetVertexBufferIndex(firstBinding + numBindings - 1), numBindings);

if (range.length == 0) {
return;
Expand Down

0 comments on commit e6d686d

Please sign in to comment.