Skip to content

Commit 07d3bcf

Browse files
gary-sweetCommit Bot
authored andcommitted
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/+/1978638 Reviewed-by: Jamie Madill <[email protected]> Reviewed-by: Shahbaz Youssefi <[email protected]> Commit-Queue: Jamie Madill <[email protected]>
1 parent 0af8b59 commit 07d3bcf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libANGLE/Context.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1493,7 +1493,7 @@ void Context::getIntegervImpl(GLenum pname, GLint *params)
14931493
*params = mState.mCaps.maxVaryingVectors;
14941494
break;
14951495
case GL_MAX_VARYING_COMPONENTS:
1496-
*params = mState.mCaps.maxVertexOutputComponents;
1496+
*params = mState.mCaps.maxVaryingVectors * 4;
14971497
break;
14981498
case GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS:
14991499
*params = mState.mCaps.maxCombinedTextureImageUnits;

0 commit comments

Comments
 (0)