Vulkan: set DS layout before using it in the endRenderPass In CommandBufferHelper::endRenderPass(), we are checking depth stencil's initialLayout to change storeOp to None if the layout is read only. But the layout was set after that check, which essentially voids the optimization. This CL moves the finalizeDepthStencilImageLayout() call before the layout is used. This CL also moves the depth stencil loadOp/storeOp to a new function finalizeDepthStencilLoadStoreOp(). When depthImage gets deleted before renderpass ends, we could also apply the same load/store optimization just like we did at endRenderPass() time. Bug: b/187425444 Change-Id: I89814274352f09cbf1f7b58a91bbaf131b983fb1 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2877933 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com> Commit-Queue: Charlie Lao <cclao@google.com>