vulkan: Split src/vulkan/util in three
The stuff in src/vulkan/util is no longer really utility code. It's core implementation code. In order to enable even more common Vulkan code, we really need to break up src/vulkan/util into three bits:
- src/vulkan/util
- vk_util.h
- vk_alloc.h
- vk_enum_to_str.py
- src/vulkan/dispatch
- All the dispatch take generators
- src/vulkan/runtime
- All the common objects like
vk_device
and friends - vk_log.c/h
- All the common objects like
The layers subdir needs to link against the first two and they shouldn't really need access to runtime/. The one exception here is that the autogenerated dispatch trampolines for instance versions of device functions need to access vk_device
. Probably they best thing to do there is to just let that bit of code-gen have a header dependency on runtime/. Another option would be to keep the generator in dispatch/ but invoke it from runtime/. There is also an autogenerated set of dispatch tables for vk_common_
; the generated files should be in runtime/ but the generator will live in dispatch/. This is the same as for drivers which have similar autogenerated tables.
This last one, the runtime, needs to be able to depend on NIR. I'd like to start building common pipeline code and we need to be able to link against NIR. We don't want the layers pulling in NIR.
While we're at it, we need you watch out for vk_enum_to_str.py. A bunch of stuff has been bolted on there which isn't enum_to_str
functions. Most of it probably belongs util but I'm not sure if it all does.