Commit 5ac5ae86 by Geoff Lang

Move assertion into if-block.

Since the loop always goes up to MAX_VERTEX_ATTRIBS, the ASSERTION may be triggered even though no more attributes are enabled. BUG=angle:740 Change-Id: I2bb30d7e9f426ae1a0b8250e65c1fd02107973ac Reviewed-on: https://chromium-review.googlesource.com/217027Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Tested-by: 's avatarGeoff Lang <geofflang@chromium.org>
parent 63d2fc7f
......@@ -365,13 +365,12 @@ std::string DynamicHLSL::generateVertexShaderForInputLayout(const std::string &s
for (unsigned int attributeIndex = 0; attributeIndex < MAX_VERTEX_ATTRIBS; attributeIndex++)
{
ASSERT(inputIndex < MAX_VERTEX_ATTRIBS);
const VertexFormat &vertexFormat = inputLayout[inputIndex];
const sh::Attribute &shaderAttribute = shaderAttributes[attributeIndex];
if (!shaderAttribute.name.empty())
{
ASSERT(inputIndex < MAX_VERTEX_ATTRIBS);
const VertexFormat &vertexFormat = inputLayout[inputIndex];
// HLSL code for input structure
if (IsMatrixType(shaderAttribute.type))
{
......
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