diff options
author | Matt Turner <[email protected]> | 2013-09-19 19:31:31 -0700 |
---|---|---|
committer | Matt Turner <[email protected]> | 2013-10-07 11:38:15 -0700 |
commit | e7dc88026a821a31bf2afeb934dded11c91401a1 (patch) | |
tree | c7cf2f7a9151b138ec390bd66f6f884618fb43e8 /src/mesa/drivers/dri | |
parent | c4e6569fc838d712253e355f32ee40671a86579e (diff) |
i965: Fixup for don't dead-code eliminate instructions that write to the accumulator.
Accidentally pushed an old version of the patch.
v2: Set destination register using brw_null_reg().
Reviewed-by: Paul Berry <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_fs.cpp | 3 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_vec4.cpp | 3 |
2 files changed, 2 insertions, 4 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp index b83aca447e5..d287bfdbd10 100644 --- a/src/mesa/drivers/dri/i965/brw_fs.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs.cpp @@ -1854,8 +1854,7 @@ fs_visitor::dead_code_eliminate() case BRW_OPCODE_ADDC: case BRW_OPCODE_SUBB: case BRW_OPCODE_MACH: - inst->dst.file = ARF; - inst->dst.reg = BRW_ARF_NULL; + inst->dst = fs_reg(retype(brw_null_reg(), inst->dst.type)); break; default: inst->remove(); diff --git a/src/mesa/drivers/dri/i965/brw_vec4.cpp b/src/mesa/drivers/dri/i965/brw_vec4.cpp index 790ff2ebc72..149a1a0e165 100644 --- a/src/mesa/drivers/dri/i965/brw_vec4.cpp +++ b/src/mesa/drivers/dri/i965/brw_vec4.cpp @@ -322,8 +322,7 @@ vec4_visitor::dead_code_eliminate() case BRW_OPCODE_ADDC: case BRW_OPCODE_SUBB: case BRW_OPCODE_MACH: - inst->dst.file = ARF; - inst->dst.reg = BRW_ARF_NULL; + inst->dst = dst_reg(retype(brw_null_reg(), inst->dst.type)); break; default: inst->remove(); |