Mesa (master): i965/fs: Recalculate live intervals in calculate_register_pressure().
Matt Turner
mattst88 at kemper.freedesktop.org
Sat Apr 5 16:46:26 UTC 2014
Module: Mesa
Branch: master
Commit: 26012c16737a8542316062ef17fa9a0b34e274b7
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=26012c16737a8542316062ef17fa9a0b34e274b7
Author: Matt Turner <mattst88 at gmail.com>
Date: Wed Mar 26 13:09:21 2014 -0700
i965/fs: Recalculate live intervals in calculate_register_pressure().
Otherwise calling dump_instructions() after declaring a new fs_reg would
segfault when calculate_register_pressure()'s loop over reg walked off
the end of the virtual_grf_start[] array that calculate_live_intervals()
would have reallocated for you, if it had known there was a new
register.
---
src/mesa/drivers/dri/i965/brw_fs.cpp | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp
index 713e477..c88f7c9 100644
--- a/src/mesa/drivers/dri/i965/brw_fs.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs.cpp
@@ -3294,6 +3294,7 @@ fs_visitor::assign_binding_table_offsets()
void
fs_visitor::calculate_register_pressure()
{
+ invalidate_live_intervals();
calculate_live_intervals();
int num_instructions = 0;
More information about the mesa-commit
mailing list