gm107/ir: emit RED instead of ATOM when no dst
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Fri, 4 Nov 2016 19:08:57 +0000 (20:08 +0100)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Sat, 5 Nov 2016 18:27:35 +0000 (19:27 +0100)
commita29536459694017bf4e7424764574808553a6d7f
tree5d9efc510f85f58cc55e10f9d569a11351fd151c
parentcfb5a9ab2321ae82c28655cee0537f1d42c57933
gm107/ir: emit RED instead of ATOM when no dst

This is similar to NVC0 and GK110 emitters where we emit
reduction operations instead of atomic operations when the
destination is not used.

Found after writing some tests which check if performance counters
return the expected value. In that case, gred_count returned 0
on gm107 while at least gk106 returned the correct value.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gm107.cpp