Commit bb22e508 by Jamie Madill Committed by Shannon Woods

Fix an improper use of VariableRowCount to AttributeRegisterCount in ProgramBinary.

This is a regression from the non-square matrix uniforms implementation. TRAC #23269 Signed-off-by: Geoff Lang Signed-off-by: Nicolas Capens Authored-by: Jamie Madill
parent d1e78c9c
...@@ -2080,7 +2080,7 @@ bool ProgramBinary::linkAttributes(InfoLog &infoLog, const AttributeBindings &at ...@@ -2080,7 +2080,7 @@ bool ProgramBinary::linkAttributes(InfoLog &infoLog, const AttributeBindings &at
mLinkedAttribute[location] = *attribute; mLinkedAttribute[location] = *attribute;
int rows = VariableRowCount(attribute->type); int rows = AttributeRegisterCount(attribute->type);
if (rows + location > MAX_VERTEX_ATTRIBS) if (rows + location > MAX_VERTEX_ATTRIBS)
{ {
...@@ -2120,7 +2120,7 @@ bool ProgramBinary::linkAttributes(InfoLog &infoLog, const AttributeBindings &at ...@@ -2120,7 +2120,7 @@ bool ProgramBinary::linkAttributes(InfoLog &infoLog, const AttributeBindings &at
for (int attributeIndex = 0; attributeIndex < MAX_VERTEX_ATTRIBS; ) for (int attributeIndex = 0; attributeIndex < MAX_VERTEX_ATTRIBS; )
{ {
int index = vertexShader->getSemanticIndex(mLinkedAttribute[attributeIndex].name); int index = vertexShader->getSemanticIndex(mLinkedAttribute[attributeIndex].name);
int rows = std::max(AttributeRegisterCount(mLinkedAttribute[attributeIndex].type), 1); int rows = AttributeRegisterCount(mLinkedAttribute[attributeIndex].type);
for (int r = 0; r < rows; r++) for (int r = 0; r < rows; r++)
{ {
......
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