i965/fs: Use is_head_sentinel() instead of ->prev == NULL.
authorMatt Turner <mattst88@gmail.com>
Tue, 24 Jun 2014 19:41:35 +0000 (12:41 -0700)
committerMatt Turner <mattst88@gmail.com>
Tue, 1 Jul 2014 15:55:51 +0000 (08:55 -0700)
Makes it more clear what we're doing and requires less knowledge of
exec_list.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
src/mesa/drivers/dri/i965/brw_fs.cpp

index 8d98b0d..263127f 100644 (file)
@@ -2137,7 +2137,7 @@ fs_visitor::compute_to_mrf()
        */
       fs_inst *scan_inst;
       for (scan_inst = (fs_inst *)inst->prev;
-          scan_inst->prev != NULL;
+           !scan_inst->is_head_sentinel();
           scan_inst = (fs_inst *)scan_inst->prev) {
         if (scan_inst->dst.file == GRF &&
             scan_inst->dst.reg == inst->src[0].reg) {