Pack VertexAttribType enum.
This improves performance slightly in vertex array format checks.
Instead of needing to switch on GLenum values we can use packed arrays
and tables to determine the values we need.
Does not significantly affect performance but will enable future work.
Bug: angleproject:3074
Change-Id: I6f4821a463e9b41fe3f8c8967eb3ed4c1d6b84be
Reviewed-on: https://chromium-review.googlesource.com/c/1393903
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
diff --git a/src/libANGLE/Context.cpp b/src/libANGLE/Context.cpp
index 0c93d95..545a0ac 100644
--- a/src/libANGLE/Context.cpp
+++ b/src/libANGLE/Context.cpp
@@ -4781,7 +4781,7 @@
void Context::vertexAttribPointer(GLuint index,
GLint size,
- GLenum type,
+ VertexAttribType type,
GLboolean normalized,
GLsizei stride,
const void *ptr)
@@ -4793,7 +4793,7 @@
void Context::vertexAttribFormat(GLuint attribIndex,
GLint size,
- GLenum type,
+ VertexAttribType type,
GLboolean normalized,
GLuint relativeOffset)
{
@@ -4804,7 +4804,7 @@
void Context::vertexAttribIFormat(GLuint attribIndex,
GLint size,
- GLenum type,
+ VertexAttribType type,
GLuint relativeOffset)
{
mState.setVertexAttribFormat(attribIndex, size, type, false, true, relativeOffset);
@@ -4830,7 +4830,7 @@
void Context::vertexAttribIPointer(GLuint index,
GLint size,
- GLenum type,
+ VertexAttribType type,
GLsizei stride,
const void *pointer)
{