* rework how shader interface block naming rules are handled * Fixes 2136 According to the spec, shader interfaces (uniform blocks, buffer blocks, input blocks, output blocks) all should be matched up via their block names across all compilation units, not instance names. Also, all block names can be re-used between all 4 interface types without conflict. This change makes it so all of these blocks are matched and remapped using block name and not by instance name. Additional the rule that matched uniform and buffer blocks must either be anonymous or named (but not nessearily the same name) is now imposed. * add warning if instance names differ between matched shader interfaces * Add test cases from #2137 which is now fixed as well. * replace some tab characters with spaces * buffer blocks and uniform blocks now share the same block namespace
This commit is contained in:
parent
1fff362355
commit
0b66fa3b62
29 changed files with 2495 additions and 27 deletions
|
|
@ -225,6 +225,15 @@ enum ComputeDerivativeMode {
|
|||
LayoutDerivativeGroupLinear, // derivative_group_linearNV
|
||||
};
|
||||
|
||||
class TIdMaps {
|
||||
public:
|
||||
TMap<TString, int>& operator[](int i) { return maps[i]; };
|
||||
const TMap<TString, int>& operator[](int i) const { return maps[i]; };
|
||||
private:
|
||||
TMap<TString, int> maps[EsiCount];
|
||||
};
|
||||
|
||||
|
||||
//
|
||||
// Set of helper functions to help parse and build the tree.
|
||||
//
|
||||
|
|
@ -862,8 +871,8 @@ protected:
|
|||
void mergeCallGraphs(TInfoSink&, TIntermediate&);
|
||||
void mergeModes(TInfoSink&, TIntermediate&);
|
||||
void mergeTrees(TInfoSink&, TIntermediate&);
|
||||
void seedIdMap(TMap<TString, int>& idMap, int& maxId);
|
||||
void remapIds(const TMap<TString, int>& idMap, int idShift, TIntermediate&);
|
||||
void seedIdMap(TIdMaps& idMaps, int& maxId);
|
||||
void remapIds(const TIdMaps& idMaps, int idShift, TIntermediate&);
|
||||
void mergeBodies(TInfoSink&, TIntermSequence& globals, const TIntermSequence& unitGlobals);
|
||||
void mergeLinkerObjects(TInfoSink&, TIntermSequence& linkerObjects, const TIntermSequence& unitLinkerObjects);
|
||||
void mergeImplicitArraySizes(TType&, const TType&);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue