Fix MSAARenderToSingleSampled in Graphite/Dawn

The MSAARenderToSingleSampled feature was recently implemented in
Dawn/Vulkan. The current implementation in Skia isn't compatible with
the restrictions of the feature in Dawn. This triggers validation errors
that break Graphite/Dawn/Vulkan.

Dawn enforces that depth/stencil samples must match the sample count
specified for a render pass. This is because Dawn never supported
resolving depth/stencil attachments. Graphite was using 1x depth/stencil
attachment when render pass was rendered at 4x because the Vulkan
extension supports that. Change Graphite so depth/stencil sample count
always matches the render pass sample count. Note this also applies to
Graphite/Vulkan when VK_EXT_multisampled_render_to_single_sampled is
used.

Also update the dawn struct used with MSAARenderToSingleSampled.
wgpu::DawnRenderPassSampleCount is the new struct and it's chained on
the render pass instead of color attachment.

Bug: chromium:482088881
Change-Id: If5bb8c78bbe65bb7f8487089380c732daaed41c0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1157378
Reviewed-by: Michael Ludwig <[email protected]>
Commit-Queue: Kyle Charbonneau <[email protected]>
4 files changed