Update naming for vertex state

- VertexInputDescriptor -> VertexStateDescriptor
- VertexBufferDescriptor -> VertexBufferLayoutDescriptor
- VertexBufferDescriptor.stride -> .arrayStride
- VertexAttributeDescriptor.offset no longer optional

gpuweb PR: https://github.com/gpuweb/gpuweb/pull/469

Bug: dawn:22
Change-Id: I5431df4ba22cfbdb1bc81e6709e562cd736892a3
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/13100
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
diff --git a/src/dawn_native/opengl/RenderPipelineGL.cpp b/src/dawn_native/opengl/RenderPipelineGL.cpp
index b7e7448..b16783c 100644
--- a/src/dawn_native/opengl/RenderPipelineGL.cpp
+++ b/src/dawn_native/opengl/RenderPipelineGL.cpp
@@ -202,7 +202,7 @@
         modules[SingleShaderStage::Fragment] = ToBackend(descriptor->fragmentStage->module);
 
         PipelineGL::Initialize(device->gl, ToBackend(GetLayout()), modules);
-        CreateVAOForVertexInput(descriptor->vertexInput);
+        CreateVAOForVertexState(descriptor->vertexState);
     }
 
     RenderPipeline::~RenderPipeline() {
@@ -215,25 +215,25 @@
         return mGlPrimitiveTopology;
     }
 
-    void RenderPipeline::CreateVAOForVertexInput(const VertexInputDescriptor* vertexInput) {
+    void RenderPipeline::CreateVAOForVertexState(const VertexStateDescriptor* vertexState) {
         const OpenGLFunctions& gl = ToBackend(GetDevice())->gl;
 
         gl.GenVertexArrays(1, &mVertexArrayObject);
         gl.BindVertexArray(mVertexArrayObject);
 
-        for (uint32_t location : IterateBitSet(GetAttributesSetMask())) {
+        for (uint32_t location : IterateBitSet(GetAttributeLocationsUsed())) {
             const auto& attribute = GetAttribute(location);
             gl.EnableVertexAttribArray(location);
 
-            attributesUsingInput[attribute.inputSlot][location] = true;
-            auto input = GetInput(attribute.inputSlot);
+            attributesUsingVertexBuffer[attribute.vertexBufferSlot][location] = true;
+            const VertexBufferInfo& vertexBuffer = GetVertexBuffer(attribute.vertexBufferSlot);
 
-            if (input.stride == 0) {
+            if (vertexBuffer.arrayStride == 0) {
                 // Emulate a stride of zero (constant vertex attribute) by
                 // setting the attribute instance divisor to a huge number.
                 gl.VertexAttribDivisor(location, 0xffffffff);
             } else {
-                switch (input.stepMode) {
+                switch (vertexBuffer.stepMode) {
                     case wgpu::InputStepMode::Vertex:
                         break;
                     case wgpu::InputStepMode::Instance: