Add serial tracking to ProgramBinary

Trac #21270 Bug=351 Signed-off-by: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/trunk@1232 736b8ea6-26fd-11df-bfd4-992fa37f6226
parent 5ae3ccc3
...@@ -57,7 +57,9 @@ UniformLocation::UniformLocation(const std::string &_name, unsigned int element, ...@@ -57,7 +57,9 @@ UniformLocation::UniformLocation(const std::string &_name, unsigned int element,
{ {
} }
ProgramBinary::ProgramBinary() unsigned int ProgramBinary::mCurrentSerial = 1;
ProgramBinary::ProgramBinary() : mSerial(issueSerial())
{ {
mDevice = getDevice(); mDevice = getDevice();
...@@ -123,6 +125,16 @@ ProgramBinary::~ProgramBinary() ...@@ -123,6 +125,16 @@ ProgramBinary::~ProgramBinary()
} }
} }
unsigned int ProgramBinary::getSerial() const
{
return mSerial;
}
unsigned int ProgramBinary::issueSerial()
{
return mCurrentSerial++;
}
IDirect3DPixelShader9 *ProgramBinary::getPixelShader() IDirect3DPixelShader9 *ProgramBinary::getPixelShader()
{ {
return mPixelExecutable; return mPixelExecutable;
......
...@@ -155,6 +155,8 @@ class ProgramBinary ...@@ -155,6 +155,8 @@ class ProgramBinary
bool validateSamplers(InfoLog *infoLog); bool validateSamplers(InfoLog *infoLog);
bool isValidated() const; bool isValidated() const;
unsigned int getSerial() const;
static std::string decorateAttribute(const std::string &name); // Prepend an underscore static std::string decorateAttribute(const std::string &name); // Prepend an underscore
static std::string undecorateUniform(const std::string &_name); // Remove leading underscore static std::string undecorateUniform(const std::string &_name); // Remove leading underscore
...@@ -219,6 +221,11 @@ class ProgramBinary ...@@ -219,6 +221,11 @@ class ProgramBinary
GLint mDxPointsOrLinesLocation; GLint mDxPointsOrLinesLocation;
bool mValidated; bool mValidated;
const unsigned int mSerial;
static unsigned int issueSerial();
static unsigned int mCurrentSerial;
}; };
} }
......
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