Vulkan: Mega-refactor to VertexArrayVk.

This moves a lot of the code in VertexArrayVk into ContextVk. Having
the code in a centralized place makes the code a bit more organized
since the Context is reponsible for binding state to the command
buffers. It also makes it easier to use dirty bits to track the command
buffer state.

Bug: angleproject:2786
Change-Id: I5cefbb14028e8f3fe651f26e997ca88f8f1c7628
Reviewed-on: https://chromium-review.googlesource.com/1188953
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
diff --git a/src/libANGLE/renderer/vulkan/ProgramVk.h b/src/libANGLE/renderer/vulkan/ProgramVk.h
index 63985aa..54fbddb 100644
--- a/src/libANGLE/renderer/vulkan/ProgramVk.h
+++ b/src/libANGLE/renderer/vulkan/ProgramVk.h
@@ -103,17 +103,25 @@
                               const vk::PipelineLayout **pipelineLayoutOut);
 
     angle::Result updateUniforms(ContextVk *contextVk);
-
-    void invalidateTextures();
+    angle::Result updateTexturesDescriptorSet(ContextVk *contextVk);
 
     angle::Result updateDescriptorSets(ContextVk *contextVk,
                                        const gl::DrawCallParams &drawCallParams,
-                                       VkDescriptorSet driverUniformsDescriptorSet,
                                        vk::CommandBuffer *commandBuffer);
 
     // For testing only.
     void setDefaultUniformBlocksMinSizeForTesting(size_t minSize);
 
+    const vk::PipelineLayout &getPipelineLayout() const { return mPipelineLayout.get(); }
+
+    bool hasTextures() const { return !mState.getSamplerBindings().empty(); }
+
+    bool dirtyUniforms() const
+    {
+        return (mDefaultUniformBlocks[vk::ShaderType::VertexShader].uniformsDirty ||
+                mDefaultUniformBlocks[vk::ShaderType::FragmentShader].uniformsDirty);
+    }
+
   private:
     template <int cols, int rows>
     void setUniformMatrixfv(GLint location,
@@ -126,7 +134,6 @@
     angle::Result initDefaultUniformBlocks(const gl::Context *glContext);
 
     angle::Result updateDefaultUniformsDescriptorSet(ContextVk *contextVk);
-    angle::Result updateTexturesDescriptorSet(ContextVk *contextVk);
 
     template <class T>
     void getUniformImpl(GLint location, T *v, GLenum entryPointType) const;
@@ -165,7 +172,6 @@
     // Descriptor sets for uniform blocks and textures for this program.
     std::vector<VkDescriptorSet> mDescriptorSets;
     gl::RangeUI mUsedDescriptorSetRange;
-    bool mDirtyTextures;
 
     // We keep a reference to the pipeline and descriptor set layouts. This ensures they don't get
     // deleted while this program is in use.