mesa/src
Francisco Jerez 59cb919ff2 intel/ir: Fix CFG corruption in opt_predicated_break().
Specifically the optimization of a conditional BREAK + WHILE sequence
into a conditional WHILE seems pretty broken.  The list of successors
of "earlier_block" (where the conditional BREAK was found) is emptied
and then re-created with the same edges for no apparent reason.  On
top of that the list of predecessors of the block immediately after
the WHILE loop is emptied, but only one of the original edges will be
added back, which means that potentially several blocks that still
have it on their list of successors won't be on its list of
predecessors anymore, causing all sorts of hilarity due to the
inconsistency in the control flow graph.

The solution is to remove the code that's removing valid edges from
the CFG.  cfg_t::remove_block() will already clean up after itself.
The assert in bblock_t::combine_with() also needs to be removed since
we will be merging a block with multiple children into the first one
of them.

Found the issue on a hardware enabling branch originally, but
apparently somebody reproduced the same problem independently on
master in the meantime.

Fixes: d13bcdb3a9 ("i965/fs: Extend predicated break pass to predicate WHILE.")
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111009
Cc: jiradet.jd@gmail.com
Cc: Sergii Romantsov <sergii.romantsov@globallogic.com>
Cc: Matt Turner <mattst88@gmail.com>
Cc: mesa-stable@lists.freedesktop.org
Tested-by: Paul Chelombitko <qamonstergl@gmail.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
(cherry picked from commit 54fbc625ea)
2019-08-02 07:00:31 +00:00
..
amd radv: Fix descriptor set allocation failure. 2019-07-31 08:00:27 +00:00
broadcom v3d: fix checking twice auf flag 2019-06-14 09:06:36 +00:00
compiler nir: remove explicit nir_intrinsic_index_flag values 2019-08-01 07:59:12 +00:00
egl egl/drm: ensure the backing gbm is set before using it 2019-08-01 07:57:55 +00:00
freedreno freedreno: Fix data races with allocating/freeing struct ir3. 2019-07-30 08:33:26 +00:00
gallium nv50/ir: handle insn not being there for definition of CVT arg 2019-07-29 11:08:14 +00:00
gbm meson: make nm binary optional 2019-05-03 10:58:05 -07:00
getopt
glx meson: allow building all glx without any drivers 2019-07-24 10:09:37 +00:00
gtest delete autotools .gitignore files 2019-04-29 21:17:19 +00:00
hgl haiku: Fix hgl dispatch build. Tested under meson/scons. 2019-04-02 16:06:00 -05:00
imgui imgui: update memory editor 2019-02-26 12:49:07 +00:00
intel intel/ir: Fix CFG corruption in opt_predicated_break(). 2019-08-02 07:00:31 +00:00
loader Delete autotools 2019-04-15 13:44:29 -07:00
mapi meson: Search for execinfo.h 2019-07-02 09:57:34 +02:00
mesa main: Fix memleaks in mesa_use_program 2019-07-25 08:34:56 +00:00
util util: fix no-op macro (bad number of arguments) 2019-07-24 10:29:18 +00:00
vulkan vulkan/wsi: update swapchain status on vkQueuePresent 2019-07-18 08:27:58 +00:00
meson.build turnip: Add driver skeleton (v2) 2019-03-11 10:01:15 -07:00
SConscript scons: Remove gles option. 2018-10-19 16:50:26 +01:00