glsl: Add "built-in" function for 64-bit integer sign()

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!

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
This commit is contained in:
Ian Romanick
2016-10-17 13:55:27 -07:00
parent 6c3af04363
commit 6b03b345eb
6 changed files with 251 additions and 0 deletions

View File

@@ -48,6 +48,9 @@ namespace generate_ir {
ir_function_signature *
umul64(void *mem_ctx, builtin_available_predicate avail);
ir_function_signature *
sign64(void *mem_ctx, builtin_available_predicate avail);
}
#endif /* BULITIN_FUNCTIONS_H */