Avoid redundant bindings/states based on Metal profiler feedback. (#2006)

This commit is contained in:
Tim Sylvester
2024-01-22 07:02:36 -08:00
committed by GitHub
parent cd3de6d3ad
commit 5c304614d6
9 changed files with 90 additions and 35 deletions

View File

@@ -324,12 +324,8 @@ bool Context::renderTileClippingMasks(gfx::RenderPass& renderPass,
clipMaskDepthStencilState = std::move(depthStencilState);
}
}
if (clipMaskDepthStencilState) {
encoder->setDepthStencilState(clipMaskDepthStencilState.get());
} else {
assert(!"Failed to create depth-stencil state for clip masking");
return false;
}
assert(clipMaskDepthStencilState || !"Failed to create depth-stencil state for clip masking");
mtlRenderPass.setDepthStencilState(clipMaskDepthStencilState);
if (!clipMaskPipelineState) {
// A vertex descriptor tells Metal what's in the vertex buffer