mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-16 16:37:08 +00:00
dawn_wire: Fix a bug with multiple injected devices
Device child objects were storing an *unstable* pointer to device specific tracking information. Fix this by moving the tracking information to a stable heap allocation. Bug: dawn:565 Change-Id: I00ad72563ac66e29314603e77698718953fcbf15 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/38280 Commit-Queue: Austin Eng <enga@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
committed by
Commit Bot service account
parent
b5cfe3a774
commit
cef68bc8b7
@@ -137,8 +137,8 @@ namespace dawn_wire { namespace server {
|
||||
}
|
||||
resultData->generation = bufferResult.generation;
|
||||
resultData->handle = mProcs.deviceCreateBuffer(device->handle, descriptor);
|
||||
resultData->device = device;
|
||||
if (!TrackDeviceChild(device, ObjectType::Buffer, bufferResult.id)) {
|
||||
resultData->deviceInfo = device->info.get();
|
||||
if (!TrackDeviceChild(resultData->deviceInfo, ObjectType::Buffer, bufferResult.id)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user