diff --git a/src/mesa/drivers/dri/r300/compiler/radeon_pair_regalloc.c b/src/mesa/drivers/dri/r300/compiler/radeon_pair_regalloc.c index 49983d6..98c7780 100644 --- a/src/mesa/drivers/dri/r300/compiler/radeon_pair_regalloc.c +++ b/src/mesa/drivers/dri/r300/compiler/radeon_pair_regalloc.c @@ -515,6 +515,7 @@ static void do_advanced_regalloc(struct regalloc_state * s) unsigned int class_index; /* Compute the live intervals */ rc_variable_compute_live_intervals(var_ptr->Item); + rc_variable_print(var_ptr->Item); class_index = variable_get_class(var_ptr->Item, rc_class_list); diff --git a/src/mesa/drivers/dri/r300/compiler/radeon_variable.c b/src/mesa/drivers/dri/r300/compiler/radeon_variable.c index 16fa5d2..5b2295d 100644 --- a/src/mesa/drivers/dri/r300/compiler/radeon_variable.c +++ b/src/mesa/drivers/dri/r300/compiler/radeon_variable.c @@ -388,17 +388,21 @@ struct rc_list * rc_get_variables(struct radeon_compiler * c) */ while (aborted_list) { struct rc_list * search_ptr_next; + struct rc_variable * var; var_ptr = aborted_list; + for (var = var_ptr->Item; var; var = var->Friend) { - search_ptr = var_ptr->Next; - while(search_ptr) { - search_ptr_next = search_ptr->Next; - if (readers_intersect(var_ptr->Item, search_ptr->Item)){ - rc_list_remove(&aborted_list, search_ptr); - rc_variable_add_friend(var_ptr->Item, + search_ptr = var_ptr->Next; + while(search_ptr) { + search_ptr_next = search_ptr->Next; + if (readers_intersect(var, search_ptr->Item)){ + rc_list_remove(&aborted_list, + search_ptr); + rc_variable_add_friend(var, search_ptr->Item); + } + search_ptr = search_ptr_next; } - search_ptr = search_ptr_next; } rc_list_remove(&aborted_list, var_ptr); rc_list_add(&variable_list, rc_list(