From 311157c3c6849e8efccd88f7594bb34c570a6780 Mon Sep 17 00:00:00 2001 From: Andrew Knight Date: Thu, 25 Sep 2014 13:22:55 +0300 Subject: ANGLE: Upgrade to 2.1~abce76206141 Upgrade to address issues discovered since the last upgrade. Patch notes: 0000-General-fixes-for-ANGLE-2.1.patch added removal of the unused third-party tracing functions 0003-Fix-compilation-with-MinGW-gcc-64-bit.patch removed as it is no longer needed 0011-ANGLE-Fix-compilation-error-on-MinGW-caused-by-trace.patch removed as it is no longer needed 0016-ANGLE-Fix-compilation-with-MinGW-D3D11.patch now supports MinGW 64-bit [ChangeLog][Third-party libraries] ANGLE updated to 2.1~f8602ad91e4f Task-number: QTBUG-40649 Task-number: QTBUG-40658 Task-number: QTBUG-41031 Task-number: QTBUG-41081 Task-number: QTBUG-41308 Task-number: QTBUG-41563 Change-Id: I9f776c8d5cb94ddb12d608a8d5630bfc54437bea Reviewed-by: Friedemann Kleint Reviewed-by: Oliver Wolff Reviewed-by: Kai Koehne --- .../angle/src/compiler/translator/OutputHLSL.cpp | 74 +++------------------- 1 file changed, 10 insertions(+), 64 deletions(-) (limited to 'src/3rdparty/angle/src/compiler/translator/OutputHLSL.cpp') diff --git a/src/3rdparty/angle/src/compiler/translator/OutputHLSL.cpp b/src/3rdparty/angle/src/compiler/translator/OutputHLSL.cpp index 1bf1181af0..a5ea71599d 100644 --- a/src/3rdparty/angle/src/compiler/translator/OutputHLSL.cpp +++ b/src/3rdparty/angle/src/compiler/translator/OutputHLSL.cpp @@ -21,6 +21,7 @@ #include "compiler/translator/util.h" #include "compiler/translator/UniformHLSL.h" #include "compiler/translator/StructureHLSL.h" +#include "compiler/translator/TranslatorHLSL.h" #include #include @@ -93,8 +94,10 @@ bool OutputHLSL::TextureFunction::operator<(const TextureFunction &rhs) const return false; } -OutputHLSL::OutputHLSL(TParseContext &context, const ShBuiltInResources& resources, ShShaderOutput outputType) - : TIntermTraverser(true, true, true), mContext(context), mOutputType(outputType) +OutputHLSL::OutputHLSL(TParseContext &context, TranslatorHLSL *parentTranslator) + : TIntermTraverser(true, true, true), + mContext(context), + mOutputType(parentTranslator->getOutputType()) { mUnfoldShortCircuit = new UnfoldShortCircuit(context, this); mInsideFunction = false; @@ -126,6 +129,7 @@ OutputHLSL::OutputHLSL(TParseContext &context, const ShBuiltInResources& resourc mUsesDiscardRewriting = false; mUsesNestedBreak = false; + const ShBuiltInResources &resources = parentTranslator->getResources(); mNumRenderTargets = resources.EXT_draw_buffers ? resources.MaxDrawBuffers : 1; mUniqueIndex = 0; @@ -138,7 +142,7 @@ OutputHLSL::OutputHLSL(TParseContext &context, const ShBuiltInResources& resourc mExcessiveLoopIndex = NULL; mStructureHLSL = new StructureHLSL; - mUniformHLSL = new UniformHLSL(mStructureHLSL, mOutputType); + mUniformHLSL = new UniformHLSL(mStructureHLSL, parentTranslator); if (mOutputType == SH_HLSL9_OUTPUT) { @@ -212,31 +216,6 @@ TInfoSinkBase &OutputHLSL::getBodyStream() return mBody; } -const std::vector &OutputHLSL::getUniforms() -{ - return mUniformHLSL->getUniforms(); -} - -const std::vector &OutputHLSL::getInterfaceBlocks() const -{ - return mUniformHLSL->getInterfaceBlocks(); -} - -const std::vector &OutputHLSL::getOutputVariables() const -{ - return mActiveOutputVariables; -} - -const std::vector &OutputHLSL::getAttributes() const -{ - return mActiveAttributes; -} - -const std::vector &OutputHLSL::getVaryings() const -{ - return mActiveVaryings; -} - const std::map &OutputHLSL::getInterfaceBlockRegisterMap() const { return mUniformHLSL->getInterfaceBlockRegisterMap(); @@ -324,8 +303,6 @@ void OutputHLSL::header() // Program linking depends on this exact format varyings += "static " + InterpolationString(type.getQualifier()) + " " + TypeString(type) + " " + Decorate(name) + ArrayString(type) + " = " + initializer(type) + ";\n"; - - declareVaryingToList(type, type.getQualifier(), name, mActiveVaryings); } for (ReferencedSymbols::const_iterator attribute = mReferencedAttributes.begin(); attribute != mReferencedAttributes.end(); attribute++) @@ -334,10 +311,6 @@ void OutputHLSL::header() const TString &name = attribute->second->getSymbol(); attributes += "static " + TypeString(type) + " " + Decorate(name) + ArrayString(type) + " = " + initializer(type) + ";\n"; - - sh::Attribute attributeVar(GLVariableType(type), GLVariablePrecision(type), name.c_str(), - (unsigned int)type.getArraySize(), type.getLayoutQualifier().location); - mActiveAttributes.push_back(attributeVar); } out << mStructureHLSL->structsHeader(); @@ -370,14 +343,9 @@ void OutputHLSL::header() { const TString &variableName = outputVariableIt->first; const TType &variableType = outputVariableIt->second->getType(); - const TLayoutQualifier &layoutQualifier = variableType.getLayoutQualifier(); out << "static " + TypeString(variableType) + " out_" + variableName + ArrayString(variableType) + " = " + initializer(variableType) + ";\n"; - - sh::Attribute outputVar(GLVariableType(variableType), GLVariablePrecision(variableType), variableName.c_str(), - (unsigned int)variableType.getArraySize(), layoutQualifier.location); - mActiveOutputVariables.push_back(outputVar); } } else @@ -1951,6 +1919,9 @@ bool OutputHLSL::visitAggregate(Visit visit, TIntermAggregate *node) out << ", "; } break; + case EOpInvariantDeclaration: + // Do not do any translation + return false; case EOpPrototype: if (visit == PreVisit) { @@ -2910,29 +2881,4 @@ const ConstantUnion *OutputHLSL::writeConstantUnion(const TType &type, const Con return constUnion; } -class DeclareVaryingTraverser : public GetVariableTraverser -{ - public: - DeclareVaryingTraverser(std::vector *output, - InterpolationType interpolation) - : GetVariableTraverser(output), - mInterpolation(interpolation) - {} - - private: - void visitVariable(Varying *varying) - { - varying->interpolation = mInterpolation; - } - - InterpolationType mInterpolation; -}; - -void OutputHLSL::declareVaryingToList(const TType &type, TQualifier baseTypeQualifier, - const TString &name, std::vector &fieldsOut) -{ - DeclareVaryingTraverser traverser(&fieldsOut, GetInterpolationType(baseTypeQualifier)); - traverser.traverse(type, name); -} - } -- cgit v1.2.3