summaryrefslogtreecommitdiff
path: root/src/compiler/ShaderLang.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/compiler/ShaderLang.cpp')
-rw-r--r--src/compiler/ShaderLang.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/compiler/ShaderLang.cpp b/src/compiler/ShaderLang.cpp
index 5e4535e5..147894e0 100644
--- a/src/compiler/ShaderLang.cpp
+++ b/src/compiler/ShaderLang.cpp
@@ -85,12 +85,13 @@ static void getVariableInfo(ShShaderInfo varType,
}
//
-// Driver must call this first, once, before doing any other
-// compiler operations.
+// Driver must call this first, once, before doing any other compiler operations.
+// Subsequent calls to this function are no-op.
//
int ShInitialize()
{
- return InitProcess() ? 1 : 0;
+ static const bool kInitialized = InitProcess();
+ return kInitialized ? 1 : 0;
}
//