mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-20 02:15:43 +00:00
Allow creating texture views from destroyed textures
Bug: dawn:1031 Change-Id: I3af52d5c53c4ccf2c30a4eccb9c50dfe2e822f25 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/60221 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jiawei Shao <jiawei.shao@intel.com> Commit-Queue: Austin Eng <enga@chromium.org>
This commit is contained in:
@@ -510,13 +510,13 @@ namespace {
|
||||
}
|
||||
}
|
||||
|
||||
// Test that it's invalid to create a texture view from a destroyed texture
|
||||
// Test that it's valid to create a texture view from a destroyed texture
|
||||
TEST_F(TextureViewValidationTest, DestroyCreateTextureView) {
|
||||
wgpu::Texture texture = Create2DArrayTexture(device, 1);
|
||||
wgpu::TextureViewDescriptor descriptor =
|
||||
CreateDefaultViewDescriptor(wgpu::TextureViewDimension::e2D);
|
||||
texture.Destroy();
|
||||
ASSERT_DEVICE_ERROR(texture.CreateView(&descriptor));
|
||||
texture.CreateView(&descriptor);
|
||||
}
|
||||
|
||||
// Test that the selected TextureAspects must exist in the texture format
|
||||
|
||||
Reference in New Issue
Block a user