projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b417c97
)
mesa: _mesa_get_x86_features() only needs to do its thing once
author
Brian Paul
<brianp@vmware.com>
Wed, 4 Mar 2009 23:39:11 +0000
(16:39 -0700)
committer
Brian Paul
<brianp@vmware.com>
Wed, 4 Mar 2009 23:43:39 +0000
(16:43 -0700)
src/mesa/x86/common_x86.c
patch
|
blob
|
history
diff --git
a/src/mesa/x86/common_x86.c
b/src/mesa/x86/common_x86.c
index 18b1c2243cea5fdd6f0ee695224a9d06ca8288ab..5efdb4f24a6a82064444d66b04d6c71c88296df2 100644
(file)
--- 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;