Skip to content

Commit ba1ecb6

Browse files
bderodnfield
authored andcommitted
Add baseVertex (flutter#16)
1 parent e7f9073 commit ba1ecb6

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

impeller/renderer/backend/metal/render_pass_mtl.mm

+1-1
Original file line numberDiff line numberDiff line change
@@ -482,7 +482,7 @@ static bool Bind(PassBindingsCache& pass,
482482
indexBuffer:mtl_index_buffer
483483
indexBufferOffset:command.index_buffer.range.offset
484484
instanceCount:1u
485-
baseVertex:0u
485+
baseVertex:command.base_vertex
486486
baseInstance:0u];
487487
}
488488
return true;

impeller/renderer/command.h

+4
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,10 @@ struct Command {
7373
CullMode cull_mode = CullMode::kNone;
7474
uint32_t stencil_reference = 0u;
7575
//----------------------------------------------------------------------------
76+
/// The offset used when indexing into the vertex buffer.
77+
///
78+
uint64_t base_vertex = 0u;
79+
//----------------------------------------------------------------------------
7680
/// The viewport coordinates that the rasterizer linearly maps normalized
7781
/// device coordinates to.
7882
/// If unset, the viewport is the size of the render target with a zero

0 commit comments

Comments
 (0)