Commit 54ba6f01 by Gert Wollny Committed by Angle LUCI CQ

Capture/Replay: Emit SetupReplay() late

Only emit SetupReplay() after all captured frames have been run, so that InitializeReplay() is called with values of readBufferSize and the maxClientArraySize that are sufficiently large for all frames. Bug: angleproject:5965 Bug: angleproject:5895 Change-Id: Ic59597dc27f733fb210d7cc5a144a86e54cd2040 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2894486 Commit-Queue: Gert Wollny <gert.wollny@collabora.com> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarCody Northrop <cnorthrop@google.com>
parent 45ee87e2
......@@ -1071,24 +1071,6 @@ void WriteCppReplay(bool compression,
out << "extern \"C\" {\n";
}
if (frameIndex == 1)
{
std::stringstream setupCallStream;
setupCallStream << "void " << FmtSetupFunction(kNoPartId) << "\n";
setupCallStream << "{\n";
size_t maxClientArraySize = MaxClientArraySize(clientArraySizes);
WriteInitReplayCall(compression, setupCallStream, context->id(), captureLabel,
maxClientArraySize, readBufferSize);
WriteCppReplayFunctionWithParts(context, ReplayFunc::Setup, &dataTracker, frameIndex,
binaryData, setupCalls, header, setupCallStream, out);
out << setupCallStream.str();
out << "}\n";
}
if (frameIndex == frameCount)
{
// Emit code to reset back to starting state
......@@ -4907,6 +4889,8 @@ void FrameCapture::writeCppReplayIndexFiles(const gl::Context *context, bool wri
const egl::Config *config = context->getConfig();
const egl::AttributeMap &attributes = context->getDisplay()->getAttributeMap();
DataTracker dataTracker;
unsigned frameCount = getFrameCount();
std::stringstream header;
......@@ -4996,6 +4980,22 @@ void FrameCapture::writeCppReplayIndexFiles(const gl::Context *context, bool wri
source << "\n";
}
{
std::stringstream setupCallStream;
setupCallStream << "void " << FmtSetupFunction(kNoPartId) << "\n";
setupCallStream << "{\n";
WriteInitReplayCall(mCompression, setupCallStream, context->id(), mCaptureLabel,
MaxClientArraySize(mClientArraySizes), mReadBufferSize);
WriteCppReplayFunctionWithParts(context, ReplayFunc::Setup, &dataTracker, mFrameIndex,
&mBinaryData, mSetupCalls, header, setupCallStream, source);
source << setupCallStream.str();
source << "}\n";
}
source << "extern \"C\" {\n";
source << "void ReplayFrame(uint32_t frameIndex)\n";
source << "{\n";
......
......@@ -35,9 +35,18 @@ ColorMaskTest.AMDZeroColorMaskBug/ES3_OpenGL
SimpleOperationTest.ClearAndSwap/*
SimpleOperationTest.DrawQuadAndSwap/*
# Tests that fail randomly when run in groups but pass when run standalone
BufferDataTest.ZeroNonNULLData/ES2_Vulkan
BufferDataTest.ZeroNonNULLData/ES2_Vulkan_AsyncQueue
BufferDataTest.NULLResolvedData/ES2_Vulkan
BufferDataTest.NULLResolvedData/ES2_Vulkan_AsyncQueue
BufferDataTest.ExtensionDependency/ES2_Vulkan_AsyncQueue
BufferDataTest.RepeatedDrawWithDynamic/ES2_Vulkan
BufferDataTest.MapBufferOES/ES2_Vulkan_AsyncQueue
# Crashed tests
BlitFramebufferANGLETest.*
BufferDataTest.*
ClipDistanceTest.*
CopyCompressedTextureTest.InternalFormat/*
DebugMarkerTest.*
......
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