From 437e65f9d93f8df0e6aaf1bcaf74c6a211498db8 Mon Sep 17 00:00:00 2001 From: Francisco Jerez Date: Mon, 25 Apr 2016 17:25:48 -0700 Subject: [PATCH] i965/fs: Add (sub)reg_offset asserts to brw_reg_from_fs_reg. These are completely ignored by the conversion to brw_reg, so they better be zero. Reviewed-by: Jason Ekstrand --- src/mesa/drivers/dri/i965/brw_fs_generator.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/mesa/drivers/dri/i965/brw_fs_generator.cpp b/src/mesa/drivers/dri/i965/brw_fs_generator.cpp index 4ca3dad866c..93a95198843 100644 --- a/src/mesa/drivers/dri/i965/brw_fs_generator.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs_generator.cpp @@ -56,6 +56,7 @@ brw_file_from_reg(fs_reg *reg) static struct brw_reg brw_reg_from_fs_reg(fs_inst *inst, fs_reg *reg, unsigned gen, bool compressed) { + assert(reg->reg_offset == 0); struct brw_reg brw_reg; switch (reg->file) { @@ -103,6 +104,7 @@ brw_reg_from_fs_reg(fs_inst *inst, fs_reg *reg, unsigned gen, bool compressed) case ARF: case FIXED_GRF: case IMM: + assert(reg->subreg_offset == 0); brw_reg = reg->as_brw_reg(); break; case BAD_FILE: -- 2.30.2