Fix index size check to respect 16 bit buffers (flutter/engine#19)
This commit is contained in:
committed by
Dan Field
parent
9d14c1e663
commit
f26f4b5f7a
@@ -473,7 +473,8 @@ bool RenderPassMTL::EncodeCommands(Allocator& allocator,
|
||||
if (!mtl_index_buffer) {
|
||||
return false;
|
||||
}
|
||||
FML_DCHECK(command.index_count * sizeof(uint32_t) ==
|
||||
FML_DCHECK(command.index_count *
|
||||
(command.index_type == IndexType::k16bit ? 2 : 4) ==
|
||||
command.index_buffer.range.length);
|
||||
// Returns void. All error checking must be done by this point.
|
||||
[encoder drawIndexedPrimitives:ToMTLPrimitiveType(command.primitive_type)
|
||||
|
||||
Reference in New Issue
Block a user