Vulkan: Use dynamic state for Viewport and Scissor.

This reduces the size of the pipeline cache descriptor under 256 bytes.
Further improves the speed of cache query. Has the minor cost of
needing more state application during a new command buffer or render
pass.

Bug: angleproject:2522
Change-Id: I3d71e457a36084ac4748d04fe3c9bab4caad503c
Reviewed-on: https://chromium-review.googlesource.com/c/1316888
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
diff --git a/src/libANGLE/renderer/vulkan/VertexArrayVk.cpp b/src/libANGLE/renderer/vulkan/VertexArrayVk.cpp
index 37b8c50..9182135 100644
--- a/src/libANGLE/renderer/vulkan/VertexArrayVk.cpp
+++ b/src/libANGLE/renderer/vulkan/VertexArrayVk.cpp
@@ -212,14 +212,14 @@
     case gl::VertexArray::DIRTY_BIT_ATTRIB_0 + INDEX:                             \
         ANGLE_TRY(syncDirtyAttrib(contextVk, attribs[INDEX],                      \
                                   bindings[attribs[INDEX].bindingIndex], INDEX)); \
-        invalidatePipeline = true;                                                \
+        invalidateContext = true;                                                 \
         break;
 
 #define ANGLE_VERTEX_DIRTY_BINDING_FUNC(INDEX)                                    \
     case gl::VertexArray::DIRTY_BIT_BINDING_0 + INDEX:                            \
         ANGLE_TRY(syncDirtyAttrib(contextVk, attribs[INDEX],                      \
                                   bindings[attribs[INDEX].bindingIndex], INDEX)); \
-        invalidatePipeline = true;                                                \
+        invalidateContext = true;                                                 \
         break;
 
 #define ANGLE_VERTEX_DIRTY_BUFFER_DATA_FUNC(INDEX)                                \
@@ -235,7 +235,7 @@
 {
     ASSERT(dirtyBits.any());
 
-    bool invalidatePipeline = false;
+    bool invalidateContext = false;
 
     ContextVk *contextVk = vk::GetImpl(context);
 
@@ -288,9 +288,9 @@
         }
     }
 
-    if (invalidatePipeline)
+    if (invalidateContext)
     {
-        contextVk->invalidateCurrentPipeline();
+        contextVk->invalidateVertexAndIndexBuffers();
     }
 
     return angle::Result::Continue();