mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-21 18:59:21 +00:00
Add MaybeError to d3d12::Device::ExecuteCommandList
Closing a command list can fail. We need to handle the error gracefully instead of ignoring it. As a fallout from adding MaybeError to ExecuteCommandList, need to also add MaybeError to TickImpl, and OnBeforePresent. Bug:dawn:19 Change-Id: I13685f3dd731f4ab49cbff4ce4edfa960d630464 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/11841 Reviewed-by: Kai Ninomiya <kainino@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Rafael Cintron <rafael.cintron@microsoft.com>
This commit is contained in:
committed by
Commit Bot service account
parent
0b82671047
commit
86d921e048
@@ -32,7 +32,7 @@ namespace dawn_native {
|
||||
UNREACHABLE();
|
||||
}
|
||||
|
||||
void OnBeforePresent(TextureBase* texture) override {
|
||||
MaybeError OnBeforePresent(TextureBase* texture) override {
|
||||
UNREACHABLE();
|
||||
}
|
||||
};
|
||||
@@ -127,7 +127,8 @@ namespace dawn_native {
|
||||
}
|
||||
ASSERT(!IsError());
|
||||
|
||||
OnBeforePresent(texture);
|
||||
if (GetDevice()->ConsumedError(OnBeforePresent(texture)))
|
||||
return;
|
||||
|
||||
mImplementation.Present(mImplementation.userData);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user