diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_fs.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp index ab4ee34b41c..19e9cb957e0 100644 --- a/src/mesa/drivers/dri/i965/brw_fs.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs.cpp @@ -2334,6 +2334,17 @@ fs_visitor::opt_algebraic() } } break; + case SHADER_OPCODE_RCP: { + fs_inst *prev = (fs_inst *)inst->prev; + if (prev->opcode == SHADER_OPCODE_SQRT) { + if (inst->src[0].equals(prev->dst)) { + inst->opcode = SHADER_OPCODE_RSQ; + inst->src[0] = prev->src[0]; + progress = true; + } + } + break; + } default: break; } |