aboutsummaryrefslogtreecommitdiffstats
path: root/src/compiler/glsl/builtin_functions.h
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2016-10-18 16:46:35 -0700
committerIan Romanick <[email protected]>2017-01-20 15:41:23 -0800
commit695b04f7eb24bff108e8d85c476adb5cf9de6f2d (patch)
treecdb68980096ab9f21fba88aa3018ac9a1f26de45 /src/compiler/glsl/builtin_functions.h
parent82c31f3eb957a0089773db47a4aca8bf3eb4a29e (diff)
glsl: Add "built-in" functions to do 64%64 => 64 modulus
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 ac1a8ccd1eb..7ae211b48aa 100644
--- a/src/compiler/glsl/builtin_functions.h
+++ b/src/compiler/glsl/builtin_functions.h
@@ -52,6 +52,12 @@ ir_function_signature *
idiv64(void *mem_ctx, builtin_available_predicate avail);
ir_function_signature *
+umod64(void *mem_ctx, builtin_available_predicate avail);
+
+ir_function_signature *
+imod64(void *mem_ctx, builtin_available_predicate avail);
+
+ir_function_signature *
umul64(void *mem_ctx, builtin_available_predicate avail);
ir_function_signature *