Remove the option of disabling explicit resource allocation
We're burning our boats behind us. Succeed or die trying!
Change-Id: I6a9f71b758a6ae7b090c5221ab12a5ab4d166b47
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/209647
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
diff --git a/src/gpu/GrGpuCommandBuffer.cpp b/src/gpu/GrGpuCommandBuffer.cpp
index a80b088..b1215f6 100644
--- a/src/gpu/GrGpuCommandBuffer.cpp
+++ b/src/gpu/GrGpuCommandBuffer.cpp
@@ -49,32 +49,22 @@
SkASSERT(!pipeline.isScissorEnabled() || fixedDynamicState ||
(dynamicStateArrays && dynamicStateArrays->fScissorRects));
- auto resourceProvider = this->gpu()->getContext()->priv().resourceProvider();
-
if (pipeline.isBad()) {
return false;
}
+#ifdef SK_DEBUG
if (fixedDynamicState && fixedDynamicState->fPrimitiveProcessorTextures) {
GrTextureProxy** processorProxies = fixedDynamicState->fPrimitiveProcessorTextures;
for (int i = 0; i < primProc.numTextureSamplers(); ++i) {
- if (resourceProvider->explicitlyAllocateGPUResources()) {
- SkASSERT(processorProxies[i]->isInstantiated());
- } else if (!processorProxies[i]->instantiate(resourceProvider)) {
- return false;
- }
+ SkASSERT(processorProxies[i]->isInstantiated());
}
}
if (dynamicStateArrays && dynamicStateArrays->fPrimitiveProcessorTextures) {
int n = primProc.numTextureSamplers() * meshCount;
const auto* textures = dynamicStateArrays->fPrimitiveProcessorTextures;
for (int i = 0; i < n; ++i) {
- if (resourceProvider->explicitlyAllocateGPUResources()) {
- SkASSERT(textures[i]->isInstantiated());
- } else if (!textures[i]->instantiate(resourceProvider)) {
- return false;
- }
+ SkASSERT(textures[i]->isInstantiated());
}
-#ifdef SK_DEBUG
SkASSERT(meshCount >= 1);
const GrTextureProxy* const* primProcProxies =
dynamicStateArrays->fPrimitiveProcessorTextures;
@@ -90,9 +80,8 @@
SkASSERT(testProxy->config() == config);
}
}
-#endif
-
}
+#endif
if (primProc.numVertexAttributes() > this->gpu()->caps()->maxVertexAttributes()) {
this->gpu()->stats()->incNumFailedDraws();