mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-20 18:29:23 +00:00
Destroy frontend and backend for Textures
Same idea as for buffers, Destroy can be used to free GPU memory associated with resources without waiting for javascript garbage collection to occur. Bug: dawn:46 Change-Id: Ia796b06b5228cbec4cfe8d78a500f967181d8c1f Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/5540 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Kai Ninomiya <kainino@chromium.org> Commit-Queue: Natasha Lee <natlee@microsoft.com>
This commit is contained in:
committed by
Commit Bot service account
parent
889d743baa
commit
cae68ff846
@@ -242,4 +242,12 @@ TEST_F(TextureViewValidationTest, TextureViewFormatCompatibility) {
|
||||
}
|
||||
}
|
||||
|
||||
// Test that it's invalid to create a texture view from a destroyed texture
|
||||
TEST_F(TextureViewValidationTest, DestroyCreateTextureView) {
|
||||
dawn::Texture texture = Create2DArrayTexture(device, 1);
|
||||
dawn::TextureViewDescriptor descriptor =
|
||||
CreateDefaultTextureViewDescriptor(dawn::TextureViewDimension::e2D);
|
||||
texture.Destroy();
|
||||
ASSERT_DEVICE_ERROR(texture.CreateTextureView(&descriptor));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user