Validate device limits
We should validate that no operations exceed device limits. For instance, I just ran into an issue with too many local compute shader invocations, which caused VK_ERROR_DEVICE_LOST
without any information about what caused the issue (even with all Vulkan validation layers enabled).
It's unclear to me how exactly to achieve this, because we need to query the implementation for the device limits, so it seems difficult to have this information at the type level for validation with type families. One possibility is to have a "device limits" file which contains all the relevant constants needed to perform validation, which is generated using Template Haskell. This still incurs a heavy Vulkan dependency on the library itself (as opposed to the examples), so it may not be worth it.