mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1189860 - Check if the passed in shader attributes exceeds the maximum. r=jrmuizel
CLOSED TREE
This commit is contained in:
parent
e59ea46aed
commit
f9ad578c0d
@ -671,6 +671,12 @@ bool ProgramBinary::linkAttributes(InfoLog &infoLog, const AttributeBindings &at
|
||||
unsigned int usedLocations = 0;
|
||||
const std::vector<sh::Attribute> &shaderAttributes = vertexShader->getActiveAttributes();
|
||||
|
||||
if (shaderAttributes.size() > gl::MAX_VERTEX_ATTRIBS)
|
||||
{
|
||||
infoLog.append("%u vertex attributes passed in exceeds maximum of %u.", shaderAttributes.size(), gl::MAX_VERTEX_ATTRIBS);
|
||||
return false;
|
||||
}
|
||||
|
||||
// Link attributes that have a binding location
|
||||
for (unsigned int attributeIndex = 0; attributeIndex < shaderAttributes.size(); attributeIndex++)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user