aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorGravatar Chris Dalton <csmartdalton@google.com>2018-03-07 07:46:10 -0700
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-03-14 16:35:50 +0000
commitc2d0dd658bbb8caebf0cc9d5cf4b98b1bda616e7 (patch)
treee3484818ca2d9b65df1c1b54595ea0e5b2f44891 /include
parentc4f49040919ef5698c9abd31f7f250f572d8caa8 (diff)
Add a shader cap for incomplete short int precision
Bug: skia: Change-Id: Iac36eb763e687f6ecc3acbd4afced66f95596be2 Reviewed-on: https://skia-review.googlesource.com/109003 Reviewed-by: Brian Salomon <bsalomon@google.com> Reviewed-by: Ethan Nicholas <ethannicholas@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
Diffstat (limited to 'include')
-rw-r--r--include/gpu/GrShaderCaps.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/gpu/GrShaderCaps.h b/include/gpu/GrShaderCaps.h
index 86a2566675..f86e87c461 100644
--- a/include/gpu/GrShaderCaps.h
+++ b/include/gpu/GrShaderCaps.h
@@ -119,6 +119,10 @@ public:
// If true interpolated vertex shader outputs are inaccurate.
bool interpolantsAreInaccurate() const { return fInterpolantsAreInaccurate; }
+ // If true, short ints can't represent every integer in the 16-bit two's complement range as
+ // required by the spec. SKSL will always emit full ints.
+ bool incompleteShortIntPrecision() const { return fIncompleteShortIntPrecision; }
+
bool requiresLocalOutputColorForFBFetch() const { return fRequiresLocalOutputColorForFBFetch; }
bool mustObfuscateUniformColor() const { return fMustObfuscateUniformColor; }
@@ -261,6 +265,7 @@ private:
bool fMustGuardDivisionEvenAfterExplicitZeroCheck : 1;
bool fCanUseFragCoord : 1;
bool fInterpolantsAreInaccurate : 1;
+ bool fIncompleteShortIntPrecision : 1;
const char* fVersionDeclString;