Hash :
d85de0e9
Author :
Date :
2023-08-09T14:15:56
Capture/Replay: Add optional replay of trimmed resources
This CL:
- Adds '--include-inactive-resources' option to
angle_trace_tests
- Removes the 'trim-enabled' option
- Outputs all previously trimmed shaders/programs to trace file
in a new Setup function, SetupReplayContextSharedInactive()
which is executed only if the new option is specified
- Modifies CaptureTest to add inactive resources, but does not
set the include-inactive-resources flag
Bug: b/296055694
Change-Id: I33b18d5da727d55c90c2012c2bf64b1413521429
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4781552
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Commit-Queue: Mark Łobodziński <mark@lunarg.com>
Reviewed-by: Roman Lavrov <romanl@google.com>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58
#include "CapturedTest_MultiFrame_ES3_Vulkan.h"
#include "trace_fixture.h"
#include "angle_trace_gl.h"
// Private Functions
void InitReplay(void)
{
// binaryDataFileName = CapturedTest_MultiFrame_ES3_Vulkan.angledata
// maxClientArraySize = 0
// maxClientArraySize = 0
// readBufferSize = 32
// resourceIDBufferSize = 1
// contextID = 1
// maxBuffer = 1
// maxContext = 1
// maxFenceNV = 0
// maxFramebuffer = 2
// maxImage = 0
// maxMemoryObject = 0
// maxProgramPipeline = 0
// maxQuery = 0
// maxRenderbuffer = 0
// maxSampler = 0
// maxSemaphore = 0
// maxShaderProgram = 5
// maxSurface = 1
// maxSync = 0
// maxTexture = 0
// maxTransformFeedback = 0
// maxVertexArray = 0
// maxegl_Sync = 0
InitializeReplay4("CapturedTest_MultiFrame_ES3_Vulkan.angledata", 0, 32, 1, 1, 1, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 5, 1, 0, 0, 0, 0, 0);
}
// Public Functions
void ReplayFrame(uint32_t frameIndex)
{
switch (frameIndex)
{
case 1:
ReplayFrame1();
break;
case 2:
ReplayFrame2();
break;
case 3:
ReplayFrame3();
break;
case 4:
ReplayFrame4();
break;
default:
break;
}
}