summaryrefslogtreecommitdiff
path: root/src/mesa/main/imports.h
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2004-11-25 23:22:56 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2004-11-25 23:22:56 +0000
commit936028f8b0db83595fda77ed4b9f30452cdf9c8b (patch)
tree051a3f0aa39c87fbf036d1529e84afc95cef829f /src/mesa/main/imports.h
parentb653aaede5abf39f91f9d1152bb411572950184f (diff)
Started some assorted clean-ups in #defines, typedefs, etc.
Next: move all the Windows/WGL stuff into the drivers/windows/ directory.
Diffstat (limited to 'src/mesa/main/imports.h')
-rw-r--r--src/mesa/main/imports.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/mesa/main/imports.h b/src/mesa/main/imports.h
index a928b20ad5..b69b5fa31a 100644
--- a/src/mesa/main/imports.h
+++ b/src/mesa/main/imports.h
@@ -198,6 +198,20 @@ extern void _ext_mesa_free_pixelbuffer( void *pb );
/*@}*/
+/**********************************************************************/
+
+
+/**
+ * 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;
+
+
/**********************************************************************
* Math macros