aboutsummaryrefslogtreecommitdiffstats
path: root/src/compiler/glsl/ir_optimization.h
diff options
context:
space:
mode:
authorSagar Ghuge <[email protected]>2019-02-27 14:02:54 -0800
committerSagar Ghuge <[email protected]>2019-03-04 15:50:25 -0800
commit1d8994a63b546a5b2dc4feb5bd98a84ee853d6af (patch)
tree6ff1fb8b5cca7261fb887e3bc9dfe773121e2352 /src/compiler/glsl/ir_optimization.h
parente551040c602d392019e68f54d9a3a310d2a937a3 (diff)
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 <[email protected]> Suggested-by: Matt Turner <Matt Turner <[email protected]> Suggested-by: Jason Ekstrand <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/compiler/glsl/ir_optimization.h')
-rw-r--r--src/compiler/glsl/ir_optimization.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/compiler/glsl/ir_optimization.h b/src/compiler/glsl/ir_optimization.h
index ef68b93c09e..e027654d3a0 100644
--- a/src/compiler/glsl/ir_optimization.h
+++ b/src/compiler/glsl/ir_optimization.h
@@ -57,6 +57,7 @@ struct gl_shader_program;
#define DDIV_TO_MUL_RCP 0x100000
#define DIV_TO_MUL_RCP (FDIV_TO_MUL_RCP | DDIV_TO_MUL_RCP)
#define SQRT_TO_ABS_SQRT 0x200000
+#define MUL64_TO_MUL_AND_MUL_HIGH 0x400000
/* Opertaions for lower_64bit_integer_instructions() */
#define MUL64 (1U << 0)