mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-19 01:46:35 +00:00
Remove special-casing of device reference/release in the wire
The wire's device is externally owned so reference/release were no-ops. To unify the code paths, remove the special casing and instead take an extra ref on the device the wire server is created with. This is functionally equivalent and will allow both the current wire code, and the incoming change to allow multiple device/adapter creation to both work. This CL also makes it possible for the client to destroy the device before child objects. A follow-up CL will mitigate this on the server side. Bug: dawn:384 Change-Id: Ic5427074469012dccf8689ec95a848e6ba2c1fc2 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/37001 Commit-Queue: Austin Eng <enga@chromium.org> Reviewed-by: Jiawei Shao <jiawei.shao@intel.com> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
committed by
Commit Bot service account
parent
f0d7cc4f5a
commit
5ad5557667
@@ -61,12 +61,6 @@ namespace dawn_wire { namespace client {
|
||||
ObjectType objectType = static_cast<ObjectType>(&objectList - mObjects.data());
|
||||
while (!objectList.empty()) {
|
||||
ObjectBase* object = objectList.head()->value();
|
||||
if (object == mDevice) {
|
||||
// Note: We don't send a DestroyObject command for the device
|
||||
// since freeing a device object is done out of band.
|
||||
DeviceAllocator().Free(mDevice);
|
||||
continue;
|
||||
}
|
||||
|
||||
DestroyObjectCmd cmd;
|
||||
cmd.objectType = objectType;
|
||||
|
||||
Reference in New Issue
Block a user