pouët.net

Demos using Vulkan

category: code [glöplog]
or just look at a vulkan hellotriangle.cpp... but it all goes uphill from there!
Resurrecting old thread because one liner. Also this video seems to strongly suggest the cost is not nearly as high as conventional wisdom suggests, but that’s for a whole freaking game engine.
added on the 2020-02-07 17:36:29 by QUINTIX QUINTIX
What?

Quote:

... this. to build something based on vulkan (or d3d12 for that matter) requires tremendous extra effort that almost certainly won't pay off in the end in terms of actual rendering performance improvements in typical demo scenarios.


From my experience, D3D12 *feels* actually simpler...

No more SRV/RTV/UAV handling... create them as needed and forget about them, just splay them on the heap. I've never tried Vulkan, but D3D12 has the D3D9 feeling of just shit-out-that-primitives[TM]. Resource management is so dead simple, even D3D9 or legacy GL seems like rocket science. Samplers? Easy. Shaders? Easy. Binding this to that? Easy. And those annoying constant buffers? Easy now. The only thing you don't have is automatic mipmap generation - I think Vulkan has that - but how hard is it to render from one level to another level of a texture... 50 lines of code and you are done.

Resource management: no, it's not that hard to have an array of:
can-delete-resource-if-frame-count-is-greater-than-this-frame-plus-two[tm]

Setting up D3D12 is simpler than D3D11. D3D11CreateDeviceAndSwapChain is wrong - end of story. A *correct* D3D11 setup takes way more lines than D3D12 - anyone into IDXGIFactory6 and EnumAdapterByGpuPreference and query proper factory from adapter and so forth and going fullscreen correctly? Just check https://github.com/microsoft/DirectX-Graphics-Samples/tree/master/Samples/Desktop/D3D12HelloWorld - especially the frame buffering sample, once you wrapped that few lines in some functions, you are ready to go.

Yes, root signatures are annoying to death - but I think every API has some quirks. But it's not that bad, from testing, even "overdimensioned" root signatures work out well. And root constants are nice - because D3D12 manages the versioning of them. At the end, you have way simpler code, but that code is less forgiving if something goes wrong. D3D12 rocks, give it try. I think Vulkan is the in the same lines, but with a schwuler API?

P.S. I don't understand why people switch to the compute pipeline when generating mipmaps (see rant above). Even on Radeon VII (Vega - compute monster) it was faster to do mipmaps on the render pipeline and feed compute with something other - or I've done some things wrong. But I thing the resource transition from UAV to SRV is way more costly than RTV to UAV?
added on the 2020-02-07 20:16:50 by EvilOne EvilOne
Sorry to resurrect an old thread. Shame on QUINTIX...
added on the 2020-02-07 20:18:35 by EvilOne EvilOne
Boah... I mean RTV to SRV. Thank you, Gin Tonic :-/
added on the 2020-02-07 20:21:21 by EvilOne EvilOne

login