Commit 6f35e366 by Lubosz Sarnecki Committed by Commit Bot

TracePerfTests: Don't call framebuffer functions on GLES1.

Skip unbinding the framebuffer on GLES1, where the function does not exist. This caused a crash when recording screenshots on native GLES1 implementations on Android. Bug: angleproject:5961 Change-Id: I7a35474154a4a8d56b36df02629944de7660dcd8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2891567 Commit-Queue: Lubosz Sarnecki <lubosz.sarnecki@collabora.com> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarCody Northrop <cnorthrop@google.com>
parent 83689e32
......@@ -1530,7 +1530,13 @@ void TracePerfTest::saveScreenshot(const std::string &screenshotName)
uint32_t pixelCount = mTestParams.windowWidth * mTestParams.windowHeight;
std::vector<uint8_t> pixelData(pixelCount * 4);
// Only unbind the framebuffer on context versions where it's available.
const TraceInfo &traceInfo = GetTraceInfo(GetParam().testID);
if (traceInfo.contextClientMajorVersion > 1)
{
glBindFramebuffer(GL_FRAMEBUFFER, 0);
}
glReadPixels(0, 0, mTestParams.windowWidth, mTestParams.windowHeight, GL_RGBA, GL_UNSIGNED_BYTE,
pixelData.data());
......
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