[dawn][native][emscripten] Move/rename bindingArraySize to core struct

The handling of the new struct is equivalent to the handling of the old
struct with an extension, so this is like the extension struct is always
on. Validation is updated so that instead of the extension struct being
unsafe, bindingArraySize > 1 is unsafe. (bindingArraySize = 0 and 1 are
equivalent, and both are allowed with both array and non-array shader
bindings).

If any dependencies use non-designated initializers to create
WGPUBindGroupLayoutEntry objects (like in WireArgumentTests.cpp), this
will break compilation. Fortunately there doesn't seem to be any build
breakage in Chromium or Skia.

Fixed: 415092021
Change-Id: Ifbccfa87711e5bf5cb14242224e272a0556f7de1
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/242395
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
diff --git a/src/dawn/dawn.json b/src/dawn/dawn.json
index b711daf..42b4632 100644
--- a/src/dawn/dawn.json
+++ b/src/dawn/dawn.json
@@ -495,21 +495,13 @@
         ]
     },
 
-    "bind group layout entry array size": {
-        "category": "structure",
-        "chained": "in",
-        "chain roots": ["bind group layout entry"],
-        "members": [
-            {"name": "array size", "type": "uint32_t", "default": 0}
-        ]
-    },
-
     "bind group layout entry": {
         "category": "structure",
         "extensible": "in",
         "members": [
             {"name": "binding", "type": "uint32_t"},
             {"name": "visibility", "type": "shader stage"},
+            {"name": "binding array size", "type": "uint32_t", "default": 0},
             {"name": "buffer", "type": "buffer binding layout", "default": "zero"},
             {"name": "sampler", "type": "sampler binding layout", "default": "zero"},
             {"name": "texture", "type": "texture binding layout", "default": "zero"},
@@ -3799,7 +3791,6 @@
             {"value": 10, "name": "surface color management", "tags": ["upstream", "emscripten"]},
             {"value": 11, "name": "request adapter WebXR options", "tags": ["upstream", "emscripten"]},
             {"value": 12, "name": "adapter properties subgroups"},
-            {"value": 13, "name": "bind group layout entry array size"},
 
             {"value": 0, "name": "texture binding view dimension descriptor", "tags": ["compat"]},
 
diff --git a/src/dawn/native/BindGroupLayoutInternal.cpp b/src/dawn/native/BindGroupLayoutInternal.cpp
index 0c1b299..cd43ad0 100644
--- a/src/dawn/native/BindGroupLayoutInternal.cpp
+++ b/src/dawn/native/BindGroupLayoutInternal.cpp
@@ -96,10 +96,7 @@
                                         bool allowInternalBinding) {
     DAWN_TRY(ValidateShaderStage(entry->visibility));
 
-    uint32_t arraySize = 1;
-    if (auto* arraySizeInfo = entry.Get<BindGroupLayoutEntryArraySize>()) {
-        arraySize = arraySizeInfo->arraySize;
-    }
+    uint32_t arraySize = std::max(1u, entry->bindingArraySize);
 
     int bindingMemberCount = 0;
 
@@ -125,9 +122,9 @@
                 entry->visibility, wgpu::ShaderStage::Vertex);
         }
 
-        // TODO(393558555): Support arraySize != 1 for non-dynamic buffers.
-        DAWN_INVALID_IF(arraySize != 1,
-                        "arraySize (%u) != 1 for a buffer binding is not implemented yet.",
+        // TODO(393558555): Support bindingArraySize > 1 for non-dynamic buffers.
+        DAWN_INVALID_IF(arraySize > 1,
+                        "bindingArraySize (%u) > 1 for a buffer binding is not implemented yet.",
                         arraySize);
     }
 
@@ -135,9 +132,9 @@
         bindingMemberCount++;
         DAWN_TRY(ValidateSamplerBindingType(entry->sampler.type));
 
-        // TODO(393558555): Support arraySize != 1 for samplers.
-        DAWN_INVALID_IF(arraySize != 1,
-                        "arraySize (%u) != 1 for a sampler binding is not implemented yet.",
+        // TODO(393558555): Support bindingArraySize > 1 for samplers.
+        DAWN_INVALID_IF(arraySize > 1,
+                        "bindingArraySize (%u) > 1 for a sampler binding is not implemented yet.",
                         arraySize);
     }
 
@@ -211,10 +208,11 @@
                 DAWN_UNREACHABLE();
         }
 
-        // TODO(393558555): Support arraySize != 1 for storage textures.
-        DAWN_INVALID_IF(arraySize != 1,
-                        "arraySize (%u) != 1 for a storage texture binding is not implemented yet.",
-                        arraySize);
+        // TODO(393558555): Support bindingArraySize > 1 for storage textures.
+        DAWN_INVALID_IF(
+            arraySize > 1,
+            "bindingArraySize (%u) > 1 for a storage texture binding is not implemented yet.",
+            arraySize);
     }
 
     if (auto* staticSamplerBindingLayout = entry.Get<StaticSamplerBindingLayout>()) {
@@ -225,10 +223,10 @@
                         wgpu::FeatureName::StaticSamplers);
 
         DAWN_TRY(device->ValidateObject(staticSamplerBindingLayout->sampler));
-        DAWN_INVALID_IF(
-            arraySize != 1,
-            "BindGroupLayoutEntry arraySize (%u) is greater than 1 for a static sampler entry.",
-            arraySize);
+        DAWN_INVALID_IF(arraySize > 1,
+                        "BindGroupLayoutEntry bindingArraySize (%u) > 1 for a static "
+                        "sampler entry.",
+                        arraySize);
 
         if (staticSamplerBindingLayout->sampledTextureBinding == WGPU_LIMIT_U32_UNDEFINED) {
             DAWN_INVALID_IF(staticSamplerBindingLayout->sampler->IsYCbCr(),
@@ -238,10 +236,10 @@
 
     if (entry.Get<ExternalTextureBindingLayout>()) {
         bindingMemberCount++;
-        DAWN_INVALID_IF(
-            arraySize != 1,
-            "BindGroupLayoutEntry arraySize (%u) is greater than 1 for an external texture entry.",
-            arraySize);
+        DAWN_INVALID_IF(arraySize > 1,
+                        "BindGroupLayoutEntry bindingArraySize (%u) > 1 for an "
+                        "external texture entry.",
+                        arraySize);
     }
 
     DAWN_INVALID_IF(bindingMemberCount == 0,
@@ -252,12 +250,9 @@
                     "BindGroupLayoutEntry had more than one of buffer, sampler, texture, "
                     "storageTexture, or externalTexture set");
 
-    if (auto* arraySizeInfo = entry.Get<BindGroupLayoutEntryArraySize>()) {
-        DAWN_INVALID_IF(arraySizeInfo->arraySize != 1 &&
-                            entry->texture.sampleType == wgpu::TextureSampleType::BindingNotUsed,
-                        "Entry that is not a sampled texture has an arraySize (%u) that is not 1.",
-                        arraySizeInfo->arraySize);
-    }
+    DAWN_INVALID_IF(
+        arraySize > 1 && entry->texture.sampleType == wgpu::TextureSampleType::BindingNotUsed,
+        "Entry that is not a sampled texture has an bindingArraySize (%u) > 1.", arraySize);
 
     return {};
 }
@@ -325,18 +320,14 @@
             i, uint32_t(bindingNumber), kMaxBindingsPerBindGroup);
 
         BindingNumber arraySize{1};
