summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/glheader.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/main/glheader.h')
-rw-r--r--src/mesa/main/glheader.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/mesa/main/glheader.h b/src/mesa/main/glheader.h
index 0324b42ffd9..596bd2d01ee 100644
--- a/src/mesa/main/glheader.h
+++ b/src/mesa/main/glheader.h
@@ -1,4 +1,4 @@
-/* $Id: glheader.h,v 1.20 2001/05/14 23:11:12 brianp Exp $ */
+/* $Id: glheader.h,v 1.21 2001/06/15 15:22:07 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -241,5 +241,15 @@ typedef struct tagPIXELFORMATDESCRIPTOR PIXELFORMATDESCRIPTOR, *PPIXELFORMATDESC
#endif
+/*
+ * Sometimes we treat GLfloats as GLints. On x86 systems, moving a float
+ * as a int (thereby using integer registers instead of fp registers) is
+ * a performance win. Typically, this can be done with ordinary casts.
+ * But with gcc's -fstrict-aliasing flag (which defaults to on in gcc 3.0)
+ * these casts generate warnings.
+ * The following union typedef is used to solve that.
+ */
+typedef union { GLfloat f; GLint i; } fi_type;
+
#endif /* GLHEADER_H */