From: Eric Anholt Date: Fri, 1 Oct 2010 23:35:55 +0000 (-0700) Subject: i965: Add a sanity check for register allocation sizes. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=afb64311e3484002e06aeac62187b68467610449;p=mesa.git i965: Add a sanity check for register allocation sizes. --- diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp index b38df71a84a..ba6c048f38f 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]; } }