glsl: Add "built-in" functions to do 64%64 => 64 modulus
authorIan Romanick <ian.d.romanick@intel.com>
Tue, 18 Oct 2016 23:46:35 +0000 (16:46 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Fri, 20 Jan 2017 23:41:23 +0000 (15:41 -0800)
commit695b04f7eb24bff108e8d85c476adb5cf9de6f2d
treecdb68980096ab9f21fba88aa3018ac9a1f26de45
parent82c31f3eb957a0089773db47a4aca8bf3eb4a29e
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>
src/compiler/glsl/builtin_functions.cpp
src/compiler/glsl/builtin_functions.h
src/compiler/glsl/builtin_int64.h
src/compiler/glsl/glcpp/glcpp-parse.y
src/compiler/glsl/int64.glsl