This commit is contained in:
Brandon DeRosier
2022-02-18 08:38:27 -08:00
committed by Dan Field
parent 70f50783e5
commit 9d14c1e663
2 changed files with 5 additions and 1 deletions

View File

@@ -482,7 +482,7 @@ bool RenderPassMTL::EncodeCommands(Allocator& allocator,
indexBuffer:mtl_index_buffer
indexBufferOffset:command.index_buffer.range.offset
instanceCount:1u
baseVertex:0u
baseVertex:command.base_vertex
baseInstance:0u];
}
return true;

View File

@@ -73,6 +73,10 @@ struct Command {
CullMode cull_mode = CullMode::kNone;
uint32_t stencil_reference = 0u;
//----------------------------------------------------------------------------
/// The offset used when indexing into the vertex buffer.
///
uint64_t base_vertex = 0u;
//----------------------------------------------------------------------------
/// The viewport coordinates that the rasterizer linearly maps normalized
/// device coordinates to.
/// If unset, the viewport is the size of the render target with a zero