renderer/metal: don't draw with zero instances

This commit is contained in:
Mitchell Hashimoto
2024-04-21 19:42:48 -07:00
parent 8093088515
commit 7a6a2b0752

View File

@ -1227,6 +1227,10 @@ fn drawCells(
buf: CellBuffer,
len: usize,
) !void {
// This triggers an assertion in the Metal API if we try to draw
// with an instance count of 0 so just bail.
if (len == 0) return;
// Use our shader pipeline
encoder.msgSend(
void,