diff options
author | Brian Salomon <bsalomon@google.com> | 2017-11-30 09:07:43 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-11-30 14:34:42 +0000 |
commit | edfa0d2f623dc66e695fac631d5fb03599b264b7 (patch) | |
tree | d11b5febf8ac7eca11a1971a946816f39ff225ea /src/gpu/GrShaderCaps.cpp | |
parent | 7c945ca65683fd17b029ab0748fe2359a8f71a4c (diff) |
Use a dst size threshold for multitexturing images.
TODO: Set thresholds based on GPU in use.
Change-Id: I0aeac596d11ab63922f2df0d76c668b4f8be5353
Reviewed-on: https://skia-review.googlesource.com/77900
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'src/gpu/GrShaderCaps.cpp')
-rw-r--r-- | src/gpu/GrShaderCaps.cpp | 14 |
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 } |