Mesa (master): i965: Ensure that we end instruction streams properly.
Iago Toral Quiroga
itoral at kemper.freedesktop.org
Mon Jun 9 10:07:58 UTC 2014
Module: Mesa
Branch: master
Commit: c75f827f129dbb03e92200c9bfc3d82e02ea82f6
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=c75f827f129dbb03e92200c9bfc3d82e02ea82f6
Author: Iago Toral Quiroga <itoral at igalia.com>
Date: Mon Jun 9 12:00:04 2014 +0200
i965: Ensure that we end instruction streams properly.
Threads must terminate with a SEND message to a particular shared function,
such as a URB write or FB write, so the instruction stream really shouldn't
ever end in an IF/ELSE/ENDIF or similar block structure.
However, if the instruction stream (incorrectly) ends in a block structure
the last block's end pointer will not be set, leading to a crash later on in
fs_live_variables::setup_def_use(). It is better to detect this earlier, so
assert on that.
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
---
src/mesa/drivers/dri/i965/brw_cfg.cpp | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/mesa/drivers/dri/i965/brw_cfg.cpp b/src/mesa/drivers/dri/i965/brw_cfg.cpp
index 6bf99f1..9d6eeb3 100644
--- a/src/mesa/drivers/dri/i965/brw_cfg.cpp
+++ b/src/mesa/drivers/dri/i965/brw_cfg.cpp
@@ -257,6 +257,8 @@ cfg_t::cfg_t(exec_list *instructions)
}
}
+ assert(cur->end);
+
cur->end_ip = ip;
make_block_array();
More information about the mesa-commit
mailing list