Enable using discardable msaa attachments in vulkan.

This CL enables in Vulkan a system similar to render to texture for GL
MSAA. This can have rendering artifacts if we break up the rendering to
an MSAA surface into two render passes since when we load for the second
render pass it fills all the samples with the resolved color from the
first render pass instead of just the covered samples. These artifacts
exists in the GL version as well. Locally we are seeing perf gains up to
2x factor which justifies the artifacts of using this technique.
Additionally, when we turn on reduce oplist splitting this will decrease
the times where this is even an issue.

This enables it for all devices, but most likely we will only see
improvements on tilers and will end up disabling this for desktops.

Also includes some minor fixes.


Bug: skia:10979
Change-Id: Ic7c3000e3ebed9f4a6351ab8f5637be9ee0194ff
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/344964
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
3 files changed