From afb64311e3484002e06aeac62187b68467610449 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Fri, 1 Oct 2010 16:35:55 -0700 Subject: i965: Add a sanity check for register allocation sizes. --- src/mesa/drivers/dri/i965/brw_fs.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') 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]; } } -- cgit v1.2.3