Browse Source

Merge pull request #43818 from lawnjelly/back_buffer_fix

Batching - BackBuffer copy fix
Rémi Verschelde 4 years ago
parent
commit
83f7c2d957

+ 0 - 4
drivers/gles2/rasterizer_canvas_gles2.cpp

@@ -1946,10 +1946,6 @@ void RasterizerCanvasGLES2::render_joined_item(const BItemJoined &p_bij, RenderI
 	}
 	}
 #endif
 #endif
 
 
-	// this must be reset for each joined item,
-	// it only exists to prevent capturing the screen more than once per item
-	state.canvas_texscreen_used = false;
-
 	// all the joined items will share the same state with the first item
 	// all the joined items will share the same state with the first item
 	Item *ci = bdata.item_refs[p_bij.first_item_ref].item;
 	Item *ci = bdata.item_refs[p_bij.first_item_ref].item;
 
 

+ 0 - 4
drivers/gles3/rasterizer_canvas_gles3.cpp

@@ -1203,10 +1203,6 @@ void RasterizerCanvasGLES3::render_joined_item(const BItemJoined &p_bij, RenderI
 	}
 	}
 #endif
 #endif
 
 
-	// this must be reset for each joined item,
-	// it only exists to prevent capturing the screen more than once per item
-	state.canvas_texscreen_used = false;
-
 	// all the joined items will share the same state with the first item
 	// all the joined items will share the same state with the first item
 	Item *p_ci = bdata.item_refs[p_bij.first_item_ref].item;
 	Item *p_ci = bdata.item_refs[p_bij.first_item_ref].item;
 
 

+ 5 - 0
drivers/gles_common/rasterizer_canvas_batcher.h

@@ -3048,6 +3048,11 @@ PREAMBLE(bool)::_detect_item_batch_break(RenderItemState &r_ris, RasterizerCanva
 
 
 	} // else
 	} // else
 
 
+	// special case, back buffer copy, so don't join
+	if (p_ci->copy_back_buffer) {
+		return true;
+	}
+
 	return false;
 	return false;
 }
 }