Commit c41cbb3d7f59d6184f3a05c40afdb9ff15ba4772

Igor Nazarov 2024-06-03T18:59:27

Fix binary is not cached after isBinaryReady() is true Backend may wait and clear `mPostLinkSubTasks`. The `isBinaryReady()` will check, that there are no tasks, and will skip the caching. This change renamed `cacheProgramBinaryIfNotAlready()` to more general `cacheProgramBinaryIfNecessary()`, because it skips caching if there are post link tasks. The `cacheProgramBinary()` renamed to `cacheProgramBinaryIfNotAlready()`, to better reflect it's behavior. Call `cacheProgramBinaryIfNotAlready()` from `isBinaryReady()` if there no post link tasks to ensure binary is cached. Removed check for empty `mPostLinkSubTasks` before calling executable's wait, because same check already performed internally. The `waitForPostLinkTasks()` is not on hot path and does not require avoiding no-op method call. Bug: angleproject:8297 Change-Id: I2bd78c15231805cda4b62a9889287d8cf780cd1e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5593928 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Igor Nazarov <i.nazarov@samsung.com>