HLSL: HS return is arrayed to match SPIR-V semantics
HLSL HS outputs a per ctrl point value, and the DS reads an array of that type. (It also has a per patch frequency). The per-ctrl-pt frequency is arrayed on just one side, as opposed to SPIR-V which is arrayed on both. To match semantics, the compiler creates an array behind the scenes and indexes it by invocation ID, assigning the HS return value to it.
This commit is contained in:
parent
7afe1344ca
commit
e752f463c5
6 changed files with 477 additions and 382 deletions
|
|
@ -80,6 +80,7 @@ public:
|
|||
void handleFunctionDeclarator(const TSourceLoc&, TFunction& function, bool prototype);
|
||||
TIntermAggregate* handleFunctionDefinition(const TSourceLoc&, TFunction&, const TAttributeMap&, TIntermNode*& entryPointTree);
|
||||
TIntermNode* transformEntryPoint(const TSourceLoc&, TFunction&, const TAttributeMap&);
|
||||
void handleEntryPointAttributes(const TSourceLoc&, TFunction&, const TAttributeMap&);
|
||||
void handleFunctionBody(const TSourceLoc&, TFunction&, TIntermNode* functionBody, TIntermNode*& node);
|
||||
void remapEntryPointIO(TFunction& function, TVariable*& returnValue, TVector<TVariable*>& inputs, TVector<TVariable*>& outputs);
|
||||
void remapNonEntryPointIO(TFunction& function);
|
||||
|
|
@ -283,6 +284,9 @@ protected:
|
|||
|
||||
void finish() override; // post-processing
|
||||
|
||||
// Linkage symbol helpers
|
||||
TIntermSymbol* findLinkageSymbol(TBuiltInVariable biType) const;
|
||||
|
||||
// Current state of parsing
|
||||
struct TPragma contextPragma;
|
||||
int loopNestingLevel; // 0 if outside all loops
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue