glsl: Implement [iu]mulExtended() built-ins for ARB_gpu_shader5.
authorMatt Turner <mattst88@gmail.com>
Wed, 18 Sep 2013 04:34:15 +0000 (21:34 -0700)
committerMatt Turner <mattst88@gmail.com>
Mon, 7 Oct 2013 17:43:19 +0000 (10:43 -0700)
commit06e41a02a3564b00404dd3dd5d6f6b5897df36e9
treec8addcab70dc2f20e65df76fd2570230ff5e64bd
parent69909c866b6595f80d206c8e2484b1dc6668e7be
glsl: Implement [iu]mulExtended() built-ins for ARB_gpu_shader5.

These built-ins have two "out" parameters, which makes implementing them
efficiently with our current compiler infrastructure difficult. Instead,
implement them in terms of the existing ir_binop_mul IR (to return the
low 32-bits) and a new ir_binop_mul64 which returns the high 32-bits.

v2: Rename mul64 -> imul_high as suggested by Ken.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/glsl/builtin_functions.cpp
src/glsl/ir.cpp
src/glsl/ir.h
src/glsl/ir_builder.cpp
src/glsl/ir_builder.h
src/glsl/ir_validate.cpp
src/mesa/program/ir_to_mesa.cpp
src/mesa/state_tracker/st_glsl_to_tgsi.cpp