Rename VariableInfo files to CollectVariables
Files that only have a single function should be named consistently
with the function. Unnecessary include in CallDAG.h is removed.
BUG=angleproject:2068
TEST=angle_unittests
Change-Id: I27d55a766b9eb66fcfd1e0a2341a2843bb9dc5bb
Reviewed-on: https://chromium-review.googlesource.com/608368
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
diff --git a/src/compiler/translator/CallDAG.h b/src/compiler/translator/CallDAG.h
index d29f932..155081c 100644
--- a/src/compiler/translator/CallDAG.h
+++ b/src/compiler/translator/CallDAG.h
@@ -14,7 +14,6 @@
#include <map>
#include "compiler/translator/IntermNode.h"
-#include "compiler/translator/VariableInfo.h"
namespace sh
{
diff --git a/src/compiler/translator/VariableInfo.cpp b/src/compiler/translator/CollectVariables.cpp
similarity index 98%
rename from src/compiler/translator/VariableInfo.cpp
rename to src/compiler/translator/CollectVariables.cpp
index f48abd3..4ffae59 100644
--- a/src/compiler/translator/VariableInfo.cpp
+++ b/src/compiler/translator/CollectVariables.cpp
@@ -3,8 +3,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
+// CollectVariables.cpp: Collect lists of shader interface variables based on the AST.
-#include "compiler/translator/VariableInfo.h"
+#include "compiler/translator/CollectVariables.h"
#include "angle_gl.h"
#include "common/utilities.h"
@@ -540,7 +541,7 @@
ASSERT(blockType);
InterfaceBlock interfaceBlock;
- interfaceBlock.name = blockType->name().c_str();
+ interfaceBlock.name = blockType->name().c_str();
interfaceBlock.mappedName = HashName(blockType->name().c_str(), mHashFunction).c_str();
interfaceBlock.instanceName =
(blockType->hasInstanceName() ? blockType->instanceName().c_str() : "");
@@ -568,7 +569,7 @@
{
Uniform uniform;
setCommonVariableProperties(variable.getType(), variable.getSymbol(), &uniform);
- uniform.binding = variable.getType().getLayoutQualifier().binding;
+ uniform.binding = variable.getType().getLayoutQualifier().binding;
uniform.location = variable.getType().getLayoutQualifier().location;
uniform.offset = variable.getType().getLayoutQualifier().offset;
return uniform;
diff --git a/src/compiler/translator/VariableInfo.h b/src/compiler/translator/CollectVariables.h
similarity index 81%
rename from src/compiler/translator/VariableInfo.h
rename to src/compiler/translator/CollectVariables.h
index 7317414..3a40824 100644
--- a/src/compiler/translator/VariableInfo.h
+++ b/src/compiler/translator/CollectVariables.h
@@ -3,9 +3,10 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
+// CollectVariables.h: Collect lists of shader interface variables based on the AST.
-#ifndef COMPILER_TRANSLATOR_VARIABLEINFO_H_
-#define COMPILER_TRANSLATOR_VARIABLEINFO_H_
+#ifndef COMPILER_TRANSLATOR_COLLECTVARIABLES_H_
+#define COMPILER_TRANSLATOR_COLLECTVARIABLES_H_
#include <GLSLANG/ShaderLang.h>
@@ -31,4 +32,4 @@
const TExtensionBehavior &extensionBehavior);
}
-#endif // COMPILER_TRANSLATOR_VARIABLEINFO_H_
+#endif // COMPILER_TRANSLATOR_COLLECTVARIABLES_H_
diff --git a/src/compiler/translator/Compiler.cpp b/src/compiler/translator/Compiler.cpp
index 8b7cb0e..b6e256e 100644
--- a/src/compiler/translator/Compiler.cpp
+++ b/src/compiler/translator/Compiler.cpp
@@ -14,6 +14,7 @@
#include "compiler/translator/Cache.h"
#include "compiler/translator/CallDAG.h"
#include "compiler/translator/ClampPointSize.h"
+#include "compiler/translator/CollectVariables.h"
#include "compiler/translator/DeclareAndInitBuiltinsForInstancedMultiview.h"
#include "compiler/translator/DeferGlobalInitializers.h"
#include "compiler/translator/EmulateGLFragColorBroadcast.h"
diff --git a/src/compiler/translator/Compiler.h b/src/compiler/translator/Compiler.h
index 7930c73..54f1e38 100644
--- a/src/compiler/translator/Compiler.h
+++ b/src/compiler/translator/Compiler.h
@@ -14,6 +14,8 @@
// This should not be included by driver code.
//
+#include <GLSLANG/ShaderVars.h>
+
#include "compiler/translator/BuiltInFunctionEmulator.h"
#include "compiler/translator/CallDAG.h"
#include "compiler/translator/Diagnostics.h"
@@ -22,7 +24,6 @@
#include "compiler/translator/InfoSink.h"
#include "compiler/translator/Pragma.h"
#include "compiler/translator/SymbolTable.h"
-#include "compiler/translator/VariableInfo.h"
#include "third_party/compiler/ArrayBoundsClamper.h"
namespace sh