diff options
author | Andrew Knight <andrew.knight@digia.com> | 2013-04-03 19:57:09 +0300 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-04-08 11:35:44 +0200 |
commit | 710ad8ce1bd5d01ce048851d210ac3831ca17dde (patch) | |
tree | bb3f645e57a7887341113275c9caa2583f7e2dfa /src/3rdparty/angle/src/compiler/VariableInfo.cpp | |
parent | 8307ab784eb4d8d22441ee61f02cb381684ca3a2 (diff) |
Upgrade ANGLE to DX11 Proto
Upgrades ANGLE to dx11proto (dx11-MRT-support tag), which splits out support
for DirectX9 & DirectX11. The DX9 codepath is used by default;
CONFIG+=angle_d3d11 must be passed to the ANGLE project to build for DX11.
Existing patches to ANGLE have been updated (or removed if no longer
needed), and a patch has been added to make DX9/DX11 codepaths mutually
exclusive.
Change-Id: Ibe13befadb94f04883eca449d0ee1f0da955ff92
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Axel Waggershauser <awagger@gmail.com>
Diffstat (limited to 'src/3rdparty/angle/src/compiler/VariableInfo.cpp')
-rw-r--r-- | src/3rdparty/angle/src/compiler/VariableInfo.cpp | 34 |
1 files changed, 23 insertions, 11 deletions
diff --git a/src/3rdparty/angle/src/compiler/VariableInfo.cpp b/src/3rdparty/angle/src/compiler/VariableInfo.cpp index 3ff283627b..eb6bea9b0f 100644 --- a/src/3rdparty/angle/src/compiler/VariableInfo.cpp +++ b/src/3rdparty/angle/src/compiler/VariableInfo.cpp @@ -77,23 +77,25 @@ static void getBuiltInVariableInfo(const TType& type, static void getUserDefinedVariableInfo(const TType& type, const TString& name, const TString& mappedName, - TVariableInfoList& infoList); + TVariableInfoList& infoList, + ShHashFunction64 hashFunction); // Returns info for an attribute or uniform. static void getVariableInfo(const TType& type, const TString& name, const TString& mappedName, - TVariableInfoList& infoList) + TVariableInfoList& infoList, + ShHashFunction64 hashFunction) { if (type.getBasicType() == EbtStruct) { if (type.isArray()) { for (int i = 0; i < type.getArraySize(); ++i) { TString lname = name + arrayBrackets(i); TString lmappedName = mappedName + arrayBrackets(i); - getUserDefinedVariableInfo(type, lname, lmappedName, infoList); + getUserDefinedVariableInfo(type, lname, lmappedName, infoList, hashFunction); } } else { - getUserDefinedVariableInfo(type, name, mappedName, infoList); + getUserDefinedVariableInfo(type, name, mappedName, infoList, hashFunction); } } else { getBuiltInVariableInfo(type, name, mappedName, infoList); @@ -124,7 +126,8 @@ void getBuiltInVariableInfo(const TType& type, void getUserDefinedVariableInfo(const TType& type, const TString& name, const TString& mappedName, - TVariableInfoList& infoList) + TVariableInfoList& infoList, + ShHashFunction64 hashFunction) { ASSERT(type.getBasicType() == EbtStruct); @@ -133,8 +136,9 @@ void getUserDefinedVariableInfo(const TType& type, const TType* fieldType = (*structure)[i].type; getVariableInfo(*fieldType, name + "." + fieldType->getFieldName(), - mappedName + "." + fieldType->getFieldName(), - infoList); + mappedName + "." + TIntermTraverser::hash(fieldType->getFieldName(), hashFunction), + infoList, + hashFunction); } } @@ -149,9 +153,11 @@ TVariableInfo::TVariableInfo(ShDataType type, int size) } CollectAttribsUniforms::CollectAttribsUniforms(TVariableInfoList& attribs, - TVariableInfoList& uniforms) + TVariableInfoList& uniforms, + ShHashFunction64 hashFunction) : mAttribs(attribs), - mUniforms(uniforms) + mUniforms(uniforms), + mHashFunction(hashFunction) { } @@ -206,10 +212,16 @@ bool CollectAttribsUniforms::visitAggregate(Visit, TIntermAggregate* node) // cannot be initialized in a shader, we must have only // TIntermSymbol nodes in the sequence. ASSERT(variable != NULL); + TString processedSymbol; + if (mHashFunction == NULL) + processedSymbol = variable->getSymbol(); + else + processedSymbol = TIntermTraverser::hash(variable->getOriginalSymbol(), mHashFunction); getVariableInfo(variable->getType(), variable->getOriginalSymbol(), - variable->getSymbol(), - infoList); + processedSymbol, + infoList, + mHashFunction); } } break; |