summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2010-10-01 16:35:55 -0700
committerEric Anholt <eric@anholt.net>2010-10-01 17:19:03 -0700
commitafb64311e3484002e06aeac62187b68467610449 (patch)
treed7571efc33ce2baae2b83df48827d950078f6dda
parent5ee09413162f4ec83cc7a738e807ffde8c89cca7 (diff)
i965: Add a sanity check for register allocation sizes.
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp
index b38df71a84..ba6c048f38 100644
--- a/src/mesa/drivers/dri/i965/brw_fs.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs.cpp
@@ -2293,6 +2293,11 @@ fs_visitor::assign_regs()
break;
}
if (i == class_count) {
+ if (this->virtual_grf_sizes[r] >= base_reg_count) {
+ fprintf(stderr, "Object too large to register allocate.\n");
+ this->fail = true;
+ }
+
class_sizes[class_count++] = this->virtual_grf_sizes[r];
}
}