ES31: Add glGetProgramResourceName 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
Change-Id: Ide7d5ad40a611a091c3dffab47fd31da57b69f1d
Reviewed-on: https://chromium-review.googlesource.com/457523
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 2c2806f..72ace5e 100644
--- a/src/libANGLE/Context.cpp
+++ b/src/libANGLE/Context.cpp
@@ -2049,10 +2049,21 @@
GLuint Context::getProgramResourceIndex(GLuint program, GLenum programInterface, const GLchar *name)
{
- gl::Program *programObject = getProgram(program);
+ const auto *programObject = getProgram(program);
return QueryProgramResourceIndex(programObject, programInterface, name);
}
+void Context::getProgramResourceName(GLuint program,
+ GLenum programInterface,
+ GLuint index,
+ GLsizei bufSize,
+ GLsizei *length,
+ GLchar *name)
+{
+ const auto *programObject = getProgram(program);
+ QueryProgramResourceName(programObject, programInterface, index, bufSize, length, name);
+}
+
void Context::handleError(const Error &error)
{
if (error.isError())