Always collect variables when generating HLSL

HLSL output needs uniform information generated by the collectVariables()
step to be able to write uniform registers.

Tested manually by compiling a shader with a uniform with
shader_translator.

BUG=angleproject:1132

Change-Id: I91d19b5fa789b7b33cf76a654ffbbd17d279db01
Reviewed-on: https://chromium-review.googlesource.com/294962
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
diff --git a/src/compiler/translator/Compiler.cpp b/src/compiler/translator/Compiler.cpp
index 555d794..b61fb6d 100644
--- a/src/compiler/translator/Compiler.cpp
+++ b/src/compiler/translator/Compiler.cpp
@@ -329,7 +329,7 @@
             RemovePow(root);
         }
 
-        if (success && (compileOptions & SH_VARIABLES))
+        if (success && shouldCollectVariables(compileOptions))
         {
             collectVariables(root);
             if (compileOptions & SH_ENFORCE_PACKING_RESTRICTIONS)