Commit a28233e5 by jbauman@chromium.org

Iterate directly over uniforms when applying them

Directly iterate over uniforms, not over uniform locations, so we don't waste time looking at locations in the middle of arrays. Gets about 1 fps on a NaCl benchmark. BUG= TEST=webgl conformance tests Review URL: http://codereview.appspot.com/5210042 git-svn-id: https://angleproject.googlecode.com/svn/trunk@792 736b8ea6-26fd-11df-bfd4-992fa37f6226
parent 4d27f3b4
#define MAJOR_VERSION 0 #define MAJOR_VERSION 0
#define MINOR_VERSION 0 #define MINOR_VERSION 0
#define BUILD_VERSION 0 #define BUILD_VERSION 0
#define BUILD_REVISION 791 #define BUILD_REVISION 792
#define STRINGIFY(x) #x #define STRINGIFY(x) #x
#define MACRO_STRINGIFY(x) STRINGIFY(x) #define MACRO_STRINGIFY(x) STRINGIFY(x)
......
...@@ -149,21 +149,21 @@ class Program ...@@ -149,21 +149,21 @@ class Program
bool defineUniform(const D3DXHANDLE &constantHandle, const D3DXCONSTANT_DESC &constantDescription, std::string name = ""); bool defineUniform(const D3DXHANDLE &constantHandle, const D3DXCONSTANT_DESC &constantDescription, std::string name = "");
bool defineUniform(const D3DXCONSTANT_DESC &constantDescription, std::string &name); bool defineUniform(const D3DXCONSTANT_DESC &constantDescription, std::string &name);
Uniform *createUniform(const D3DXCONSTANT_DESC &constantDescription, std::string &name); Uniform *createUniform(const D3DXCONSTANT_DESC &constantDescription, std::string &name);
bool applyUniform1bv(GLint location, GLsizei count, const GLboolean *v); bool applyUniform1bv(Uniform *targetUniform, GLsizei count, const GLboolean *v);
bool applyUniform2bv(GLint location, GLsizei count, const GLboolean *v); bool applyUniform2bv(Uniform *targetUniform, GLsizei count, const GLboolean *v);
bool applyUniform3bv(GLint location, GLsizei count, const GLboolean *v); bool applyUniform3bv(Uniform *targetUniform, GLsizei count, const GLboolean *v);
bool applyUniform4bv(GLint location, GLsizei count, const GLboolean *v); bool applyUniform4bv(Uniform *targetUniform, GLsizei count, const GLboolean *v);
bool applyUniform1fv(GLint location, GLsizei count, const GLfloat *v); bool applyUniform1fv(Uniform *targetUniform, GLsizei count, const GLfloat *v);
bool applyUniform2fv(GLint location, GLsizei count, const GLfloat *v); bool applyUniform2fv(Uniform *targetUniform, GLsizei count, const GLfloat *v);
bool applyUniform3fv(GLint location, GLsizei count, const GLfloat *v); bool applyUniform3fv(Uniform *targetUniform, GLsizei count, const GLfloat *v);
bool applyUniform4fv(GLint location, GLsizei count, const GLfloat *v); bool applyUniform4fv(Uniform *targetUniform, GLsizei count, const GLfloat *v);
bool applyUniformMatrix2fv(GLint location, GLsizei count, const GLfloat *value); bool applyUniformMatrix2fv(Uniform *targetUniform, GLsizei count, const GLfloat *value);
bool applyUniformMatrix3fv(GLint location, GLsizei count, const GLfloat *value); bool applyUniformMatrix3fv(Uniform *targetUniform, GLsizei count, const GLfloat *value);
bool applyUniformMatrix4fv(GLint location, GLsizei count, const GLfloat *value); bool applyUniformMatrix4fv(Uniform *targetUniform, GLsizei count, const GLfloat *value);
bool applyUniform1iv(GLint location, GLsizei count, const GLint *v); bool applyUniform1iv(Uniform *targetUniform, GLsizei count, const GLint *v);
bool applyUniform2iv(GLint location, GLsizei count, const GLint *v); bool applyUniform2iv(Uniform *targetUniform, GLsizei count, const GLint *v);
bool applyUniform3iv(GLint location, GLsizei count, const GLint *v); bool applyUniform3iv(Uniform *targetUniform, GLsizei count, const GLint *v);
bool applyUniform4iv(GLint location, GLsizei count, const GLint *v); bool applyUniform4iv(Uniform *targetUniform, GLsizei count, const GLint *v);
void getConstantHandles(Uniform *targetUniform, D3DXHANDLE *constantPS, D3DXHANDLE *constantVS); void getConstantHandles(Uniform *targetUniform, D3DXHANDLE *constantPS, D3DXHANDLE *constantVS);
......
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