Commit 40f11af8 by Cody Northrop Committed by Commit Bot

Capture/Replay: Ignore delete of non-genned buffers

Instead of asserting that the app is calling glDeleteBuffers on buffers we've seen created, ignore buffer names that we haven't seen. This is allowed by the spec: Buffer objects are deleted by calling void DeleteBuffers(sizei n, const uint *buffers); Unused names in buffers are silently ignored, as is the value zero. Test: SAKURA School Simulator MEC Bug: b/188488065 Bug: angleproject:5987 Change-Id: Id4704e544f644dbe3edf6efdf70b5c3ef9ccaba7 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2902442Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarTim Van Patten <timvp@google.com> Commit-Queue: Cody Northrop <cnorthrop@google.com>
parent 47e008c2
......@@ -4939,13 +4939,16 @@ void ResourceTracker::setDeletedBuffer(gl::BufferID id)
return;
}
// Ensure this buffer was in our starting set
// It's possible this could fire if the app deletes buffers that were never generated
ASSERT(mStartingBuffers.empty() || (mStartingBuffers.find(id) != mStartingBuffers.end()));
// In this case, the app is deleting a buffer we started with, we need to regen on loop
if (mStartingBuffers.find(id) != mStartingBuffers.end())
{
// The app is deleting a buffer we started with, we need to regen on loop
mBuffersToRegen.insert(id);
mBuffersToRestore.insert(id);
}
// If none of the above is true, the app is deleting a buffer that was never genned.
// This is allowed by the spec for DeleteBuffers:
// Unused names in buffers are silently ignored, as is the value zero.
}
void ResourceTracker::setDeletedFenceSync(GLsync sync)
......
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