[Mesa-dev] [PATCH 06/16] i965/fs: Assert that var < num_vars.
Jordan Justen
jljusten at gmail.com
Fri Jan 10 09:23:55 PST 2014
Patches 1-6
Reviewed-by: Jordan Justen <jordan.l.justen at intel.com>
On Thu, Dec 19, 2013 at 1:40 PM, Matt Turner <mattst88 at gmail.com> wrote:
> Helped to track down a problem in a version of the next commit.
> ---
> src/mesa/drivers/dri/i965/brw_fs_live_variables.cpp | 2 ++
> 1 file changed, 2 insertions(+)
>
> 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 a29767d..a2d88aa 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);
> --
> 1.8.3.2
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list