nvc0/ir: replace cvt instructions with add to improve shader performance
authorKarol Herbst <kherbst@redhat.com>
Thu, 13 Dec 2018 19:19:45 +0000 (20:19 +0100)
committerKarol Herbst <kherbst@redhat.com>
Tue, 5 Feb 2019 19:35:38 +0000 (20:35 +0100)
commita61c388d077edf78321ee31c84b24c6cce24ccbc
tree85a10806d64e639c013f5291518879fbc8e71117
parenta203eaa4f4fb672b95426289b8dad3a8998f92d7
nvc0/ir: replace cvt instructions with add to improve shader performance

gives me an performance boost of 0.2% in pixmark_piano on my gk106, gm204 and
gp107.

reduces the amount of generated convert instructions by roughly 30% in
shader-db.

v2: only for 32 bit operations
    move some common code out of the switch
    handle OP_SAT with modifiers
v3: only for registers and const memory
    rework if clauses
    merge isCvt into this patch
v4: merge isCvt into its use

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp
src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.h