Commit e3c0469c by Cody Northrop Committed by Commit Bot

Capture/Replay: Limit GL_MAX_IMAGE_UNITS during capture

Test: LEGO MEC Bug: b/161716126 Change-Id: I15e34bbeafe79c921ee01e99425555badad36fe4 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2551538Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Commit-Queue: Cody Northrop <cnorthrop@google.com>
parent 8930f182
......@@ -3512,9 +3512,6 @@ void Context::initCaps()
ANGLE_LIMIT_CAP(mState.mCaps.maxSampleMaskWords, MAX_SAMPLE_MASK_WORDS);
#undef ANGLE_LIMIT_CAP
#undef ANGLE_LOG_CAP_LIMIT
// WebGL compatibility
mState.mExtensions.webglCompatibility = mWebGLContext;
for (const auto &extensionInfo : GetExtensionInfoMap())
......@@ -3535,6 +3532,11 @@ void Context::initCaps()
<< std::endl;
mDisplay->overrideFrontendFeatures({"disable_program_binary"}, true);
constexpr GLint maxImageUnits = 20;
INFO() << "Limiting image unit count to " << maxImageUnits << " while FrameCapture enabled"
<< std::endl;
ANGLE_LIMIT_CAP(mState.mCaps.maxImageUnits, maxImageUnits);
INFO() << "Disabling GL_EXT_map_buffer_range and GL_OES_mapbuffer during capture, which "
"are not supported on some native drivers"
<< std::endl;
......@@ -3550,6 +3552,9 @@ void Context::initCaps()
mState.mCaps.programBinaryFormats.clear();
}
#undef ANGLE_LIMIT_CAP
#undef ANGLE_LOG_CAP_LIMIT
// Generate texture caps
updateCaps();
}
......
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