Always attach stencil buffers with exact sample count matches

After this CL we will always attach a stencil buffer for rendering
that matches the stencil sample count of the proxy. We will even
downgrade a stencil attachment to one with less samples if necessary.
(In the past we would only guarantee that the attached stencil buffer
had a sample count >= to that of the proxy.)

Change-Id: I358e13ffdf286695257b1b5b672a84d16c417b80
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/253547
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
diff --git a/src/gpu/GrOpsTask.cpp b/src/gpu/GrOpsTask.cpp
index 06d3733..6181995 100644
--- a/src/gpu/GrOpsTask.cpp
+++ b/src/gpu/GrOpsTask.cpp
@@ -507,7 +507,7 @@
         stencil = renderTarget->renderTargetPriv().getStencilAttachment();
     }
 
-    SkASSERT(!stencil || stencil->numSamples() >= proxy->numStencilSamples());
+    SkASSERT(!stencil || stencil->numSamples() == proxy->numStencilSamples());
 
     GrLoadOp stencilLoadOp;
     switch (fInitialStencilContent) {