diff options
author | Tom Stellard <[email protected]> | 2011-09-18 17:43:41 -0700 |
---|---|---|
committer | Tom Stellard <[email protected]> | 2011-09-18 18:00:14 -0700 |
commit | 2d1004d9aa719bb93a4f057b0eefe88f23b44e44 (patch) | |
tree | 8dd9ee5aa99d4e358806329763ad864a79d4dcd8 | |
parent | 63b59027563be933f86635489e70520b566360eb (diff) |
r300/compiler: Fix regalloc for values with multiple writers
https://bugs.freedesktop.org/show_bug.cgi?id=40062
https://bugs.freedesktop.org/show_bug.cgi?id=36939
Note: This is a candidate for the 7.11 branch.
-rw-r--r-- | src/gallium/drivers/r300/compiler/radeon_variable.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/gallium/drivers/r300/compiler/radeon_variable.c b/src/gallium/drivers/r300/compiler/radeon_variable.c index 7c640c4f621..77bb9d4c230 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)); |