diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2022-11-05 09:01:16 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-05 09:01:16 +0100 |
commit | 6882890a34528e056f13020798f4a473046990bb (patch) | |
tree | 85cf4aadc8918c8e47a3200dce0f21c64b1ca5ff /drivers | |
parent | ec521a405a89a1b80a9989c09dcc2f2e7763ddcf (diff) | |
parent | 3c1e5003abf91c9f37055f0e3ed6ada72859a382 (diff) |
Merge pull request #68270 from clayjohn/GLES3-batching-tileset
Fix pathological corner case in drawing tileset editor
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gles3/rasterizer_canvas_gles3.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gles3/rasterizer_canvas_gles3.cpp b/drivers/gles3/rasterizer_canvas_gles3.cpp index 29252c8677..b05817cd8e 100644 --- a/drivers/gles3/rasterizer_canvas_gles3.cpp +++ b/drivers/gles3/rasterizer_canvas_gles3.cpp @@ -581,7 +581,7 @@ void RasterizerCanvasGLES3::_render_items(RID p_to_render_target, int p_item_cou _record_item_commands(ci, p_canvas_transform_inverse, current_clip, blend_mode, p_lights, index, batch_broken); } - if (r_last_index >= index) { + if (index == 0) { // Nothing to render, just return. state.current_batch_index = 0; state.canvas_instance_batches.clear(); @@ -1325,7 +1325,7 @@ void RasterizerCanvasGLES3::_render_batch(Light *p_lights, uint32_t p_index) { void RasterizerCanvasGLES3::_add_to_batch(uint32_t &r_index, bool &r_batch_broken) { if (r_index >= data.max_instances_per_ubo - 1) { - WARN_PRINT_ONCE("Trying to draw too many items. Please increase maximum number of items in the project settings 'rendering/gl_compatibility/item_buffer_size'"); + ERR_PRINT_ONCE("Trying to draw too many items. Please increase maximum number of items in the project settings 'rendering/gl_compatibility/item_buffer_size'"); return; } |