Add UMA for bgra8unorm read-only usage

bgra8unorm read-only usage was never supposed to be allowed.
We've deprecated it. We'd like to know if we any sites use it
before we turn it off after a few releases.

Bug: 427681156
Change-Id: Id8589b216280687531201c838325e7a04dd42e84
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/251234
Commit-Queue: Gregg Tavares <gman@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
diff --git a/src/dawn/native/BindGroupLayoutInternal.cpp b/src/dawn/native/BindGroupLayoutInternal.cpp
index 4d5c92f..1c454a1 100644
--- a/src/dawn/native/BindGroupLayoutInternal.cpp
+++ b/src/dawn/native/BindGroupLayoutInternal.cpp
@@ -49,6 +49,7 @@
 #include "dawn/native/PerStage.h"
 #include "dawn/native/Sampler.h"
 #include "dawn/native/ValidationUtils_autogen.h"
+#include "dawn/platform/metrics/HistogramMacros.h"
 
 namespace dawn::native {
 
@@ -77,6 +78,8 @@
     // TODO(427681156): Remove this deprecation warning
     if (storageTextureFormat == wgpu::TextureFormat::BGRA8Unorm &&
         access == wgpu::StorageTextureAccess::ReadOnly) {
+        DAWN_HISTOGRAM_BOOLEAN(device->GetPlatform(), "BGRA8UnormStorageTextureReadOnlyUsage",
+                               true);
         device->EmitWarningOnce(
             "bgra8unorm with read-only access is deprecated. bgra8unorm only supports write-only "
             "access. Note: allowing this usage was a bug in Chrome. The spec disallows it as it is "