---
src/mesa/main/imports.h | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/src/mesa/main/imports.h b/src/mesa/main/imports.h
index ef7c378..416c59b 100644
--- a/src/mesa/main/imports.h
+++ b/src/mesa/main/imports.h
@@ -165,6 +165,13 @@ static inline GLint64 IROUND64(float f)
return (GLint64) ((f >= 0.0F) ? (f + 0.5F) : (f - 0.5F));
}
+/**
+ * Convert double to int64 by rounding to nearest integer.
+ */
+static inline GLint64 IROUNDD64(double d)
+{
+ return (GLint64) ((d >= 0.0) ? (d + 0.5) : (d - 0.5));
+}
/**
* Convert positive float to int by rounding to nearest integer.
--
2.9.3
_______________________________________________
mesa-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-dev