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.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/mesalib/src/mesa/program/register_allocate.c b/mesalib/src/mesa/program/register_allocate.c
index 2c826fc66..16739fd39 100644
--- a/mesalib/src/mesa/program/register_allocate.c
+++ b/mesalib/src/mesa/program/register_allocate.c
@@ -355,7 +355,7 @@ ra_alloc_interference_graph(struct ra_regs *regs, unsigned int count)
g->stack = rzalloc_array(g, unsigned int, count);
for (i = 0; i < count; i++) {
- int bitset_count = ALIGN(count, BITSET_WORDBITS) / BITSET_WORDBITS;
+ int bitset_count = BITSET_WORDS(count);
g->nodes[i].adjacency = rzalloc_array(g, BITSET_WORD, bitset_count);
g->nodes[i].adjacency_list_size = 4;
@@ -437,7 +437,7 @@ ra_simplify(struct ra_graph *g)
}
for (i = 0; i < g->count; i++) {
- if (!g->nodes[i].in_stack)
+ if (!g->nodes[i].in_stack && g->nodes[i].reg == -1)
return GL_FALSE;
}
@@ -586,7 +586,7 @@ int
ra_get_best_spill_node(struct ra_graph *g)
{
unsigned int best_node = -1;
- unsigned int best_benefit = 0.0;
+ float best_benefit = 0.0;
unsigned int n;
for (n = 0; n < g->count; n++) {