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/DirectResourceAccessPass.cpp b/lib/DirectResourceAccessPass.cpp
index b6d1032..4f36567 100644
--- a/lib/DirectResourceAccessPass.cpp
+++ b/lib/DirectResourceAccessPass.cpp
@@ -105,7 +105,7 @@
bool Changed = false;
int arg_index = 0;
for (Argument &arg : fn->args()) {
- switch (clspv::GetArgKindForType(arg.getType())) {
+ switch (clspv::GetArgKind(arg)) {
case clspv::ArgKind::Buffer:
case clspv::ArgKind::BufferUBO:
case clspv::ArgKind::ReadOnlyImage: