glsl: [u/i]mulExtended optimization for GLSL
authorSagar Ghuge <sagar.ghuge@intel.com>
Wed, 27 Feb 2019 22:02:54 +0000 (14:02 -0800)
committerSagar Ghuge <sagar.ghuge@intel.com>
Mon, 4 Mar 2019 23:50:25 +0000 (15:50 -0800)
commit1d8994a63b546a5b2dc4feb5bd98a84ee853d6af
tree6ff1fb8b5cca7261fb887e3bc9dfe773121e2352
parente551040c602d392019e68f54d9a3a310d2a937a3
glsl: [u/i]mulExtended optimization for GLSL

Optimize mulExtended to use 32x32->64 multiplication.

Drivers which are not based on NIR, they can set the
MUL64_TO_MUL_AND_MUL_HIGH lowering flag in order to have same old
behavior.

v2: Add missing condition check (Jason Ekstrand)

Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Suggested-by: Matt Turner <Matt Turner <mattst88@gmail.com>
Suggested-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/compiler/glsl/builtin_functions.cpp
src/compiler/glsl/glsl_to_nir.cpp
src/compiler/glsl/ir_optimization.h
src/compiler/glsl/ir_validate.cpp
src/compiler/glsl/lower_instructions.cpp
src/mesa/program/ir_to_mesa.cpp
src/mesa/state_tracker/st_glsl_to_tgsi.cpp