diff options
author | Eric Anholt <eric@anholt.net> | 2010-10-01 16:35:55 -0700 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2010-10-01 17:19:03 -0700 |
commit | afb64311e3484002e06aeac62187b68467610449 (patch) | |
tree | d7571efc33ce2baae2b83df48827d950078f6dda /src/mesa/drivers | |
parent | 5ee09413162f4ec83cc7a738e807ffde8c89cca7 (diff) |
i965: Add a sanity check for register allocation sizes.
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_fs.cpp | 5 |
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]; } } |