mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-21 10:49:14 +00:00
Handle Device Lost for SwapChain
Bug: dawn:68 Change-Id: I16e00bb2e203e71fd0840b71bc027e6fbea4e52c Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/15723 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Natasha Lee <natlee@microsoft.com>
This commit is contained in:
committed by
Commit Bot service account
parent
713d9cbf93
commit
2fd6181929
@@ -220,6 +220,7 @@ namespace dawn_native {
|
||||
wgpu::TextureUsage allowedUsage,
|
||||
uint32_t width,
|
||||
uint32_t height) const {
|
||||
DAWN_TRY(GetDevice()->ValidateIsAlive());
|
||||
DAWN_TRY(GetDevice()->ValidateObject(this));
|
||||
|
||||
DAWN_TRY(ValidateTextureUsage(allowedUsage));
|
||||
@@ -233,6 +234,7 @@ namespace dawn_native {
|
||||
}
|
||||
|
||||
MaybeError OldSwapChainBase::ValidateGetCurrentTextureView() const {
|
||||
DAWN_TRY(GetDevice()->ValidateIsAlive());
|
||||
DAWN_TRY(GetDevice()->ValidateObject(this));
|
||||
|
||||
if (mWidth == 0) {
|
||||
@@ -244,6 +246,7 @@ namespace dawn_native {
|
||||
}
|
||||
|
||||
MaybeError OldSwapChainBase::ValidatePresent() const {
|
||||
DAWN_TRY(GetDevice()->ValidateIsAlive());
|
||||
DAWN_TRY(GetDevice()->ValidateObject(this));
|
||||
|
||||
if (mCurrentTextureView.Get() == nullptr) {
|
||||
|
||||
Reference in New Issue
Block a user