Restore support for multisample locations
Bug: skia:
Change-Id: I971455867e54d431cc1094fca041f773f78748ee
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/196218
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
diff --git a/src/gpu/GrProgramDesc.h b/src/gpu/GrProgramDesc.h
index 274fcef..e2fe270 100644
--- a/src/gpu/GrProgramDesc.h
+++ b/src/gpu/GrProgramDesc.h
@@ -39,12 +39,8 @@
* @param GrGpu Ptr to the GrGpu object the program will be used with.
* @param GrProgramDesc The built and finalized descriptor
**/
- static bool Build(GrProgramDesc*,
- GrPixelConfig,
- const GrPrimitiveProcessor&,
- bool hasPointSize,
- const GrPipeline&,
- GrGpu*);
+ static bool Build(GrProgramDesc*, const GrRenderTarget*, const GrPrimitiveProcessor&,
+ bool hasPointSize, const GrPipeline&, GrGpu*);
// Returns this as a uint32_t array to be used as a key in the program cache.
const uint32_t* asKey() const {
@@ -91,15 +87,23 @@
}
struct KeyHeader {
+ bool hasSurfaceOriginKey() const {
+ return SkToBool(fSurfaceOriginKey);
+ }
+ GrProcessor::CustomFeatures processorFeatures() const {
+ return (GrProcessor::CustomFeatures)fProcessorFeatures;
+ }
+
// Set to uniquely idenitify any swizzling of the shader's output color(s).
uint16_t fOutputSwizzle;
uint8_t fColorFragmentProcessorCnt; // Can be packed into 4 bits if required.
uint8_t fCoverageFragmentProcessorCnt;
// Set to uniquely identify the rt's origin, or 0 if the shader does not require this info.
uint8_t fSurfaceOriginKey : 2;
+ uint8_t fProcessorFeatures : 1;
bool fSnapVerticesToPixelCenters : 1;
bool fHasPointSize : 1;
- uint8_t fPad : 4;
+ uint8_t fPad : 3;
};
GR_STATIC_ASSERT(sizeof(KeyHeader) == 6);