Commit 07d3bcf1 by Gary Sweet Committed by Commit Bot

Correct calculation of GL_MAX_VARYING_COMPONENTS

GL_MAX_VARYING_COMPONENTS does not equal maxVertexOutputComponents. The minimum supported limit for GL_MAX_VARYING_COMPONENTS is 60, whereas the minimum for maxVertexOutputComponents is 64. On devices that have the minimum limits the existing code will report a limit for GL_MAX_VARYING_COMPONENTS that is too large (64 vs 60). Report instead as (GL_MAX_VARYING_VECTORS * 4). Bug: angleproject:4233 Change-Id: I920a32cf21040ff5b64746fcf3489db740028d48 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1978638Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarShahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
parent 0af8b596
......@@ -1493,7 +1493,7 @@ void Context::getIntegervImpl(GLenum pname, GLint *params)
*params = mState.mCaps.maxVaryingVectors;
break;
case GL_MAX_VARYING_COMPONENTS:
*params = mState.mCaps.maxVertexOutputComponents;
*params = mState.mCaps.maxVaryingVectors * 4;
break;
case GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS:
*params = mState.mCaps.maxCombinedTextureImageUnits;
......
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