Merge pull request #47994 from lawnjelly/ewok_cope_broken_shader
Batching - Don't join items with invalid shaders
This commit is contained in:
commit
41a3b98f2b
|
@ -1356,6 +1356,12 @@ bool RasterizerCanvasGLES2::try_join_item(Item *p_ci, RenderItemState &r_ris, bo
|
||||||
if (material_ptr) {
|
if (material_ptr) {
|
||||||
shader_ptr = material_ptr->shader;
|
shader_ptr = material_ptr->shader;
|
||||||
|
|
||||||
|
// special case, if the user has made an error in the shader code
|
||||||
|
if (shader_ptr && !shader_ptr->valid) {
|
||||||
|
join = false;
|
||||||
|
r_batch_break = true;
|
||||||
|
}
|
||||||
|
|
||||||
if (shader_ptr && shader_ptr->mode != VS::SHADER_CANVAS_ITEM) {
|
if (shader_ptr && shader_ptr->mode != VS::SHADER_CANVAS_ITEM) {
|
||||||
shader_ptr = NULL; // not a canvas item shader, don't use.
|
shader_ptr = NULL; // not a canvas item shader, don't use.
|
||||||
}
|
}
|
||||||
|
|
|
@ -1754,6 +1754,12 @@ bool RasterizerCanvasGLES3::try_join_item(Item *p_ci, RenderItemState &r_ris, bo
|
||||||
if (material_ptr) {
|
if (material_ptr) {
|
||||||
shader_ptr = material_ptr->shader;
|
shader_ptr = material_ptr->shader;
|
||||||
|
|
||||||
|
// special case, if the user has made an error in the shader code
|
||||||
|
if (shader_ptr && !shader_ptr->valid) {
|
||||||
|
join = false;
|
||||||
|
r_batch_break = true;
|
||||||
|
}
|
||||||
|
|
||||||
if (shader_ptr && shader_ptr->mode != VS::SHADER_CANVAS_ITEM) {
|
if (shader_ptr && shader_ptr->mode != VS::SHADER_CANVAS_ITEM) {
|
||||||
shader_ptr = NULL; // not a canvas item shader, don't use.
|
shader_ptr = NULL; // not a canvas item shader, don't use.
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue