ir_to_mesa: Use constructors to convert between src_reg and dst_reg.
authorKenneth Graunke <kenneth@whitecape.org>
Tue, 5 Apr 2011 19:01:59 +0000 (12:01 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Tue, 5 Apr 2011 22:29:07 +0000 (15:29 -0700)
commitcb21fa91b8e8f46d7d27604b9cb77fba031567f4
tree5df8b0ff59ce6c32ae89ee4eeede3d50c64df170
parentfc6b4332c32461d0e092c908a0f3d9d44d1452a9
ir_to_mesa: Use constructors to convert between src_reg and dst_reg.

Rather than ir_to_mesa_dst_reg_from_src and ir_to_mesa_src_reg_from_dst.

The new constructors are marked 'explicit' so that the compiler can
catch cases where source and destination registers were accidentally
interchanged.

This also necessitated using constructors to initialize the undef and
address registers, as well as adding a default constructor.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
src/mesa/program/ir_to_mesa.cpp