i965/fs: Add (sub)reg_offset asserts to brw_reg_from_fs_reg.
authorFrancisco Jerez <currojerez@riseup.net>
Tue, 26 Apr 2016 00:25:48 +0000 (17:25 -0700)
committerFrancisco Jerez <currojerez@riseup.net>
Sat, 28 May 2016 06:29:05 +0000 (23:29 -0700)
These are completely ignored by the conversion to brw_reg, so they
better be zero.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/mesa/drivers/dri/i965/brw_fs_generator.cpp

index 4ca3dad866c86b20b94aaaa7dc28a7935a46c05c..93a9519884396b9d0e6f7cbaea50c0b04ce144bc 100644 (file)
@@ -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: