Remove DynamicStateArrays from GrProgramInfo and GrPipeline
Every op that updates dynamic state between draws has now been
migrated to explicit binding.
Change-Id: Ibd13c9c0ffb16a205c073dfb4fd21d93f496dc52
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/277493
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
diff --git a/src/gpu/GrOpsRenderPass.cpp b/src/gpu/GrOpsRenderPass.cpp
index fb3b91e..9d790e0 100644
--- a/src/gpu/GrOpsRenderPass.cpp
+++ b/src/gpu/GrOpsRenderPass.cpp
@@ -122,8 +122,21 @@
#ifdef SK_DEBUG
SkASSERT((primProc.numTextureSamplers() > 0) == SkToBool(primProcTextures));
for (int i = 0; i < primProc.numTextureSamplers(); ++i) {
- SkASSERT(primProcTextures[i]->backendFormat() ==
- primProc.textureSampler(i).backendFormat());
+ const auto& sampler = primProc.textureSampler(i);
+ const GrSurfaceProxy* proxy = primProcTextures[i];
+ SkASSERT(proxy);
+ SkASSERT(proxy->backendFormat() == sampler.backendFormat());
+ SkASSERT(proxy->backendFormat().textureType() == sampler.backendFormat().textureType());
+
+ const GrTexture* tex = proxy->peekTexture();
+ SkASSERT(tex);
+ if (GrSamplerState::Filter::kMipMap == sampler.samplerState().filter() &&
+ (tex->width() != 1 || tex->height() != 1)) {
+ // There are some cases where we might be given a non-mipmapped texture with a mipmap
+ // filter. See skbug.com/7094.
+ SkASSERT(tex->texturePriv().mipMapped() != GrMipMapped::kYes ||
+ !tex->texturePriv().mipMapsAreDirty());
+ }
}
#endif