Commit aa16dd4a by unknown Committed by Geoff Lang

Hard-limit the number of uniform vectors in OpenGL.

Using the real limits (usually 4096) can cause the uniforms/gl-uniform-arrays WebGL test to time out. This limit artificial limit can be lifted once the test is updated. BUG=407309 Change-Id: I17a0a963e606800ec4f6f1972c777b597976622f Reviewed-on: https://chromium-review.googlesource.com/314460Reviewed-by: 's avatarCorentin Wallez <cwallez@chromium.org> Tested-by: 's avatarGeoff Lang <geofflang@chromium.org>
parent b4a3af29
......@@ -548,6 +548,16 @@ void GenerateCaps(const FunctionsGL *functions, gl::Caps *caps, gl::TextureCapsM
LimitVersion(maxSupportedESVersion, gl::Version(2, 0));
}
// TODO(geofflang): The gl-uniform-arrays WebGL conformance test struggles to complete on time
// if the max uniform vectors is too large. Artificially limit the maximum until the test is
// updated.
caps->maxVertexUniformVectors = std::min(1024u, caps->maxVertexUniformVectors);
caps->maxVertexUniformComponents =
std::min(caps->maxVertexUniformVectors / 4, caps->maxVertexUniformComponents);
caps->maxFragmentUniformVectors = std::min(1024u, caps->maxFragmentUniformVectors);
caps->maxFragmentUniformComponents =
std::min(caps->maxFragmentUniformVectors / 4, caps->maxFragmentUniformComponents);
// Extension support
extensions->setTextureExtensionSupport(*textureCapsMap);
extensions->elementIndexUint = functions->standard == STANDARD_GL_DESKTOP ||
......
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