Skip to content

Commit 6e40ce0

Browse files
vontureAngle LUCI CQ
authored and
Angle LUCI CQ
committed
Do not call postResolveLink in Program::deserialize.
postResolveLink assumes the program is currently linked, which is not the case in Program::deserialize. It makes calls to set uniforms which is not always expected by the backend. Call postResolveLink after the backend has linked when loading program binaries. Bug: angleproject:6073, angleproject:8183 Change-Id: Idacb81040ea79a7df51917aaa27c77b25df7d5cd Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4588410 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
1 parent e7a9275 commit 6e40ce0

File tree

2 files changed

+6
-9
lines changed

2 files changed

+6
-9
lines changed

src/libANGLE/Program.cpp

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1309,12 +1309,6 @@ void Program::resolveLinkImpl(const Context *context)
13091309
return;
13101310
}
13111311

1312-
if (linkingState->linkingFromBinary)
1313-
{
1314-
// All internal Program state is already loaded from the binary.
1315-
return;
1316-
}
1317-
13181312
// According to GLES 3.0/3.1 spec for LinkProgram and UseProgram,
13191313
// Only successfully linked program can replace the executables.
13201314
ASSERT(mLinked);
@@ -1327,6 +1321,12 @@ void Program::resolveLinkImpl(const Context *context)
13271321
// Must be called after markUnusedUniformLocations.
13281322
postResolveLink(context);
13291323

1324+
if (linkingState->linkingFromBinary)
1325+
{
1326+
// All internal Program state is already loaded from the binary.
1327+
return;
1328+
}
1329+
13301330
// Save to the program cache.
13311331
std::lock_guard<std::mutex> cacheLock(context->getProgramCacheMutex());
13321332
MemoryProgramCache *cache = context->getMemoryProgramCache();
@@ -3687,7 +3687,6 @@ angle::Result Program::deserialize(const Context *context,
36873687
mState.mExecutable->updateTransformFeedbackStrides();
36883688
}
36893689

3690-
postResolveLink(context);
36913690
mState.mExecutable->updateCanDrawWith();
36923691

36933692
if (context->getShareGroup()->getFrameCaptureShared()->enabled())

src/tests/angle_end2end_tests_expectations.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@
1818
6063 GLES : SimpleStateChangeTestES31.DrawThenChangeFBOThenDrawThenFlushInAnotherThreadThenDrawIndexed/* = SKIP
1919
// Crashes in setUniformValuesFromBindingQualifiers() because mUniformRealLocationMap is not
2020
// initialized when the program is loaded from cache.
21-
6073 OPENGL : ProgramInterfaceTestES31.ReloadFromCacheShouldNotCrash/ES3_1_OpenGL__cached = SKIP
22-
6073 GLES : ProgramInterfaceTestES31.ReloadFromCacheShouldNotCrash/ES3_1_OpenGLES__cached = SKIP
2321
6142 VULKAN : BlitFramebufferTest.BlitDepthStencilPixelByPixel/* = SKIP
2422
6153 VULKAN WIN INTEL : GLSLTest_ES31.StructAndArrayEqualOperator/* = SKIP
2523
6153 VULKAN PIXEL4ORXL : GLSLTest_ES31.StructAndArrayEqualOperator/* = SKIP

0 commit comments

Comments
 (0)