Commit a3ed8e19 by Jonah Ryan-Davis Committed by Commit Bot

GL: Fix issue with EXTBlendFuncExtendedES3DrawTest

The call to glBindFragDataLocationIndexedEXT was not being properly forwarded through ANGLE because we assumed that if its location was set, then its index was set, which is not always the case. Fixed this, and also added a link status check after linking so the error will properly propagate in the future. Bug: chromium:1099763 Change-Id: I28981c04a3f2d6a59c239b35b3f7eb0c7f586804 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2289653Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarJonah Ryan-Davis <jonahr@google.com> Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
parent debe4683
...@@ -367,12 +367,12 @@ std::unique_ptr<LinkEvent> ProgramGL::link(const gl::Context *context, ...@@ -367,12 +367,12 @@ std::unique_ptr<LinkEvent> ProgramGL::link(const gl::Context *context,
{ {
const sh::ShaderVariable &outputVar = const sh::ShaderVariable &outputVar =
mState.getOutputVariables()[outputLocation.index]; mState.getOutputVariables()[outputLocation.index];
if (outputVar.location == -1) if (outputVar.location == -1 || outputVar.index == -1)
{ {
// We only need to assign the location and index via the API in case the // We only need to assign the location and index via the API in case the
// variable doesn't have its location set in the shader. If a variable // variable doesn't have a shader-assigned location and index. If a
// doesn't have its location set in the shader it doesn't have the index // variable doesn't have its location set in the shader it doesn't have
// set either. // the index set either.
ASSERT(outputVar.index == -1); ASSERT(outputVar.index == -1);
mFunctions->bindFragDataLocationIndexed( mFunctions->bindFragDataLocationIndexed(
mProgramID, static_cast<int>(outputLocationIndex), 0, mProgramID, static_cast<int>(outputLocationIndex), 0,
...@@ -475,6 +475,8 @@ std::unique_ptr<LinkEvent> ProgramGL::link(const gl::Context *context, ...@@ -475,6 +475,8 @@ std::unique_ptr<LinkEvent> ProgramGL::link(const gl::Context *context,
if (mRenderer->hasNativeParallelCompile()) if (mRenderer->hasNativeParallelCompile())
{ {
mFunctions->linkProgram(mProgramID); mFunctions->linkProgram(mProgramID);
// Verify the link
checkLinkStatus(infoLog);
return std::make_unique<LinkEventNativeParallel>(postLinkImplTask, mFunctions, mProgramID); return std::make_unique<LinkEventNativeParallel>(postLinkImplTask, mFunctions, mProgramID);
} }
else if (workerPool->isAsync() && else if (workerPool->isAsync() &&
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment