Automate pod arg implementation decision (#575)
Contributes to #529
* Decision made on a per-kernel basis
* New pass assigns metadata to kernels
* passes use that metadata through new utliities to get the right
ArgKinds
* currently only decides based on command line options (so NFC)
* Refactored layout validation into new files
* Refactored some global push constant methods
* new enum for how pod args are implemented
* kGlobalPushConstant will be implemented in the future
* added new metadata to test that required it
* changed arg kind utility to take the arg instead of just the type
* Priorities per-kernel push constants then ubo then ssbo
* checks for compatibility
* Added new variant of isValidExplicitLayout that checks the whole
struct
diff --git a/lib/Passes.cpp b/lib/Passes.cpp
index dae883d..d7bc38e 100644
--- a/lib/Passes.cpp
+++ b/lib/Passes.cpp
@@ -18,6 +18,7 @@
void initializeClspvPasses(PassRegistry &r) {
initializeAddFunctionAttributesPassPass(r);
+ initializeAutoPodArgsPassPass(r);
initializeAllocateDescriptorsPassPass(r);
initializeClusterModuleScopeConstantVarsPass(r);
initializeClusterPodKernelArgumentsPassPass(r);