Hacker News new | ask | show | jobs
by electricslpnsld 2878 days ago
Interesting, thanks for the clarification! Any idea as to the advantages of using these bindings vs. the Molten bindings, if one isn't using Rust?
2 comments

I think -- and I could be wrong here -- that gfx-rs aims to eventually implement Vulkan on D3D12 in addition to Metal, while MoltenVK only aims to work on Metal.
I don't know about the MoltenVK branding specifically, but Khronos does plan a "Universally portable subset" of Vulkan with tools to target both Metal and D3D12 from one rendering codebase and common SPIR-V shaders.

The project is call Vulkan Portability Initiative:

https://www.khronos.org/blog/khronos-announces-the-vulkan-po...

If I understood correctly, gfx-rs aims to provide an implementation for that initiative. Khronos only announced it in concept, they didn't implement it.
Both gfx-rs and MoltenVK are in that technical subgroup within Khronos.
Are there any D3D12 platforms that don't also support Vulkan?
Windows, partially. Vulkan can be used in classic win32 apps but not in "modern" UWP apps.

The Xbox One uses a variant of D3D12 and doesn't support Vulkan at all.

> Vulkan can be used in classic win32 apps but not in "modern" UWP apps.

Why is this/how do they enforce that?

The Xbox is hardly a surprise, but then again you're only going to target that for games so it's less of a problem.

> Why is this/how do they enforce that?

Technically Windows doesn't support Vulkan at all, but the openness of the win32 platform allowed Khronos to define a "backdoor" interface where the application ignores the Windows graphics stack and instead gets a Vulkan context by talking to the graphics driver directly. The UWP sandbox makes this impossible so you're stuck with the native Direct3D APIs.

I don't think UWP with Vulkan is completely impossible.

https://github.com/KhronosGroup/Vulkan-Docs/issues/366

It doesn't exist now though for sure, so for all practical purposes UWP locks developers out of using Vulkan.

Ahh, I had no idea UWP implied running on microsoft's terms. Is there a way to run them out of the sandbox manually?
Older Intel chips (pre-Skylake IIRC) don’t have Vulkan support on Windows, even though they do on Linux.
I am not completely sure, but I can imagine XBox One.
gfx-rs Metal backend can be powerful and faster