Non-Functional: Add postprocess as more robust way to add capabilities

When capabilities are needed for specific SPIR-V instructions, it is
fragile to do so based on GLSL/AST usage; it should be based on actual
instructions they got translated to.
This commit is contained in:
John Kessenich
2018-08-03 15:56:12 -06:00
parent e99a26810f
commit f04c51b3bd
5 changed files with 178 additions and 54 deletions

View File

@@ -563,9 +563,15 @@ public:
// based on the type of the base and the chain of dereferences.
Id accessChainGetInferredType();
// Remove OpDecorate instructions whose operands are defined in unreachable
// blocks.
void eliminateDeadDecorations();
// Add capabilities, extensions, remove unneeded decorations, etc.,
// based on the resulting SPIR-V.
void postProcess();
// Hook to visit each instruction in a block in a function
void postProcess(Instruction& inst);
// Hook to visit each instruction in a reachable block in a function.
void postProcessReachable(Instruction& inst);
void dump(std::vector<unsigned int>&) const;
void createBranch(Block* block);