Commit 7f661449 by Alexis Hetu Committed by Alexis Hétu

Fixed matrix4x2 and matrix4x3 uniform arrays

matrix4x2 and matrix4x3 uniform arrays were broken because the structure allocated to contain them was of the wrong dimension, causing subsequent array elements to overwrite a portion of the previous element. Change-Id: I8129c7352f5470146994a0a89052a75fcfc4e54f Reviewed-on: https://swiftshader-review.googlesource.com/4524Tested-by: 's avatarAlexis Hétu <sugoi@google.com> Reviewed-by: 's avatarNicolas Capens <capn@google.com>
parent 0b965170
...@@ -2133,7 +2133,7 @@ namespace es2 ...@@ -2133,7 +2133,7 @@ namespace es2
bool Program::applyUniformMatrix4x2fv(GLint location, GLsizei count, const GLfloat *value) bool Program::applyUniformMatrix4x2fv(GLint location, GLsizei count, const GLfloat *value)
{ {
float matrix[(MAX_UNIFORM_VECTORS + 2) / 3][3][4]; float matrix[(MAX_UNIFORM_VECTORS + 3) / 4][4][4];
for(int i = 0; i < count; i++) for(int i = 0; i < count; i++)
{ {
...@@ -2162,7 +2162,7 @@ namespace es2 ...@@ -2162,7 +2162,7 @@ namespace es2
bool Program::applyUniformMatrix4x3fv(GLint location, GLsizei count, const GLfloat *value) bool Program::applyUniformMatrix4x3fv(GLint location, GLsizei count, const GLfloat *value)
{ {
float matrix[(MAX_UNIFORM_VECTORS + 2) / 3][3][4]; float matrix[(MAX_UNIFORM_VECTORS + 3) / 4][4][4];
for(int i = 0; i < count; i++) for(int i = 0; i < count; i++)
{ {
......
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