-        if (auto* arraySizeInfo = entry.Get<BindGroupLayoutEntryArraySize>()) {
-            arraySize = BindingNumber(arraySizeInfo->arraySize);
+        if (entry->bindingArraySize > 1) {
+            arraySize = BindingNumber(entry->bindingArraySize);
 
-            DAWN_INVALID_IF(
-                device->IsToggleEnabled(Toggle::DisableBindGroupLayoutEntryArraySize),
-                "On entries[%u]: chaining of BindGroupLayoutEntryArraySize is disabled.", i);
+            DAWN_INVALID_IF(device->IsToggleEnabled(Toggle::DisableBindGroupLayoutEntryArraySize),
+                            "On entries[%u]: use of bindingArraySize > 1 is disabled.", i);
             DAWN_INVALID_IF(!device->IsToggleEnabled(Toggle::AllowUnsafeAPIs),
-                            "On entries[%u]: chaining of BindGroupLayoutEntryArraySize is unsafe "
-                            "while it is being implemented.",
-                            i);
+                            "On entries[%u]: use of bindingArraySize > 1 is currently unsafe.", i);
 
-            DAWN_INVALID_IF(arraySize == BindingNumber(0), "On entries[%u]: arraySize is 0.", i);
             DAWN_INVALID_IF(arraySize > kMaxBindingsPerBindGroupTyped - bindingNumber,
                             "On entries[%u]: binding (%u) + arraySize (%u) is %u which is larger "
                             "than maxBindingsPerBindGroup (%u).",
@@ -400,10 +391,11 @@
     };
 }
 
