4 ms·
I'm sooooo tired of this carve things up into functions cargo cult. Go grab a Vulkan tutorial, and try to understand the logical flow. Good luck. All the Vul
by bsder 7y ago
I'm sooooo tired of this carve things up into functions cargo cult.
Go grab a Vulkan tutorial, and try to understand the logical flow. Good luck.
All the Vulkan tutorials atomize things into functions because it "encapsulates" actions into "easier to understand" pieces.
And then creates a mutable uber-object that holds a whole bunch of Vulkan handles that needs to get passed to every function so you don't know who is updating what and when.
But, hey, writing that as a 1500 line single function where you only expose the variables as you need them is far too complex for us mere mortals to read. <rolls eyes>
- thrower123 7y agoSo, they're advising to recreate a custom version of the old OpenGL statemachine?
- bsder 7y agoThat's the result, but it's not their intent. The problem is that Vulkan requires about 1500 lines of boilerplate to put a simple triangle on the screen. The issue is that you have to wire as much as possible up statically so the graphics hardware can fly once you start feeding it vertex information. However, for someone who doesn't need maximum performance, the setup boilerplate is a nuisance as Vulkan doesn't do the idea of "sensible default". So, everybody tries to "encapsulate" this boilerplate. The problem is that this obscures the fact that you are setting up things which have distinct dependency orders. And sometimes those orders are different depending upon what you are trying to do. If you already understand advanced graphics card hardware, dependency encapsulation is great. If you really don't yet have the ideas of things like subpasses, pipelines, graphics queues, and queue synchronization really crystal clear, you don't want things abstracted as you are still experimenting and prodding the code in weird ways.