nvc0/ir: detect i2f/i2i which operate on specific bytes/words
authorIlia Mirkin <imirkin@alum.mit.edu>
Wed, 19 Aug 2015 01:09:12 +0000 (21:09 -0400)
committerIlia Mirkin <imirkin@alum.mit.edu>
Thu, 20 Aug 2015 21:58:30 +0000 (17:58 -0400)
commit63cb85e567ad1025ee990b38f43c2f1ef811821b
treeaaa78a5063e4b7e629c69b6f43443b89259d28c8
parent51499bb5ff5626b893383545c494c7f808763404
nvc0/ir: detect i2f/i2i which operate on specific bytes/words

Some Unigine shaders have been observed to unpack bytes out of 32-bit
integers and convert them to floats. I2F/I2I can handle this sort of
thing directly. Detect the handleable situations.

This misses 16-bit word capabilities in nv50, but I haven't seen shaders
that would actually make use of that.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gk110.cpp
src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gm107.cpp
src/gallium/drivers/nouveau/codegen/nv50_ir_emit_nvc0.cpp
src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp