summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorMatt Turner <[email protected]>2013-12-07 16:22:08 -0800
committerMatt Turner <[email protected]>2014-01-21 14:09:33 -0800
commit78fa6172e11159a32fc5bb222965fd53eb39976e (patch)
treed6dbd89b3371610aef26eb14dc4e8f8dd9f8b51f /src/mesa
parent9bb4d71fd2ff8ed24cb4d1485df1f1ff667bcb3c (diff)
i965/fs: Assert that var < num_vars.
Helped to track down a problem in a version of the next commit. Reviewed-by: Jordan Justen <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs_live_variables.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs_live_variables.cpp b/src/mesa/drivers/dri/i965/brw_fs_live_variables.cpp
index a29767d2c57..a2d88aa753d 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_live_variables.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_live_variables.cpp
@@ -57,6 +57,7 @@ fs_live_variables::setup_one_read(bblock_t *block, fs_inst *inst,
int ip, fs_reg reg)
{
int var = var_from_vgrf[reg.reg] + reg.reg_offset;
+ assert(var < num_vars);
/* In most cases, a register can be written over safely by the
* same instruction that is its last use. For a single
@@ -106,6 +107,7 @@ fs_live_variables::setup_one_write(bblock_t *block, fs_inst *inst,
int ip, fs_reg reg)
{
int var = var_from_vgrf[reg.reg] + reg.reg_offset;
+ assert(var < num_vars);
start[var] = MIN2(start[var], ip);
end[var] = MAX2(end[var], ip);