intel/fs/gen12: Introduce software scoreboard lowering pass.
authorFrancisco Jerez <currojerez@riseup.net>
Fri, 9 Nov 2018 22:13:37 +0000 (14:13 -0800)
committerFrancisco Jerez <currojerez@riseup.net>
Fri, 11 Oct 2019 19:24:16 +0000 (12:24 -0700)
commit265c7c897173e34920ca269aa1fae7285ec1c5a5
tree39903138483d35b8de8ebd239c8164340541247c
parente0b8d7953ea405cfbed0b2a1b0a526f8c65bf596
intel/fs/gen12: Introduce software scoreboard lowering pass.

Gen12+ hardware lacks the register scoreboard logic that used to
guarantee data coherency between register reads and writes in previous
generations.  This lowering pass runs after register allocation in
order to make up for it.

It works by performing global dataflow analysis in order to determine
the set of potential dependencies of every instruction in the shader,
and then inserts any required SWSB annotations and additional SYNC
instructions in order to guarantee data coherency.

v2: Drop unnecessary _safe list iteration (Caio).

v3: Temporarily workaround potential WaR hazard between FPU
    instruction and subsequent out-of-order write, pending
    clarification from the hardware team.  Drop redundant tracking of
    implicit access of acc0-1, since the hardware guarantees coherency
    of these (but not the other accumulators...).

Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
src/intel/Makefile.sources
src/intel/compiler/brw_fs.cpp
src/intel/compiler/brw_fs.h
src/intel/compiler/brw_fs_scoreboard.cpp [new file with mode: 0644]
src/intel/compiler/meson.build