5 ms·
Writing an efficient Vulkan renderer (2020)
- shmerl 5y agoSlightly off-topic, but I recently saw a very interesting dive into comparing Vulkan to D3D12: https://themaister.net/blog/2021/11/07/my-personal-hell-of-translating-dxil-to-spir-v-part-3/ https://themaister.net/blog/2021/11/07/my-personal-hell-of-t...
- deleted 5y ago[deleted]
- dang 5y agoA small thread at the time: Writing an Efficient Vulkan Renderer - https://news.ycombinator.com/item?id=24368353 https://news.ycombinator.com/item?id=24368353 - Sept 2020 (2 comments)
- aliswe 5y agoHow about automating this functionality that youre currently doing manually?
- WithinReason 5y agoClick on the "past" link
- dang 5y agoI don't think it's so easy to automate. More likely we'll make it a community-collaborative feature.
- oddity 5y agoSadly, it's even more complicated than what's described here. There are a lot of undocumented fast paths and nonorthogonalities between features where you can really only learn about them by talking to your friendly neighborhood driver engineer in a backdoor conversation (that only a select few developers have access to). Otherwise, it's easy to miss a lot of spooky action at a distance. Vulkan and DX12 might have been sold as "low-level" APIs but they didn't (and can't) do much to address the fundamental economic issues that push hardware engineers to build patchwork architectures. I'm half of the opinion that writing an efficient Vulkan or DX12 renderer has not been and cannot be done. If you're not one of the developers shipping a AAA title with enough weight to get attention from the RGBs, you're probably better off going as bindless and gpu-driven as you can. It's not optimal (or entirely possible on some architectures), but it probably has the most consistent behavior across architectures when it's supported.
- dagmx 5y ago> get attention from the RGBs What is RGB in this context?
- thecompilr 5y agoProbably red green blue = amd nvidia intel
- dagmx 5y agoAh that makes sense.
- shmerl 5y agoIs Godot efficient enough? They are preparing to release their Vulkan based version. Vulkan drivers for AMD and Intel are also open source (at least for Linux), so developers can look into how things are implemented without asking for some special attention. Plus driver developers are pretty open to questions.
- oddity 5y agoFor most games that people might want to make with Godot, it's probably good enough. Not everything needs to be perf-optimal. Also, the driver source being open doesn't mean that all their secrets are too.
- shmerl 5y agoWhat do you mean by secrets? Mesa especially uses open development, so decisions about drivers are made in the open.
- oddity 5y agoEven if the driver were a thin layer over DMA talking to the hardware such that every button being pressed was obvious, the performance characteristics of the buttons the driver pushes are not unless you can see their RTL or otherwise know the right combination to push to hit the right potholes. Except, we're not in that situation, and even for mostly transparent drivers there can be an opaque firmware blob in between you and the hardware. Without changing the economics, pushing the API lower only pushes the implementation of the opaque behavior lower.
- andrewmcwatters 5y agoThe difference in between using Vulkan and using OpenGL 3.3/4.0+ Core Profile is quite significant. It's hard for me to be motivated to upgrade existing code.
- shmerl 5y agoThere is zink project to translate OpenGL into Vulkan. That should help maintain legacy cases in scenarios when OpenGL drivers will stop being supported.
- pjmlp 5y agoAs someone that only does 3D as hobby, it is hardly to even be motivated to learn it. GL and DX 11 will outlast my time on this sphere.