ES31: Translate compute shader HLSL system variables in compile time

This patch moves the implementation of translating compute shader
builtin variables from link time to compile time.

Unlike graphics shaders that require the information from other
shader stages, we actually have enough information to translate
compute shader builtin variables in compile time.

Many redundant codes in DynamicHLSL have been removed after this
refactor.

BUG=angleproject:1442

Change-Id: I7458006785ff966a00a3825610adc5566652c75e
Reviewed-on: https://chromium-review.googlesource.com/1149609
Reviewed-by: Jiajia Qin <jiajia.qin@intel.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
diff --git a/src/libANGLE/renderer/d3d/ProgramD3D.cpp b/src/libANGLE/renderer/d3d/ProgramD3D.cpp
index 7eff8a5..048cefe 100644
--- a/src/libANGLE/renderer/d3d/ProgramD3D.cpp
+++ b/src/libANGLE/renderer/d3d/ProgramD3D.cpp
@@ -1513,7 +1513,9 @@
     // Ensure the compiler is initialized to avoid race conditions.
     ANGLE_TRY(mRenderer->ensureHLSLCompilerInitialized());
 
-    std::string computeShader = mDynamicHLSL->generateComputeShaderLinkHLSL(context, mState);
+    gl::Shader *computeShaderGL = mState.getAttachedShader(gl::ShaderType::Compute);
+    ASSERT(computeShaderGL);
+    std::string computeShader = computeShaderGL->getTranslatedSource(context);
 
     ShaderExecutableD3D *computeExecutable = nullptr;
     ANGLE_TRY(mRenderer->compileToExecutable(infoLog, computeShader, gl::ShaderType::Compute,