Add 'numRasterSamples' and 'isMixedSampled' to GrProgramInfo

Replaces numSamples with numRasterSamples, and adds isMixedSampled.
The sample count that vulkan and metal actually want to know is how
many samples the rasterizer will compute, which may not match the
number of samples in the render target when we have mixed samples.
They will also need to know whether a program is mixed sampled in
order to set up coverage modulation.

Change-Id: I133c11f74b7dc6a7580818ef73d6deec1d201b64
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/253550
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
diff --git a/src/gpu/mtl/GrMtlPipelineStateBuilder.mm b/src/gpu/mtl/GrMtlPipelineStateBuilder.mm
index 7750da1..e27a5b3 100644
--- a/src/gpu/mtl/GrMtlPipelineStateBuilder.mm
+++ b/src/gpu/mtl/GrMtlPipelineStateBuilder.mm
@@ -393,7 +393,7 @@
     pipelineDescriptor.vertexDescriptor = create_vertex_descriptor(programInfo.primProc());
     pipelineDescriptor.colorAttachments[0] = create_color_attachment(renderTarget->config(),
                                                                      programInfo.pipeline());
-    pipelineDescriptor.sampleCount = renderTarget->numSamples();
+    pipelineDescriptor.sampleCount = programInfo.numRasterSamples();
     bool hasStencilAttachment = SkToBool(renderTarget->renderTargetPriv().getStencilAttachment());
     GrMtlCaps* mtlCaps = (GrMtlCaps*)this->caps();
     pipelineDescriptor.stencilAttachmentPixelFormat =
@@ -461,7 +461,7 @@
     desc->fShaderKeyLength = SkToU32(keyLength);
 
     b.add32(renderTarget->config());
-    b.add32(renderTarget->numSamples());
+    b.add32(programInfo.numRasterSamples());
 
     bool hasStencilAttachment = SkToBool(renderTarget->renderTargetPriv().getStencilAttachment());
     SkASSERT(!programInfo.pipeline().isStencilEnabled() || hasStencilAttachment);