Add --no-link option
Adds the --no-link option which outputs the compiled shader binaries without linking them. This is a first step towards allowing users to create SPIR-v binary, non-executable libraries. When using the --no-link option, all functions are decorated with the Export linkage attribute.
This commit is contained in:
parent
a4aceb57de
commit
4c57db1595
24 changed files with 1671 additions and 1454 deletions
|
|
@ -1108,6 +1108,11 @@ enum TOperator {
|
|||
EOpImageBlockMatchSSDQCOM,
|
||||
};
|
||||
|
||||
enum TLinkType {
|
||||
ELinkNone,
|
||||
ELinkExport,
|
||||
};
|
||||
|
||||
class TIntermTraverser;
|
||||
class TIntermOperator;
|
||||
class TIntermAggregate;
|
||||
|
|
@ -1325,9 +1330,11 @@ public:
|
|||
virtual const TString& getMethodName() const { return method; }
|
||||
virtual TIntermTyped* getObject() const { return object; }
|
||||
virtual void traverse(TIntermTraverser*);
|
||||
void setExport() { linkType = ELinkExport; }
|
||||
protected:
|
||||
TIntermTyped* object;
|
||||
TString method;
|
||||
TLinkType linkType;
|
||||
};
|
||||
|
||||
//
|
||||
|
|
@ -1700,6 +1707,9 @@ public:
|
|||
const TPragmaTable& getPragmaTable() const { return *pragmaTable; }
|
||||
void setSpirvInstruction(const TSpirvInstruction& inst) { spirvInst = inst; }
|
||||
const TSpirvInstruction& getSpirvInstruction() const { return spirvInst; }
|
||||
|
||||
void setLinkType(TLinkType l) { linkType = l; }
|
||||
TLinkType getLinkType() const { return linkType; }
|
||||
protected:
|
||||
TIntermAggregate(const TIntermAggregate&); // disallow copy constructor
|
||||
TIntermAggregate& operator=(const TIntermAggregate&); // disallow assignment operator
|
||||
|
|
@ -1711,6 +1721,7 @@ protected:
|
|||
bool debug;
|
||||
TPragmaTable* pragmaTable;
|
||||
TSpirvInstruction spirvInst;
|
||||
TLinkType linkType = ELinkNone;
|
||||
};
|
||||
|
||||
//
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue