Hacker News new | ask | show | jobs
by jms55 741 days ago
> All those layers create problems. WGPU tries to support web browsers, Vulkan, Metal, DX11 (recently dropped), DX12, Android, and OpenGL. So it needs a big dev team and changes are hard. WGPU's own API is mostly like Vulkan - you still have to do your own GPU memory allocation and synchronization.

The first part is true, but the second part is not. Allocation and synchronization is automatic.

1 comments

Vulkan does not allocate GPU memory for you. Well, it gives you a big block, and then it's the problem of the caller to allocate little pieces from that. It's like "sbrk" in Linux/Unix, which gets memory from the OS. You usually don't use "sbrk" directly. Something like "malloc" is used on top of that.
Vulkan doesn't, but WebGPU does do synchronization and memory allocation for you.
WGPU or WebGPU? The former is the Rust crate being discussed in the quote.
Both.