mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-19 01:46:35 +00:00
dawn_wire: Implement device-related callbacks for multiple devices
Bug: dawn:565 Change-Id: Ic80a3bc1bbfd479af04e77afa0eb3f4ca3387ecd Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/38282 Reviewed-by: Jiawei Shao <jiawei.shao@intel.com> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
committed by
Commit Bot service account
parent
f1f8394de0
commit
4d66fb2d61
@@ -129,14 +129,18 @@ namespace dawn_wire { namespace client {
|
||||
void Client::Disconnect() {
|
||||
mDisconnected = true;
|
||||
mSerializer = ChunkedCommandSerializer(NoopCommandSerializer::GetInstance());
|
||||
if (mDevice != nullptr) {
|
||||
mDevice->HandleDeviceLost("GPU connection lost");
|
||||
|
||||
auto& deviceList = mObjects[ObjectType::Device];
|
||||
{
|
||||
for (LinkNode<ObjectBase>* device = deviceList.head(); device != deviceList.end();
|
||||
device = device->next()) {
|
||||
static_cast<Device*>(device->value())->HandleDeviceLost("GPU connection lost");
|
||||
}
|
||||
}
|
||||
for (auto& objectList : mObjects) {
|
||||
LinkNode<ObjectBase>* object = objectList.head();
|
||||
while (object != objectList.end()) {
|
||||
for (LinkNode<ObjectBase>* object = objectList.head(); object != objectList.end();
|
||||
object = object->next()) {
|
||||
object->value()->CancelCallbacksForDisconnect();
|
||||
object = object->next();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user