Remove deprecated array layer descriptor members

 - wgpu::TextureDescriptor::arrayLayerCount
 - wgpu::TextureCopyView::arrayLayer

Bug: dawn:22

Change-Id: I41a8b50c667f28c2496e0ad2e1d4ca655bf6c154
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/26700
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
diff --git a/dawn.json b/dawn.json
index e2cd79a..64fca2a 100644
--- a/dawn.json
+++ b/dawn.json
@@ -1591,7 +1591,6 @@
         "members": [
             {"name": "texture", "type": "texture"},
             {"name": "mip level", "type": "uint32_t", "default": "0"},
-            {"name": "array layer", "type": "uint32_t", "default": "0"},
             {"name": "origin", "type": "origin 3D"},
             {"name": "aspect", "type": "texture aspect", "default": "all"}
         ]
@@ -1613,7 +1612,6 @@
             {"name": "usage", "type": "texture usage"},
             {"name": "dimension", "type": "texture dimension", "default": "2D"},
             {"name": "size", "type": "extent 3D"},
-            {"name": "array layer count", "type": "uint32_t", "default": "1"},
             {"name": "format", "type": "texture format"},
             {"name": "mip level count", "type": "uint32_t", "default": 1},
             {"name": "sample count", "type": "uint32_t", "default": 1}
