diff options
author | Eric Anholt <[email protected]> | 2010-10-11 13:38:38 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2010-10-11 15:26:58 -0700 |
commit | 317dbf4613ebf56ca14ee70c1ad6e620ad7942c2 (patch) | |
tree | 885f60e78198cd33997af6354e6b599db74ca1a8 /src/mesa | |
parent | 7b5bc38c44269fc51db2f8b5e4ba0222212c6d71 (diff) |
i965: Don't compute-to-MRF in gen6 math instructions.
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_fs.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp index 0f1f4fa26ef..0353bb54e72 100644 --- a/src/mesa/drivers/dri/i965/brw_fs.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs.cpp @@ -2616,6 +2616,22 @@ fs_visitor::compute_to_mrf() if (scan_inst->mlen) break; + if (intel->gen >= 6) { + /* gen6 math instructions must have the destination be + * GRF, so no compute-to-MRF for them. + */ + if (scan_inst->opcode == FS_OPCODE_RCP || + scan_inst->opcode == FS_OPCODE_RSQ || + scan_inst->opcode == FS_OPCODE_SQRT || + scan_inst->opcode == FS_OPCODE_EXP2 || + scan_inst->opcode == FS_OPCODE_LOG2 || + scan_inst->opcode == FS_OPCODE_SIN || + scan_inst->opcode == FS_OPCODE_COS || + scan_inst->opcode == FS_OPCODE_POW) { + break; + } + } + if (scan_inst->dst.reg_offset == inst->src[0].reg_offset) { /* Found the creator of our MRF's source value. */ found = true; |