from Hacker News

Vulkan Memory Allocator

by fctorial on 7/21/21, 8:44 AM with 108 comments

  • by flohofwoe on 7/21/21, 10:32 AM

    This is a fairly well known project which fixes one of Vulkan's greatest shortcomings (some might say the lack of resource memory management is one of Vulkan's greatest features though), but I wonder if there are alternatives which provide most of the critical features but with a much smaller footprint. VMA is around 20kloc, which is about the same as jemalloc (23kloc). A general purpose allocator like jemalloc is overkill for many situations, but there are much smaller (yet slower) alternatives like Emscripten's emmalloc (which is just 1.4 kloc: https://github.com/emscripten-core/emscripten/blob/main/syst...).

    Are there similar smaller alternatives for VMA?

    As for the motivation: my 3D API wrapper around OpenGL, D3D11, Metal and WebGPU clocks in at 15kloc for all 3D backends, I'm hesitant to add a Vulkan backend exactly for problems like doing my own memory management for Vulkan resources. If I would integrate VMA, this would more than double the line count just for the memory management of a single 3D backend which simply doesn't seem "right". See: https://github.com/floooh/sokol/blob/master/sokol_gfx.h

  • by Ostrogodsky on 7/21/21, 2:36 PM

    Somewhat related I hope. Does anyone know a resource guide to learn methodically about GPUs? Let me see if I can explain my frustrations:

    1. The usual recommended books for beginners, although good miss what I need, yes I love building ray-tracers and rasterizers but I can finish the book and not have the slightest idea about how a GPU actually works

    2. Books like H&P although excellent, treat GPUs as an after-thought in 1 extra chapter, and even the content is like 5-10 years behind.

    3. The GPU gems series are too advanced for me, I get lost pretty quickly and quit in frustration

    4. Nvidia, AMD resources are 50% advertising, 50% hype and proprietary jargon.

    I suppose what I want does not exist, I want a guide that starting from a somewhat basic level (let's say assuming the reader took an undergraduate course in comp architecture) methodically explains how the GPU evolved into a complete separate type of computing architecture, how it works in the nitty gritty details, and how it is been used in different applications (graphics,ML,data processing, etc)

  • by flqn on 7/21/21, 10:59 AM

    Is this page completely broken for anyone else? After the fade-in animations, the whole page vanishes. Using Chrome, btw.