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 <ian.d.romanick@intel.com> Reviewed-by: Matt Turner <mattst88@gmail.com>
This commit is contained in:
@@ -51,6 +51,12 @@ udiv64(void *mem_ctx, builtin_available_predicate avail);
|
||||
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);
|
||||
|
||||
|
Reference in New Issue
Block a user