summaryrefslogtreecommitdiffstats
path: root/src/compiler/glsl/builtin_functions.h
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2016-10-17 17:54:40 -0700
committerIan Romanick <[email protected]>2017-01-20 15:41:23 -0800
commit012f2995c307a83212a88ff18e13bf7be006cd77 (patch)
treec593bbbb7d840cf6c87d410ec9886c54902f6ecf /src/compiler/glsl/builtin_functions.h
parent50d52df278c547ffd53505a3ebf98f13cba5bd56 (diff)
glsl: Add "built-in" functions to do 64/64 => 64 division
These functions are directly available in shaders. A #define is added to detect the presence. This allows these functions to be tested using piglit regardless of whether the driver uses them for lowering. The GLSL spec says that functions and macros beginning with __ are reserved for use by the implementation... hey, that's us! v2: Use function inlining. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Matt Turner <[email protected]>
Diffstat (limited to 'src/compiler/glsl/builtin_functions.h')
-rw-r--r--src/compiler/glsl/builtin_functions.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/compiler/glsl/builtin_functions.h b/src/compiler/glsl/builtin_functions.h
index c66f523f692..ac1a8ccd1eb 100644
--- a/src/compiler/glsl/builtin_functions.h
+++ b/src/compiler/glsl/builtin_functions.h
@@ -46,6 +46,12 @@ _mesa_glsl_release_builtin_functions(void);
namespace generate_ir {
ir_function_signature *
+udiv64(void *mem_ctx, builtin_available_predicate avail);
+
+ir_function_signature *
+idiv64(void *mem_ctx, builtin_available_predicate avail);
+
+ir_function_signature *
umul64(void *mem_ctx, builtin_available_predicate avail);
ir_function_signature *