Skip to content

Commit ce0a74b

Browse files
committed
Break batch on Compatibility when primitive texture changes.
1 parent 2a9ff39 commit ce0a74b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/gles3/rasterizer_canvas_gles3.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1123,7 +1123,7 @@ void RasterizerCanvasGLES3::_record_item_commands(const Item *p_item, RID p_rend
11231123
case Item::Command::TYPE_PRIMITIVE: {
11241124
const Item::CommandPrimitive *primitive = static_cast<const Item::CommandPrimitive *>(c);
11251125

1126-
if (primitive->point_count != state.canvas_instance_batches[state.current_batch_index].primitive_points || state.canvas_instance_batches[state.current_batch_index].command_type != Item::Command::TYPE_PRIMITIVE) {
1126+
if (primitive->point_count != state.canvas_instance_batches[state.current_batch_index].primitive_points || state.canvas_instance_batches[state.current_batch_index].command_type != Item::Command::TYPE_PRIMITIVE || primitive->texture != state.canvas_instance_batches[state.current_batch_index].tex) {
11271127
_new_batch(r_batch_broken);
11281128
state.canvas_instance_batches[state.current_batch_index].tex = primitive->texture;
11291129
state.canvas_instance_batches[state.current_batch_index].primitive_points = primitive->point_count;

0 commit comments

Comments
 (0)