Commit 4c7e3ee3 by Mohan Maiya Committed by Commit Bot

Capture/Replay: Account for EGL_KHR_no_config_context

EGL_KHR_no_config_context allows creating a context with EGL_NO_CONFIG. Add a null check when collecting config attributes. This fixes trace capture of Angry Birds 2 by allowing CaptureReplayTest to pass EGL_DONT_CARE for the config parameters. Bug: angleproject:4817 Change-Id: I982136ae2a7db4bd8d3f16f4accfe093e5610091 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2333356 Commit-Queue: Mohan Maiya <m.maiya@samsung.com> Reviewed-by: 's avatarCody Northrop <cnorthrop@google.com>
parent be6a1d87
......@@ -1094,12 +1094,18 @@ void WriteCppReplayIndexFiles(bool compression,
header << "constexpr uint32_t kReplayFrameEnd = " << frameEnd << ";\n";
header << "constexpr EGLint kReplayDrawSurfaceWidth = " << drawSurfaceWidth << ";\n";
header << "constexpr EGLint kReplayDrawSurfaceHeight = " << drawSurfaceHeight << ";\n";
header << "constexpr EGLint kDefaultFramebufferRedBits = " << config->redSize << ";\n";
header << "constexpr EGLint kDefaultFramebufferGreenBits = " << config->greenSize << ";\n";
header << "constexpr EGLint kDefaultFramebufferBlueBits = " << config->blueSize << ";\n";
header << "constexpr EGLint kDefaultFramebufferAlphaBits = " << config->alphaSize << ";\n";
header << "constexpr EGLint kDefaultFramebufferDepthBits = " << config->depthSize << ";\n";
header << "constexpr EGLint kDefaultFramebufferStencilBits = " << config->stencilSize << ";\n";
header << "constexpr EGLint kDefaultFramebufferRedBits = "
<< (config ? std::to_string(config->redSize) : "EGL_DONT_CARE") << ";\n";
header << "constexpr EGLint kDefaultFramebufferGreenBits = "
<< (config ? std::to_string(config->greenSize) : "EGL_DONT_CARE") << ";\n";
header << "constexpr EGLint kDefaultFramebufferBlueBits = "
<< (config ? std::to_string(config->blueSize) : "EGL_DONT_CARE") << ";\n";
header << "constexpr EGLint kDefaultFramebufferAlphaBits = "
<< (config ? std::to_string(config->alphaSize) : "EGL_DONT_CARE") << ";\n";
header << "constexpr EGLint kDefaultFramebufferDepthBits = "
<< (config ? std::to_string(config->depthSize) : "EGL_DONT_CARE") << ";\n";
header << "constexpr EGLint kDefaultFramebufferStencilBits = "
<< (config ? std::to_string(config->stencilSize) : "EGL_DONT_CARE") << ";\n";
header << "\n";
header << "void SetupContext" << static_cast<int>(contextId) << "Replay();\n";
header << "void ReplayContext" << static_cast<int>(contextId)
......
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