mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-20 18:29:23 +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
@@ -132,8 +132,9 @@ namespace dawn_native { namespace opengl {
|
||||
return mLastSubmittedSerial + 1;
|
||||
}
|
||||
|
||||
void Device::TickImpl() {
|
||||
MaybeError Device::TickImpl() {
|
||||
CheckPassedFences();
|
||||
return {};
|
||||
}
|
||||
|
||||
void Device::CheckPassedFences() {
|
||||
|
||||
@@ -53,7 +53,7 @@ namespace dawn_native { namespace opengl {
|
||||
Serial GetCompletedCommandSerial() const final override;
|
||||
Serial GetLastSubmittedCommandSerial() const final override;
|
||||
Serial GetPendingCommandSerial() const override;
|
||||
void TickImpl() override;
|
||||
MaybeError TickImpl() override;
|
||||
|
||||
ResultOrError<std::unique_ptr<StagingBufferBase>> CreateStagingBuffer(size_t size) override;
|
||||
MaybeError CopyFromStagingToBuffer(StagingBufferBase* source,
|
||||
|
||||
@@ -44,7 +44,8 @@ namespace dawn_native { namespace opengl {
|
||||
TextureBase::TextureState::OwnedExternal);
|
||||
}
|
||||
|
||||
void SwapChain::OnBeforePresent(TextureBase*) {
|
||||
MaybeError SwapChain::OnBeforePresent(TextureBase*) {
|
||||
return {};
|
||||
}
|
||||
|
||||
}} // namespace dawn_native::opengl
|
||||
|
||||
@@ -30,7 +30,7 @@ namespace dawn_native { namespace opengl {
|
||||
|
||||
protected:
|
||||
TextureBase* GetNextTextureImpl(const TextureDescriptor* descriptor) override;
|
||||
void OnBeforePresent(TextureBase* texture) override;
|
||||
MaybeError OnBeforePresent(TextureBase* texture) override;
|
||||
};
|
||||
|
||||
}} // namespace dawn_native::opengl
|
||||
|
||||
Reference in New Issue
Block a user