diff --git a/src/dawn_native/CommandEncoder.cpp b/src/dawn_native/CommandEncoder.cpp
index 62e730a..45fb193 100644
--- a/src/dawn_native/CommandEncoder.cpp
+++ b/src/dawn_native/CommandEncoder.cpp
@@ -668,12 +668,6 @@
                                              const TextureCopyView* destination,
                                              const Extent3D* copySize) {
         mEncodingContext.TryEncode(this, [&](CommandAllocator* allocator) -> MaybeError {
-            // TODO(crbug.com/dawn/22): Remove once migration from GPUTextureCopyView.arrayLayer to
-            // GPUTextureCopyView.origin.z is done.
-            TextureCopyView fixedDest;
-            DAWN_TRY_ASSIGN(fixedDest, FixTextureCopyView(GetDevice(), destination));
-            destination = &fixedDest;
-
             // TODO(crbug.com/dawn/22): Remove once migration to .layout is done.
             BufferCopyView fixedSource;
             DAWN_TRY_ASSIGN(fixedSource, FixBufferCopyView(GetDevice(), source));
@@ -738,12 +732,6 @@
                                              const BufferCopyView* destination,
                                              const Extent3D* copySize) {
         mEncodingContext.TryEncode(this, [&](CommandAllocator* allocator) -> MaybeError {
-            // TODO(crbug.com/dawn/22): Remove once migration from GPUTextureCopyView.arrayLayer to
-            // GPUTextureCopyView.origin.z is done.
-            TextureCopyView fixedSrc;
-            DAWN_TRY_ASSIGN(fixedSrc, FixTextureCopyView(GetDevice(), source));
-            source = &fixedSrc;
-
             // TODO(crbug.com/dawn/22): Remove once migration to .layout is done.
             BufferCopyView fixedDst;
             DAWN_TRY_ASSIGN(fixedDst, FixBufferCopyView(GetDevice(), destination));
@@ -805,15 +793,6 @@
                                               const TextureCopyView* destination,
                                               const Extent3D* copySize) {
         mEncodingContext.TryEncode(this, [&](CommandAllocator* allocator) -> MaybeError {
-            // TODO(crbug.com/dawn/22): Remove once migration from GPUTextureCopyView.arrayLayer to
-            // GPUTextureCopyView.origin.z is done.
-            TextureCopyView fixedSrc;
-            DAWN_TRY_ASSIGN(fixedSrc, FixTextureCopyView(GetDevice(), source));
-            source = &fixedSrc;
-            TextureCopyView fixedDest;
-            DAWN_TRY_ASSIGN(fixedDest, FixTextureCopyView(GetDevice(), destination));
-            destination = &fixedDest;
-
             if (GetDevice()->IsValidationEnabled()) {
                 DAWN_TRY(GetDevice()->ValidateObject(source->texture));
                 DAWN_TRY(GetDevice()->ValidateObject(destination->texture));
diff --git a/src/dawn_native/Device.cpp b/src/dawn_native/Device.cpp
index 533035c..fcb2876 100644
--- a/src/dawn_native/Device.cpp
+++ b/src/dawn_native/Device.cpp
@@ -1030,13 +1030,6 @@
     ResultOrError<Ref<TextureBase>> DeviceBase::CreateTextureInternal(
         const TextureDescriptor* descriptor) {
         DAWN_TRY(ValidateIsAlive());
-
-        // TODO(dawn:22): Remove once migration from GPUTextureDescriptor.arrayLayerCount to
-        // GPUTextureDescriptor.size.depth is done.
-        TextureDescriptor fixedDescriptor;
-        DAWN_TRY_ASSIGN(fixedDescriptor, FixTextureDescriptor(this, descriptor));
-        descriptor = &fixedDescriptor;
-
         if (IsValidationEnabled()) {
             DAWN_TRY(ValidateTextureDescriptor(this, descriptor));
         }
diff --git a/src/dawn_native/Queue.cpp b/src/dawn_native/Queue.cpp
index 435d265..027ee58 100644
--- a/src/dawn_native/Queue.cpp
+++ b/src/dawn_native/Queue.cpp
@@ -146,12 +146,6 @@
                                                size_t dataSize,
                                                const TextureDataLayout* dataLayout,
                                                const Extent3D* writeSize) {
-        // TODO(crbug.com/dawn/22): Remove once migration from GPUTextureCopyView.arrayLayer to
-        // GPUTextureCopyView.origin.z is done.
-        TextureCopyView fixedDest;
-        DAWN_TRY_ASSIGN(fixedDest, FixTextureCopyView(GetDevice(), destination));
-        destination = &fixedDest;
-
         DAWN_TRY(ValidateWriteTexture(destination, dataSize, dataLayout, writeSize));
 
         if (writeSize->width == 0 || writeSize->height == 0 || writeSize->depth == 0) {
diff --git a/src/dawn_native/Texture.cpp b/src/dawn_native/Texture.cpp
index 550846b..8f93b46 100644
--- a/src/dawn_native/Texture.cpp
+++ b/src/dawn_native/Texture.cpp
@@ -333,25 +333,6 @@
         return desc;
     }
 
-    ResultOrError<TextureDescriptor> FixTextureDescriptor(DeviceBase* device,
-                                                          const TextureDescriptor* desc) {
-        TextureDescriptor fixedDesc = *desc;
-
-        if (desc->arrayLayerCount >= 2) {
-            if (desc->size.depth != 1) {
-                return DAWN_VALIDATION_ERROR("arrayLayerCount and size.depth cannot both be set.");
-            } else {
-                fixedDesc.size.depth = fixedDesc.arrayLayerCount;
-                fixedDesc.arrayLayerCount = 1;
-                device->EmitDeprecationWarning(
-                    "wgpu::TextureDescriptor::arrayLayerCount is deprecated in favor of "
-                    "::size::depth");
-            }
-        }
-
-        return {std::move(fixedDesc)};
-    }
-
     bool IsValidSampleCount(uint32_t sampleCount) {
         switch (sampleCount) {
             case 1:
@@ -696,23 +677,4 @@
         return mRange;
     }
 
-    ResultOrError<TextureCopyView> FixTextureCopyView(DeviceBase* device,
-                                                      const TextureCopyView* view) {
-        TextureCopyView fixedView = *view;
-
-        if (view->arrayLayer != 0) {
-            if (view->origin.z != 0) {
-                return DAWN_VALIDATION_ERROR("arrayLayer and origin.z cannot both be != 0");
-            } else {
-                fixedView.origin.z = fixedView.arrayLayer;
-                fixedView.arrayLayer = 1;
-                device->EmitDeprecationWarning(
-                    "wgpu::TextureCopyView::arrayLayer is deprecated in favor of "
-                    "::origin::z");
-            }
-        }
-
-        return fixedView;
-    }
-
 }  // namespace dawn_native
diff --git a/src/dawn_native/Texture.h b/src/dawn_native/Texture.h
index fbb2dea..252f11f 100644
--- a/src/dawn_native/Texture.h
+++ b/src/dawn_native/Texture.h
@@ -64,11 +64,6 @@
         const TextureBase* texture,
         const TextureViewDescriptor* descriptor);
 
-    // TODO(dawn:22): Remove once migration from GPUTextureDescriptor.arrayLayerCount to
-    // GPUTextureDescriptor.size.depth is done.
-    ResultOrError<TextureDescriptor> FixTextureDescriptor(DeviceBase* device,
-                                                          const TextureDescriptor* desc);
-
     bool IsValidSampleCount(uint32_t sampleCount);
 
     static constexpr wgpu::TextureUsage kReadOnlyTextureUsages =
@@ -189,9 +184,6 @@
         SubresourceRange mRange;
     };
 
-    ResultOrError<TextureCopyView> FixTextureCopyView(DeviceBase* device,
-                                                      const TextureCopyView* view);
-
 }  // namespace dawn_native
 
 #endif  // DAWNNATIVE_TEXTURE_H_
diff --git a/src/dawn_native/d3d12/TextureD3D12.cpp b/src/dawn_native/d3d12/TextureD3D12.cpp
index 048822c..69220f0 100644
--- a/src/dawn_native/d3d12/TextureD3D12.cpp
+++ b/src/dawn_native/d3d12/TextureD3D12.cpp
@@ -394,12 +394,6 @@
         const TextureDescriptor* textureDescriptor =
             reinterpret_cast<const TextureDescriptor*>(descriptor->cTextureDescriptor);
 
-        // TODO(dawn:22): Remove once migration from GPUTextureDescriptor.arrayLayerCount to
-        // GPUTextureDescriptor.size.depth is done.
-        TextureDescriptor fixedDescriptor;
-        DAWN_TRY_ASSIGN(fixedDescriptor, FixTextureDescriptor(device, textureDescriptor));
-        textureDescriptor = &fixedDescriptor;
-
         Ref<Texture> dawnTexture =
             AcquireRef(new Texture(device, textureDescriptor, TextureState::OwnedExternal));
         DAWN_TRY(dawnTexture->InitializeAsExternalTexture(textureDescriptor, sharedHandle,
diff --git a/src/dawn_native/metal/DeviceMTL.mm b/src/dawn_native/metal/DeviceMTL.mm
index 79b4f81..a09f9270 100644
--- a/src/dawn_native/metal/DeviceMTL.mm
+++ b/src/dawn_native/metal/DeviceMTL.mm
@@ -325,14 +325,6 @@
         const TextureDescriptor* textureDescriptor =
             reinterpret_cast<const TextureDescriptor*>(descriptor->cTextureDescriptor);
 
-        // TODO(dawn:22): Remove once migration from GPUTextureDescriptor.arrayLayerCount to
-        // GPUTextureDescriptor.size.depth is done.
-        TextureDescriptor fixedDescriptor;
-        if (ConsumedError(FixTextureDescriptor(this, textureDescriptor), &fixedDescriptor)) {
-            return nullptr;
-        }
-        textureDescriptor = &fixedDescriptor;
-
         if (ConsumedError(ValidateTextureDescriptor(this, textureDescriptor))) {
             return nullptr;
         }
diff --git a/src/dawn_native/vulkan/DeviceVk.cpp b/src/dawn_native/vulkan/DeviceVk.cpp
index 1b5e197..b79c79c 100644
--- a/src/dawn_native/vulkan/DeviceVk.cpp
+++ b/src/dawn_native/vulkan/DeviceVk.cpp
@@ -661,12 +661,6 @@
         const TextureDescriptor* textureDescriptor =
             reinterpret_cast<const TextureDescriptor*>(descriptor->cTextureDescriptor);
 
-        // TODO(dawn:22): Remove once migration from GPUTextureDescriptor.arrayLayerCount to
-        // GPUTextureDescriptor.size.depth is done.
-        TextureDescriptor fixedDescriptor;
-        DAWN_TRY_ASSIGN(fixedDescriptor, FixTextureDescriptor(this, textureDescriptor));
-        textureDescriptor = &fixedDescriptor;
-
         // Check services support this combination of handle type / image info
         if (!mExternalSemaphoreService->Supported()) {
             return DAWN_VALIDATION_ERROR("External semaphore usage not supported");
diff --git a/src/tests/end2end/DeprecatedAPITests.cpp b/src/tests/end2end/DeprecatedAPITests.cpp
index 7d65e83..bc0bca9 100644
--- a/src/tests/end2end/DeprecatedAPITests.cpp
+++ b/src/tests/end2end/DeprecatedAPITests.cpp
@@ -82,70 +82,6 @@
     EXPECT_BUFFER_U32_EQ(data, buffer, 0);
 }
 
-// Test that using TextureDescriptor::arrayLayerCount emits a warning.
-TEST_P(DeprecationTests, TextureDescriptorArrayLayerCountDeprecated) {
-    wgpu::TextureDescriptor desc;
-    desc.usage = wgpu::TextureUsage::Sampled;
-    desc.dimension = wgpu::TextureDimension::e2D;
-    desc.size = {1, 1, 1};
-    desc.arrayLayerCount = 2;
-    desc.format = wgpu::TextureFormat::RGBA8Unorm;
-    desc.mipLevelCount = 1;
-    desc.sampleCount = 1;
-
-    EXPECT_DEPRECATION_WARNING(device.CreateTexture(&desc));
-}
-
-// Test that using both TextureDescriptor::arrayLayerCount and size.depth triggers an error.
-TEST_P(DeprecationTests, TextureDescriptorArrayLayerCountAndDepthSizeIsError) {
-    wgpu::TextureDescriptor desc;
-    desc.usage = wgpu::TextureUsage::Sampled;
-    desc.dimension = wgpu::TextureDimension::e2D;
-    desc.size = {1, 1, 2};
-    desc.arrayLayerCount = 2;
-    desc.format = wgpu::TextureFormat::RGBA8Unorm;
-    desc.mipLevelCount = 1;
-    desc.sampleCount = 1;
-
-    ASSERT_DEVICE_ERROR(device.CreateTexture(&desc));
-}
-
-// Test that TextureDescriptor::arrayLayerCount does correct state tracking.
-TEST_P(DeprecationTests, TextureDescriptorArrayLayerCountStateTracking) {
-    wgpu::TextureDescriptor desc;
-    desc.usage = wgpu::TextureUsage::Sampled;
-    desc.dimension = wgpu::TextureDimension::e2D;
-    desc.size = {1, 1, 1};
-    desc.arrayLayerCount = 2;
-    desc.format = wgpu::TextureFormat::RGBA8Unorm;
-    desc.mipLevelCount = 1;
-    desc.sampleCount = 1;
-
-    wgpu::Texture texture;
-    EXPECT_DEPRECATION_WARNING(texture = device.CreateTexture(&desc));
-
-    wgpu::TextureViewDescriptor viewDesc;
-    viewDesc.dimension = wgpu::TextureViewDimension::e2DArray;
-    viewDesc.arrayLayerCount = 2;
-    texture.CreateView(&viewDesc);
-    viewDesc.arrayLayerCount = 3;
-    ASSERT_DEVICE_ERROR(texture.CreateView(&viewDesc));
-}
-
-// Test that using TextureDescriptor::arrayLayerCount = 0 is allowed
-TEST_P(DeprecationTests, TextureDescriptorArrayLayerCountZero) {
-    wgpu::TextureDescriptor desc;
-    desc.usage = wgpu::TextureUsage::Sampled;
-    desc.dimension = wgpu::TextureDimension::e2D;
-    desc.size = {1, 1, 1};
-    desc.arrayLayerCount = 0;
-    desc.format = wgpu::TextureFormat::RGBA8Unorm;
-    desc.mipLevelCount = 1;
-    desc.sampleCount = 1;
-
-    device.CreateTexture(&desc);
-}
-
 DAWN_INSTANTIATE_TEST(DeprecationTests,
                       D3D12Backend(),
                       MetalBackend(),
@@ -153,141 +89,6 @@
                       OpenGLBackend(),
                       VulkanBackend());
 
-class TextureCopyViewArrayLayerDeprecationTests : public DeprecationTests {
-  protected:
-    wgpu::TextureCopyView MakeOldTextureCopyView() {
-        wgpu::TextureDescriptor desc;
-        desc.usage = wgpu::TextureUsage::CopySrc | wgpu::TextureUsage::CopyDst;
-        desc.dimension = wgpu::TextureDimension::e2D;
-        desc.size = {1, 1, 2};
-        desc.format = wgpu::TextureFormat::RGBA8Unorm;
-
-        wgpu::TextureCopyView copy;
-        copy.texture = device.CreateTexture(&desc);
-        copy.arrayLayer = 1;
-        copy.origin = {0, 0, 0};
-        return copy;
-    }
-
-    wgpu::TextureCopyView MakeNewTextureCopyView() {
-        wgpu::TextureCopyView copy = MakeOldTextureCopyView();
-        copy.arrayLayer = 0;
-        copy.origin.z = 1;
-        return copy;
-    }
-
-    wgpu::TextureCopyView MakeErrorTextureCopyView() {
-        wgpu::TextureCopyView copy = MakeOldTextureCopyView();
-        copy.origin.z = 1;
-        return copy;
-    }
-
-    wgpu::BufferCopyView MakeBufferCopyView() const {
-        wgpu::BufferDescriptor desc;
-        desc.usage = wgpu::BufferUsage::CopySrc | wgpu::BufferUsage::CopyDst;
-        desc.size = 4;
-
-        wgpu::BufferCopyView copy = {};
-        copy.buffer = device.CreateBuffer(&desc);
-        copy.layout.bytesPerRow = kTextureBytesPerRowAlignment;
-        return copy;
-    }
-
-    wgpu::Extent3D copySize = {1, 1, 1};
-};
-
-// Test that using TextureCopyView::arrayLayer emits a warning.
-TEST_P(TextureCopyViewArrayLayerDeprecationTests, DeprecationWarning) {
-    wgpu::TextureCopyView texOldCopy = MakeOldTextureCopyView();
-    wgpu::TextureCopyView texNewCopy = MakeNewTextureCopyView();
-    wgpu::BufferCopyView bufCopy = MakeBufferCopyView();
-
-    wgpu::CommandEncoder encoder = device.CreateCommandEncoder();
-    EXPECT_DEPRECATION_WARNING(encoder.CopyBufferToTexture(&bufCopy, &texOldCopy, &copySize));
-    EXPECT_DEPRECATION_WARNING(encoder.CopyTextureToTexture(&texNewCopy, &texOldCopy, &copySize));
-    EXPECT_DEPRECATION_WARNING(encoder.CopyTextureToBuffer(&texOldCopy, &bufCopy, &copySize));
-    EXPECT_DEPRECATION_WARNING(encoder.CopyTextureToTexture(&texOldCopy, &texNewCopy, &copySize));
-
-    wgpu::CommandBuffer command = encoder.Finish();
-
-    queue.Submit(1, &command);
-
-    // TODO(dawn:483): Add other backends after implementing WriteTexture in them.
-    if (IsMetal() || IsVulkan()) {
-        std::vector<uint32_t> data = {1};
-        EXPECT_DEPRECATION_WARNING(
-            queue.WriteTexture(&texOldCopy, data.data(), 4, &bufCopy.layout, &copySize));
-    }
-}
-
-// Test that using both TextureCopyView::arrayLayer and origin.z is an error.
-TEST_P(TextureCopyViewArrayLayerDeprecationTests, BothArrayLayerAndOriginZIsError) {
-    wgpu::TextureCopyView texErrorCopy = MakeErrorTextureCopyView();
-    wgpu::TextureCopyView texNewCopy = MakeNewTextureCopyView();
-    wgpu::BufferCopyView bufCopy = MakeBufferCopyView();
-
-    wgpu::CommandEncoder encoder = device.CreateCommandEncoder();
-    encoder.CopyBufferToTexture(&bufCopy, &texErrorCopy, &copySize);
-    ASSERT_DEVICE_ERROR(encoder.Finish());
-
-    encoder = device.CreateCommandEncoder();
-    encoder.CopyTextureToTexture(&texNewCopy, &texErrorCopy, &copySize);
-    ASSERT_DEVICE_ERROR(encoder.Finish());
-
-    encoder = device.CreateCommandEncoder();
-    encoder.CopyTextureToBuffer(&texErrorCopy, &bufCopy, &copySize);
-    ASSERT_DEVICE_ERROR(encoder.Finish());
-
-    encoder = device.CreateCommandEncoder();
-    encoder.CopyTextureToTexture(&texErrorCopy, &texNewCopy, &copySize);
-    ASSERT_DEVICE_ERROR(encoder.Finish());
-
-    // TODO(dawn:483): Add other backends after implementing WriteTexture in them.
-    if (IsMetal() || IsVulkan()) {
-        std::vector<uint32_t> data = {1};
-        ASSERT_DEVICE_ERROR(
-            queue.WriteTexture(&texErrorCopy, data.data(), 4, &bufCopy.layout, &copySize));
-    }
-}
-
-// Test that using TextureCopyView::arrayLayer is correctly taken into account
-TEST_P(TextureCopyViewArrayLayerDeprecationTests, StateTracking) {
-    wgpu::TextureCopyView texOOBCopy = MakeOldTextureCopyView();
-    texOOBCopy.arrayLayer = 2;  // Oh no, it is OOB!
-    wgpu::TextureCopyView texNewCopy = MakeNewTextureCopyView();
-    wgpu::BufferCopyView bufCopy = MakeBufferCopyView();
-
-    wgpu::CommandEncoder encoder = device.CreateCommandEncoder();
-    EXPECT_DEPRECATION_WARNING(encoder.CopyBufferToTexture(&bufCopy, &texOOBCopy, &copySize));
-    ASSERT_DEVICE_ERROR(encoder.Finish());
-
-    encoder = device.CreateCommandEncoder();
-    EXPECT_DEPRECATION_WARNING(encoder.CopyTextureToTexture(&texNewCopy, &texOOBCopy, &copySize));
-    ASSERT_DEVICE_ERROR(encoder.Finish());
-
-    encoder = device.CreateCommandEncoder();
-    EXPECT_DEPRECATION_WARNING(encoder.CopyTextureToBuffer(&texOOBCopy, &bufCopy, &copySize));
-    ASSERT_DEVICE_ERROR(encoder.Finish());
-
-    encoder = device.CreateCommandEncoder();
-    EXPECT_DEPRECATION_WARNING(encoder.CopyTextureToTexture(&texOOBCopy, &texNewCopy, &copySize));
-    ASSERT_DEVICE_ERROR(encoder.Finish());
-
-    // TODO(dawn:483): Add other backends after implementing WriteTexture in them.
-    if (IsMetal() || IsVulkan()) {
-        std::vector<uint32_t> data = {1};
-        EXPECT_DEPRECATION_WARNING(ASSERT_DEVICE_ERROR(
-            queue.WriteTexture(&texOOBCopy, data.data(), 4, &bufCopy.layout, &copySize)));
-    }
-}
-
-DAWN_INSTANTIATE_TEST(TextureCopyViewArrayLayerDeprecationTests,
-                      D3D12Backend(),
-                      MetalBackend(),
-                      NullBackend(),
-                      OpenGLBackend(),
-                      VulkanBackend());
-
 class BufferCopyViewDeprecationTests : public DeprecationTests {
   protected:
     wgpu::TextureCopyView MakeTextureCopyView() {
@@ -299,7 +100,6 @@
 
         wgpu::TextureCopyView copy;
         copy.texture = device.CreateTexture(&desc);
-        copy.arrayLayer = 0;
         copy.origin = {0, 0, 1};
         return copy;
     }
diff --git a/src/tests/white_box/D3D12DescriptorHeapTests.cpp b/src/tests/white_box/D3D12DescriptorHeapTests.cpp
index 43a1179..0e6785d 100644
--- a/src/tests/white_box/D3D12DescriptorHeapTests.cpp
+++ b/src/tests/white_box/D3D12DescriptorHeapTests.cpp
@@ -66,7 +66,6 @@
         descriptor.size.width = width;
         descriptor.size.height = height;
         descriptor.size.depth = 1;
-        descriptor.arrayLayerCount = 1;
         descriptor.sampleCount = 1;
         descriptor.format = format;
         descriptor.mipLevelCount = 1;
@@ -732,7 +731,6 @@
     descriptor.size.width = kRTSize;
     descriptor.size.height = kRTSize;
     descriptor.size.depth = 1;
-    descriptor.arrayLayerCount = 1;
     descriptor.sampleCount = 1;
     descriptor.format = wgpu::TextureFormat::RGBA8Unorm;
     descriptor.mipLevelCount = 1;
diff --git a/src/tests/white_box/D3D12SmallTextureTests.cpp b/src/tests/white_box/D3D12SmallTextureTests.cpp
index 5566e15..fdf5d81 100644
--- a/src/tests/white_box/D3D12SmallTextureTests.cpp
+++ b/src/tests/white_box/D3D12SmallTextureTests.cpp
@@ -50,7 +50,6 @@
     descriptor.size.width = 8;
     descriptor.size.height = 8;
     descriptor.size.depth = 1;
-    descriptor.arrayLayerCount = 1;
     descriptor.sampleCount = 1;
     descriptor.format = wgpu::TextureFormat::BC1RGBAUnorm;
     descriptor.mipLevelCount = 1;
diff --git a/src/tests/white_box/VulkanImageWrappingTestsOpaqueFD.cpp b/src/tests/white_box/VulkanImageWrappingTestsOpaqueFD.cpp
index 431bd03..cfd3c60 100644
--- a/src/tests/white_box/VulkanImageWrappingTestsOpaqueFD.cpp
+++ b/src/tests/white_box/VulkanImageWrappingTestsOpaqueFD.cpp
@@ -373,7 +373,6 @@
             defaultDescriptor.format = wgpu::TextureFormat::RGBA8Unorm;
             defaultDescriptor.size = {1, 1, 1};
             defaultDescriptor.sampleCount = 1;
-            defaultDescriptor.arrayLayerCount = 1;
             defaultDescriptor.mipLevelCount = 1;
             defaultDescriptor.usage = wgpu::TextureUsage::OutputAttachment |
                                       wgpu::TextureUsage::CopySrc | wgpu::TextureUsage::CopyDst;
@@ -432,13 +431,11 @@
             wgpu::TextureCopyView copySrc;
             copySrc.texture = source;
             copySrc.mipLevel = 0;
-            copySrc.arrayLayer = 0;
             copySrc.origin = {0, 0, 0};
 
             wgpu::TextureCopyView copyDst;
             copyDst.texture = destination;
             copyDst.mipLevel = 0;
-            copyDst.arrayLayer = 0;
             copyDst.origin = {0, 0, 0};
 
             wgpu::Extent3D copySize = {1, 1, 1};
@@ -918,7 +915,6 @@
         descriptor.size.width = 640;
         descriptor.size.height = 480;
         descriptor.size.depth = 1;
-        descriptor.arrayLayerCount = 1;
         descriptor.sampleCount = 1;
         descriptor.format = wgpu::TextureFormat::BGRA8Unorm;
         descriptor.mipLevelCount = 1;