gk104/ir: simplify and fool-proof texbar algorithm
authorIlia Mirkin <imirkin@alum.mit.edu>
Thu, 10 Dec 2015 23:19:44 +0000 (18:19 -0500)
committerIlia Mirkin <imirkin@alum.mit.edu>
Sat, 12 Dec 2015 23:10:16 +0000 (18:10 -0500)
commit7752bbc44e78e982de3cd4c34862adc38a338234
tree4f7f209919b20bd39b21b5676225f8f6ded788c0
parentd35695096de2358aef40452b5e3304a02534f7db
gk104/ir: simplify and fool-proof texbar algorithm

With the current algorithm, we only look at tex uses. However there's a
write-after-write hazard where we might decide to, on some path, not use
a texture's output at all, but instead to write a different value to
that register. However without the barrier, the texture might complete
later and overwrite that value.

This fixes Unreal Elemental demo on GK110/GK208, flightgear on GK10x,
and likely other random-looking failures.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: "11.1" <mesa-stable@lists.freedesktop.org>
src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp
src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.h