Vulkan: Refactor generated code in xfb emulation path
Vulkan: Refactor generated code in xfb emulation path

The index expression was regenerated for every component written to the
output.  This change refactors the generated code such that common
values are calculated once.

This is in preparation for moving some of this code to the translator
and reducing the amount of code generated at link time.

Bug: angleproject:3606
Change-Id: Ib180d245218f8f6f18c57c0ea092e8c45cbffd1a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2607490
Commit-Queue: Shahbaz Youssefi <582eeec4f08a2ccd61e3ef52115e6e7c571582de@chromium.org>
Reviewed-by: Jamie Madill <7e492b4f1c8458024932de3ba475cbf015424c30@chromium.org>
Reviewed-by: Tim Van Patten <c7814369a8d3d5671c484acc7b3215f1bf4221be@google.com>

ppy/angle,ppy/angle,ppy/angle,ppy/angle