aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorGravatar Brian Salomon <bsalomon@google.com>2018-01-23 11:06:41 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-01-23 18:33:49 +0000
commit01b476a02825b926436dff8d0bcb2e0e07640b56 (patch)
tree5d5e23220fa3816fff01d69d6aa7ac3fe9f0d8f6 /include
parent165fa634b7619f5a9e04eb5735ab0ec2c0776c42 (diff)
Start of adding GrContextOption that overrides driver workarounds.
This handles most of the GL driver workarounds but not Vulkan (yet). GL wokarounds related to config support are still not handled. Change-Id: I3d0f62ac8a0f6e9ba13632ea82acdc493912c63d Reviewed-on: https://skia-review.googlesource.com/98382 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
Diffstat (limited to 'include')
-rw-r--r--include/gpu/GrCaps.h2
-rw-r--r--include/gpu/GrContextOptions.h7
-rw-r--r--include/gpu/GrShaderCaps.h2
3 files changed, 9 insertions, 2 deletions
diff --git a/include/gpu/GrCaps.h b/include/gpu/GrCaps.h
index 0d5b3403cd..639fe44a81 100644
--- a/include/gpu/GrCaps.h
+++ b/include/gpu/GrCaps.h
@@ -214,7 +214,7 @@ protected:
bool fBlacklistCoverageCounting : 1;
bool fAvoidStencilBuffers : 1;
- // ANGLE workaround
+ // ANGLE performance workaround
bool fPreferVRAMUseOverFlushes : 1;
bool fSampleShadingSupport : 1;
diff --git a/include/gpu/GrContextOptions.h b/include/gpu/GrContextOptions.h
index 2640d51e1b..492a2d9b26 100644
--- a/include/gpu/GrContextOptions.h
+++ b/include/gpu/GrContextOptions.h
@@ -141,6 +141,13 @@ struct GrContextOptions {
Enable fUseDrawInsteadOfGLClear = Enable::kDefault;
/**
+ * Disables correctness workarounds that are enabled for particular GPUs, OSes, or drivers.
+ * This does not affect code path choices that are made for perfomance reasons nor does it
+ * override other GrContextOption settings.
+ */
+ bool fDisableDriverCorrectnessWorkarounds = false;
+
+ /**
* Cache in which to store compiled shader binaries between runs.
*/
PersistentCache* fPersistentCache = nullptr;
diff --git a/include/gpu/GrShaderCaps.h b/include/gpu/GrShaderCaps.h
index 887dc2e928..9dd2f96d89 100644
--- a/include/gpu/GrShaderCaps.h
+++ b/include/gpu/GrShaderCaps.h
@@ -259,7 +259,6 @@ private:
bool fFBFetchNeedsCustomOutput : 1;
bool fBindlessTextureSupport : 1;
bool fUsesPrecisionModifiers : 1;
- bool fCanUseAnyFunctionInShader : 1;
bool fFlatInterpolationSupport : 1;
bool fPreferFlatInterpolation : 1;
bool fNoPerspectiveInterpolationSupport : 1;
@@ -273,6 +272,7 @@ private:
bool fHalfIs32Bits : 1;
// Used for specific driver bug work arounds
+ bool fCanUseAnyFunctionInShader : 1;
bool fCanUseMinAndAbsTogether : 1;
bool fCanUseFractForNegativeValues : 1;
bool fMustForceNegatedAtanParamToFloat : 1;