summaryrefslogtreecommitdiff
path: root/src/mesa/main/macros.h
diff options
context:
space:
mode:
authorIan Romanick <ian.d.romanick@intel.com>2009-08-28 15:37:25 -0700
committerIan Romanick <ian.d.romanick@intel.com>2009-09-03 11:22:45 -0700
commit10067e464132e6d484c34dd277da5eb5e21cf491 (patch)
tree609023f3e2ec2c049626333631f624e15e811f55 /src/mesa/main/macros.h
parentd75a99edd6386ab26d69a3f0cbbed4c79fe5fad4 (diff)
ARB sync: Add infrastructure for glGetInteger64v
Diffstat (limited to 'src/mesa/main/macros.h')
-rw-r--r--src/mesa/main/macros.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mesa/main/macros.h b/src/mesa/main/macros.h
index 4ca7957ffa..3d9a1aba98 100644
--- a/src/mesa/main/macros.h
+++ b/src/mesa/main/macros.h
@@ -99,6 +99,9 @@ extern GLfloat _mesa_ubyte_to_float_color_tab[256];
/* a close approximation: */
#define FLOAT_TO_INT(X) ( (GLint) (2147483647.0 * (X)) )
+/** Convert GLfloat in [-1.0,1.0] to GLint64 in [-(1<<63),(1 << 63) -1] */
+#define FLOAT_TO_INT64(X) ( (GLint64) (9223372036854775807.0 * (double)(X)) )
+
/** Convert GLint in [-2147483648,2147483647] to GLfloat in [-1.0,1.0], texture/fb data */
#define INT_TO_FLOAT_TEX(I) ((I) == -2147483648 ? -1.0F : (I) * (1.0F/2147483647.0))