Pure Texture to Sampled Texture Transform
Adds a transformation step to the post processing step. Two modes are available: 1) keep - Keeps samplers, textures and sampled textures as is 2) transform pure texture into sampled texture and remove pure samplers - removes all pure samplers - transforms all pure textures into its sampled counter part Change-Id: If54972e8052961db66c23f4b7e719d363cf6edbd
This commit is contained in:
parent
d6af18f621
commit
baf570efa5
9 changed files with 159 additions and 2 deletions
|
|
@ -182,7 +182,8 @@ public:
|
|||
useUnknownFormat(false),
|
||||
hlslOffsets(false),
|
||||
useStorageBuffer(false),
|
||||
hlslIoMapping(false)
|
||||
hlslIoMapping(false),
|
||||
textureSamplerTransformMode(EShTexSampTransKeep)
|
||||
{
|
||||
localSize[0] = 1;
|
||||
localSize[1] = 1;
|
||||
|
|
@ -233,6 +234,7 @@ public:
|
|||
bool usingStorageBuffer() const { return useStorageBuffer; }
|
||||
void setHlslIoMapping(bool b) { hlslIoMapping = b; }
|
||||
bool usingHlslIoMapping() { return hlslIoMapping; }
|
||||
void setTextureSamplerTransformMode(EShTextureSamplerTransformMode mode) { textureSamplerTransformMode = mode; }
|
||||
|
||||
void setVersion(int v) { version = v; }
|
||||
int getVersion() const { return version; }
|
||||
|
|
@ -472,6 +474,7 @@ protected:
|
|||
void pushSelector(TIntermSequence&, const TVectorSelector&, const TSourceLoc&);
|
||||
void pushSelector(TIntermSequence&, const TMatrixSelector&, const TSourceLoc&);
|
||||
bool specConstantPropagates(const TIntermTyped&, const TIntermTyped&);
|
||||
void performTextureUpgradeAndSamplerRemovalTransformation(TIntermNode* root);
|
||||
|
||||
const EShLanguage language; // stage, known at construction time
|
||||
EShSource source; // source language, known a bit later
|
||||
|
|
@ -536,6 +539,8 @@ protected:
|
|||
std::unordered_set<int> usedConstantId; // specialization constant ids used
|
||||
std::set<TString> semanticNameSet;
|
||||
|
||||
EShTextureSamplerTransformMode textureSamplerTransformMode;
|
||||
|
||||
private:
|
||||
void operator=(TIntermediate&); // prevent assignments
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue