Description
It is no secret that the continued support for ancient fossilised hardware has caused various issues and stalled progress (see e.g: #1567 and #1587). It also seems that such support in the OpenGL renderer isn't going away anytime soon.
As such, I make the following proposal to project head @illwieckz to resolve this problem in a way that would benefit everyone involved:
1. General
This describes the steps towards the creation of a Vulkan-based Daemon derivative that can be readily swapped with it. There are 2 main ways of structuring it in relation to Daemon that I think would work well:
- Both repositories use a common base. Changes that do not pertain to the renderer or only pertain to the API/ABI would be simply merged from one into the other. This has the potential added benefit that non-ABI/non-API changes could be tested more rapidly in one of the versions, while keeping the other as a more stable backup (see section 3 about the more rapid distribution).
- Both renderers are loaded as dlls. This might require more work to separate out the renderer parts.
In either case these would be 2 different repositories, because I want to avoid cmake hell and submodules, plus this would be a very clean solution to having renderer-specific issues, since they would use separate issue trackers and therefore would be easy to keep track of. Also, the main repository then wouldn't be receiving constant changes and a barrage of Vulkan-specific issues burying everything else, which are sure to follow for some time after beginning such a development.
Additionally, I would need to separate out some of the code into the shared renderer part. E. g. splitting the lightmapping shader, so there would be one shared part that would just take API-agnostic input, one GL part to process those inputs from how they're stored with GL, and one Vulkan part to process the inputs from how they'd be stored with Vulkan; that is just an example though, the actual split of shared vs data input would need to be pretty sane to avoid a lot of duplication, plus likely some macros or something for things that are used in the middle of the shader code multiple times.
This also would make it a lot more visible, instead of just burying it somewhere in the settings, where it would be easily overlooked, at least after some initial post announcing it once it's in a working condition.
2. Project organisation
I would have the ultimate authority on how the Vulkan renderer is developed. This includes:
- Deciding if something is to be merged/not merged into or reverted from the Vulkan renderer, the shared renderer parts or elsewhere that would affect the Vulkan renderer (e. g. functions that call into the Vulkan renderer), regardless of reviews/comments/etc.
- Ignoring the 24-hour merge rule for the Vulkan renderer, the shared renderer parts or elsewhere that would affect the Vulkan renderer (we should just get rid of this rule in general too I think, I've never seen it being useful for anything).
- Addition, removal, changes of the Vulkan renderer's development direction, supported features, supported hardware.
- Build system/github/organisational changes on the Vulkan renderer repository.
- Documentation of the Vulkan renderer, the shared renderer parts or elsewhere that would affect the Vulkan renderer in whatever way I see fit.
- Changes to Unvanquished and dpks distributed with it that have to do with the Vulkan renderer (e. g. Vulkan-specific settings or presets), which includes deciding on merging/not merging/reverting, ignoring the 24-hour merge rule, documentation, that pertain to the Vulkan renderer.
3. Distribution
The Vulkan-based derivative (name pending) would be distributed alongside Daemon in the updater, as a separate binary. This would make it easy to both avoid disk space pollution by using only one or the other, as well as provide the option of using both to those who would like to have a fallback (in which case both can exist in the same directory).
This would also help with getting bug reports from players, which is an important concern I've seen from people who've hosted Tremulous servers for a long time, because there's a pretty high likelihood that if you asked someone, "Which rendering API are you using?" it would be met with a "wtf is that?", whereas "Are you using Daemon or [Vulkan binary]?" is a lot more straightforward.
That is, of course, something that would more so work with option 1 in section 1.
The updater would allow updating it without requiring an update to Unvanquished/Daemon.
The same binary would also be distributed as part of the universal zip.
I don't know what Daemon does for distributing through package systems, like Flatpak, so I don't yet have anything concrete for that.
4. Versioning
The Vulkan renderer would have a separate versioning system from Daemon, and I would have the ultimate authority on said system (this ties in to section 2.3). This version is to be displayed in the updater as well.
Given @illwieckz's words about wanting experts to lead their areas, which according to various people would be me in this case, I believe this would be a very reasonable way to both do some rapid improvements, test them without waiting for a long time for release, while providing a more stable version at the same time, and backport those changes where possible.