Allow one texture as write-only storage and sampled in one compute pass

This patch enables one texture to be used as both write-only storage
texture and sampled texture in one compute pass.

Note that while we don't need to check the usage scope of a texture in
the whole compute pass scope, we still need to verify one texture cannot
be bound to multiple bindings that are used in one dispatch at the same
time. This check will be added in the following patches.

This patch also adds tests to ensure a texture can be used as the
following binding types in one compute pass:
- read-only storage + sampled
- write-only storage + sampled
- read-only storage + write-only storage

BUG=dawn:267
TEST=dawn_unittests

Change-Id: Ibff2b005a5269a0bfa254e0417de4920758add39
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/20120
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
Reviewed-by: Austin Eng <enga@chromium.org>
diff --git a/src/dawn_native/CommandEncoder.cpp b/src/dawn_native/CommandEncoder.cpp
index 23710cd..bb6109f 100644
--- a/src/dawn_native/CommandEncoder.cpp
+++ b/src/dawn_native/CommandEncoder.cpp
@@ -526,7 +526,7 @@
     RenderPassEncoder* CommandEncoder::BeginRenderPass(const RenderPassDescriptor* descriptor) {
         DeviceBase* device = GetDevice();
 
-        PassResourceUsageTracker usageTracker;
+        PassResourceUsageTracker usageTracker(PassType::Render);
         bool success =
             mEncodingContext.TryEncode(this, [&](CommandAllocator* allocator) -> MaybeError {
                 uint32_t width = 0;