ES31: Add glGetProgramResourceLocation API
Add API entry and validation checks(GLES 3.1 section 7.3).
Add the first 2 interfaces(PROGRAM_INPUT and PROGRAM_OUTPUT) implementation.
BUG=angleproject:1920
TEST=angle_end2end_tests:ProgramInterfaceTestES31.*
Change-Id: I5128cda43b0d9176c910b036cdc76bf37757670e
Reviewed-on: https://chromium-review.googlesource.com/474212
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
diff --git a/src/libANGLE/Context.cpp b/src/libANGLE/Context.cpp
index d255bd8..52c2176 100644
--- a/src/libANGLE/Context.cpp
+++ b/src/libANGLE/Context.cpp
@@ -2166,6 +2166,14 @@
QueryProgramResourceName(programObject, programInterface, index, bufSize, length, name);
}
+GLint Context::getProgramResourceLocation(GLuint program,
+ GLenum programInterface,
+ const GLchar *name)
+{
+ const auto *programObject = getProgram(program);
+ return QueryProgramResourceLocation(programObject, programInterface, name);
+}
+
void Context::handleError(const Error &error)
{
if (error.isError())