Add basic supports of storage textures on OpenGL

This patch adds the basic supports of read-only and write-only storage
textures on OpenGL backend. Currently on OpenGL backend we only support
using either a layer of a texture or the entire texture as either read-
only or write-only storage texture.

BUG=dawn:267
TEST=dawn_end2end_tests

Change-Id: I235b98d8d961a17739ea35eec9726dcc80889c4b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/22180
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
diff --git a/src/dawn_native/opengl/PipelineLayoutGL.cpp b/src/dawn_native/opengl/PipelineLayoutGL.cpp
index 082a25b..d951b83 100644
--- a/src/dawn_native/opengl/PipelineLayoutGL.cpp
+++ b/src/dawn_native/opengl/PipelineLayoutGL.cpp
@@ -26,6 +26,7 @@
         GLuint samplerIndex = 0;
         GLuint sampledTextureIndex = 0;
         GLuint ssboIndex = 0;
+        GLuint storageTextureIndex = 0;
 
         for (uint32_t group : IterateBitSet(GetBindGroupLayoutsMask())) {
             const BindGroupLayoutBase* bgl = GetBindGroupLayout(group);
@@ -53,9 +54,13 @@
                         ssboIndex++;
                         break;
 
-                    case wgpu::BindingType::StorageTexture:
                     case wgpu::BindingType::ReadonlyStorageTexture:
                     case wgpu::BindingType::WriteonlyStorageTexture:
+                        mIndexInfo[group][bindingIndex] = storageTextureIndex;
+                        storageTextureIndex++;
+                        break;
+
+                    case wgpu::BindingType::StorageTexture:
                         UNREACHABLE();
                         break;