Add PrimitiveMode packed GLenum.

Bug: angleproject:2574
Change-Id: I3d7bd7ca0d69a364a611dc04799ea34906fc4a6c
Reviewed-on: https://chromium-review.googlesource.com/1067114
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
diff --git a/src/libANGLE/Shader.cpp b/src/libANGLE/Shader.cpp
index 0da1039..874e1e4 100644
--- a/src/libANGLE/Shader.cpp
+++ b/src/libANGLE/Shader.cpp
@@ -12,15 +12,15 @@
 
 #include <sstream>
 
-#include "common/utilities.h"
 #include "GLSLANG/ShaderLang.h"
+#include "common/utilities.h"
 #include "libANGLE/Caps.h"
 #include "libANGLE/Compiler.h"
 #include "libANGLE/Constants.h"
+#include "libANGLE/Context.h"
+#include "libANGLE/ResourceManager.h"
 #include "libANGLE/renderer/GLImplFactory.h"
 #include "libANGLE/renderer/ShaderImpl.h"
-#include "libANGLE/ResourceManager.h"
-#include "libANGLE/Context.h"
 
 namespace gl
 {
@@ -389,7 +389,7 @@
     // Gather the shader information
     mState.mShaderVersion = sh::GetShaderVersion(compilerHandle);
 
-    mState.mUniforms        = GetShaderVariables(sh::GetUniforms(compilerHandle));
+    mState.mUniforms            = GetShaderVariables(sh::GetUniforms(compilerHandle));
     mState.mUniformBlocks       = GetShaderVariables(sh::GetUniformBlocks(compilerHandle));
     mState.mShaderStorageBlocks = GetShaderVariables(sh::GetShaderStorageBlocks(compilerHandle));
 
@@ -406,7 +406,7 @@
                 mState.mOutputVaryings = GetShaderVariables(sh::GetOutputVaryings(compilerHandle));
                 mState.mAllAttributes    = GetShaderVariables(sh::GetAttributes(compilerHandle));
                 mState.mActiveAttributes = GetActiveShaderVariables(&mState.mAllAttributes);
-                mState.mNumViews = sh::GetVertexShaderNumViews(compilerHandle);
+                mState.mNumViews         = sh::GetVertexShaderNumViews(compilerHandle);
             }
             break;
         }
@@ -426,13 +426,13 @@
 
             if (sh::HasValidGeometryShaderInputPrimitiveType(compilerHandle))
             {
-                mState.mGeometryShaderInputPrimitiveType =
-                    sh::GetGeometryShaderInputPrimitiveType(compilerHandle);
+                mState.mGeometryShaderInputPrimitiveType = FromGLenum<PrimitiveMode>(
+                    sh::GetGeometryShaderInputPrimitiveType(compilerHandle));
             }
             if (sh::HasValidGeometryShaderOutputPrimitiveType(compilerHandle))
             {
-                mState.mGeometryShaderOutputPrimitiveType =
-                    sh::GetGeometryShaderOutputPrimitiveType(compilerHandle);
+                mState.mGeometryShaderOutputPrimitiveType = FromGLenum<PrimitiveMode>(
+                    sh::GetGeometryShaderOutputPrimitiveType(compilerHandle));
             }
             if (sh::HasValidGeometryShaderMaxVertices(compilerHandle))
             {
@@ -594,13 +594,13 @@
     return mState.mNumViews;
 }
 
-Optional<GLenum> Shader::getGeometryShaderInputPrimitiveType(const Context *context)
+Optional<PrimitiveMode> Shader::getGeometryShaderInputPrimitiveType(const Context *context)
 {
     resolveCompile(context);
     return mState.mGeometryShaderInputPrimitiveType;
 }
 
-Optional<GLenum> Shader::getGeometryShaderOutputPrimitiveType(const Context *context)
+Optional<PrimitiveMode> Shader::getGeometryShaderOutputPrimitiveType(const Context *context)
 {
     resolveCompile(context);
     return mState.mGeometryShaderOutputPrimitiveType;