зеркало из https://github.com/AvaloniaUI/angle.git
CaptureReplay: Emit unused resources
In the final frame of Manhattan, resources are cleaned up, even if they are non-existent. This is allowed by the GLES spec. Compilation of the replay would fail, for instance: error: use of undeclared identifier 'gRenderbufferMap'; did you mean 'gFramebufferMap'? const GLuint glDeleteRenderbuffers_renderbuffersPacked_0[] = { gRenderbufferMap[0] }; ^~~~~~~~~~~~~~~~ This is because we are only declaring resources if they are used. Instead, go ahead and emit the resources, then circle back when filtering is implemented, allow that to optimize the replay. Bug: angleproject:4091 Bug: angleproject:4223 Change-Id: Ib48da0d9c3f4f2eca268646e7717a12126b1d85c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2066455 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Cody Northrop <cnorthrop@google.com>
This commit is contained in:
Родитель
ce4918f18f
Коммит
b8ca4309b5
|
@ -807,9 +807,7 @@ void WriteCppReplayIndexFiles(const std::string &outDir,
|
|||
}
|
||||
for (ResourceIDType resourceType : AllEnums<ResourceIDType>())
|
||||
{
|
||||
if (!hasResourceType[resourceType])
|
||||
continue;
|
||||
|
||||
// TODO: Only emit resources needed by the frames (anglebug.com/4223)
|
||||
const char *name = GetResourceIDTypeName(resourceType);
|
||||
header << "extern ResourceMap g" << name << "Map;\n";
|
||||
source << "ResourceMap g" << name << "Map;\n";
|
||||
|
@ -875,8 +873,7 @@ void WriteCppReplayIndexFiles(const std::string &outDir,
|
|||
|
||||
for (ResourceIDType resourceType : AllEnums<ResourceIDType>())
|
||||
{
|
||||
if (!hasResourceType[resourceType])
|
||||
continue;
|
||||
// TODO: Only emit resources needed by the frames (anglebug.com/4223)
|
||||
const char *name = GetResourceIDTypeName(resourceType);
|
||||
header << "void Update" << name << "ID(GLuint id, GLsizei readBufferOffset);\n";
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче