Revert "Verify shader link correctness after looking up in program cache"

This reverts commit 60b56591de.

Reason for revert: Flakiness if the attached shaders are not compiled

Original change's description:
> Verify shader link correctness after looking up in program cache
>
> Since the program cache takes shader sources into account, if the cache
> is hit the shaders should have been correct for link.
>
> Bug: angleproject:8297
> Change-Id: I115c7eb807ed620d30b9e30669c99fffb5c7912d
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4817830
> Reviewed-by: Geoff Lang <geofflang@chromium.org>
> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>

Bug: angleproject:8297
Change-Id: Icf4058e4bea471f097caed950b18f690d8d0456d
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4846389
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org>
This commit is contained in:
Shahbaz Youssefi
2023-09-07 17:10:56 +00:00
committed by Angle LUCI CQ
parent 265f3d3641
commit fc7a28530e

View File

@@ -1201,6 +1201,13 @@ angle::Result Program::linkImpl(const Context *context)
mState.mInfoLog.reset();
// Validate we have properly attached shaders before checking the cache.
if (!linkValidateShaders(context))
{
return angle::Result::Continue;
}
linkShaders();
egl::BlobCache::Key programHash = {0};
MemoryProgramCache *cache = context->getMemoryProgramCache();
@@ -1231,14 +1238,7 @@ angle::Result Program::linkImpl(const Context *context)
// Cache load failed, fall through to normal linking.
unlink();
// Validate we have properly attached shaders after checking the cache. Since the input to the
// shaders is part of the cache key, if there was a cache hit, the shaders would have linked
// correctly.
if (!linkValidateShaders(context))
{
return angle::Result::Continue;
}
// Re-link shaders after the unlink call.
linkShaders();
ProgramMergedVaryings mergedVaryings;