Use GrProgramInfo's primitiveType field

This improves the encapsulation of all the data required to make a program/pipeline w/in the GrProgramInfo class.

Bug: skia:9455
Change-Id: Ib41519c8ded9f27a7bbe787097a431b38ab101bd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/253376
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
diff --git a/src/gpu/GrProgramDesc.cpp b/src/gpu/GrProgramDesc.cpp
index 6ef7e6f..8d995a3 100644
--- a/src/gpu/GrProgramDesc.cpp
+++ b/src/gpu/GrProgramDesc.cpp
@@ -191,8 +191,7 @@
 }
 
 bool GrProgramDesc::Build(GrProgramDesc* desc, const GrRenderTarget* renderTarget,
-                          const GrProgramInfo& programInfo, GrPrimitiveType primitiveType,
-                          GrGpu* gpu) {
+                          const GrProgramInfo& programInfo, GrGpu* gpu) {
     // The descriptor is used as a cache key. Thus when a field of the
     // descriptor will not affect program generation (because of the attribute
     // bindings in use or other descriptor field settings) it should be set
@@ -264,6 +263,8 @@
     // Ensure enough bits.
     SkASSERT(header->fProcessorFeatures == (int) programInfo.requestedFeatures());
     header->fSnapVerticesToPixelCenters = programInfo.pipeline().snapVerticesToPixelCenters();
-    header->fHasPointSize = (primitiveType == GrPrimitiveType::kPoints);
+    // The base descriptor only stores whether or not the primitiveType is kPoints. Backend-
+    // specific versions (e.g., Vulkan) require more detail
+    header->fHasPointSize = (programInfo.primitiveType() == GrPrimitiveType::kPoints);
     return true;
 }