HLSL: cast non-int types to uint on Load/Store indexes

Some texture and SB operations can take non-integer indexes, which should be
cast to integers before use if they are not already.  This adds makeIntegerIndex()
for the purpose.  Int types are left alone.

(This was done before for operator[], but needs to apply to some other things
too, hence its extraction into common function now)
This commit is contained in:
steve-lunarg
2017-04-20 09:00:56 -06:00
parent 670271890d
commit f8203a0acd
6 changed files with 453 additions and 91 deletions

View File

@@ -250,6 +250,7 @@ protected:
TVariable* getSplitIoVar(int id) const;
void addInterstageIoToLinkage();
void addPatchConstantInvocation();
TIntermTyped* makeIntegerIndex(TIntermTyped*);
void fixBuiltInIoType(TType&);