From: Matt Turner Date: Tue, 24 Jun 2014 19:41:35 +0000 (-0700) Subject: i965/fs: Use is_head_sentinel() instead of ->prev == NULL. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e8e5f0a342505a4d10cbcdee03592c96d286b57c;p=mesa.git i965/fs: Use is_head_sentinel() instead of ->prev == NULL. Makes it more clear what we're doing and requires less knowledge of exec_list. Reviewed-by: Ian Romanick --- diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp index 8d98b0d30ab..263127f2de1 100644 --- a/src/mesa/drivers/dri/i965/brw_fs.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs.cpp @@ -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) {