diff options
author | Brian Paul <[email protected]> | 2004-11-25 23:22:56 +0000 |
---|---|---|
committer | Brian Paul <[email protected]> | 2004-11-25 23:22:56 +0000 |
commit | 936028f8b0db83595fda77ed4b9f30452cdf9c8b (patch) | |
tree | 051a3f0aa39c87fbf036d1529e84afc95cef829f /src/mesa/main/imports.h | |
parent | b653aaede5abf39f91f9d1152bb411572950184f (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.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/mesa/main/imports.h b/src/mesa/main/imports.h index a928b20ad56..b69b5fa31a1 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 |