summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTom Stellard <[email protected]>2011-05-11 16:12:52 -0700
committerTom Stellard <[email protected]>2011-05-11 16:16:29 -0700
commit95c93651b4023cb070878aee7723d886de8ea19a (patch)
tree0759042daa2fbb9c1e645e6ecfa9b6d8567183a6 /src
parent4612554dce5d787fca9c85a67378024b336bd6ad (diff)
r300/compiler: Fix bug in rc_get_variables()
Variables that share readers were not always being linked together. https://bugs.freedesktop.org/show_bug.cgi?id=36939
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/r300/compiler/radeon_variable.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/src/mesa/drivers/dri/r300/compiler/radeon_variable.c b/src/mesa/drivers/dri/r300/compiler/radeon_variable.c
index 16fa5d28902..5b2295dc7ce 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(