diff --git a/src/gallium/drivers/r300/compiler/radeon_pair_regalloc.c b/src/gallium/drivers/r300/compiler/radeon_pair_regalloc.c index 49983d6..53f6ca5 100644 --- a/src/gallium/drivers/r300/compiler/radeon_pair_regalloc.c +++ b/src/gallium/drivers/r300/compiler/radeon_pair_regalloc.c @@ -526,6 +526,7 @@ static void do_advanced_regalloc(struct regalloc_state * s) } node_classes[node_index] = rc_class_list[class_index].Id; + rc_variable_print(var_ptr->Item); } diff --git a/src/gallium/drivers/r300/compiler/radeon_variable.c b/src/gallium/drivers/r300/compiler/radeon_variable.c index 7c640c4..77bb9d4 100644 --- a/src/gallium/drivers/r300/compiler/radeon_variable.c +++ b/src/gallium/drivers/r300/compiler/radeon_variable.c @@ -297,9 +297,12 @@ static void get_variable_helper( { struct rc_list * list_ptr; for (list_ptr = *variable_list; list_ptr; list_ptr = list_ptr->Next) { - if (readers_intersect(variable, list_ptr->Item)) { - rc_variable_add_friend(list_ptr->Item, variable); - return; + struct rc_variable * var; + for (var = list_ptr->Item; var; var = var->Friend) { + if (readers_intersect(var, variable)) { + rc_variable_add_friend(var, variable); + return; + } } } rc_list_add(variable_list, rc_list(&variable->C->Pool, variable));