nvir/gm107: consider FILE_FLAGS dependencies in SchedDataCalculatorGM107
authorKarol Herbst <kherbst@redhat.com>
Tue, 5 Dec 2017 10:09:54 +0000 (11:09 +0100)
committerKarol Herbst <kherbst@redhat.com>
Mon, 26 Feb 2018 13:41:58 +0000 (14:41 +0100)
commitef308d40070014b92aaf07a228edc73bd2e85570
treee1312dc1f465d536d11ec94baddbe0a59d1a4f25
parent2f07f823c9e5563156531057f1ea6e24670bba7f
nvir/gm107: consider FILE_FLAGS dependencies in SchedDataCalculatorGM107

currently while insterting barriers, writes and reads to FILE_FLAGS aren't
considered. This can lead to WaR hazards in some situations.

With the previous commit fixes shaders with intstructions like this:
  mad u32 $r2 $r4 $r11 $r2
  mad u32 { $r5 $c0 } $r4 $r10 $r6
  mad (SUBOP:1) u32 $r3 $r4 $r10 $r2 $c0

Affects OpenCL CTS tests on Maxwell+:
basic/test_basic intmath_long
basic/test_basic intmath_long2
basic/test_basic intmath_long4

v2: only put barriers on instructions which actually read flags

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Signed-off-by: Karol Herbst <kherbst@redhat.com>
src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gm107.cpp