ES31: Implement glDispatchCompute for D3D backend

BUG=angleproject:1955
TESTCASE=angle_end2end_tests

Change-Id: I69b4df83d67017d39df67753d6d17fc15ececebf
Reviewed-on: https://chromium-review.googlesource.com/462067
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
diff --git a/src/tests/gl_tests/ComputeShaderTest.cpp b/src/tests/gl_tests/ComputeShaderTest.cpp
index c2f8036..3ad97a7 100644
--- a/src/tests/gl_tests/ComputeShaderTest.cpp
+++ b/src/tests/gl_tests/ComputeShaderTest.cpp
@@ -21,12 +21,6 @@
     ComputeShaderTest() {}
 };
 
-class DispatchComputeTest : public ANGLETest
-{
-  protected:
-    DispatchComputeTest() {}
-};
-
 class ComputeShaderTestES3 : public ANGLETest
 {
   protected:
@@ -231,16 +225,15 @@
     ANGLE_GL_COMPUTE_PROGRAM(program, csSource);
 }
 
-// TODO(Xinghua): A temporary test for glDispatchCompute, remove and merge it
-// ComputeShaderTest after implementing this API on D3D backend.
-TEST_P(DispatchComputeTest, DispatchCompute)
+// Use glDispatchCompute to define work group count.
+TEST_P(ComputeShaderTest, DispatchCompute)
 {
     const std::string csSource =
         "#version 310 es\n"
         "layout(local_size_x=4, local_size_y=3, local_size_z=2) in;\n"
         "void main()\n"
         "{\n"
-        "    uvec3 temp1 = gl_NumWorkGroups;\n"
+        "    uvec3 temp = gl_NumWorkGroups;\n"
         "}\n";
 
     ANGLE_GL_COMPUTE_PROGRAM(program, csSource);
@@ -260,7 +253,6 @@
 }
 
 ANGLE_INSTANTIATE_TEST(ComputeShaderTest, ES31_OPENGL(), ES31_OPENGLES(), ES31_D3D11());
-ANGLE_INSTANTIATE_TEST(DispatchComputeTest, ES31_OPENGL(), ES31_OPENGLES());
 ANGLE_INSTANTIATE_TEST(ComputeShaderTestES3, ES3_OPENGL(), ES3_OPENGLES());
 
 }  // namespace