|
aac68adc
|
2022-05-21T22:27:22
|
|
Capture/Replay: Track dirty state per EntryPoint for Reset
This CL introduces a new concept of tracking whether an entry
point has been called. If so, emit Reset calls designed specifically
for that entrypoint.
This will likely only be useful for one dimensional state binding
calls that can easily be tracked and set back.
Only support for EntryPoint::GLUseProgram is added at the moment, but
any entry point can be added.
Reset will now set the active program back to what it was in Setup.
For example:
void ResetReplay()
{
...
glUseProgram(gShaderProgramMap[2]);
UpdateCurrentProgram(2);
}
Test: Animal Crossing MEC, Star Wars KOTOR MEC
Bug: angleproject:7307
Bug: angleproject:7353
Change-Id: I19d238ca13bbfb619e1cf8ed86f15ed6c4255a61
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3656827
Commit-Queue: Cody Northrop <cnorthrop@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Lubosz Sarnecki <lubosz.sarnecki@collabora.com>
|
|
d4b8cd5e
|
2021-09-14T16:34:31
|
|
FrameCapture: Implement capture of coherent bufferstorages.
Track buffers with the GL_MAP_COHERENT_BIT_EXT access flag in a
CoherentBufferTracker on a per page basis using the
PageFaultHandler and protection functions from system_utils.
Check for dirty memory and capture it on draw calls.
Bug: angleproject:5857
Change-Id: Ib098f96952db7583d3e6517570c179e7754f54b2
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3168629
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Lubosz Sarnecki <lubosz.sarnecki@collabora.com>
|
|
8313ffe2
|
2021-11-29T15:46:25
|
|
FrameCapture: Add ReplayWriter helper class.
This centralizes all of the replay file I/O into a single point.
Each function is stored separately in this class. Right now there's
some small file format changes:
- the namespaces for the capture label are gone. these had no
functional impact now that each trace was a separate module.
- the header is cleaned up into private and public functions. this
cleans up a few things like defining non-existent functions.
- inline variables are tracked through the replay. they are now
global instead of anonymous, and string sets get reused instead
of duplicated between frames.
There should be no functional changes with the naming of the trace
files or the trace behaviour.
This change sets the stage for the ReplayWriter buffering multiple
frames into a single cpp file on disk, which can potentially reduce
the number of object files in the compilation by a great deal. It
could also be extended to work with buffered I/O so we don't block
and hitch when we're writing large trace files.
Bug: angleproject:5133
Change-Id: Ib96685e1202ac8101a4b828fa79642236af2120a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3311940
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
5f092f8b
|
2021-08-17T17:15:59
|
|
FrameCapture: Support glProgramBinary
This CL allows applications to use glProgramBinary. Normally this is
a problem because we need program source in order to recreate shaders
in use during mid-execution capture. Use of program binaries
means an app can start and render frames without having submitted
source for that run.
To support this, we will embed program source into ANGLE's binary
format. This will allow us to extract it when the app submits the
binary. We will only embed this when capture is enabled to prevent
increased binary size in the common case. Since this changes ANGLE's
binary format, apps will recreate binaries when capture is enabled.
Additionally, we can't allow captures to have glProgramBinary calls
in the middle of captured frame ranges, so intercept those calls and
replace with a full linking sequence.
Changes include:
- Add new frontend feauture enableProgramBinaryForCapture that allows
OES_get_program_binary during capture.
- Update ANGLE's binary format to include program source when
capture is enabled.
- Update maybeOverrideEntryPoint to handle multiple new calls
instead of a single call.
- Override calls to glProgramBinary that occur mid-capture
to instead emit a full GenerateLinkedProgram sequence.
- Add checks for created/attached shaders during FrameCapture since
they won't be available for programs populated by the app using
glProgramBinary.
Test: Fortnite MEC
Bug: b/180418810
Bug: angleproject:5658
Change-Id: Ib2a0e9e434d3ee0f384d128c48b2a7d4834f5b0f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3105390
Commit-Queue: Cody Northrop <cnorthrop@google.com>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
35bdaf8d
|
2021-08-03T08:12:26
|
|
Capture/Replay: Minor cleanups.
Removes a duplicate assignment to the enabled variable. In the cpp
it's set to true, and in the header it was false. Also updates a
few variable names to be consistent with the group.
Bug: angleproject:5133
Change-Id: I3fb00ecc474191bea7c3a650ce23805b6f02d667
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3066007
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
b5630d5c
|
2021-07-19T20:39:02
|
|
Capture/Replay: Add textures to resource tracking
This CL:
- Shifts resource reset tracking to be stored in an array of structs
indexed by type. This helps curb the complexity of adding more
resource types.
- Moves buffer and program tracking to the new layout.
- Adds textures to the resource tracker, using new layout.
Note that only aspects common to all ResourceIDTypes have been moved
to the new layout. Unique pieces of data, like buffer mapping state
and GLSync handling, remain in resource tracker alone.
Since texture setup is quite involved, this CL takes the approach of
having each call applied to two call chains at the same time;
SetupReplay calls and ResetReplay calls.
ResetReplay ends up with a sequence similar to buffers:
...
const GLuint deleteTextures[] = {
gTextureMap[1], gTextureMap[2], ... gTextureMap[n]};
glDeleteTextures(<count>, deleteTextures);
...
glGenTextures(1, reinterpret_cast<GLuint *>(gReadBuffer));
UpdateTextureID(1, 0);
glGenTextures(1, reinterpret_cast<GLuint *>(gReadBuffer));
UpdateTextureID(2, 0);
glGenTextures(1, reinterpret_cast<GLuint *>(gReadBuffer));
UpdateTextureID(3, 0);
...
glBindTexture(GL_TEXTURE_2D, gTextureMap[1]);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, 9729);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_R, 33071);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, 33071);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, 33071);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_COMPARE_FUNC, 519);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LEVEL, 0);
glTexImage2D(GL_TEXTURE_2D, 0, 6406, 512, 512, 0, GL_ALPHA, GL_UNSIGNED_BYTE,
reinterpret_cast<const GLubyte *>(&gBinaryData[183263280]));
glBindTexture(GL_TEXTURE_2D, gTextureMap[2]);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, 9987);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_COMPARE_FUNC, 519);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LEVEL, 6);
glTexStorage2D(GL_TEXTURE_2D, 7, GL_COMPRESSED_SRGB8_ETC2, 64, 64);
...
Test: PUBG Mobile MEC
Bug: b/180418573
Bug: angleproject:6087
Change-Id: I9f8e151c12aec5b2b7af376b8e0ff644ff9c61c4
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3016114
Commit-Queue: Cody Northrop <cnorthrop@google.com>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
223cd0ac
|
2021-06-15T18:46:07
|
|
Capture/Replay: Refactor shared context handling
This is the initial CL to enable capture/replay of multi-context
applications.
This CL refactors FrameCapture and FrameCaptureShared to move much of
the functionality into FrameCaptureShared, since most everything is
shared by Contexts in the share group. For example, the setup of the
majority of the GL objects is done in the new SetupReplayContextShared()
function in the new $LABEL_capture_context_shared_frame001.cpp file. The
setup is performed by (for example):
void SetupReplay()
{
$LABEL::InitReplay();
$LABEL::SetupReplayContextShared();
SetupReplayContext2();
}
This performs the shared setup first, followed by the context-specific
setup, which may reference shared objects careated by
LABEL::SetupReplayContextShared().
No re-capturing is required with this change, since the external APIs
(i.e., SetupReplay()) are still the same.
Bug: angleproject:5878
Test: Manual MEC and replay of Magic Tiles 3, Candy Crush Soda Saga, Temple Run 2
Change-Id: Iab7bfe651437e9be1dee83514cd97acc20c61d1d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2965780
Commit-Queue: Tim Van Patten <timvp@google.com>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
6fc10389
|
2021-02-10T11:20:16
|
|
Move Frame Capture to capture/ folder.
This will make it easier to trigger the trace tests when these files
are modified.
Bug: angleproject:5530
Change-Id: I5f0c450595b380cd91b20c1477dc1845bee35dd9
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2686120
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
|