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 /include/gpu | |
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 'include/gpu')
-rw-r--r-- | include/gpu/GrCaps.h | 3 | ||||
-rw-r--r-- | include/gpu/GrShaderCaps.h | 12 |
2 files changed, 10 insertions, 5 deletions
diff --git a/include/gpu/GrCaps.h b/include/gpu/GrCaps.h index b19281b00d..86b27b066a 100644 --- a/include/gpu/GrCaps.h +++ b/include/gpu/GrCaps.h @@ -225,9 +225,6 @@ protected: // Vulkan doesn't support this (yet) and some drivers have issues, too bool fCrossContextTextureSupport : 1; - // Disables using multiple texture units to batch multiple SkImages at once. - bool fDisableImageMultitexturingSupport : 1; - InstancedSupport fInstancedSupport; BlendEquationSupport fBlendEquationSupport; diff --git a/include/gpu/GrShaderCaps.h b/include/gpu/GrShaderCaps.h index 4c847ac8b0..15377ff0b1 100644 --- a/include/gpu/GrShaderCaps.h +++ b/include/gpu/GrShaderCaps.h @@ -196,7 +196,14 @@ public: int maxCombinedSamplers() const { return fMaxCombinedSamplers; } - bool disableImageMultitexturingSupport() const { return fDisableImageMultitexturing; } + /** + * In general using multiple texture units for image rendering seems to be a win at smaller + * sizes of dst rects and a loss at larger sizes. Dst rects above this pixel area threshold will + * not use multitexturing. + */ + size_t disableImageMultitexturingDstRectAreaThreshold() const { + return fDisableImageMultitexturingDstRectAreaThreshold; + } /** * Given a texture's config, this determines what swizzle must be appended to accesses to the @@ -245,7 +252,6 @@ private: bool fVertexIDSupport : 1; bool fFloatIs32Bits : 1; bool fHalfIs32Bits : 1; - bool fDisableImageMultitexturing : 1; // Used for specific driver bug work arounds bool fCanUseMinAndAbsTogether : 1; @@ -277,6 +283,8 @@ private: int fMaxFragmentSamplers; int fMaxCombinedSamplers; + size_t fDisableImageMultitexturingDstRectAreaThreshold; + AdvBlendEqInteraction fAdvBlendEqInteraction; GrSwizzle fConfigTextureSwizzle[kGrPixelConfigCnt]; |