diff options
author | Brian Salomon <bsalomon@google.com> | 2018-01-22 08:43:38 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-01-22 14:14:18 +0000 |
commit | dba65f95e40fb1a4ea936b453b9bcb3fdbe178e1 (patch) | |
tree | 307b8b391870d8891e523fc3879c6787da5e8146 /include/gpu/GrShaderCaps.h | |
parent | 5081eede67601e5c5c0fc343b787490603e058cc (diff) |
Add a workaround for inaccurate interpolants on Adreno 3xx.
Also ensure that sk_FragCoord x and y values are at pixel centers when
workaround is used.
Change-Id: Ib748af9e496a406a50622e00e96e1346cbb5eb26
Reviewed-on: https://skia-review.googlesource.com/97064
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'include/gpu/GrShaderCaps.h')
-rw-r--r-- | include/gpu/GrShaderCaps.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/gpu/GrShaderCaps.h b/include/gpu/GrShaderCaps.h index 66e7d42306..887dc2e928 100644 --- a/include/gpu/GrShaderCaps.h +++ b/include/gpu/GrShaderCaps.h @@ -124,6 +124,9 @@ public: // If false, SkSL uses a workaround so that sk_FragCoord doesn't actually query gl_FragCoord bool canUseFragCoord() const { return fCanUseFragCoord; } + // If true interpolated vertex shader outputs are inaccurate. + bool interpolantsAreInaccurate() const { return fInterpolantsAreInaccurate; } + bool requiresLocalOutputColorForFBFetch() const { return fRequiresLocalOutputColorForFBFetch; } bool mustObfuscateUniformColor() const { return fMustObfuscateUniformColor; } @@ -279,6 +282,7 @@ private: bool fMustObfuscateUniformColor : 1; bool fMustGuardDivisionEvenAfterExplicitZeroCheck : 1; bool fCanUseFragCoord : 1; + bool fInterpolantsAreInaccurate : 1; const char* fVersionDeclString; |