HLSL: matrix swizzle (_12, _m23) syntax, partial semantics.
This partially addressess issue #670, for when the matrix swizzle degenerates to a component or column: m[c], m[c][r] (where HLSL swaps rows and columns for user's view). An error message is given for the arbitrary cases not covered. These cases will work for arbitrary use of l-values. Future work will handle more arbitrary swizzles, which might not work as arbitrary l-values.
This commit is contained in:
parent
913e3b686a
commit
001dfa1c5c
6 changed files with 367 additions and 62 deletions
|
|
@ -97,6 +97,8 @@ public:
|
|||
TIntermAggregate* handleSamplerTextureCombine(const TSourceLoc& loc, TIntermTyped* argTex, TIntermTyped* argSampler);
|
||||
|
||||
bool parseVectorFields(const TSourceLoc&, const TString&, int vecSize, TVectorFields&);
|
||||
bool parseMatrixComponents(const TSourceLoc&, const TString&, int cols, int rows, TMatrixComponents&);
|
||||
int getMatrixComponentsColumn(int rows, const TMatrixComponents&);
|
||||
void assignError(const TSourceLoc&, const char* op, TString left, TString right);
|
||||
void unaryOpError(const TSourceLoc&, const char* op, TString operand);
|
||||
void binaryOpError(const TSourceLoc&, const char* op, TString left, TString right);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue