radeonsi: strengthen emit_optimization_barrier
authorNicolai Hähnle <nicolai.haehnle@amd.com>
Fri, 31 Mar 2017 11:04:34 +0000 (13:04 +0200)
committerNicolai Hähnle <nicolai.haehnle@amd.com>
Wed, 5 Apr 2017 13:29:43 +0000 (15:29 +0200)
commit24d4fbe226c1f5b9a216d05c25737b4b14391975
tree248d40d5f708aab2d88bd95cff03a1ddc94c3fdf
parent5c4602f4a259dae639457554f377bc35f800083f
radeonsi: strengthen emit_optimization_barrier

LLVM will lift inline assembly out of if-else-blocks if both paths have
the same inline assembly. Prevent this by adding an irrelevant unique
text to the assembly.

This requires the LLVM assembly parser to be initialized.

Furthermore, allow forcing subsequent computations to happen after the
optimization barrier by defining a data dependency.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/gallium/drivers/radeonsi/si_shader.c
src/gallium/drivers/radeonsi/si_shader_tgsi_setup.c