~ubuntu-branches/ubuntu/raring/mesa/raring-proposed

« back to all changes in this revision

Viewing changes to src/mesa/drivers/dri/i965/brw_vec4_reg_allocate.cpp

  • Committer: Package Import Robot
  • Author(s): Maarten Lankhorst
  • Date: 2013-03-14 12:18:29 UTC
  • mfrom: (1.7.14)
  • Revision ID: package-import@ubuntu.com-20130314121829-bv7c0z6t1pob5ket
Tags: 9.0.3-0ubuntu1
New upstream release. (LP: #1134466)

Show diffs side-by-side

added added

removed removed

Lines of Context:
41
41
   }
42
42
}
43
43
 
44
 
void
 
44
bool
45
45
vec4_visitor::reg_allocate_trivial()
46
46
{
47
47
   unsigned int hw_reg_mapping[this->virtual_grf_count];
90
90
   if (prog_data->total_grf > max_grf) {
91
91
      fail("Ran out of regs on trivial allocator (%d/%d)\n",
92
92
           prog_data->total_grf, max_grf);
 
93
      return false;
93
94
   }
 
95
 
 
96
   return true;
94
97
}
95
98
 
96
99
static void
139
142
   ra_set_finalize(brw->vs.regs);
140
143
}
141
144
 
142
 
void
 
145
bool
143
146
vec4_visitor::reg_allocate()
144
147
{
145
148
   unsigned int hw_reg_mapping[virtual_grf_count];
151
154
   /* Using the trivial allocator can be useful in debugging undefined
152
155
    * register access as a result of broken optimization passes.
153
156
    */
154
 
   if (0) {
155
 
      reg_allocate_trivial();
156
 
      return;
157
 
   }
 
157
   if (0)
 
158
      return reg_allocate_trivial();
158
159
 
159
160
   calculate_live_intervals();
160
161
 
213
214
         spill_reg(reg);
214
215
      }
215
216
      ralloc_free(g);
216
 
      return;
 
217
      return false;
217
218
   }
218
219
 
219
220
   /* Get the chosen virtual registers for each node, and map virtual
239
240
   }
240
241
 
241
242
   ralloc_free(g);
 
243
 
 
244
   return true;
242
245
}
243
246
 
244
247
void