aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrShaderCaps.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpu/GrShaderCaps.cpp')
-rw-r--r--src/gpu/GrShaderCaps.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/gpu/GrShaderCaps.cpp b/src/gpu/GrShaderCaps.cpp
index 2d9cd0a39b..65721ee897 100644
--- a/src/gpu/GrShaderCaps.cpp
+++ b/src/gpu/GrShaderCaps.cpp
@@ -68,11 +68,9 @@ GrShaderCaps::GrShaderCaps(const GrContextOptions& options) {
fMaxCombinedSamplers = 0;
fAdvBlendEqInteraction = kNotSupported_AdvBlendEqInteraction;
-#if GR_TEST_UTILS
- fDisableImageMultitexturing = options.fDisableImageMultitexturing;
-#else
- fDisableImageMultitexturing = false;
-#endif
+ // TODO: Default this to 0 and only enable image multitexturing when a "safe" threshold is
+ // known for a GPU class.
+ fDisableImageMultitexturingDstRectAreaThreshold = std::numeric_limits<size_t>::max();
}
void GrShaderCaps::dumpJSON(SkJSONWriter* writer) const {
@@ -130,7 +128,8 @@ void GrShaderCaps::dumpJSON(SkJSONWriter* writer) const {
writer->appendS32("Max Combined Samplers", fMaxFragmentSamplers);
writer->appendString("Advanced blend equation interaction",
kAdvBlendEqInteractionStr[fAdvBlendEqInteraction]);
- writer->appendBool("Disable image multitexturing", fDisableImageMultitexturing);
+ writer->appendU64("Disable image multitexturing dst area threshold",
+ fDisableImageMultitexturingDstRectAreaThreshold);
writer->endObject();
}
@@ -138,5 +137,8 @@ void GrShaderCaps::dumpJSON(SkJSONWriter* writer) const {
void GrShaderCaps::applyOptionsOverrides(const GrContextOptions& options) {
#if GR_TEST_UTILS
fDualSourceBlendingSupport = fDualSourceBlendingSupport && !options.fSuppressDualSourceBlending;
+ if (options.fDisableImageMultitexturing) {
+ fDisableImageMultitexturingDstRectAreaThreshold = 0;
+ }
#endif
}