Vulkan: Update shader compilation documentation

Bug: angleproject:3394
Change-Id: If8df97644d07f258a8f1ea1bde6b6b3572f6d024
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2062745
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
diff --git a/src/libANGLE/renderer/vulkan/doc/ShaderModuleCompilation.md b/src/libANGLE/renderer/vulkan/doc/ShaderModuleCompilation.md
index 89730b2..0f3146a 100644
--- a/src/libANGLE/renderer/vulkan/doc/ShaderModuleCompilation.md
+++ b/src/libANGLE/renderer/vulkan/doc/ShaderModuleCompilation.md
@@ -10,25 +10,33 @@
 y flipping, default uniforms, and OpenGL
 [line segment rasterization](OpenGLLineSegmentRasterization.md). For more info see
 [TranslatorVulkan.cpp][TranslatorVulkan.cpp]. After initial compilation the shaders are not
-complete. They are templated with markers that are filled in later at link time.
+complete. The translator initially assigns resources and in/out variables arbitrary descriptor set,
+binding and location indices. The correct values are determined at link time. For the sake of
+transform feedback, some markers are left in the shader for link-time substitution.
 
-1. **Link-Time Translation**: During a call to `glLinkProgram` the Vulkan back-end can know the
-necessary locations and properties to write to connect the shader stage interfaces. We get the
-completed shader source using ANGLE's [GlslangWrapperVk][GlslangWrapperVk.cpp] helper class. We still
-cannot generate `VkShaderModules` since some ANGLE features like
-[OpenGL line rasterization](OpenGLLineSegmentRasterization.md) emulation depend on draw-time
-information.
+  The translator outputs some feature code conditional to Vulkan specialization constants, which are
+resolved at draw-time. For example,
+[Bresenham line rasterization](OpenGLLineSegmentRasterization.md) emulation.
 
-1. **Draw-time SPIR-V Generation**: Once the application records a draw call we use Khronos'
-[glslang][glslang] to convert the Vulkan-compatible GLSL into SPIR-V.  The SPIR-V is then compiled
-into `VkShaderModules`. For details please see [GlslangWrapperVk.cpp][GlslangWrapperVk.cpp]. The
-`VkShaderModules` are then used by `VkPipelines` with the appropriate specialization constant
-values. Note that we currently don't use [SPIRV-Tools][SPIRV-Tools] to perform any SPIR-V
-optimization. This could be something to improve on in the future.
+1. **Link-Time Compilation and Transformation**: During a call to `glLinkProgram` the Vulkan
+back-end can know the necessary locations and properties to write to connect the shader stage
+interfaces. We get the completed shader source using ANGLE's
+[GlslangWrapperVk][GlslangWrapperVk.cpp] helper class. At this time, we use Khronos'
+[glslang][glslang] to convert the Vulkan-compatible GLSL into SPIR-V. A transformation pass is done
+on the generated SPIR-V to update the arbitrary descriptor set, binding and location indices set in
+step 1. Additionally, component and various transform feedback decorations are added and inactive
+varyings are removed from the shader interface. We currently don't generate `VkShaderModules` at
+this time, but that could be a future optimization.
+
+1. **Draw-time Pipeline Creation**: Once the application records a draw call, the SPIR-V is compiled
+into `VkShaderModule`s. The appropriate specialization constants are then resolved and the
+`VkPipeline` object is created.  Note that we currently don't use [SPIRV-Tools][SPIRV-Tools] to
+perform any SPIR-V optimization. This could be something to improve on in the future.
 
 See the below diagram for a high-level view of the shader translation flow:
 
 <!-- Generated from https://bramp.github.io/js-sequence-diagrams/
+     Note: remove whitespace in - -> arrows.
 participant App
 participant "ANGLE Front-end"
 participant "Vulkan Back-end"
@@ -41,7 +49,7 @@
 "Vulkan Back-end"->"ANGLE Translator": sh::Compile
 "ANGLE Translator"- ->"ANGLE Front-end": return Vulkan-compatible GLSL
 
-Note right of "ANGLE Front-end": Source is templated\nwith markers to be\nfilled at link time.
+Note right of "ANGLE Front-end": Source is using bogus\nVulkan qualifiers to be\ncorrected at link time.
 
 Note right of App: Same for FS, GS, etc...
 
@@ -52,11 +60,13 @@
 
 Note right of "Vulkan Back-end": ProgramVk inits uniforms,\nlayouts, and descriptors.
 
-"Vulkan Back-end"->GlslangWrapperVk: GlslangWrapperVk::GetShaderSource
-GlslangWrapperVk- ->"Vulkan Back-end": return filled-in sources
+"Vulkan Back-end"->GlslangWrapperVk: GlslangWrapperVk::GetShaderSpirvCode
+GlslangWrapperVk->Glslang: GlslangToSpv
+Glslang- ->GlslangWrapperVk: Return SPIR-V
 
-Note right of "Vulkan Back-end": Source is templated with\ndefines to be resolved at\ndraw time.
+Note right of GlslangWrapperVk: Transform SPIR-V
 
+GlslangWrapperVk- ->"Vulkan Back-end": return transformed SPIR-V
 "Vulkan Back-end"- ->"ANGLE Front-end": return success
 
 Note right of App: App execution continues...
@@ -64,10 +74,6 @@
 App->"ANGLE Front-end": glDrawArrays (any draw)
 "ANGLE Front-end"->"Vulkan Back-end": ContextVk::drawArrays
 
-"Vulkan Back-end"->GlslangWrapperVk: GlslangWrapperVk::GetShaderCode (with defines)
-GlslangWrapperVk->Glslang: GlslangToSpv
-Glslang- ->"Vulkan Back-end": Return SPIR-V
-
 Note right of "Vulkan Back-end": We init VkShaderModules\nand VkPipeline then\nrecord the draw.
 
 "Vulkan Back-end"- ->"ANGLE Front-end": return success
