Make TextureDescriptor match WebGPU IDL

This patch updates the definition of TextureDescriptor to make it match
WebGPU IDL:
1. Rename 'arrayLayer' to 'arraySize'
2. Add the missing member "sampleCount" and check that currently
   sampleCount can only be 1.

BUG=dawn:56
TEST=dawn_unittests

Change-Id: I642186529f045865ae344cb5545ac80e14445c59
Reviewed-on: https://dawn-review.googlesource.com/c/3180
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
Jiawei Shao
2018-12-12 09:27:16 +00:00
committed by Commit Bot service account
parent d86edb310a
commit 8bff3b22be
22 changed files with 146 additions and 39 deletions

View File

@@ -94,7 +94,8 @@ TEST_F(CommandBufferValidationTest, TextureWithReadAndWriteUsage) {
textureDescriptor.format = dawn::TextureFormat::R8G8B8A8Unorm;
textureDescriptor.dimension = dawn::TextureDimension::e2D;
textureDescriptor.size = {1, 1, 1};
textureDescriptor.arrayLayer = 1;
textureDescriptor.arraySize = 1;
textureDescriptor.sampleCount = 1;
textureDescriptor.levelCount = 1;
dawn::Texture texture = device.CreateTexture(&textureDescriptor);
dawn::TextureView view = texture.CreateDefaultTextureView();