glsl: Add methods to copy parts of one ir_constant into another.
authorOlivier Galibert <galibert@pobox.com>
Wed, 2 May 2012 21:11:40 +0000 (23:11 +0200)
committerKenneth Graunke <kenneth@whitecape.org>
Tue, 8 May 2012 19:55:50 +0000 (12:55 -0700)
commit8ec01ba2ff95449674c779c05afcd32bbf7dbdc8
treee368ae55dbf3e8a52ddc966b3b8d2087e4bec1e3
parenta270e86d382597d4d01ebcfa1693e21d778cbe6d
glsl: Add methods to copy parts of one ir_constant into another.

- copy_masked_offset copies part of a constant into another,
  assign-like.

- copy_offset copies a constant into (a subset of) another,
  funcall-return like.

These methods are to be used to trace through assignments and function
calls when computing a constant expression.

Signed-off-by: Olivier Galibert <galibert@pobox.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net> [v1]
src/glsl/ir.cpp
src/glsl/ir.h