aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/program/register_allocate.c
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib/src/mesa/program/register_allocate.c')
-rw-r--r--mesalib/src/mesa/program/register_allocate.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/mesalib/src/mesa/program/register_allocate.c b/mesalib/src/mesa/program/register_allocate.c
index ea06a07c6..4eed0b5aa 100644
--- a/mesalib/src/mesa/program/register_allocate.c
+++ b/mesalib/src/mesa/program/register_allocate.c
@@ -630,9 +630,10 @@ ra_get_best_spill_node(struct ra_graph *g)
* colored that we couldn't manage to color in ra_select().
*/
for (i = g->stack_optimistic_start; i < g->stack_count; i++) {
+ float cost, benefit;
+
n = g->stack[i];
- float cost = g->nodes[n].spill_cost;
- float benefit;
+ cost = g->nodes[n].spill_cost;
if (cost <= 0.0)
continue;