summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/angle/src/compiler/translator/UniformHLSL.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdparty/angle/src/compiler/translator/UniformHLSL.cpp')
-rw-r--r--src/3rdparty/angle/src/compiler/translator/UniformHLSL.cpp17
1 files changed, 8 insertions, 9 deletions
diff --git a/src/3rdparty/angle/src/compiler/translator/UniformHLSL.cpp b/src/3rdparty/angle/src/compiler/translator/UniformHLSL.cpp
index 61b6ed7455..71659fe354 100644
--- a/src/3rdparty/angle/src/compiler/translator/UniformHLSL.cpp
+++ b/src/3rdparty/angle/src/compiler/translator/UniformHLSL.cpp
@@ -7,14 +7,13 @@
// Methods for GLSL to HLSL translation for uniforms and interface blocks.
//
-#include "OutputHLSL.h"
-#include "common/blocklayout.h"
-#include "common/utilities.h"
#include "compiler/translator/UniformHLSL.h"
+
+#include "common/utilities.h"
#include "compiler/translator/StructureHLSL.h"
-#include "compiler/translator/util.h"
#include "compiler/translator/UtilsHLSL.h"
-#include "compiler/translator/TranslatorHLSL.h"
+#include "compiler/translator/blocklayoutHLSL.h"
+#include "compiler/translator/util.h"
namespace sh
{
@@ -61,13 +60,13 @@ static TString InterfaceBlockStructName(const TInterfaceBlock &interfaceBlock)
return DecoratePrivate(interfaceBlock.name()) + "_type";
}
-UniformHLSL::UniformHLSL(StructureHLSL *structureHLSL, TranslatorHLSL *translator)
+UniformHLSL::UniformHLSL(StructureHLSL *structureHLSL, ShShaderOutput outputType, const std::vector<Uniform> &uniforms)
: mUniformRegister(0),
mInterfaceBlockRegister(0),
mSamplerRegister(0),
mStructureHLSL(structureHLSL),
- mOutputType(translator->getOutputType()),
- mUniforms(translator->getUniforms())
+ mOutputType(outputType),
+ mUniforms(uniforms)
{}
void UniformHLSL::reserveUniformRegisters(unsigned int registerCount)
@@ -105,7 +104,7 @@ unsigned int UniformHLSL::declareUniformAndAssignRegister(const TType &type, con
unsigned int registerCount = HLSLVariableRegisterCount(*uniform, mOutputType);
- if (gl::IsSampler(uniform->type))
+ if (gl::IsSamplerType(uniform->type))
{
mSamplerRegister += registerCount;
}