-BindingInfo ConvertToBindingInfoNoArray(const UnpackedPtr<BindGroupLayoutEntry>& binding) {
+BindingInfo ConvertToBindingInfo(const UnpackedPtr<BindGroupLayoutEntry>& binding) {
     BindingInfo bindingInfo;
     bindingInfo.binding = BindingNumber(binding->binding);
     bindingInfo.visibility = binding->visibility;
+    bindingInfo.arraySize = BindingIndex(std::max(1u, binding->bindingArraySize));
 
     if (binding->buffer.type != wgpu::BufferBindingType::BindingNotUsed) {
         bindingInfo.bindingLayout = BufferBindingInfo::From(binding->buffer);
@@ -444,16 +436,11 @@
     for (uint32_t i = 0; i < descriptor->entryCount; i++) {
         UnpackedPtr<BindGroupLayoutEntry> entry = Unpack(&descriptor->entries[i]);
 
-        BindingIndex arraySize{1};
-        if (const auto* arraySizeInfo = entry.Get<BindGroupLayoutEntryArraySize>()) {
-            arraySize = BindingIndex(arraySizeInfo->arraySize);
-        }
-
         // External textures are expanded from a texture_external into two sampled texture bindings
         // and one uniform buffer binding. The original binding number is used for the first sampled
         // texture.
         if (entry.Get<ExternalTextureBindingLayout>()) {
-            DAWN_ASSERT(arraySize == BindingIndex{1});
+            DAWN_ASSERT(entry->bindingArraySize <= 1);
             dawn::native::ExternalTextureBindingExpansion bindingExpansion;
 
             BindingInfo plane0Entry = CreateSampledTextureBindingForExternalTexture(
@@ -479,9 +466,8 @@
         // Add one BindingInfo per element of the array with increasing indexInArray for backends to
         // know which element it is when they need it, but also with increasing BindingNumber as the
         // array takes consecutive binding numbers on the API side.
-        BindingInfo info = ConvertToBindingInfoNoArray(entry);
-        info.arraySize = arraySize;
-        for (BindingIndex indexInArray : Range(arraySize)) {
+        BindingInfo info = ConvertToBindingInfo(entry);
+        for (BindingIndex indexInArray : Range(info.arraySize)) {
             info.indexInArray = indexInArray;
             result.entries.push_back(info);
             info.binding++;
diff --git a/src/dawn/native/BindingInfo.cpp b/src/dawn/native/BindingInfo.cpp
index ee52c714..e29f811 100644
--- a/src/dawn/native/BindingInfo.cpp
+++ b/src/dawn/native/BindingInfo.cpp
@@ -27,6 +27,8 @@
 
 #include "dawn/native/BindingInfo.h"
 
+#include <algorithm>
+
 #include "dawn/common/MatchVariant.h"
 #include "dawn/native/Adapter.h"
 #include "dawn/native/ChainUtils.h"
@@ -54,10 +56,7 @@
 
 void IncrementBindingCounts(BindingCounts* bindingCounts,
                             const UnpackedPtr<BindGroupLayoutEntry>& entry) {
-    uint32_t arraySize = 1;
-    if (const auto* arraySizeInfo = entry.Get<BindGroupLayoutEntryArraySize>()) {
-        arraySize = arraySizeInfo->arraySize;
-    }
+    uint32_t arraySize = std::max(1u, entry->bindingArraySize);
 
     bindingCounts->totalCount += arraySize;
 
diff --git a/src/dawn/native/BindingInfo.h b/src/dawn/native/BindingInfo.h
index c171f22..80d95d8 100644
--- a/src/dawn/native/BindingInfo.h
+++ b/src/dawn/native/BindingInfo.h
@@ -141,7 +141,7 @@
     BindingNumber binding;
     wgpu::ShaderStage visibility;
 
-    // The size of the array this binding is part of. Each BindingInfy represents a single entry.
+    // The size of the array this binding is part of. Each BindingInfo represents a single entry.
     BindingIndex arraySize{1};
     // The index of this entry in the array. Must be 0 if this entry is not in an array.
     BindingIndex indexInArray{0};
diff --git a/src/dawn/native/PipelineLayout.cpp b/src/dawn/native/PipelineLayout.cpp
index 702f0b4..0e7133b 100644
--- a/src/dawn/native/PipelineLayout.cpp
+++ b/src/dawn/native/PipelineLayout.cpp
@@ -203,12 +203,7 @@
     DeviceBase* device,
     std::vector<StageAndDescriptor> stages,
     bool allowInternalBinding) {
-    // A structure containing all the BGLEntry and all of its (non-empty) chains so that they can
-    // be moved around together in maps / vectors etc. They are linked together just before calling
-    // CreateBGL.
-    struct EntryData : public BindGroupLayoutEntry {
-        BindGroupLayoutEntryArraySize arraySize;
-    };
+    using EntryData = BindGroupLayoutEntry;
     using EntryMap = absl::flat_hash_map<BindingNumber, EntryData>;
 
     // Merges two entries at the same location, if they are allowed to be merged.
@@ -272,8 +267,8 @@
         modifiedEntry->visibility |= mergedEntry.visibility;
 
         // Size binding_arrays to be the maximum of the required array sizes.
-        modifiedEntry->arraySize.arraySize =
-            std::max(modifiedEntry->arraySize.arraySize, mergedEntry.arraySize.arraySize);
+        modifiedEntry->bindingArraySize =
+            std::max(modifiedEntry->bindingArraySize, mergedEntry.bindingArraySize);
 
         return {};
     };
@@ -283,7 +278,7 @@
         [](const ShaderBindingInfo& shaderBinding,
            const ExternalTextureBindingLayout* externalTextureBindingEntry) -> EntryData {
         EntryData entry = {};
-        entry.arraySize.arraySize = uint32_t(shaderBinding.arraySize);
+        entry.bindingArraySize = uint32_t(shaderBinding.arraySize);
 
         MatchVariant(
             shaderBinding.bindingInfo,
@@ -323,18 +318,10 @@
     auto CreateBGL = [](DeviceBase* device, EntryMap entries,
                         PipelineCompatibilityToken pipelineCompatibilityToken,
                         bool allowInternalBinding) -> ResultOrError<Ref<BindGroupLayoutBase>> {
-        // Put all the values from the map in a vector and link the chains
+        // Put all the values from the map in a vector
         std::vector<BindGroupLayoutEntry> entryVec;
         entryVec.reserve(entries.size());
         for (auto& [_, entry] : entries) {
-            // Link the entries in the map so that the entry copied in the vector still keeps
-            // pointers to the chain in the map. This is valid to do because elements in the map
-            // won't move as the map isn't modified, only elements.
-            if (entry.arraySize.arraySize != 1) {
-                entry.arraySize.nextInChain = entry.nextInChain;
-                entry.nextInChain = &entry.arraySize;
-            }
-
             entryVec.push_back(entry);
         }
 
diff --git a/src/dawn/native/Toggles.cpp b/src/dawn/native/Toggles.cpp
index f0a4c0d..cb5f5aa 100644
--- a/src/dawn/native/Toggles.cpp
+++ b/src/dawn/native/Toggles.cpp
@@ -155,7 +155,7 @@
       "https://crbug.com/dawn/673", ToggleStage::Device}},
     {Toggle::DisableBindGroupLayoutEntryArraySize,
      {"disable_bind_group_layout_entry_array_size",
-      "Disable uses of wgpu::BindGroupLayoutEntryArraySize.",
+      "Disable uses of BindGroupLayoutEntry.bindingArraySize > 0.",
       "https://issues.chromium.org/393558555", ToggleStage::Device}},
     {Toggle::UseD3D12SmallShaderVisibleHeapForTesting,
      {"use_d3d12_small_shader_visible_heap",
diff --git a/src/dawn/tests/end2end/BindingArrayTests.cpp b/src/dawn/tests/end2end/BindingArrayTests.cpp
index 3b06e21..c7fc511 100644
--- a/src/dawn/tests/end2end/BindingArrayTests.cpp
+++ b/src/dawn/tests/end2end/BindingArrayTests.cpp
@@ -163,9 +163,6 @@
     // binding will be unused.
     wgpu::BindGroupLayout bgl;
     {
-        wgpu::BindGroupLayoutEntryArraySize arraySize;
-        arraySize.arraySize = 3;
-
         std::array<wgpu::BindGroupLayoutEntry, 3> entries;
 
         entries[0].binding = 0;
@@ -174,8 +171,8 @@
 
         entries[1].binding = 1;
         entries[1].visibility = wgpu::ShaderStage::Fragment;
+        entries[1].bindingArraySize = 3;
         entries[1].texture.sampleType = wgpu::TextureSampleType::Float;
-        entries[1].nextInChain = &arraySize;
 
         entries[2].binding = 4;
         entries[2].visibility = wgpu::ShaderStage::Fragment;
@@ -246,15 +243,12 @@
     // Create the BGL with an oversized array
     wgpu::BindGroupLayout bgl;
     {
-        wgpu::BindGroupLayoutEntryArraySize arraySize;
-        arraySize.arraySize = 2;
-
         wgpu::BindGroupLayoutEntry entry;
 
         entry.binding = 0;
         entry.visibility = wgpu::ShaderStage::Fragment;
+        entry.bindingArraySize = 2;
         entry.texture.sampleType = wgpu::TextureSampleType::Float;
-        entry.nextInChain = &arraySize;
 
         wgpu::BindGroupLayoutDescriptor bglDesc;
         bglDesc.entryCount = 1;
diff --git a/src/dawn/tests/unittests/validation/BindGroupValidationTests.cpp b/src/dawn/tests/unittests/validation/BindGroupValidationTests.cpp
index d09f1ae..77637c6 100644
--- a/src/dawn/tests/unittests/validation/BindGroupValidationTests.cpp
+++ b/src/dawn/tests/unittests/validation/BindGroupValidationTests.cpp
@@ -1201,17 +1201,14 @@
     }
 }
 
-// Test making that all the bindings for an BGL with arraySize must be specified.
+// Test making that all the bindings for an BGL with bindingArraySize must be specified.
 TEST_F(BindGroupValidationTest, AllArrayElementsMustBeSpecified) {
     // Create the BGL with three entries for the array.
-    wgpu::BindGroupLayoutEntryArraySize arraySize;
-    arraySize.arraySize = 3;
-
     wgpu::BindGroupLayoutEntry entry;
     entry.binding = 1;
     entry.visibility = wgpu::ShaderStage::Fragment;
+    entry.bindingArraySize = 3;
     entry.texture.sampleType = wgpu::TextureSampleType::Float;
-    entry.nextInChain = &arraySize;
 
     wgpu::BindGroupLayoutDescriptor bglDesc;
     bglDesc.entryCount = 1;
@@ -1838,21 +1835,20 @@
     ASSERT_DEVICE_ERROR(device.CreateBindGroupLayout(&desc));
 }
 
-// Control case for a valid use of wgpu::BindGroupLayoutEntryArraySize
+// Control case for a valid use of bindingArraySize
 TEST_F(BindGroupLayoutValidationTest, ArraySizeSuccess) {
-    wgpu::BindGroupLayoutEntryArraySize arraySize;
-    arraySize.arraySize = 1;
+    for (uint32_t bindingArraySize : {0, 1, 2}) {
+        wgpu::BindGroupLayoutEntry entry;
+        entry.binding = 0;
+        entry.visibility = wgpu::ShaderStage::Fragment;
+        entry.bindingArraySize = bindingArraySize;
+        entry.texture.sampleType = wgpu::TextureSampleType::Float;
 
-    wgpu::BindGroupLayoutEntry entry;
-    entry.binding = 0;
-    entry.visibility = wgpu::ShaderStage::Fragment;
-    entry.texture.sampleType = wgpu::TextureSampleType::Float;
-    entry.nextInChain = &arraySize;
-
-    wgpu::BindGroupLayoutDescriptor desc;
-    desc.entryCount = 1;
-    desc.entries = &entry;
-    device.CreateBindGroupLayout(&desc);
+        wgpu::BindGroupLayoutDescriptor desc;
+        desc.entryCount = 1;
+        desc.entries = &entry;
+        device.CreateBindGroupLayout(&desc);
+    }
 }
 
 class BindGroupLayoutArraySizeDisabledValidationTest : public BindGroupValidationTest {
@@ -1862,20 +1858,24 @@
     }
 };
 
-// Check that using a wgpu::BindGroupLayoutEntryArraySize is disallowed by that toggle.
+// Check that using bindingArraySize > 1 is disallowed by the toggle.
 TEST_F(BindGroupLayoutArraySizeDisabledValidationTest, ArraySizeDisabled) {
-    wgpu::BindGroupLayoutEntryArraySize arraySize;
-    arraySize.arraySize = 1;
-
     wgpu::BindGroupLayoutEntry entry;
     entry.binding = 0;
     entry.visibility = wgpu::ShaderStage::Fragment;
     entry.texture.sampleType = wgpu::TextureSampleType::Float;
-    entry.nextInChain = &arraySize;
 
     wgpu::BindGroupLayoutDescriptor desc;
     desc.entryCount = 1;
     desc.entries = &entry;
+
+    entry.bindingArraySize = 0;
+    device.CreateBindGroupLayout(&desc);
+
+    entry.bindingArraySize = 1;
+    device.CreateBindGroupLayout(&desc);
+
+    entry.bindingArraySize = 2;
     ASSERT_DEVICE_ERROR(device.CreateBindGroupLayout(&desc));
 }
 
@@ -1899,14 +1899,8 @@
     )"));
 }
 
-// Check that using arraySize != 1 is only allowed for sampled textures.
+// Check that using bindingArraySize > 1 is only allowed for sampled textures.
 TEST_F(BindGroupLayoutValidationTest, ArraySizeAllowedBindingTypes) {
-    wgpu::BindGroupLayoutEntryArraySize arraySize1;
-    arraySize1.arraySize = 1;
-
-    wgpu::BindGroupLayoutEntryArraySize arraySize2;
-    arraySize2.arraySize = 2;
-
     // Sampled texture
     {
         wgpu::BindGroupLayoutEntry entry;
@@ -1918,11 +1912,11 @@
         desc.entryCount = 1;
         desc.entries = &entry;
 
-        // Success case, arraySize 1
-        entry.nextInChain = &arraySize1;
+        // Success case
+        entry.bindingArraySize = 1;
         device.CreateBindGroupLayout(&desc);
-        // Second success case, arraySize 2
-        entry.nextInChain = &arraySize2;
+        // Success case
+        entry.bindingArraySize = 2;
         device.CreateBindGroupLayout(&desc);
     }
 
@@ -1937,11 +1931,11 @@
         desc.entryCount = 1;
         desc.entries = &entry;
 
-        // Success case, arraySize 1
-        entry.nextInChain = &arraySize1;
+        // Success case
+        entry.bindingArraySize = 1;
         device.CreateBindGroupLayout(&desc);
-        // Error case, arraySize 2
-        entry.nextInChain = &arraySize2;
+        // Error case
+        entry.bindingArraySize = 2;
         ASSERT_DEVICE_ERROR(device.CreateBindGroupLayout(&desc));
     }
 
@@ -1956,11 +1950,11 @@
         desc.entryCount = 1;
         desc.entries = &entry;
 
-        // Success case, arraySize 1
-        entry.nextInChain = &arraySize1;
+        // Success case
+        entry.bindingArraySize = 1;
         device.CreateBindGroupLayout(&desc);
-        // Error case, arraySize 2
-        entry.nextInChain = &arraySize2;
+        // Error case
+        entry.bindingArraySize = 2;
         ASSERT_DEVICE_ERROR(device.CreateBindGroupLayout(&desc));
     }
 
@@ -1976,11 +1970,11 @@
         desc.entryCount = 1;
         desc.entries = &entry;
 
-        // Success case, arraySize 1
-        entry.nextInChain = &arraySize1;
+        // Success case
+        entry.bindingArraySize = 1;
         device.CreateBindGroupLayout(&desc);
-        // Error case, arraySize 2
-        entry.nextInChain = &arraySize2;
+        // Error case
+        entry.bindingArraySize = 2;
         ASSERT_DEVICE_ERROR(device.CreateBindGroupLayout(&desc));
     }
 
@@ -1995,71 +1989,42 @@
         desc.entryCount = 1;
         desc.entries = &entry;
 
-        // Success case, arraySize 1
-        entry.nextInChain = &arraySize1;
+        // Success case
+        entry.bindingArraySize = 1;
         device.CreateBindGroupLayout(&desc);
-        // Error case, arraySize 2
-        entry.nextInChain = &arraySize2;
+        // Error case
+        entry.bindingArraySize = 2;
         ASSERT_DEVICE_ERROR(device.CreateBindGroupLayout(&desc));
     }
 }
 
-// Check that arraySize = 0 is not allowed.
-TEST_F(BindGroupLayoutValidationTest, ArraySizeZero) {
-    wgpu::BindGroupLayoutEntryArraySize arraySize;
-
-    wgpu::BindGroupLayoutEntry entry;
-    entry.binding = 0;
-    entry.visibility = wgpu::ShaderStage::Fragment;
-    entry.texture.sampleType = wgpu::TextureSampleType::Float;
-    entry.nextInChain = &arraySize;
-
-    wgpu::BindGroupLayoutDescriptor desc;
-    desc.entryCount = 1;
-    desc.entries = &entry;
-
-    // Success case, arraySize is 1
-    arraySize.arraySize = 1;
-    device.CreateBindGroupLayout(&desc);
-
-    // Error case, arraySize is 0
-    arraySize.arraySize = 0;
-    ASSERT_DEVICE_ERROR(device.CreateBindGroupLayout(&desc));
-}
-
-// Check that binding + arraySize must fit in maxBindingsPerBindGroup
+// Check that binding + bindingArraySize must fit in maxBindingsPerBindGroup
 TEST_F(BindGroupLayoutValidationTest, ArrayEndPastMaxBindingsPerBindGroup) {
-    wgpu::BindGroupLayoutEntryArraySize arraySize;
-
     wgpu::BindGroupLayoutEntry entry;
     entry.binding = kMaxBindingsPerBindGroup - 1;
     entry.visibility = wgpu::ShaderStage::Fragment;
     entry.texture.sampleType = wgpu::TextureSampleType::Float;
-    entry.nextInChain = &arraySize;
 
     wgpu::BindGroupLayoutDescriptor desc;
     desc.entryCount = 1;
     desc.entries = &entry;
 
-    // Success case, arraySize is 1 so the last used binding is maxBindingsPerBindGroup
-    arraySize.arraySize = 1;
+    // Success case, bindingArraySize is 1 so the last used binding is maxBindingsPerBindGroup
+    entry.bindingArraySize = 1;
     device.CreateBindGroupLayout(&desc);
 
-    // Error case, arraySize is 2 so we go past maxBindingsPerBindGroup
-    arraySize.arraySize = 2;
+    // Error case, bindingArraySize is 2 so we go past maxBindingsPerBindGroup
+    entry.bindingArraySize = 2;
     ASSERT_DEVICE_ERROR(device.CreateBindGroupLayout(&desc));
 }
 
-// Check that arraySize + binding overflowing is caught by some validation.
+// Check that binding+bindingArraySize overflowing is caught by some validation.
 TEST_F(BindGroupLayoutValidationTest, ArraySizePlusBindingOverflow) {
-    wgpu::BindGroupLayoutEntryArraySize arraySize;
-    arraySize.arraySize = std::numeric_limits<uint32_t>::max();
-
     wgpu::BindGroupLayoutEntry entry;
     entry.binding = 3;
     entry.visibility = wgpu::ShaderStage::Fragment;
+    entry.bindingArraySize = std::numeric_limits<uint32_t>::max();
     entry.texture.sampleType = wgpu::TextureSampleType::Float;
-    entry.nextInChain = &arraySize;
 
     wgpu::BindGroupLayoutDescriptor desc;
     desc.entryCount = 1;
@@ -2067,13 +2032,10 @@
     ASSERT_DEVICE_ERROR(device.CreateBindGroupLayout(&desc));
 }
 
-// Check that arraySize is taken into account when looking for duplicate bindings.
+// Check that bindingArraySize is taken into account when looking for duplicate bindings.
 TEST_F(BindGroupLayoutValidationTest, ArraySizeDuplicateBindings) {
     const uint32_t kPlaceholderBinding = 42;  // will be replaced before each check.
 
-    wgpu::BindGroupLayoutEntryArraySize arraySize;
-    arraySize.arraySize = 3;
-
     // Check single entry, then an array that overlaps it.
     {
         wgpu::BindGroupLayoutEntry entries[2] = {
@@ -2083,9 +2045,9 @@
                 .texture = {.sampleType = wgpu::TextureSampleType::Float},
             },
             {
-                .nextInChain = &arraySize,
                 .binding = 1,
                 .visibility = wgpu::ShaderStage::Fragment,
+                .bindingArraySize = 3,
                 .texture = {.sampleType = wgpu::TextureSampleType::Float},
             },
         };
@@ -2112,9 +2074,9 @@
     {
         wgpu::BindGroupLayoutEntry entries[2] = {
             {
-                .nextInChain = &arraySize,
                 .binding = 1,
                 .visibility = wgpu::ShaderStage::Fragment,
+                .bindingArraySize = 3,
                 .texture = {.sampleType = wgpu::TextureSampleType::Float},
             },
             {
@@ -2146,15 +2108,15 @@
     {
         wgpu::BindGroupLayoutEntry entries[2] = {
             {
-                .nextInChain = &arraySize,
                 .binding = kPlaceholderBinding,
                 .visibility = wgpu::ShaderStage::Fragment,
+                .bindingArraySize = 3,
                 .texture = {.sampleType = wgpu::TextureSampleType::Float},
             },
             {
-                .nextInChain = &arraySize,
                 .binding = 3,
                 .visibility = wgpu::ShaderStage::Fragment,
+                .bindingArraySize = 3,
                 .texture = {.sampleType = wgpu::TextureSampleType::Float},
             },
         };
@@ -2182,15 +2144,13 @@
     }
 }
 
-// Check that arraySize counts towards the binding limits.
+// Check that bindingArraySize counts towards the binding limits.
 TEST_F(BindGroupLayoutValidationTest, ArraySizeCountsTowardsLimit) {
-    wgpu::BindGroupLayoutEntryArraySize arraySize;
-
     wgpu::BindGroupLayoutEntry entries[2] = {
         {
-            .nextInChain = &arraySize,
             .binding = 1,
             .visibility = wgpu::ShaderStage::Fragment,
+            .bindingArraySize = 0,
             .texture = {.sampleType = wgpu::TextureSampleType::Float},
         },
         {
@@ -2205,21 +2165,18 @@
 
     wgpu::Limits limits = GetSupportedLimits();
 
-    // Success case: we are just at the limit with the arraySize.
-    arraySize.arraySize = limits.maxSampledTexturesPerShaderStage - 1;
+    // Success case: we are just at the limit with the bindingArraySize.
+    entries[0].bindingArraySize = limits.maxSampledTexturesPerShaderStage - 1;
     device.CreateBindGroupLayout(&desc);
 
-    // Error case: we are just above the limit with the arraySize.
-    arraySize.arraySize = limits.maxSampledTexturesPerShaderStage;
+    // Error case: we are just above the limit with the bindingArraySize.
+    entries[0].bindingArraySize = limits.maxSampledTexturesPerShaderStage;
     ASSERT_DEVICE_ERROR(device.CreateBindGroupLayout(&desc));
 }
 
-// Test that only arraySize = 1 is allowed for external textures
+// Test that only bindingArraySize = 0/1 is allowed for external textures
 TEST_F(BindGroupLayoutValidationTest, ExternalTextureWithArraySize) {
-    wgpu::BindGroupLayoutEntryArraySize arraySize;
-
     wgpu::ExternalTextureBindingLayout externalTextureLayout = {};
-    externalTextureLayout.nextInChain = &arraySize;
 
     wgpu::BindGroupLayoutEntry binding = {};
     binding.binding = 0;
@@ -2229,12 +2186,16 @@
     desc.entryCount = 1;
     desc.entries = &binding;
 
-    // Success case, arraySize is 1.
-    arraySize.arraySize = 1;
+    // Success case
+    binding.bindingArraySize = 0;
     device.CreateBindGroupLayout(&desc);
 
-    // Error case, arraySize is not 1.
-    arraySize.arraySize = 2;
+    // Success case
+    binding.bindingArraySize = 1;
+    device.CreateBindGroupLayout(&desc);
+
+    // Error case
+    binding.bindingArraySize = 2;
     ASSERT_DEVICE_ERROR(device.CreateBindGroupLayout(&desc));
 }
 
@@ -2447,13 +2408,10 @@
         utils::MakeBindGroup(device, layout, {{0, device.CreateSampler(&samplerDesc)}}));
 }
 
-// Test that only arraySize = 1 is allowed for static samplers
+// Test that only bindingArraySize = 0/1 is allowed for static samplers
 TEST_F(BindGroupLayoutWithStaticSamplersValidationTest, StaticSamplerWithArraySize) {
-    wgpu::BindGroupLayoutEntryArraySize arraySize;
-
     wgpu::StaticSamplerBindingLayout staticSamplerBinding = {};
     staticSamplerBinding.sampler = device.CreateSampler();
-    staticSamplerBinding.nextInChain = &arraySize;
 
     wgpu::BindGroupLayoutEntry binding = {};
     binding.binding = 0;
@@ -2463,12 +2421,16 @@
     desc.entryCount = 1;
     desc.entries = &binding;
 
-    // Success case, arraySize is 1.
-    arraySize.arraySize = 1;
+    // Success case
+    binding.bindingArraySize = 0;
     device.CreateBindGroupLayout(&desc);
 
-    // Error case, arraySize is not 1.
-    arraySize.arraySize = 2;
+    // Success case
+    binding.bindingArraySize = 1;
+    device.CreateBindGroupLayout(&desc);
+
+    // Error case
+    binding.bindingArraySize = 2;
     ASSERT_DEVICE_ERROR(device.CreateBindGroupLayout(&desc));
 }
 
@@ -3607,32 +3569,30 @@
     bglDesc.entries = &entry;
     wgpu::BindGroupLayout bglNoArray = device.CreateBindGroupLayout(&bglDesc);
 
-    wgpu::BindGroupLayoutEntryArraySize arraySize;
-    arraySize.arraySize = 1;
-    entry.nextInChain = &arraySize;
+    entry.bindingArraySize = 1;
     wgpu::BindGroupLayout bglArray1 = device.CreateBindGroupLayout(&bglDesc);
 
-    arraySize.arraySize = 2;
+    entry.bindingArraySize = 2;
     wgpu::BindGroupLayout bglArray2 = device.CreateBindGroupLayout(&bglDesc);
 
-    arraySize.arraySize = 3;
+    entry.bindingArraySize = 3;
     wgpu::BindGroupLayout bglArray3 = device.CreateBindGroupLayout(&bglDesc);
 
-    // Test that a BGL with arraySize 2 is valid for binding_array<T, 2>
+    // Test that a BGL with bindingArraySize 2 is valid for binding_array<T, 2>
     CreateFSRenderPipeline(R"(
             @group(0) @binding(0) var t : binding_array<texture_2d<f32>, 2>;
             @fragment fn main() {
                 _ = t[0];
             })",
                            {bglArray2});
-    // Test that a BGL with a bigger arraySize is valid.
+    // Test that a BGL with a bigger bindingArraySize is valid.
     CreateFSRenderPipeline(R"(
             @group(0) @binding(0) var t : binding_array<texture_2d<f32>, 2>;
             @fragment fn main() {
                 _ = t[0];
             })",
                            {bglArray3});
-    // Test that a BGL with a smaller arraySize is an error.
+    // Test that a BGL with a smaller bindingArraySize is an error.
     ASSERT_DEVICE_ERROR(CreateFSRenderPipeline(R"(
             @group(0) @binding(0) var t : binding_array<texture_2d<f32>, 2>;
             @fragment fn main() {
diff --git a/src/dawn/tests/unittests/validation/GetBindGroupLayoutValidationTests.cpp b/src/dawn/tests/unittests/validation/GetBindGroupLayoutValidationTests.cpp
index 00adc9f..120f00b 100644
--- a/src/dawn/tests/unittests/validation/GetBindGroupLayoutValidationTests.cpp
+++ b/src/dawn/tests/unittests/validation/GetBindGroupLayoutValidationTests.cpp
@@ -1018,13 +1018,10 @@
 TEST_F(GetBindGroupLayoutTests, ArraySizeReflected) {
     DAWN_SKIP_TEST_IF(UsesWire());
 
-    wgpu::BindGroupLayoutEntryArraySize arraySize;
-
     wgpu::BindGroupLayoutEntry entry;
     entry.binding = 0;
     entry.visibility = wgpu::ShaderStage::Fragment;
     entry.texture.sampleType = wgpu::TextureSampleType::UnfilterableFloat;
-    entry.nextInChain = &arraySize;
 
     wgpu::BindGroupLayoutDescriptor bglDesc;
     bglDesc.entryCount = 1;
@@ -1037,13 +1034,13 @@
             _ = t[0];
         })");
 
-    arraySize.arraySize = 3;
+    entry.bindingArraySize = 3;
     EXPECT_THAT(device.CreateBindGroupLayout(&bglDesc),
                 BindGroupLayoutCacheEq(pipeline.GetBindGroupLayout(0)));
-    arraySize.arraySize = 2;
+    entry.bindingArraySize = 2;
     EXPECT_THAT(device.CreateBindGroupLayout(&bglDesc),
                 Not(BindGroupLayoutCacheEq(pipeline.GetBindGroupLayout(0))));
-    arraySize.arraySize = 1;
+    entry.bindingArraySize = 1;
     EXPECT_THAT(device.CreateBindGroupLayout(&bglDesc),
                 Not(BindGroupLayoutCacheEq(pipeline.GetBindGroupLayout(0))));
 }
@@ -1053,14 +1050,11 @@
     DAWN_SKIP_TEST_IF(UsesWire());
 
     // A BGL with arraySize = 3
-    wgpu::BindGroupLayoutEntryArraySize arraySize;
-    arraySize.arraySize = 3;
-
     wgpu::BindGroupLayoutEntry entry;
     entry.binding = 0;
     entry.visibility = wgpu::ShaderStage::Vertex | wgpu::ShaderStage::Fragment;
+    entry.bindingArraySize = 3;
     entry.texture.sampleType = wgpu::TextureSampleType::UnfilterableFloat;
-    entry.nextInChain = &arraySize;
 
     wgpu::BindGroupLayoutDescriptor bglDesc;
     bglDesc.entryCount = 1;
diff --git a/src/dawn/tests/unittests/validation/UnsafeAPIValidationTests.cpp b/src/dawn/tests/unittests/validation/UnsafeAPIValidationTests.cpp
index 85db34a..01b29a4 100644
--- a/src/dawn/tests/unittests/validation/UnsafeAPIValidationTests.cpp
+++ b/src/dawn/tests/unittests/validation/UnsafeAPIValidationTests.cpp
@@ -64,20 +64,24 @@
     )"));
 }
 
-// Check that using a wgpu::BindGroupLayoutEntryArraySize is an unsafe API.
+// Check that using bindingArraySize > 1 is an unsafe API.
 TEST_F(UnsafeAPIValidationTest, BindGroupLayoutEntryArraySize) {
-    wgpu::BindGroupLayoutEntryArraySize arraySize;
-    arraySize.arraySize = 1;
-
     wgpu::BindGroupLayoutEntry entry;
     entry.binding = 0;
     entry.visibility = wgpu::ShaderStage::Fragment;
     entry.texture.sampleType = wgpu::TextureSampleType::Float;
-    entry.nextInChain = &arraySize;
 
     wgpu::BindGroupLayoutDescriptor desc;
     desc.entryCount = 1;
     desc.entries = &entry;
+
+    entry.bindingArraySize = 0;
+    device.CreateBindGroupLayout(&desc);
+
+    entry.bindingArraySize = 1;
+    device.CreateBindGroupLayout(&desc);
+
+    entry.bindingArraySize = 2;
     ASSERT_DEVICE_ERROR(device.CreateBindGroupLayout(&desc));
 }
 
diff --git a/src/dawn/tests/unittests/wire/WireArgumentTests.cpp b/src/dawn/tests/unittests/wire/WireArgumentTests.cpp
index e9855d7..da912aa 100644
--- a/src/dawn/tests/unittests/wire/WireArgumentTests.cpp
+++ b/src/dawn/tests/unittests/wire/WireArgumentTests.cpp
@@ -343,27 +343,22 @@
 TEST_F(WireArgumentTests, StructureOfStructureArrayArgument) {
     static constexpr int NUM_BINDINGS = 3;
     wgpu::BindGroupLayoutEntry entries[NUM_BINDINGS]{
-        {nullptr,
-         0,
-         wgpu::ShaderStage::Vertex,
-         {},
-         {nullptr, wgpu::SamplerBindingType::Filtering},
-         {},
-         {}},
-        {nullptr,
-         1,
-         wgpu::ShaderStage::Vertex,
-         {},
-         {},
-         {nullptr, wgpu::TextureSampleType::Float, wgpu::TextureViewDimension::e2D, false},
-         {}},
-        {nullptr,
-         2,
-         wgpu::ShaderStage::Vertex | wgpu::ShaderStage::Fragment,
-         {nullptr, wgpu::BufferBindingType::Uniform, false, 0},
-         {},
-         {},
-         {}},
+        {
+            .binding = 0,
+            .visibility = wgpu::ShaderStage::Vertex,
+            .sampler = {nullptr, wgpu::SamplerBindingType::Filtering},
+        },
+        {
+            .binding = 1,
+            .visibility = wgpu::ShaderStage::Vertex,
+            .texture = {nullptr, wgpu::TextureSampleType::Float, wgpu::TextureViewDimension::e2D,
+                        false},
+        },
+        {
+            .binding = 2,
+            .visibility = wgpu::ShaderStage::Vertex | wgpu::ShaderStage::Fragment,
+            .buffer = {nullptr, wgpu::BufferBindingType::Uniform, false, 0},
+        },
     };
     wgpu::BindGroupLayoutDescriptor bglDescriptor = {};
     bglDescriptor.entryCount = NUM_BINDINGS;
diff --git a/src/emdawnwebgpu/pkg/emdawnwebgpu.port.py b/src/emdawnwebgpu/pkg/emdawnwebgpu.port.py
index 0f8890a..98491ca 100644
--- a/src/emdawnwebgpu/pkg/emdawnwebgpu.port.py
+++ b/src/emdawnwebgpu/pkg/emdawnwebgpu.port.py
@@ -39,7 +39,7 @@
 # User options, e.g. --use-port=path/to/emdawnwebgpu.port.py:cpp_bindings=false
 OPTIONS = {
     'cpp_bindings':
-    'Add the include path for <webgpu/webgpu_cpp.h> C++ bindings. Default: true.',
+    "Add the include path for Dawn-like <webgpu/webgpu_cpp.h> C++ bindings. Default: true.",
     'opt_level':
     "Optimization (-O) level for the bindings' Wasm layer. Default: choose based on -sASSERTIONS.",
 }
diff --git a/third_party/emdawnwebgpu/pkg/webgpu/src/library_webgpu.js b/third_party/emdawnwebgpu/pkg/webgpu/src/library_webgpu.js
index 4b9bec2..094ed55 100644
--- a/third_party/emdawnwebgpu/pkg/webgpu/src/library_webgpu.js
+++ b/third_party/emdawnwebgpu/pkg/webgpu/src/library_webgpu.js
@@ -1481,6 +1481,13 @@
 
     function makeEntry(entryPtr) {
       {{{ gpu.makeCheck('entryPtr') }}}
+#if ASSERTIONS
+      // bindingArraySize is not specced and thus not implemented yet. We don't pass it through
+      // because if we did, then existing apps using this version of the bindings could break when
+      // browsers start accepting bindingArraySize.
+      var bindingArraySize = {{{ gpu.makeGetU32('entryPtr', C_STRUCTS.WGPUBindGroupLayoutEntry.bindingArraySize) }}};
+      assert(bindingArraySize == 0 || bindingArraySize == 1);
+#endif
 
       return {
         "binding":
diff --git a/third_party/webgpu-headers/webgpu.h.diff b/third_party/webgpu-headers/webgpu.h.diff
index 6896587..ec8e710 100644
--- a/third_party/webgpu-headers/webgpu.h.diff
+++ b/third_party/webgpu-headers/webgpu.h.diff
@@ -26,10 +26,8 @@
 -struct WGPUAdapterInfo;
 +struct WGPUAdapterPropertiesSubgroups;
  struct WGPUBindGroupEntry;
-+struct WGPUBindGroupLayoutEntryArraySize;
  struct WGPUBlendComponent;
  struct WGPUBufferBindingLayout;
- struct WGPUBufferDescriptor;
 @@
  struct WGPUConstantEntry;
  struct WGPUExtent3D;
@@ -103,7 +101,6 @@
      WGPUSType_SurfaceColorManagement = 0x0000000A,
      WGPUSType_RequestAdapterWebXROptions = 0x0000000B,
 +    WGPUSType_AdapterPropertiesSubgroups = 0x0000000C,
-+    WGPUSType_BindGroupLayoutEntryArraySize = 0x0000000D,
 +    WGPUSType_TextureBindingViewDimensionDescriptor = 0x00020000,
      WGPUSType_Force32 = 0x7FFFFFFF
  } WGPUSType WGPU_ENUM_ATTRIBUTE;
@@ -180,26 +177,6 @@
  
  typedef struct WGPUBindGroupEntry {
 @@
-     /*.textureView=*/NULL _wgpu_COMMA \
- })
- 
-+typedef struct WGPUBindGroupLayoutEntryArraySize {
-+    WGPUChainedStruct chain;
-+    uint32_t arraySize;
-+} WGPUBindGroupLayoutEntryArraySize WGPU_STRUCTURE_ATTRIBUTE;
-+
-+#define WGPU_BIND_GROUP_LAYOUT_ENTRY_ARRAY_SIZE_INIT _wgpu_MAKE_INIT_STRUCT(WGPUBindGroupLayoutEntryArraySize, { \
-+    /*.chain=*/_wgpu_MAKE_INIT_STRUCT(WGPUChainedStruct, { \
-+        /*.next=*/NULL _wgpu_COMMA \
-+        /*.sType=*/WGPUSType_BindGroupLayoutEntryArraySize _wgpu_COMMA \
-+    }) _wgpu_COMMA \
-+    /*.arraySize=*/0 _wgpu_COMMA \
-+})
-+
- typedef struct WGPUBlendComponent {
-     WGPUBlendOperation operation;
-     WGPUBlendFactor srcFactor;
-@@
  #define WGPU_BUFFER_BINDING_LAYOUT_INIT _wgpu_MAKE_INIT_STRUCT(WGPUBufferBindingLayout, { \
      /*.nextInChain=*/NULL _wgpu_COMMA \
      /*.type=*/WGPUBufferBindingType_Undefined _wgpu_COMMA \
@@ -379,9 +356,11 @@
  
  typedef struct WGPUTextureViewDescriptor {
 @@
+     /*.format=*/_wgpu_ENUM_ZERO_INIT(WGPUVertexFormat) _wgpu_COMMA \
+     /*.offset=*/0 _wgpu_COMMA \
      /*.shaderLocation=*/0 _wgpu_COMMA \
- })
- 
++})
++
 +typedef struct WGPUAdapterInfo {
 +    WGPUChainedStruct * nextInChain;
 +    WGPUStringView vendor;
@@ -408,27 +387,9 @@
 +    /*.deviceID=*/0 _wgpu_COMMA \
 +    /*.subgroupMinSize=*/0 _wgpu_COMMA \
 +    /*.subgroupMaxSize=*/0 _wgpu_COMMA \
-+})
-+
+ })
+ 
  typedef struct WGPUBindGroupDescriptor {
-     WGPUChainedStruct * nextInChain;
-     WGPUStringView label;
-@@
-     WGPUChainedStruct * nextInChain;
-     uint32_t binding;
-     WGPUShaderStage visibility;
--    uint32_t bindingArraySize;
-     WGPUBufferBindingLayout buffer;
-     WGPUSamplerBindingLayout sampler;
-     WGPUTextureBindingLayout texture;
-@@
-     /*.nextInChain=*/NULL _wgpu_COMMA \
-     /*.binding=*/0 _wgpu_COMMA \
-     /*.visibility=*/WGPUShaderStage_None _wgpu_COMMA \
--    /*.bindingArraySize=*/0 _wgpu_COMMA \
-     /*.buffer=*/_wgpu_STRUCT_ZERO_INIT _wgpu_COMMA \
-     /*.sampler=*/_wgpu_STRUCT_ZERO_INIT _wgpu_COMMA \
-     /*.texture=*/_wgpu_STRUCT_ZERO_INIT _wgpu_COMMA \
 @@
      /*.nextInChain=*/NULL _wgpu_COMMA \
      /*.format=*/WGPUTextureFormat_Undefined _wgpu_COMMA \
diff --git a/tools/android/BUILD.gn b/tools/android/BUILD.gn
index 4a861a8..a855723 100644
--- a/tools/android/BUILD.gn
+++ b/tools/android/BUILD.gn
@@ -56,7 +56,6 @@
     "java/android/dawn/BindGroupLayout.kt",
     "java/android/dawn/BindGroupLayoutDescriptor.kt",
     "java/android/dawn/BindGroupLayoutEntry.kt",
-    "java/android/dawn/BindGroupLayoutEntryArraySize.kt",
     "java/android/dawn/BlendComponent.kt",
     "java/android/dawn/BlendFactor.kt",
     "java/android/dawn/BlendOperation.kt",