aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpu')
-rw-r--r--src/gpu/GrShaderCaps.cpp7
-rw-r--r--src/gpu/ops/GrTextureOp.cpp4
2 files changed, 10 insertions, 1 deletions
diff --git a/src/gpu/GrShaderCaps.cpp b/src/gpu/GrShaderCaps.cpp
index 0ee9339b45..7e44188074 100644
--- a/src/gpu/GrShaderCaps.cpp
+++ b/src/gpu/GrShaderCaps.cpp
@@ -96,6 +96,12 @@ GrShaderCaps::GrShaderCaps(const GrContextOptions& options) {
fMaxFragmentImageStorages = 0;
fMaxCombinedImageStorages = 0;
fAdvBlendEqInteraction = kNotSupported_AdvBlendEqInteraction;
+
+#if GR_TEST_UTILS
+ fDisableImageMultitexturing = options.fDisableImageMultitexturing;
+#else
+ fDisableImageMultitexturing = false;
+#endif
}
void GrShaderCaps::dumpJSON(SkJSONWriter* writer) const {
@@ -175,6 +181,7 @@ void GrShaderCaps::dumpJSON(SkJSONWriter* writer) const {
writer->appendS32("Max Combined Image Storages", fMaxFragmentImageStorages);
writer->appendString("Advanced blend equation interaction",
kAdvBlendEqInteractionStr[fAdvBlendEqInteraction]);
+ writer->appendBool("Disable image multitexturing", fDisableImageMultitexturing);
writer->endObject();
}
diff --git a/src/gpu/ops/GrTextureOp.cpp b/src/gpu/ops/GrTextureOp.cpp
index ab82a9cc87..3606a01096 100644
--- a/src/gpu/ops/GrTextureOp.cpp
+++ b/src/gpu/ops/GrTextureOp.cpp
@@ -54,7 +54,9 @@ public:
static constexpr int kMaxTextures = 8;
#endif
- static int SupportsMultitexture(const GrShaderCaps& caps) { return caps.integerSupport(); }
+ static int SupportsMultitexture(const GrShaderCaps& caps) {
+ return caps.integerSupport() && !caps.disableImageMultitexturingSupport();
+ }
static sk_sp<GrGeometryProcessor> Make(sk_sp<GrTextureProxy> proxies[], int proxyCnt,
sk_sp<GrColorSpaceXform> csxf,