Device memory

Hello!

Is there function(-s) in Vulkan, that shows used or available device memory? For example we running several applications that use one GPU and I want to know, how much memory on this GPU my application can use right now.

Not that I know of. Only total memory amount of the (shared) memory heap.

Problem with such functions are, they lie as soon as they return.

Just allocate the memory you need, when you need it and it will either fail or succeed (and then wait for some to become available or just move on if you don’t necessarily need it to continue). It’s not really that different from what strategy you would do on CPU side (with e.g. C++).
Or use another API alongside Vulkan (or whatever you use), that can query that.

Thank you. I’ve got the point.