diff options
author | Brian Paul <brianp@vmware.com> | 2009-03-04 16:39:11 -0700 |
---|---|---|
committer | Brian Paul <brianp@vmware.com> | 2009-03-04 16:43:39 -0700 |
commit | 16d72437eac3ea9c557424edfc98cd664f4c4ed3 (patch) | |
tree | 11197339820e7e6f00470e4522766147d19e2dd0 /src/mesa/x86 | |
parent | b417c978a95ba7ce7040473fd29ec5009ca66d6d (diff) |
mesa: _mesa_get_x86_features() only needs to do its thing once
Diffstat (limited to 'src/mesa/x86')
-rw-r--r-- | src/mesa/x86/common_x86.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mesa/x86/common_x86.c b/src/mesa/x86/common_x86.c index 18b1c2243c..5efdb4f24a 100644 --- a/src/mesa/x86/common_x86.c +++ b/src/mesa/x86/common_x86.c @@ -199,10 +199,18 @@ void _mesa_check_os_sse_support( void ) /** * Initialize the _mesa_x86_cpu_features bitfield. + * This is a no-op if called more than once. */ void _mesa_get_x86_features(void) { + static int called = 0; + + if (called) + return; + + called = 1; + #ifdef USE_X86_ASM _mesa_x86_cpu_features = 0x0; |