Revert "Resubmit "Compile the D3D11 VS and PS on separate threads at GL link time""

Causes errors in Clang-Win. We can fix the error and then resubmit, but need to do a roll now.

This reverts commit 310184861bab5e95139e0f34b1f8e88fe8c677b8.

Change-Id: I1c91b0a97031df33c2261089f6b54ccd3270306b
Reviewed-on: https://chromium-review.googlesource.com/250430
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
diff --git a/src/libANGLE/renderer/d3d/ProgramD3D.cpp b/src/libANGLE/renderer/d3d/ProgramD3D.cpp
index 151b015..a368d29 100644
--- a/src/libANGLE/renderer/d3d/ProgramD3D.cpp
+++ b/src/libANGLE/renderer/d3d/ProgramD3D.cpp
@@ -6,13 +6,6 @@
 
 // ProgramD3D.cpp: Defines the rx::ProgramD3D class which implements rx::ProgramImpl.
 
-// <future> requires _HAS_EXCEPTIONS to be defined
-#ifdef _HAS_EXCEPTIONS
-#undef _HAS_EXCEPTIONS
-#endif // _HAS_EXCEPTIONS
-#define _HAS_EXCEPTIONS 1
-#include <future> // For std::async
-
 #include "libANGLE/renderer/d3d/ProgramD3D.h"
 
 #include "common/utilities.h"
@@ -950,7 +943,6 @@
     }
     else if (!infoLog)
     {
-        // This isn't thread-safe, so we should ensure that we always pass in an infoLog if using multiple threads.
         std::vector<char> tempCharBuffer(tempInfoLog.getLength() + 3);
         tempInfoLog.getLog(tempInfoLog.getLength(), NULL, &tempCharBuffer[0]);
         ERR("Error compiling dynamic vertex executable:\n%s\n", &tempCharBuffer[0]);
@@ -966,41 +958,18 @@
     ShaderD3D *vertexShaderD3D = ShaderD3D::makeShaderD3D(vertexShader->getImplementation());
     ShaderD3D *fragmentShaderD3D = ShaderD3D::makeShaderD3D(fragmentShader->getImplementation());
 
-    gl::Error vertexShaderTaskResult(GL_NO_ERROR);
-    gl::InfoLog tempVertexShaderInfoLog;
-
-    // Use an async task to begin compiling the vertex shader asynchronously on its own task.
-    std::future<ShaderExecutableD3D*> vertexShaderTask = std::async([this, vertexShader, &tempVertexShaderInfoLog, &vertexShaderTaskResult]()
+    gl::VertexFormat defaultInputLayout[gl::MAX_VERTEX_ATTRIBS];
+    GetDefaultInputLayoutFromShader(vertexShader->getActiveAttributes(), defaultInputLayout);
+    ShaderExecutableD3D *defaultVertexExecutable = NULL;
+    gl::Error error = getVertexExecutableForInputLayout(defaultInputLayout, &defaultVertexExecutable, &infoLog);
+    if (error.isError())
     {
-        gl::VertexFormat defaultInputLayout[gl::MAX_VERTEX_ATTRIBS];
-        GetDefaultInputLayoutFromShader(vertexShader->getActiveAttributes(), defaultInputLayout);
-        ShaderExecutableD3D *defaultVertexExecutable = NULL;
-        vertexShaderTaskResult = getVertexExecutableForInputLayout(defaultInputLayout, &defaultVertexExecutable, &tempVertexShaderInfoLog);
-        return defaultVertexExecutable;
-    });
+        return LinkResult(false, error);
+    }
 
-    // Continue to compile the pixel shader on the main thread
     std::vector<GLenum> defaultPixelOutput = GetDefaultOutputLayoutFromShader(getPixelShaderKey());
     ShaderExecutableD3D *defaultPixelExecutable = NULL;
-    gl::Error error = getPixelExecutableForOutputLayout(defaultPixelOutput, &defaultPixelExecutable, &infoLog);
-
-    // Call .get() on the vertex shader compilation. This waits until the task is complete before returning
-    ShaderExecutableD3D *defaultVertexExecutable = vertexShaderTask.get();
-
-    // Combine the temporary infoLog with the real one
-    if (tempVertexShaderInfoLog.getLength() > 0)
-    {
-        std::vector<char> tempCharBuffer(tempVertexShaderInfoLog.getLength() + 3);
-        tempVertexShaderInfoLog.getLog(tempVertexShaderInfoLog.getLength(), NULL, &tempCharBuffer[0]);
-        infoLog.append(&tempCharBuffer[0]);
-    }
-
-    if (vertexShaderTaskResult.isError())
-    {
-        return LinkResult(false, vertexShaderTaskResult);
-    }
-
-    // If the pixel shader compilation failed, then return error
+    error = getPixelExecutableForOutputLayout(defaultPixelOutput, &defaultPixelExecutable, &infoLog);
     if (error.isError())
     {
         return LinkResult(false, error);