Use packed enums on shader types in ANGLE renderer
This patch uses a packed internal enum ShaderType everywhere we
need a shader type instead of the GLenum value of the shader type.
This patch also uses program::getAttachedShader(type) everywhere
we need to get gl::Shader from a program in ANGLE.
BUG=angleproject:2169
Change-Id: I28a7fa1cfe35622c57a486932911110688eaadec
Reviewed-on: https://chromium-review.googlesource.com/972844
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
diff --git a/src/libANGLE/Context.cpp b/src/libANGLE/Context.cpp
index 3ff509e..5304421 100644
--- a/src/libANGLE/Context.cpp
+++ b/src/libANGLE/Context.cpp
@@ -614,7 +614,7 @@
return mState.mShaderPrograms->createProgram(mImplementation.get());
}
-GLuint Context::createShader(GLenum type)
+GLuint Context::createShader(ShaderType type)
{
return mState.mShaderPrograms->createShader(mImplementation.get(), mLimitations, type);
}
@@ -661,7 +661,7 @@
return mState.mPipelines->createProgramPipeline();
}
-GLuint Context::createShaderProgramv(GLenum type, GLsizei count, const GLchar *const *strings)
+GLuint Context::createShaderProgramv(ShaderType type, GLsizei count, const GLchar *const *strings)
{
UNIMPLEMENTED();
return 0u;