Daxa 4.0 Ideas
Making incremental changes is becoming difficult and ugly. Some choices were made for the c but especially the c++ api that are not great anymore. A large breaking change could fix a lot of issues with the current api.
Issues/Ideas:
- stl use in public c++ api
- massive compile time slowdown
- bad debug performance
- minimize headers, fwrd declare as much as possible
- error handling
- exceptions are not well liked, cause some minor annoying issues
- some c api functions return results but the c++ counter part does not
- unify error handling between c and c++ api
- improve error type in c++, have a TResult and TError parameters
- remove deprecated api parts
- TaskGraph (maybe this is better suited for a 3.x version?)
- standalone TaskImage and TaskBuffer are very strange
- should own resources per default
- should only optionally wrap an external resource
- should be tied to some sort of pool or manager (maybe tie them to taskgraphs?)
- Make TaskAccess's able to be or'ed
- General API
- remove instance, make it fully hidden. Give each application one static daxa vulkan instance
- need to rethink bindless image handles, possibly remove all image view api
threadable SPIR-V compilation utility optional/simpler dependency handling
Redesign swapchain creation API. Recently #99 was merged which allowed for you to use the correct display transform when writing to the swapchain, but if you want proper HDR support, you still can't select a surface format based on its color space.
I added a terrible "solution" at work, which is to pass color space to the selector. We instead should remove the selector entirely, in favor of a DeviceInfo2 style selection.
That being said, I believe more thought needs to be put into supporting external swapchain images and presentation (maybe external images entirely, but that's a completely different topic). My main use-case for this would be the frame-gen APIs. To my knowledge, FSR3 frame gen needs to handle the swapchain and presentation itself.
add tg managed persistent resources
Tg simplification: only track mip levels, not array layers, move layer tracking to bitfields for simpler slicing
remove puch constant size from pipeline creation, always use 128 bytes
There is too much boilerplate to declare an inline task.
daxa::inl_attachment(daxa::TaskImageAccess::COMPUTE_SHADER_STORAGE_READ_WRITE, task_swapchain_image),
should be much shorter, maybe something like:
daxa::AtComputeShaderStorageRW, task_swapchain_image),
Add daxa::TrasnferMemoryPool docs