Implement new defaults for Texture::CreateView

https://github.com/gpuweb/gpuweb/pull/389 except for removing createDefaultView
https://github.com/gpuweb/gpuweb/pull/407

This will need to slightly change again when
https://github.com/gpuweb/gpuweb/pull/424 lands.

Bug: dawn:214
Change-Id: Id904b55cea6d77fcf7d971bd743468c7d82a9aa8
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/10440
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
This commit is contained in:
Kai Ninomiya
2019-08-26 22:51:19 +00:00
committed by Commit Bot service account
parent f19c328b5b
commit 93196db8ef
10 changed files with 201 additions and 37 deletions

View File

@@ -257,6 +257,13 @@ TEST_F(TextureValidationTest, NonRenderableAndOutputAttachment) {
}
}
// Test it is an error to create a texture with format "None".
TEST_F(TextureValidationTest, TextureFormatNone) {
dawn::TextureDescriptor descriptor = CreateDefaultTextureDescriptor();
descriptor.format = dawn::TextureFormat::None;
ASSERT_DEVICE_ERROR(device.CreateTexture(&descriptor));
}
// TODO(jiawei.shao@intel.com): add tests to verify we cannot create 1D or 3D textures with
// compressed texture formats.
class CompressedTextureFormatsValidationTests : public TextureValidationTest {