diff --git a/src/libANGLE/renderer/vulkan/doc/img/VulkanShaderTranslation.svg b/src/libANGLE/renderer/vulkan/doc/img/VulkanShaderTranslation.svg
index 772908b..107565b 100644
--- a/src/libANGLE/renderer/vulkan/doc/img/VulkanShaderTranslation.svg
+++ b/src/libANGLE/renderer/vulkan/doc/img/VulkanShaderTranslation.svg
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd"><svg xmlns="http://www.w3.org/2000/svg" width="1185" height="1229" xmlns:xlink="http://www.w3.org/1999/xlink"><source><![CDATA[participant App
+<?xml version="1.0" encoding="utf-8" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd"><svg xmlns="http://www.w3.org/2000/svg" width="1370" height="1152" xmlns:xlink="http://www.w3.org/1999/xlink"><source><![CDATA[participant App
 participant "ANGLE Front-end"
 participant "Vulkan Back-end"
 participant "ANGLE Translator"
@@ -10,7 +10,7 @@
 "Vulkan Back-end"->"ANGLE Translator": sh::Compile
 "ANGLE Translator"-->"ANGLE Front-end": return Vulkan-compatible GLSL
 
-Note right of "ANGLE Front-end": Source is templated\nwith markers to be\nfilled at link time.
+Note right of "ANGLE Front-end": Source is using bogus\nVulkan qualifiers to be\ncorrected at link time.
 
 Note right of App: Same for FS, GS, etc...
 
@@ -21,11 +21,13 @@
 
 Note right of "Vulkan Back-end": ProgramVk inits uniforms,\nlayouts, and descriptors.
 
-"Vulkan Back-end"->GlslangWrapperVk: GlslangWrapperVk::GetShaderSource
-GlslangWrapperVk-->"Vulkan Back-end": return filled-in sources
+"Vulkan Back-end"->GlslangWrapperVk: GlslangWrapperVk::GetShaderSpirvCode
+GlslangWrapperVk->Glslang: GlslangToSpv
+Glslang-->GlslangWrapperVk: Return SPIR-V
 
-Note right of "Vulkan Back-end": Source is templated with\ndefines to be resolved at\ndraw time.
+Note right of GlslangWrapperVk: Transform SPIR-V
 
+GlslangWrapperVk-->"Vulkan Back-end": return transformed SPIR-V
 "Vulkan Back-end"-->"ANGLE Front-end": return success
 
 Note right of App: App execution continues...
@@ -33,11 +35,7 @@
 App->"ANGLE Front-end": glDrawArrays (any draw)
 "ANGLE Front-end"->"Vulkan Back-end": ContextVk::drawArrays
 
-"Vulkan Back-end"->GlslangWrapperVk: GlslangWrapperVk::GetShaderCode (with defines)
-GlslangWrapperVk->Glslang: GlslangToSpv
-Glslang-->"Vulkan Back-end": Return SPIR-V 
-
 Note right of "Vulkan Back-end": We init VkShaderModules\nand VkPipeline then\nrecord the draw.
 
 "Vulkan Back-end"-->"ANGLE Front-end": return success
