[M138] [dawn][native] Split maxImmediateSize into a separate limits group

Tiering is applied per group of limits such that if any of tier (n+1)
can't be supported, all limits go down to tier (n). maxImmediateSize
shouldn't be grouped with the OTHER limits because its tiers don't line
up with the others, causing maxVertexAttributes to be lowered
unnecessarily (it's the only limit in the OTHER group that varies from
tier0 to tier1).

Fixed: 430603273
Test: manually checked webgpureport.org in local windows chromium build
Bug: 430371785
Change-Id: Ibd1901c08aed2d471591adc4755a802ca866a1bd
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/251574
Auto-Submit: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: dan sinclair <dsinclair@chromium.org>
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Loko Kung <lokokung@google.com>
(cherry picked from commit 2113eec7a2b9c0b3cb21a98c6239baa7ca865466)
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/251754
diff --git a/src/dawn/native/Limits.cpp b/src/dawn/native/Limits.cpp
index 3a76cb0..49b4e34 100644
--- a/src/dawn/native/Limits.cpp
+++ b/src/dawn/native/Limits.cpp
@@ -111,6 +111,11 @@
     X(v1, Maximum,                       maxTextureDimension3D,      1024,      2048,       2048) \
     X(v1, Maximum,                       maxTextureArrayLayers,       256,       256,       2048)
 
+// Tiered limits for immediate data sizes.
+//                                   compat  tier0  tier1
+#define LIMITS_IMMEDIATE_SIZE(X) \
+    X(v1, Maximum, maxImmediateSize,      0,     0,    16)
+
 // TODO(crbug.com/dawn/685):
 // These limits don't have tiers yet. Define two tiers with the same values since the macros
 // in this file expect more than one tier.
@@ -125,8 +130,7 @@
     X(v1,                              Maximum,                                  maxVertexBuffers,         8,         8,          8) \
     X(v1,                              Maximum,                               maxVertexAttributes,        16,        16,         30) \
     X(v1,                              Maximum,                        maxVertexBufferArrayStride,      2048,      2048,       2048) \
-    X(v1,                              Maximum,                               maxColorAttachments,         4,         8,          8) \
-    X(v1,                              Maximum,                               maxImmediateSize,            0,         0,         16)
+    X(v1,                              Maximum,                               maxColorAttachments,         4,         8,          8)
 
 // clang-format on
 
@@ -140,6 +144,7 @@
     X(LIMITS_ATTACHMENTS)                  \
     X(LIMITS_INTER_STAGE_SHADER_VARIABLES) \
     X(LIMITS_TEXTURE_DIMENSIONS)           \
+    X(LIMITS_IMMEDIATE_SIZE)               \
     X(LIMITS_OTHER)
 
 #define LIMITS(X)                          \
@@ -152,6 +157,7 @@
     LIMITS_ATTACHMENTS(X)                  \
     LIMITS_INTER_STAGE_SHADER_VARIABLES(X) \
     LIMITS_TEXTURE_DIMENSIONS(X)           \
+    LIMITS_IMMEDIATE_SIZE(X)               \
     LIMITS_OTHER(X)
 
 namespace dawn::native {