diff options
Diffstat (limited to 'src/mesa/drivers/dri/i965')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_fs.h | 7 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_fs_generator.cpp | 1 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_vec4.cpp | 2 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_vec4.h | 14 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_vec4_generator.cpp | 2 |
5 files changed, 26 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs.h b/src/mesa/drivers/dri/i965/brw_fs.h index ce5050bd41a..4845156d74b 100644 --- a/src/mesa/drivers/dri/i965/brw_fs.h +++ b/src/mesa/drivers/dri/i965/brw_fs.h @@ -130,6 +130,13 @@ public: }; static inline fs_reg +retype(fs_reg reg, unsigned type) +{ + reg.fixed_hw_reg.type = reg.type = type; + return reg; +} + +static inline fs_reg offset(fs_reg reg, unsigned delta) { assert(delta == 0 || (reg.file != HW_REG && reg.file != IMM)); diff --git a/src/mesa/drivers/dri/i965/brw_fs_generator.cpp b/src/mesa/drivers/dri/i965/brw_fs_generator.cpp index 82db1407e81..3f2060d86bb 100644 --- a/src/mesa/drivers/dri/i965/brw_fs_generator.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs_generator.cpp @@ -1053,6 +1053,7 @@ brw_reg_from_fs_reg(fs_reg *reg) } break; case HW_REG: + assert(reg->type == reg->fixed_hw_reg.type); brw_reg = reg->fixed_hw_reg; break; case BAD_FILE: diff --git a/src/mesa/drivers/dri/i965/brw_vec4.cpp b/src/mesa/drivers/dri/i965/brw_vec4.cpp index 53fb9ee222d..fbf7fb9e78b 100644 --- a/src/mesa/drivers/dri/i965/brw_vec4.cpp +++ b/src/mesa/drivers/dri/i965/brw_vec4.cpp @@ -118,6 +118,7 @@ src_reg::src_reg(struct brw_reg reg) this->file = HW_REG; this->fixed_hw_reg = reg; + this->type = reg.type; } src_reg::src_reg(dst_reg reg) @@ -188,6 +189,7 @@ dst_reg::dst_reg(struct brw_reg reg) this->file = HW_REG; this->fixed_hw_reg = reg; + this->type = reg.type; } dst_reg::dst_reg(src_reg reg) diff --git a/src/mesa/drivers/dri/i965/brw_vec4.h b/src/mesa/drivers/dri/i965/brw_vec4.h index a592af2f128..9dc4f0162d1 100644 --- a/src/mesa/drivers/dri/i965/brw_vec4.h +++ b/src/mesa/drivers/dri/i965/brw_vec4.h @@ -141,6 +141,13 @@ public: }; static inline src_reg +retype(src_reg reg, unsigned type) +{ + reg.fixed_hw_reg.type = reg.type = type; + return reg; +} + +static inline src_reg offset(src_reg reg, unsigned delta) { assert(delta == 0 || (reg.file != HW_REG && reg.file != IMM)); @@ -193,6 +200,13 @@ public: }; static inline dst_reg +retype(dst_reg reg, unsigned type) +{ + reg.fixed_hw_reg.type = reg.type = type; + return reg; +} + +static inline dst_reg offset(dst_reg reg, unsigned delta) { assert(delta == 0 || (reg.file != HW_REG && reg.file != IMM)); diff --git a/src/mesa/drivers/dri/i965/brw_vec4_generator.cpp b/src/mesa/drivers/dri/i965/brw_vec4_generator.cpp index 058b639309b..e0c59bac3d7 100644 --- a/src/mesa/drivers/dri/i965/brw_vec4_generator.cpp +++ b/src/mesa/drivers/dri/i965/brw_vec4_generator.cpp @@ -50,6 +50,7 @@ vec4_instruction::get_dst(void) break; case HW_REG: + assert(dst.type == dst.fixed_hw_reg.type); brw_reg = dst.fixed_hw_reg; break; @@ -116,6 +117,7 @@ vec4_instruction::get_src(const struct brw_vec4_prog_data *prog_data, int i) break; case HW_REG: + assert(src[i].type == src[i].fixed_hw_reg.type); brw_reg = src[i].fixed_hw_reg; break; |