Remove gl::LinkResult.
Instead of returning a small struct from LinkProgram calls we use
angle::Result. Linking can have 3 cases:
- the link was successful -> angle::Result::Continue
- the link failed -> angle::Result::Incomplete
- there was an internal error -> angle::Result::Stop
Note that any unexpected Incomplete is still an error. Each function
that accepts Incomplete must check explicitly.
This is the last user of ErrorOrResult.
Bug: angleproject:2491
Change-Id: Idba23be27efe4b561720a4bdd8fe486b40779497
Reviewed-on: https://chromium-review.googlesource.com/c/1255645
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@google.com>
diff --git a/src/libANGLE/validationES31.cpp b/src/libANGLE/validationES31.cpp
index 8223433..a2561bd 100644
--- a/src/libANGLE/validationES31.cpp
+++ b/src/libANGLE/validationES31.cpp
@@ -1428,7 +1428,7 @@
}
const State &state = context->getGLState();
- Program *program = state.getLinkedProgram();
+ Program *program = state.getLinkedProgram(context);
if (program == nullptr || !program->hasLinkedShaderStage(ShaderType::Compute))
{
@@ -1471,7 +1471,7 @@
}
const State &state = context->getGLState();
- Program *program = state.getLinkedProgram();
+ Program *program = state.getLinkedProgram(context);
if (program == nullptr || !program->hasLinkedShaderStage(ShaderType::Compute))
{