mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-19 01:46:35 +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
@@ -74,8 +74,9 @@ namespace dawn_wire { namespace server {
|
||||
}
|
||||
|
||||
resultData->generation = pipelineObjectHandle.generation;
|
||||
resultData->device = device;
|
||||
if (!TrackDeviceChild(device, ObjectType::ComputePipeline, pipelineObjectHandle.id)) {
|
||||
resultData->deviceInfo = device->info.get();
|
||||
if (!TrackDeviceChild(resultData->deviceInfo, ObjectType::ComputePipeline,
|
||||
pipelineObjectHandle.id)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -140,8 +141,9 @@ namespace dawn_wire { namespace server {
|
||||
}
|
||||
|
||||
resultData->generation = pipelineObjectHandle.generation;
|
||||
resultData->device = device;
|
||||
if (!TrackDeviceChild(device, ObjectType::RenderPipeline, pipelineObjectHandle.id)) {
|
||||
resultData->deviceInfo = device->info.get();
|
||||
if (!TrackDeviceChild(resultData->deviceInfo, ObjectType::RenderPipeline,
|
||||
pipelineObjectHandle.id)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user