Refactor/remove dawn-defined buffer and texture usages

This change refactors dawn-defined buffer and texture usages.
It groups buffer usages together, and groups texture usages
together, in order to avoid values conflict. It also removes
kReadOnlyStorageTexture because its definition has already been
removed.

Bug: dawn:485
Change-Id: I8c772ebadd3d276905fbcdb3283f0d5d89f74dd6
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/65680
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Yunchao He <yunchao.he@intel.com>
diff --git a/src/dawn_native/ShaderModule.cpp b/src/dawn_native/ShaderModule.cpp
index 47badae..4c22706 100644
--- a/src/dawn_native/ShaderModule.cpp
+++ b/src/dawn_native/ShaderModule.cpp
@@ -165,7 +165,6 @@
                 case tint::inspector::ResourceBinding::ResourceType::kDepthTexture:
                 case tint::inspector::ResourceBinding::ResourceType::kDepthMultisampledTexture:
                     return BindingInfoType::Texture;
-                case tint::inspector::ResourceBinding::ResourceType::kReadOnlyStorageTexture:
                 case tint::inspector::ResourceBinding::ResourceType::kWriteOnlyStorageTexture:
                     return BindingInfoType::StorageTexture;
                 case tint::inspector::ResourceBinding::ResourceType::kExternalTexture:
diff --git a/src/dawn_native/dawn_platform.h b/src/dawn_native/dawn_platform.h
index 522259a..d36a48a 100644
--- a/src/dawn_native/dawn_platform.h
+++ b/src/dawn_native/dawn_platform.h
@@ -23,9 +23,19 @@
 #include <dawn_native/wgpu_structs_autogen.h>
 
 namespace dawn_native {
+    // Extra buffer usages
+    // Add an extra buffer usage and an extra binding type for binding the buffers with QueryResolve
+    // usage as storage buffer in the internal pipeline.
+    static constexpr wgpu::BufferUsage kInternalStorageBuffer =
+        static_cast<wgpu::BufferUsage>(0x40000000);
+
     // Add an extra buffer usage (readonly storage buffer usage) for render pass resource tracking
     static constexpr wgpu::BufferUsage kReadOnlyStorageBuffer =
         static_cast<wgpu::BufferUsage>(0x80000000);
+
+    // Extra texture usages
+    // Add an extra texture usage (readonly render attachment usage) for render pass resource
+    // tracking
     static constexpr wgpu::TextureUsage kReadOnlyRenderAttachment =
         static_cast<wgpu::TextureUsage>(0x40000000);
 
@@ -40,10 +50,6 @@
     // some bit when wgpu::TextureUsage::Present is removed.
     static constexpr wgpu::TextureUsage kPresentTextureUsage = wgpu::TextureUsage::Present;
 
-    // Add an extra buffer usage and an extra binding type for binding the buffers with QueryResolve
-    // usage as storage buffer in the internal pipeline.
-    static constexpr wgpu::BufferUsage kInternalStorageBuffer =
-        static_cast<wgpu::BufferUsage>(0x40000000);
     static constexpr wgpu::BufferBindingType kInternalStorageBufferBinding =
         static_cast<wgpu::BufferBindingType>(0xFFFFFFFF);
 }  // namespace dawn_native