Commit 514d5e28 by Jamie Madill Committed by Commit Bot

Vulkan: Remove global finish in ContextVk::onDestroy.

Should be no longer necessary with shared garbage collection in RendererVk. Bug: angleproject:2464 Change-Id: I8ebd910cf36dd0b18d83d32981db28599d443ec3 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1825445 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org>
parent 4671fee9
...@@ -589,9 +589,8 @@ void ContextVk::onDestroy(const gl::Context *context) ...@@ -589,9 +589,8 @@ void ContextVk::onDestroy(const gl::Context *context)
// This will not destroy any resources. It will release them to be collected after finish. // This will not destroy any resources. It will release them to be collected after finish.
mIncompleteTextures.onDestroy(context); mIncompleteTextures.onDestroy(context);
// Need all commands in the share group to complete. For now finish all Contexts. // Flush and complete current outstanding work before destruction.
// TODO(jmadill): Remove global finish. http://anglebug.com/2464 (void)finishImpl();
(void)mRenderer->globalFinish();
VkDevice device = getDevice(); VkDevice device = getDevice();
......
...@@ -1716,21 +1716,4 @@ void RendererVk::onCompletedSerial(Serial serial) ...@@ -1716,21 +1716,4 @@ void RendererVk::onCompletedSerial(Serial serial)
mLastCompletedQueueSerial = serial; mLastCompletedQueueSerial = serial;
} }
} }
angle::Result RendererVk::globalFinish()
{
for (gl::Context *context : mDisplay->getContextSet())
{
ContextVk *contextVk = vk::GetImpl(context);
ANGLE_TRY(contextVk->flushImpl(nullptr));
}
for (gl::Context *context : mDisplay->getContextSet())
{
ContextVk *contextVk = vk::GetImpl(context);
ANGLE_TRY(contextVk->finishImpl());
}
return angle::Result::Continue;
}
} // namespace rx } // namespace rx
...@@ -197,9 +197,6 @@ class RendererVk : angle::NonCopyable ...@@ -197,9 +197,6 @@ class RendererVk : angle::NonCopyable
void onCompletedSerial(Serial serial); void onCompletedSerial(Serial serial);
// Calls finish on every Context in the active set.
angle::Result globalFinish();
private: private:
angle::Result initializeDevice(DisplayVk *displayVk, uint32_t queueFamilyIndex); angle::Result initializeDevice(DisplayVk *displayVk, uint32_t queueFamilyIndex);
void ensureCapsInitialized() const; void ensureCapsInitialized() const;
......
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