summaryrefslogtreecommitdiffstats
path: root/src/compiler/glsl/int64.glsl
blob: f5fb01013c76512c426e47bd4f31b547239df0f1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/* Compile with:
 *
 * glsl_compiler --version 140 --dump-builder int64.glsl > builtin_int64.h
 *
 * Using version 1.40+ prevents built-in variables from being included.
 */
#version 140
#extension GL_MESA_shader_integer_functions: require

uvec2
umul64(uvec2 a, uvec2 b)
{
   uvec2 result;

   umulExtended(a.x, b.x, result.y, result.x);
   result.y += a.x * b.y + a.y * b.x;

   return result;
}