Commit b93f84ac by Alok Priyadarshi

Made multiple calls to ShInitialize not assert.

BUG=456 R=apatrick@chromium.org, kbr@chromium.org Review URL: https://codereview.appspot.com/11916046
parent f1e1c1e4
#define MAJOR_VERSION 1 #define MAJOR_VERSION 1
#define MINOR_VERSION 2 #define MINOR_VERSION 2
#define BUILD_VERSION 0 #define BUILD_VERSION 0
#define BUILD_REVISION 2430 #define BUILD_REVISION 2431
#define STRINGIFY(x) #x #define STRINGIFY(x) #x
#define MACRO_STRINGIFY(x) STRINGIFY(x) #define MACRO_STRINGIFY(x) STRINGIFY(x)
......
...@@ -85,12 +85,13 @@ static void getVariableInfo(ShShaderInfo varType, ...@@ -85,12 +85,13 @@ static void getVariableInfo(ShShaderInfo varType,
} }
// //
// Driver must call this first, once, before doing any other // Driver must call this first, once, before doing any other compiler operations.
// compiler operations. // Subsequent calls to this function are no-op.
// //
int ShInitialize() int ShInitialize()
{ {
return InitProcess() ? 1 : 0; static const bool kInitialized = InitProcess();
return kInitialized ? 1 : 0;
} }
// //
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment