Commit b91afcfd by Jamie Madill Committed by Commit Bot

Bump implementation max textures/images limit to 96.

We need the higher limit for tessellation shaders and ES 3.2. Unfortunately this means we are no longer using a packed 64-bit bitset for the active textures and images. We fallback to using std::bitset. Also keeps the 64 texture limit if tessellation is not available. The higher limits was causing timeouts in WebGL tests. Bug: angleproject:3572 Change-Id: I1953955600b56d7c66178bd610de53453151dc8f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2586996 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarShahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: 's avatarTim Van Patten <timvp@google.com>
parent c2a620b0
...@@ -67,9 +67,13 @@ enum ...@@ -67,9 +67,13 @@ enum
// 1+log2 of max of MAX_*_TEXTURE_SIZE // 1+log2 of max of MAX_*_TEXTURE_SIZE
IMPLEMENTATION_MAX_TEXTURE_LEVELS = 16, IMPLEMENTATION_MAX_TEXTURE_LEVELS = 16,
// Limit active textures so we can use fast bitsets.
IMPLEMENTATION_MAX_SHADER_TEXTURES = 32, IMPLEMENTATION_MAX_SHADER_TEXTURES = 32,
IMPLEMENTATION_MAX_ACTIVE_TEXTURES = IMPLEMENTATION_MAX_SHADER_TEXTURES * 2,
// In ES 3.1 and below, the limit for active textures is 64.
IMPLEMENTATION_MAX_ES31_ACTIVE_TEXTURES = 64,
// In ES 3.2 we need to support a minimum of 96 maximum textures.
IMPLEMENTATION_MAX_ACTIVE_TEXTURES = 96,
IMPLEMENTATION_MAX_IMAGE_UNITS = IMPLEMENTATION_MAX_ACTIVE_TEXTURES, IMPLEMENTATION_MAX_IMAGE_UNITS = IMPLEMENTATION_MAX_ACTIVE_TEXTURES,
// Maximum number of slots allocated for atomic counter buffers. // Maximum number of slots allocated for atomic counter buffers.
......
...@@ -3501,8 +3501,17 @@ void Context::initCaps() ...@@ -3501,8 +3501,17 @@ void Context::initCaps()
ANGLE_LIMIT_CAP(mState.mCaps.maxTransformFeedbackSeparateComponents, ANGLE_LIMIT_CAP(mState.mCaps.maxTransformFeedbackSeparateComponents,
IMPLEMENTATION_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS); IMPLEMENTATION_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS);
// Limit textures as well, so we can use fast bitsets with texture bindings. if (getClientVersion() < ES_3_2)
ANGLE_LIMIT_CAP(mState.mCaps.maxCombinedTextureImageUnits, IMPLEMENTATION_MAX_ACTIVE_TEXTURES); {
ANGLE_LIMIT_CAP(mState.mCaps.maxCombinedTextureImageUnits,
IMPLEMENTATION_MAX_ES31_ACTIVE_TEXTURES);
}
else
{
ANGLE_LIMIT_CAP(mState.mCaps.maxCombinedTextureImageUnits,
IMPLEMENTATION_MAX_ACTIVE_TEXTURES);
}
for (ShaderType shaderType : AllShaderTypes()) for (ShaderType shaderType : AllShaderTypes())
{ {
ANGLE_LIMIT_CAP(mState.mCaps.maxShaderTextureImageUnits[shaderType], ANGLE_LIMIT_CAP(mState.mCaps.maxShaderTextureImageUnits[shaderType],
......
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