diff options
Diffstat (limited to 'include/gpu/GrCaps.h')
-rw-r--r-- | include/gpu/GrCaps.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/include/gpu/GrCaps.h b/include/gpu/GrCaps.h index e2e59c30a4..05da8d7cad 100644 --- a/include/gpu/GrCaps.h +++ b/include/gpu/GrCaps.h @@ -81,6 +81,24 @@ public: */ bool floatPrecisionVaries() const { return fShaderPrecisionVaries; } + /** + * PLS storage size in bytes (0 when not supported). The PLS spec defines a minimum size of 16 + * bytes whenever PLS is supported. + */ + int pixelLocalStorageSize() const { return fPixelLocalStorageSize; } + + /** + * True if this context supports the necessary extensions and features to enable the PLS path + * renderer. + */ + bool plsPathRenderingSupport() const { +#if GR_ENABLE_PLS_PATH_RENDERING + return fPLSPathRenderingSupport; +#else + return false; +#endif + } + protected: /** Subclasses must call this after initialization in order to apply caps overrides requested by the client. Note that overrides will only reduce the caps never expand them. */ @@ -94,6 +112,8 @@ protected: bool fShaderPrecisionVaries; PrecisionInfo fFloatPrecisions[kGrShaderTypeCount][kGrSLPrecisionCount]; + int fPixelLocalStorageSize; + bool fPLSPathRenderingSupport; private: virtual void onApplyOptionsOverrides(const GrContextOptions&) {}; |