[Static samplers] Add feature to enable static samplers

This CL kicks off the addition of static samplers by adding a feature
that controls whether they are enabled.

Change-Id: I7f7f22081ba3f132e97c9877d3414003f59d4863
Bug: dawn:2643
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/179720
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Colin Blundell <blundell@chromium.org>
Reviewed-by: Nicolette Prevost <nicolettep@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
diff --git a/docs/dawn/features/static_samplers.md b/docs/dawn/features/static_samplers.md
new file mode 100644
index 0000000..986afb9
--- /dev/null
+++ b/docs/dawn/features/static_samplers.md
@@ -0,0 +1,8 @@
+# Static Samplers
+
+The `static-samplers` feature allows specification of samplers statically as
+part of the bind group layout.
+
+TODO(crbug.com/dawn/2364): Expand this documentation with examples and
+description of semantics (including constraints/validations) as we build out
+support
diff --git a/src/dawn/dawn.json b/src/dawn/dawn.json
index d9cd936..0c1dc75 100644
--- a/src/dawn/dawn.json
+++ b/src/dawn/dawn.json
@@ -2218,7 +2218,8 @@
             {"value": 1202, "name": "shared fence vk semaphore zircon handle", "tags": ["dawn", "native"]},
             {"value": 1203, "name": "shared fence DXGI shared handle", "tags": ["dawn", "native"]},
             {"value": 1204, "name": "shared fence MTL shared event", "tags": ["dawn", "native"]},
-            {"value": 1205, "name": "shared buffer memory D3D12 resource", "tags": ["dawn", "native"]}
+            {"value": 1205, "name": "shared buffer memory D3D12 resource", "tags": ["dawn", "native"]},
+            {"value": 1206, "name": "static samplers", "tags": ["dawn"]}
         ]
     },
     "filter mode": {
diff --git a/src/dawn/native/Features.cpp b/src/dawn/native/Features.cpp
index a64d9c8..708dc08 100644
--- a/src/dawn/native/Features.cpp
+++ b/src/dawn/native/Features.cpp
@@ -319,6 +319,11 @@
       "https://dawn.googlesource.com/dawn/+/refs/heads/main/docs/dawn/features/"
       "format_capabilities.md",
       FeatureInfo::FeatureState::Stable}},
+    {Feature::StaticSamplers,
+     {"Support setting samplers statically as part of bind group layout",
+      "https://dawn.googlesource.com/dawn/+/refs/heads/main/docs/dawn/features/"
+      "static_samplers.md",
+      FeatureInfo::FeatureState::Experimental}},
 };
 
 }  // anonymous namespace
diff --git a/src/dawn/wire/SupportedFeatures.cpp b/src/dawn/wire/SupportedFeatures.cpp
index 196819d..3c98c1c 100644
--- a/src/dawn/wire/SupportedFeatures.cpp
+++ b/src/dawn/wire/SupportedFeatures.cpp
@@ -99,6 +99,7 @@
         case WGPUFeatureName_AdapterPropertiesD3D:
         case WGPUFeatureName_AdapterPropertiesVk:
         case WGPUFeatureName_R8UnormStorage:
+        case WGPUFeatureName_StaticSamplers:
             return true;
     }