i965: Fix reversed naming of the operations in compute-to-mrf optimization.

Also fix up comments, so that the difference between the two passes is
clarified.
This commit is contained in:
Eric Anholt
2010-07-26 13:01:45 -07:00
parent b3ea15f12b
commit 2621100458
3 changed files with 11 additions and 6 deletions
+1 -1
View File
@@ -985,6 +985,6 @@ void brw_set_src1( struct brw_instruction *insn,
/* brw_optimize.c */
void brw_optimize(struct brw_compile *p);
void brw_remove_duplicate_mrf_moves(struct brw_compile *p);
void brw_remove_mrf_to_grf_moves(struct brw_compile *p);
void brw_remove_grf_to_mrf_moves(struct brw_compile *p);
#endif
+9 -4
View File
@@ -476,9 +476,11 @@ static void brw_remove_inst(struct brw_compile *p, const GLboolean *removeInst)
p->nr_insn = nr_insn;
}
/* The gen code emitter generates a lot of duplications in the mrf-to-grf moves.
* Here, we monitor same mov mrf-to-grf instrutions and remove them as soon as
* none of the two operands have been written
/* The gen code emitter generates a lot of duplications in the
* grf-to-mrf moves, for example when texture sampling with the same
* coordinates from multiple textures.. Here, we monitor same mov
* grf-to-mrf instrutions and remove repeated ones where the operands
* and dst ahven't changed in between.
*/
void brw_remove_duplicate_mrf_moves(struct brw_compile *p)
{
@@ -521,7 +523,10 @@ void brw_remove_duplicate_mrf_moves(struct brw_compile *p)
free(removeInst);
}
void brw_remove_mrf_to_grf_moves(struct brw_compile *p)
/* Replace moves to MRFs where the value moved is the result of a
* normal arithmetic operation with computation right into the MRF.
*/
void brw_remove_grf_to_mrf_moves(struct brw_compile *p)
{
int i, j, prev;
struct brw_context *brw = p->brw;
+1 -1
View File
@@ -1716,7 +1716,7 @@ void brw_wm_emit( struct brw_wm_compile *c )
if (p->brw->intel.gen == 5) {
brw_remove_duplicate_mrf_moves(p);
if (c->dispatch_width == 16)
brw_remove_mrf_to_grf_moves(p);
brw_remove_grf_to_mrf_moves(p);
}
if (INTEL_DEBUG & DEBUG_WM) {