Fix crash if node is already at position we want. Otherwise we remove
it from list (and list->prev becomes NULL) and then we dereference list->prev
in list_addtail()
Reviewed-by: Andreas Baierl <ichgeh@imkreisrum.de>
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4126>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4126>
# These are really slow on tiling architectures (including llvmpipe).
dEQP-GLES[0-9]*.functional.flush_finish
-# Crashes
-dEQP-GLES2.functional.shaders.invariance.highp.common_subexpression_1
-dEQP-GLES2.functional.shaders.invariance.mediump.common_subexpression_1
-dEQP-GLES2.functional.shaders.invariance.lowp.common_subexpression_1
-
# Flaky
dEQP-GLES2.functional.clipping.triangle_vertex.clip_three.clip_neg_x_neg_z_and_pos_x_pos_z_and_neg_x_neg_y_pos_z
dEQP-GLES2.functional.default_vertex_attrib.*
(insert_node->rsched.reg_pressure == node->rsched.reg_pressure &&
(insert_node->rsched.est >= node->rsched.est))))) {
insert_pos = &node->list;
+ if (node == insert_node)
+ return;
break;
}
}