mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-20 18:29:23 +00:00
Handle Device Lost for Command Encoder Finish
Bug: dawn:68 Change-Id: I3449cdd9e69f3ae44a30f113fd88bd2fce2c94d7 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/15602 Commit-Queue: Kai Ninomiya <kainino@chromium.org> Reviewed-by: Austin Eng <enga@chromium.org> Reviewed-by: Rafael Cintron <rafael.cintron@microsoft.com> Reviewed-by: Kai Ninomiya <kainino@chromium.org>
This commit is contained in:
committed by
Commit Bot service account
parent
f44a809f9a
commit
2dd9ed0776
@@ -357,4 +357,13 @@ TEST_P(DeviceLostTest, SetSubDataFails) {
|
||||
ASSERT_DEVICE_ERROR(buffer.SetSubData(0, sizeof(float), data.data()));
|
||||
}
|
||||
|
||||
// Test that Command Encoder Finish fails when device lost
|
||||
TEST_P(DeviceLostTest, CommandEncoderFinishFails) {
|
||||
wgpu::CommandBuffer commands;
|
||||
wgpu::CommandEncoder encoder = device.CreateCommandEncoder();
|
||||
|
||||
SetCallbackAndLoseForTesting();
|
||||
ASSERT_DEVICE_ERROR(encoder.Finish());
|
||||
}
|
||||
|
||||
DAWN_INSTANTIATE_TEST(DeviceLostTest, D3D12Backend, VulkanBackend);
|
||||
Reference in New Issue
Block a user