-]]></source><desc></desc><defs><marker viewBox="0 0 5 5" markerWidth="5" markerHeight="5" orient="auto" refX="5" refY="2.5" id="markerArrowBlock"><path d="M 0 0 L 5 2.5 L 0 5 z"></path></marker><marker viewBox="0 0 9.6 16" markerWidth="4" markerHeight="16" orient="auto" refX="9.6" refY="8" id="markerArrowOpen"><path d="M 9.6,8 1.92,16 0,13.7 5.76,8 0,2.286 1.92,0 9.6,8 z"></path></marker></defs><g class="title"></g><g class="actor"><rect x="10" y="20" width="47.59375" height="39" stroke="#000000" fill="#ffffff" style="stroke-width: 2;"></rect><text x="21" y="45" style="font-size: 16px; font-family: &quot;Andale Mono&quot;, monospace;"><tspan x="20">App</tspan></text></g><g class="actor"><rect x="10" y="1170.359375" width="47.59375" height="39" stroke="#000000" fill="#ffffff" style="stroke-width: 2;"></rect><text x="21" y="1195.359375" style="font-size: 16px; font-family: &quot;Andale Mono&quot;, monospace;"><tspan x="20">App</tspan></text></g><line x1="33.796875" x2="33.796875" y1="59" y2="1170.359375" stroke="#000000" fill="none" style="stroke-width: 2;"></line><g class="actor"><rect x="237.0390625" y="20" width="152.953125" height="39" stroke="#000000" fill="#ffffff" style="stroke-width: 2;"></rect><text x="248.0390625" y="45" style="font-size: 16px; font-family: &quot;Andale Mono&quot;, monospace;"><tspan x="247.0390625">ANGLE Front-end</tspan></text></g><g class="actor"><rect x="237.0390625" y="1170.359375" width="152.953125" height="39" stroke="#000000" fill="#ffffff" style="stroke-width: 2;"></rect><text x="248.0390625" y="1195.359375" style="font-size: 16px; font-family: &quot;Andale Mono&quot;, monospace;"><tspan x="247.0390625">ANGLE Front-end</tspan></text></g><line x1="313.515625" x2="313.515625" y1="59" y2="1170.359375" stroke="#000000" fill="none" style="stroke-width: 2;"></line><g class="actor"><rect x="462.9765625" y="20" width="152.953125" height="39" stroke="#000000" fill="#ffffff" style="stroke-width: 2;"></rect><text x="473.9765625" y="45" style="font-size: 16px; font-family: &quot;Andale Mono&quot;, monospace;"><tspan x="472.9765625">Vulkan Back-end</tspan></text></g><g class="actor"><rect x="462.9765625" y="1170.359375" width="152.953125" height="39" stroke="#000000" fill="#ffffff" style="stroke-width: 2;"></rect><text x="473.9765625" y="1195.359375" style="font-size: 16px; font-family: &quot;Andale Mono&quot;, monospace;"><tspan x="472.9765625">Vulkan Back-end</tspan></text></g><line x1="539.453125" x2="539.453125" y1="59" y2="1170.359375" stroke="#000000" fill="none" style="stroke-width: 2;"></line><g class="actor"><rect x="728.3984375" y="20" width="161.953125" height="39" stroke="#000000" fill="#ffffff" style="stroke-width: 2;"></rect><text x="739.3984375" y="45" style="font-size: 16px; font-family: &quot;Andale Mono&quot;, monospace;"><tspan x="738.3984375">ANGLE Translator</tspan></text></g><g class="actor"><rect x="728.3984375" y="1170.359375" width="161.953125" height="39" stroke="#000000" fill="#ffffff" style="stroke-width: 2;"></rect><text x="739.3984375" y="1195.359375" style="font-size: 16px; font-family: &quot;Andale Mono&quot;, monospace;"><tspan x="738.3984375">ANGLE Translator</tspan></text></g><line x1="809.375" x2="809.375" y1="59" y2="1170.359375" stroke="#000000" fill="none" style="stroke-width: 2;"></line><g class="actor"><rect x="910.3515625" y="20" width="143.359375" height="39" stroke="#000000" fill="#ffffff" style="stroke-width: 2;"></rect><text x="920.3515625" y="45" style="font-size: 16px; font-family: &quot;Andale Mono&quot;, monospace;"><tspan x="920.3515625">GlslangWrapperVk</tspan></text></g><g class="actor"><rect x="910.3515625" y="1170.359375" width="143.359375" height="39" stroke="#000000" fill="#ffffff" style="stroke-width: 2;"></rect><text x="920.3515625" y="1195.359375" style="font-size: 16px; font-family: &quot;Andale Mono&quot;, monospace;"><tspan x="920.3515625">GlslangWrapperVk</tspan></text></g><line x1="982.03125" x2="982.03125" y1="59" y2="1170.359375" stroke="#000000" fill="none" style="stroke-width: 2;"></line><g class="actor"><rect x="1073.7109375" y="20" width="81.78125" height="39" stroke="#000000" fill="#ffffff" style="stroke-width: 2;"></rect><text x="1083.7109375" y="45" style="font-size: 16px; font-family: &quot;Andale Mono&quot;, monospace;"><tspan x="1083.7109375">Glslang</tspan></text></g><g class="actor"><rect x="1073.7109375" y="1170.359375" width="81.78125" height="39" stroke="#000000" fill="#ffffff" style="stroke-width: 2;"></rect><text x="1083.7109375" y="1195.359375" style="font-size: 16px; font-family: &quot;Andale Mono&quot;, monospace;"><tspan x="1083.7109375">Glslang</tspan></text></g><line x1="1114.6015625" x2="1114.6015625" y1="59" y2="1170.359375" stroke="#000000" fill="none" style="stroke-width: 2;"></line><g class="signal"><text x="85.6875" y="89.5" style="font-size: 16px; font-family: &quot;Andale Mono&quot;, monospace;"><tspan x="85.6875">glCompileShader (VS)</tspan></text><line x1="33.796875" x2="313.515625" y1="98" y2="98" stroke="#000000" fill="none" style="stroke-width: 2; marker-end: url(&quot;#markerArrowBlock&quot;);"></line></g><g class="signal"><text x="351.609375" y="128.5" style="font-size: 16px; font-family: &quot;Andale Mono&quot;, monospace;"><tspan x="351.609375">ShaderVk::compile</tspan></text><line x1="313.515625" x2="539.453125" y1="137" y2="137" stroke="#000000" fill="none" style="stroke-width: 2; marker-end: url(&quot;#markerArrowBlock&quot;);"></line></g><g class="signal"><text x="625.9296875" y="167.5" style="font-size: 16px; font-family: &quot;Andale Mono&quot;, monospace;"><tspan x="625.9296875">sh::Compile</tspan></text><line x1="539.453125" x2="809.375" y1="176" y2="176" stroke="#000000" fill="none" style="stroke-width: 2; marker-end: url(&quot;#markerArrowBlock&quot;);"></line></g><g class="signal"><text x="433.890625" y="206.5" style="font-size: 16px; font-family: &quot;Andale Mono&quot;, monospace;"><tspan x="433.890625">return Vulkan-compatible GLSL</tspan></text><line x1="809.375" x2="313.515625" y1="215" y2="215" stroke="#000000" fill="none" style="stroke-width: 2; stroke-dasharray: 6, 2; marker-end: url(&quot;#markerArrowBlock&quot;);"></line></g><g class="note"><rect x="333.515625" y="235" width="185.9375" height="67.390625" stroke="#000000" fill="#ffffff" style="stroke-width: 2;"></rect><text x="338.515625" y="255" style="font-size: 16px; font-family: &quot;Andale Mono&quot;, monospace;"><tspan x="338.515625">Source is templated</tspan><tspan dy="1.2em" x="338.515625">with markers to be</tspan><tspan dy="1.2em" x="338.515625">filled at link time.</tspan></text></g><g class="note"><rect x="53.796875" y="322.390625" width="212.328125" height="29" stroke="#000000" fill="#ffffff" style="stroke-width: 2;"></rect><text x="58.796875" y="342.390625" style="font-size: 16px; font-family: &quot;Andale Mono&quot;, monospace;"><tspan x="58.796875">Same for FS, GS, etc...</tspan></text></g><g class="signal"><text x="81.2890625" y="381.890625" style="font-size: 16px; font-family: &quot;Andale Mono&quot;, monospace;"><tspan x="81.2890625">glCreateProgram (...)</tspan></text><line x1="33.796875" x2="313.515625" y1="390.390625" y2="390.390625" stroke="#000000" fill="none" style="stroke-width: 2; marker-end: url(&quot;#markerArrowBlock&quot;);"></line></g><g class="signal"><text x="85.6875" y="420.890625" style="font-size: 16px; font-family: &quot;Andale Mono&quot;, monospace;"><tspan x="85.6875">glAttachShader (...)</tspan></text><line x1="33.796875" x2="313.515625" y1="429.390625" y2="429.390625" stroke="#000000" fill="none" style="stroke-width: 2; marker-end: url(&quot;#markerArrowBlock&quot;);"></line></g><g class="signal"><text x="116.375" y="459.890625" style="font-size: 16px; font-family: &quot;Andale Mono&quot;, monospace;"><tspan x="116.375">glLinkProgram</tspan></text><line x1="33.796875" x2="313.515625" y1="468.390625" y2="468.390625" stroke="#000000" fill="none" style="stroke-width: 2; marker-end: url(&quot;#markerArrowBlock&quot;);"></line></g><g class="signal"><text x="360.40625" y="498.890625" style="font-size: 16px; font-family: &quot;Andale Mono&quot;, monospace;"><tspan x="360.40625">ProgramVk::link</tspan></text><line x1="313.515625" x2="539.453125" y1="507.390625" y2="507.390625" stroke="#000000" fill="none" style="stroke-width: 2; marker-end: url(&quot;#markerArrowBlock&quot;);"></line></g><g class="note"><rect x="559.453125" y="527.390625" width="229.921875" height="48.1875" stroke="#000000" fill="#ffffff" style="stroke-width: 2;"></rect><text x="564.453125" y="547.390625" style="font-size: 16px; font-family: &quot;Andale Mono&quot;, monospace;"><tspan x="564.453125">ProgramVk inits uniforms,</tspan><tspan dy="1.2em" x="564.453125">layouts, and descriptors.</tspan></text></g><g class="signal"><text x="624.2890625" y="606.078125" style="font-size: 16px; font-family: &quot;Andale Mono&quot;, monospace;"><tspan x="624.2890625">GlslangWrapperVk::GetShaderSource</tspan></text><line x1="539.453125" x2="982.03125" y1="614.578125" y2="614.578125" stroke="#000000" fill="none" style="stroke-width: 2; marker-end: url(&quot;#markerArrowBlock&quot;);"></line></g><g class="signal"><text x="655.1796875" y="645.078125" style="font-size: 16px; font-family: &quot;Andale Mono&quot;, monospace;"><tspan x="655.1796875">return filled-in sources</tspan></text><line x1="982.03125" x2="539.453125" y1="653.578125" y2="653.578125" stroke="#000000" fill="none" style="stroke-width: 2; stroke-dasharray: 6, 2; marker-end: url(&quot;#markerArrowBlock&quot;);"></line></g><g class="note"><rect x="559.453125" y="673.578125" width="229.921875" height="67.390625" stroke="#000000" fill="#ffffff" style="stroke-width: 2;"></rect><text x="564.453125" y="693.578125" style="font-size: 16px; font-family: &quot;Andale Mono&quot;, monospace;"><tspan x="564.453125">Source is templated with</tspan><tspan dy="1.2em" x="564.453125">defines to be resolved at</tspan><tspan dy="1.2em" x="564.453125">draw time.</tspan></text></g><g class="signal"><text x="364.90625" y="771.46875" style="font-size: 16px; font-family: &quot;Andale Mono&quot;, monospace;"><tspan x="364.90625">return success</tspan></text><line x1="539.453125" x2="313.515625" y1="779.96875" y2="779.96875" stroke="#000000" fill="none" style="stroke-width: 2; stroke-dasharray: 6, 2; marker-end: url(&quot;#markerArrowBlock&quot;);"></line></g><g class="note"><rect x="53.796875" y="799.96875" width="239.71875" height="29" stroke="#000000" fill="#ffffff" style="stroke-width: 2;"></rect><text x="59.796875" y="819.96875" style="font-size: 16px; font-family: &quot;Andale Mono&quot;, monospace;"><tspan x="58.796875">App execution continues...</tspan></text></g><g class="signal"><text x="72.4921875" y="859.46875" style="font-size: 16px; font-family: &quot;Andale Mono&quot;, monospace;"><tspan x="72.4921875">glDrawArrays (any draw)</tspan></text><line x1="33.796875" x2="313.515625" y1="867.96875" y2="867.96875" stroke="#000000" fill="none" style="stroke-width: 2; marker-end: url(&quot;#markerArrowBlock&quot;);"></line></g><g class="signal"><text x="334.1171875" y="898.46875" style="font-size: 16px; font-family: &quot;Andale Mono&quot;, monospace;"><tspan x="334.1171875">ContextVk::drawArrays</tspan></text><line x1="313.515625" x2="539.453125" y1="906.96875" y2="906.96875" stroke="#000000" fill="none" style="stroke-width: 2; marker-end: url(&quot;#markerArrowBlock&quot;);"></line></g><g class="signal"><text x="567.2109375" y="937.46875" style="font-size: 16px; font-family: &quot;Andale Mono&quot;, monospace;"><tspan x="567.2109375">GlslangWrapperVk::GetShaderCode (with defines)</tspan></text><line x1="539.453125" x2="982.03125" y1="945.96875" y2="945.96875" stroke="#000000" fill="none" style="stroke-width: 2; marker-end: url(&quot;#markerArrowBlock&quot;);"></line></g><g class="signal"><text x="995.43359375" y="976.46875" style="font-size: 16px; font-family: &quot;Andale Mono&quot;, monospace;"><tspan x="995.43359375">GlslangToSpv</tspan></text><line x1="982.03125" x2="1114.6015625" y1="984.96875" y2="984.96875" stroke="#000000" fill="none" style="stroke-width: 2; marker-end: url(&quot;#markerArrowBlock&quot;);"></line></g><g class="signal"><text x="769.24609375" y="1015.46875" style="font-size: 16px; font-family: &quot;Andale Mono&quot;, monospace;"><tspan x="769.24609375">Return SPIR-V</tspan></text><line x1="1114.6015625" x2="539.453125" y1="1023.96875" y2="1023.96875" stroke="#000000" fill="none" style="stroke-width: 2; stroke-dasharray: 6, 2; marker-end: url(&quot;#markerArrowBlock&quot;);"></line></g><g class="note"><rect x="559.453125" y="1043.96875" width="212.328125" height="67.390625" stroke="#000000" fill="#ffffff" style="stroke-width: 2;"></rect><text x="564.453125" y="1063.96875" style="font-size: 16px; font-family: &quot;Andale Mono&quot;, monospace;"><tspan x="564.453125">We init VkShaderModules</tspan><tspan dy="1.2em" x="564.453125">and VkPipeline then</tspan><tspan dy="1.2em" x="564.453125">record the draw.</tspan></text></g><g class="signal"><text x="364.90625" y="1141.859375" style="font-size: 16px; font-family: &quot;Andale Mono&quot;, monospace;"><tspan x="364.90625">return success</tspan></text><line x1="539.453125" x2="313.515625" y1="1150.359375" y2="1150.359375" stroke="#000000" fill="none" style="stroke-width: 2; stroke-dasharray: 6, 2; marker-end: url(&quot;#markerArrowBlock&quot;);"></line></g></svg>
\ No newline at end of file
+]]></source><desc></desc><defs><marker viewBox="0 0 5 5" markerWidth="5" markerHeight="5" orient="auto" refX="5" refY="2.5" id="markerArrowBlock"><path d="M 0 0 L 5 2.5 L 0 5 z"></path></marker><marker viewBox="0 0 9.6 16" markerWidth="4" markerHeight="16" orient="auto" refX="9.6" refY="8" id="markerArrowOpen"><path d="M 9.6,8 1.92,16 0,13.7 5.76,8 0,2.286 1.92,0 9.6,8 z"></path></marker></defs><g class="title"></g><g class="actor"><rect x="10" y="20" width="48.90625" height="39" stroke="#000000" fill="#ffffff" style="stroke-width: 2; --darkreader-inline-fill:#eae7e1; --darkreader-inline-stroke:#000000;" data-darkreader-inline-fill="" data-darkreader-inline-stroke=""></rect><text x="20" y="45" style="font-size: 16px; font-family: &quot;Andale Mono&quot;, monospace;"><tspan x="20">App</tspan></text></g><g class="actor"><rect x="10" y="1093.015625" width="48.90625" height="39" stroke="#000000" fill="#ffffff" style="stroke-width: 2; --darkreader-inline-fill:#eae7e1; --darkreader-inline-stroke:#000000;" data-darkreader-inline-fill="" data-darkreader-inline-stroke=""></rect><text x="20" y="1118.015625" style="font-size: 16px; font-family: &quot;Andale Mono&quot;, monospace;"><tspan x="20">App</tspan></text></g><line x1="34.453125" x2="34.453125" y1="59" y2="1093.015625" stroke="#000000" fill="none" style="stroke-width: 2; --darkreader-inline-fill:none; --darkreader-inline-stroke:#000000;" data-darkreader-inline-fill="" data-darkreader-inline-stroke=""></line><g class="actor"><rect x="252.65625" y="20" width="164.5" height="39" stroke="#000000" fill="#ffffff" style="stroke-width: 2; --darkreader-inline-fill:#eae7e1; --darkreader-inline-stroke:#000000;" data-darkreader-inline-fill="" data-darkreader-inline-stroke=""></rect><text x="262.65625" y="45" style="font-size: 16px; font-family: &quot;Andale Mono&quot;, monospace;"><tspan x="262.65625">ANGLE Front-end</tspan></text></g><g class="actor"><rect x="252.65625" y="1093.015625" width="164.5" height="39" stroke="#000000" fill="#ffffff" style="stroke-width: 2; --darkreader-inline-fill:#eae7e1; --darkreader-inline-stroke:#000000;" data-darkreader-inline-fill="" data-darkreader-inline-stroke=""></rect><text x="262.65625" y="1118.015625" style="font-size: 16px; font-family: &quot;Andale Mono&quot;, monospace;"><tspan x="262.65625">ANGLE Front-end</tspan></text></g><line x1="334.90625" x2="334.90625" y1="59" y2="1093.015625" stroke="#000000" fill="none" style="stroke-width: 2; --darkreader-inline-fill:none; --darkreader-inline-stroke:#000000;" data-darkreader-inline-fill="" data-darkreader-inline-stroke=""></line><g class="actor"><rect x="524.21875" y="20" width="164.5" height="39" stroke="#000000" fill="#ffffff" style="stroke-width: 2; --darkreader-inline-fill:#eae7e1; --darkreader-inline-stroke:#000000;" data-darkreader-inline-fill="" data-darkreader-inline-stroke=""></rect><text x="534.21875" y="45" style="font-size: 16px; font-family: &quot;Andale Mono&quot;, monospace;"><tspan x="534.21875">Vulkan Back-end</tspan></text></g><g class="actor"><rect x="524.21875" y="1093.015625" width="164.5" height="39" stroke="#000000" fill="#ffffff" style="stroke-width: 2; --darkreader-inline-fill:#eae7e1; --darkreader-inline-stroke:#000000;" data-darkreader-inline-fill="" data-darkreader-inline-stroke=""></rect><text x="534.21875" y="1118.015625" style="font-size: 16px; font-family: &quot;Andale Mono&quot;, monospace;"><tspan x="534.21875">Vulkan Back-end</tspan></text></g><line x1="606.46875" x2="606.46875" y1="59" y2="1093.015625" stroke="#000000" fill="none" style="stroke-width: 2; --darkreader-inline-fill:none; --darkreader-inline-stroke:#000000;" data-darkreader-inline-fill="" data-darkreader-inline-stroke=""></line><g class="actor"><rect x="810.046875" y="20" width="174.5" height="39" stroke="#000000" fill="#ffffff" style="stroke-width: 2; --darkreader-inline-fill:#eae7e1; --darkreader-inline-stroke:#000000;" data-darkreader-inline-fill="" data-darkreader-inline-stroke=""></rect><text x="820.046875" y="45" style="font-size: 16px; font-family: &quot;Andale Mono&quot;, monospace;"><tspan x="820.046875">ANGLE Translator</tspan></text></g><g class="actor"><rect x="810.046875" y="1093.015625" width="174.5" height="39" stroke="#000000" fill="#ffffff" style="stroke-width: 2; --darkreader-inline-fill:#eae7e1; --darkreader-inline-stroke:#000000;" data-darkreader-inline-fill="" data-darkreader-inline-stroke=""></rect><text x="820.046875" y="1118.015625" style="font-size: 16px; font-family: &quot;Andale Mono&quot;, monospace;"><tspan x="820.046875">ANGLE Translator</tspan></text></g><line x1="897.296875" x2="897.296875" y1="59" y2="1093.015625" stroke="#000000" fill="none" style="stroke-width: 2; --darkreader-inline-fill:none; --darkreader-inline-stroke:#000000;" data-darkreader-inline-fill="" data-darkreader-inline-stroke=""></line><g class="actor"><rect x="1004.546875" y="20" width="174.5" height="39" stroke="#000000" fill="#ffffff" style="stroke-width: 2; --darkreader-inline-fill:#eae7e1; --darkreader-inline-stroke:#000000;" data-darkreader-inline-fill="" data-darkreader-inline-stroke=""></rect><text x="1014.546875" y="45" style="font-size: 16px; font-family: &quot;Andale Mono&quot;, monospace;"><tspan x="1014.546875">GlslangWrapperVk</tspan></text></g><g class="actor"><rect x="1004.546875" y="1093.015625" width="174.5" height="39" stroke="#000000" fill="#ffffff" style="stroke-width: 2; --darkreader-inline-fill:#eae7e1; --darkreader-inline-stroke:#000000;" data-darkreader-inline-fill="" data-darkreader-inline-stroke=""></rect><text x="1014.546875" y="1118.015625" style="font-size: 16px; font-family: &quot;Andale Mono&quot;, monospace;"><tspan x="1014.546875">GlslangWrapperVk</tspan></text></g><line x1="1091.796875" x2="1091.796875" y1="59" y2="1093.015625" stroke="#000000" fill="none" style="stroke-width: 2; --darkreader-inline-fill:none; --darkreader-inline-stroke:#000000;" data-darkreader-inline-fill="" data-darkreader-inline-stroke=""></line><g class="actor"><rect x="1252.578125" y="20" width="87.4375" height="39" stroke="#000000" fill="#ffffff" style="stroke-width: 2; --darkreader-inline-fill:#eae7e1; --darkreader-inline-stroke:#000000;" data-darkreader-inline-fill="" data-darkreader-inline-stroke=""></rect><text x="1262.578125" y="45" style="font-size: 16px; font-family: &quot;Andale Mono&quot;, monospace;"><tspan x="1262.578125">Glslang</tspan></text></g><g class="actor"><rect x="1252.578125" y="1093.015625" width="87.4375" height="39" stroke="#000000" fill="#ffffff" style="stroke-width: 2; --darkreader-inline-fill:#eae7e1; --darkreader-inline-stroke:#000000;" data-darkreader-inline-fill="" data-darkreader-inline-stroke=""></rect><text x="1262.578125" y="1118.015625" style="font-size: 16px; font-family: &quot;Andale Mono&quot;, monospace;"><tspan x="1262.578125">Glslang</tspan></text></g><line x1="1296.296875" x2="1296.296875" y1="59" y2="1093.015625" stroke="#000000" fill="none" style="stroke-width: 2; --darkreader-inline-fill:none; --darkreader-inline-stroke:#000000;" data-darkreader-inline-fill="" data-darkreader-inline-stroke=""></line><g class="signal"><text x="88.3515625" y="89.5" style="font-size: 16px; font-family: &quot;Andale Mono&quot;, monospace;"><tspan x="88.3515625">glCompileShader (VS)</tspan></text><line x1="34.453125" x2="334.90625" y1="98" y2="98" stroke="#000000" fill="none" style="stroke-width: 2; marker-end: url(&quot;#markerArrowBlock&quot;); --darkreader-inline-fill:none; --darkreader-inline-stroke:#000000;" data-darkreader-inline-fill="" data-darkreader-inline-stroke=""></line></g><g class="signal"><text x="388.8046875" y="128.5" style="font-size: 16px; font-family: &quot;Andale Mono&quot;, monospace;"><tspan x="388.8046875">ShaderVk::compile</tspan></text><line x1="334.90625" x2="606.46875" y1="137" y2="137" stroke="#000000" fill="none" style="stroke-width: 2; marker-end: url(&quot;#markerArrowBlock&quot;); --darkreader-inline-fill:none; --darkreader-inline-stroke:#000000;" data-darkreader-inline-fill="" data-darkreader-inline-stroke=""></line></g><g class="signal"><text x="698.8984375" y="167.5" style="font-size: 16px; font-family: &quot;Andale Mono&quot;, monospace;"><tspan x="698.8984375">sh::Compile</tspan></text><line x1="606.46875" x2="897.296875" y1="176" y2="176" stroke="#000000" fill="none" style="stroke-width: 2; marker-end: url(&quot;#markerArrowBlock&quot;); --darkreader-inline-fill:none; --darkreader-inline-stroke:#000000;" data-darkreader-inline-fill="" data-darkreader-inline-stroke=""></line></g><g class="signal"><text x="476.421875" y="206.5" style="font-size: 16px; font-family: &quot;Andale Mono&quot;, monospace;"><tspan x="476.421875">return Vulkan-compatible GLSL</tspan></text><line x1="897.296875" x2="334.90625" y1="215" y2="215" stroke="#000000" fill="none" style="stroke-width: 2; stroke-dasharray: 6, 2; marker-end: url(&quot;#markerArrowBlock&quot;); --darkreader-inline-fill:none; --darkreader-inline-stroke:#000000;" data-darkreader-inline-fill="" data-darkreader-inline-stroke=""></line></g><g class="note"><rect x="354.90625" y="235" width="231.5625" height="67.40625" stroke="#000000" fill="#ffffff" style="stroke-width: 2; --darkreader-inline-fill:#eae7e1; --darkreader-inline-stroke:#000000;" data-darkreader-inline-fill="" data-darkreader-inline-stroke=""></rect><text x="359.90625" y="255" style="font-size: 16px; font-family: &quot;Andale Mono&quot;, monospace;"><tspan x="359.90625">Source is using bogus</tspan><tspan dy="1.2em" x="359.90625">Vulkan qualifiers to be</tspan><tspan dy="1.2em" x="359.90625">corrected at link time.</tspan></text></g><g class="note"><rect x="54.453125" y="322.40625" width="231.5625" height="29" stroke="#000000" fill="#ffffff" style="stroke-width: 2; --darkreader-inline-fill:#eae7e1; --darkreader-inline-stroke:#000000;" data-darkreader-inline-fill="" data-darkreader-inline-stroke=""></rect><text x="59.453125" y="342.40625" style="font-size: 16px; font-family: &quot;Andale Mono&quot;, monospace;"><tspan x="59.453125">Same for FS, GS, etc...</tspan></text></g><g class="signal"><text x="83.53125" y="381.90625" style="font-size: 16px; font-family: &quot;Andale Mono&quot;, monospace;"><tspan x="83.53125">glCreateProgram (...)</tspan></text><line x1="34.453125" x2="334.90625" y1="390.40625" y2="390.40625" stroke="#000000" fill="none" style="stroke-width: 2; marker-end: url(&quot;#markerArrowBlock&quot;); --darkreader-inline-fill:none; --darkreader-inline-stroke:#000000;" data-darkreader-inline-fill="" data-darkreader-inline-stroke=""></line></g><g class="signal"><text x="88.3515625" y="420.90625" style="font-size: 16px; font-family: &quot;Andale Mono&quot;, monospace;"><tspan x="88.3515625">glAttachShader (...)</tspan></text><line x1="34.453125" x2="334.90625" y1="429.40625" y2="429.40625" stroke="#000000" fill="none" style="stroke-width: 2; marker-end: url(&quot;#markerArrowBlock&quot;); --darkreader-inline-fill:none; --darkreader-inline-stroke:#000000;" data-darkreader-inline-fill="" data-darkreader-inline-stroke=""></line></g><g class="signal"><text x="122.0625" y="459.90625" style="font-size: 16px; font-family: &quot;Andale Mono&quot;, monospace;"><tspan x="122.0625">glLinkProgram</tspan></text><line x1="34.453125" x2="334.90625" y1="468.40625" y2="468.40625" stroke="#000000" fill="none" style="stroke-width: 2; marker-end: url(&quot;#markerArrowBlock&quot;); --darkreader-inline-fill:none; --darkreader-inline-stroke:#000000;" data-darkreader-inline-fill="" data-darkreader-inline-stroke=""></line></g><g class="signal"><text x="398.2578125" y="498.90625" style="font-size: 16px; font-family: &quot;Andale Mono&quot;, monospace;"><tspan x="398.2578125">ProgramVk::link</tspan></text><line x1="334.90625" x2="606.46875" y1="507.40625" y2="507.40625" stroke="#000000" fill="none" style="stroke-width: 2; marker-end: url(&quot;#markerArrowBlock&quot;); --darkreader-inline-fill:none; --darkreader-inline-stroke:#000000;" data-darkreader-inline-fill="" data-darkreader-inline-stroke=""></line></g><g class="note"><rect x="626.46875" y="527.40625" width="250.828125" height="48.203125" stroke="#000000" fill="#ffffff" style="stroke-width: 2; --darkreader-inline-fill:#eae7e1; --darkreader-inline-stroke:#000000;" data-darkreader-inline-fill="" data-darkreader-inline-stroke=""></rect><text x="631.46875" y="547.40625" style="font-size: 16px; font-family: &quot;Andale Mono&quot;, monospace;"><tspan x="631.46875">ProgramVk inits uniforms,</tspan><tspan dy="1.2em" x="631.46875">layouts, and descriptors.</tspan></text></g><g class="signal"><text x="675.7421875" y="606.109375" style="font-size: 16px; font-family: &quot;Andale Mono&quot;, monospace;"><tspan x="675.7421875">GlslangWrapperVk::GetShaderSpirvCode</tspan></text><line x1="606.46875" x2="1091.796875" y1="614.609375" y2="614.609375" stroke="#000000" fill="none" style="stroke-width: 2; marker-end: url(&quot;#markerArrowBlock&quot;); --darkreader-inline-fill:none; --darkreader-inline-stroke:#000000;" data-darkreader-inline-fill="" data-darkreader-inline-stroke=""></line></g><g class="signal"><text x="1136.25" y="645.109375" style="font-size: 16px; font-family: &quot;Andale Mono&quot;, monospace;"><tspan x="1136.25">GlslangToSpv</tspan></text><line x1="1091.796875" x2="1296.296875" y1="653.609375" y2="653.609375" stroke="#000000" fill="none" style="stroke-width: 2; marker-end: url(&quot;#markerArrowBlock&quot;); --darkreader-inline-fill:none; --darkreader-inline-stroke:#000000;" data-darkreader-inline-fill="" data-darkreader-inline-stroke=""></line></g><g class="signal"><text x="1131.25" y="684.109375" style="font-size: 16px; font-family: &quot;Andale Mono&quot;, monospace;"><tspan x="1131.25">Return SPIR-V</tspan></text><line x1="1296.296875" x2="1091.796875" y1="692.609375" y2="692.609375" stroke="#000000" fill="none" style="stroke-width: 2; stroke-dasharray: 6, 2; marker-end: url(&quot;#markerArrowBlock&quot;); --darkreader-inline-fill:none; --darkreader-inline-stroke:#000000;" data-darkreader-inline-fill="" data-darkreader-inline-stroke=""></line></g><g class="note"><rect x="1111.796875" y="712.609375" width="164.5" height="29" stroke="#000000" fill="#ffffff" style="stroke-width: 2; --darkreader-inline-fill:#eae7e1; --darkreader-inline-stroke:#000000;" data-darkreader-inline-fill="" data-darkreader-inline-stroke=""></rect><text x="1116.796875" y="732.609375" style="font-size: 16px; font-family: &quot;Andale Mono&quot;, monospace;"><tspan x="1116.796875">Transform SPIR-V</tspan></text></g><g class="signal"><text x="728.5390625" y="772.109375" style="font-size: 16px; font-family: &quot;Andale Mono&quot;, monospace;"><tspan x="728.5390625">return transformed SPIR-V</tspan></text><line x1="1091.796875" x2="606.46875" y1="780.609375" y2="780.609375" stroke="#000000" fill="none" style="stroke-width: 2; stroke-dasharray: 6, 2; marker-end: url(&quot;#markerArrowBlock&quot;); --darkreader-inline-fill:none; --darkreader-inline-stroke:#000000;" data-darkreader-inline-fill="" data-darkreader-inline-stroke=""></line></g><g class="signal"><text x="403.2578125" y="811.109375" style="font-size: 16px; font-family: &quot;Andale Mono&quot;, monospace;"><tspan x="403.2578125">return success</tspan></text><line x1="606.46875" x2="334.90625" y1="819.609375" y2="819.609375" stroke="#000000" fill="none" style="stroke-width: 2; stroke-dasharray: 6, 2; marker-end: url(&quot;#markerArrowBlock&quot;); --darkreader-inline-fill:none; --darkreader-inline-stroke:#000000;" data-darkreader-inline-fill="" data-darkreader-inline-stroke=""></line></g><g class="note"><rect x="54.453125" y="839.609375" width="260.453125" height="29" stroke="#000000" fill="#ffffff" style="stroke-width: 2; --darkreader-inline-fill:#eae7e1; --darkreader-inline-stroke:#000000;" data-darkreader-inline-fill="" data-darkreader-inline-stroke=""></rect><text x="59.453125" y="859.609375" style="font-size: 16px; font-family: &quot;Andale Mono&quot;, monospace;"><tspan x="59.453125">App execution continues...</tspan></text></g><g class="signal"><text x="73.8984375" y="899.109375" style="font-size: 16px; font-family: &quot;Andale Mono&quot;, monospace;"><tspan x="73.8984375">glDrawArrays (any draw)</tspan></text><line x1="34.453125" x2="334.90625" y1="907.609375" y2="907.609375" stroke="#000000" fill="none" style="stroke-width: 2; marker-end: url(&quot;#markerArrowBlock&quot;); --darkreader-inline-fill:none; --darkreader-inline-stroke:#000000;" data-darkreader-inline-fill="" data-darkreader-inline-stroke=""></line></g><g class="signal"><text x="369.5390625" y="938.109375" style="font-size: 16px; font-family: &quot;Andale Mono&quot;, monospace;"><tspan x="369.5390625">ContextVk::drawArrays</tspan></text><line x1="334.90625" x2="606.46875" y1="946.609375" y2="946.609375" stroke="#000000" fill="none" style="stroke-width: 2; marker-end: url(&quot;#markerArrowBlock&quot;); --darkreader-inline-fill:none; --darkreader-inline-stroke:#000000;" data-darkreader-inline-fill="" data-darkreader-inline-stroke=""></line></g><g class="note"><rect x="626.46875" y="966.609375" width="231.5625" height="67.40625" stroke="#000000" fill="#ffffff" style="stroke-width: 2; --darkreader-inline-fill:#eae7e1; --darkreader-inline-stroke:#000000;" data-darkreader-inline-fill="" data-darkreader-inline-stroke=""></rect><text x="631.46875" y="986.609375" style="font-size: 16px; font-family: &quot;Andale Mono&quot;, monospace;"><tspan x="631.46875">We init VkShaderModules</tspan><tspan dy="1.2em" x="631.46875">and VkPipeline then</tspan><tspan dy="1.2em" x="631.46875">record the draw.</tspan></text></g><g class="signal"><text x="403.2578125" y="1064.515625" style="font-size: 16px; font-family: &quot;Andale Mono&quot;, monospace;"><tspan x="403.2578125">return success</tspan></text><line x1="606.46875" x2="334.90625" y1="1073.015625" y2="1073.015625" stroke="#000000" fill="none" style="stroke-width: 2; stroke-dasharray: 6, 2; marker-end: url(&quot;#markerArrowBlock&quot;); --darkreader-inline-fill:none; --darkreader-inline-stroke:#000000;" data-darkreader-inline-fill="" data-darkreader-inline-stroke=""></line></g></svg>
\ No newline at end of file