Skip to content

Commit 51dcb38

Browse files
committed
GLES3: Skip batches with zero instance count while rendering
1 parent 654132c commit 51dcb38

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

drivers/gles3/rasterizer_canvas_gles3.cpp

+5
Original file line numberDiff line numberDiff line change
@@ -661,6 +661,11 @@ void RasterizerCanvasGLES3::_render_items(RID p_to_render_target, int p_item_cou
661661
state.current_tex = RID();
662662

663663
for (uint32_t i = 0; i <= state.current_batch_index; i++) {
664+
// Skipping when there is no instances.
665+
if (state.canvas_instance_batches[i].instance_count == 0) {
666+
continue;
667+
}
668+
664669
//setup clip
665670
if (current_clip != state.canvas_instance_batches[i].clip) {
666671
current_clip = state.canvas_instance_batches[i].clip;

0 commit comments

Comments
 (0)