Live data from Hacker News

Simplifying Vulkan one subsystem at a time

khronos.org

81–90 of 200 posts

Re: Simplifying Vulkan one subsystem at a time

#81

I suspect we are only 5-10 years away until Vulkan is finaly usable. There are so many completely needlessly complex things, or things that should have an easy-path for the common case. BDA, dynamic rendering and shader objects almost make Vulkan bearable. What's still sorely missing is a single-line device malloc, a default queue that can be used without ever touching the queue family API, and an entirely descriptor…

I use Vulkan on a daily basis. Some examples:

- with DXVK to play games - with llama.cpp to run local LLMs

Vulkan is already everywhere, from games to AI.

Re: Simplifying Vulkan one subsystem at a time

#82
post #10

At least they are making an effort to correct the extension spaghetti, already worse than OpenGL. Addiitionally most of these fixes aren't coming into Android, now getting WebGPU for Java/Kotlin[0] after so many refused to move away from OpenGL ES, and naturally any card not lucky to get new driver releases. Still, better now than never. [0] - https://developer.android.com/jetpack/androidx/releases/webg...

As someone from game development, not supporting Vulkan on Android and sticking with OpenGL ES instead is a safer bet. There is always some device(s) that bug out on Vulkan badly. Nobody wants to sit and find workarounds for that obscure vendor.

Re: Simplifying Vulkan one subsystem at a time

#83
post #74

Uuugh, graphics. So many smart people expending great energy to look busy while doing nothing particularly profound. Graphics people, here is what you need to do. 1) Figure out a machine abstraction. 2) Figure out an abstraction for how these machines communicate with each other and the cpu on a shared memory bus. 3) Write a binary spec for code for this abstract machine. 4) Compilers target this abstract machine. 5)…

It sounds like webgl + wasm.

Re: Simplifying Vulkan one subsystem at a time

#84
post #41

I wish they would just allow us to push everything to GPU as buffer pointers, like buffer_device address extension allows you to, and then reconstruct the data to your required format via shaders. The GPU programming seems to be both super low level, but also high level, cause textures and descriptors need these ultra specific data format's, and then the way you construct and upload those formats are very complicated…

I also want what you're describing. It seems like the ideal "data-in-out" pipeline for purely compute based shaders.

I've brought it up several times when talking with folks who work down in the chip level for optimizing these operations and all I can say is, there are a lot of unforeseen complications to what we're suggesting.

It's not that we can't have a GPU that does these things, it's apparently more of a combination of previous and current architectural decisions that don't want that. For instance, an nVidia GPU is focused on providing the hardware optimizations necessary to do either LLM compute or graphics acceleration, both essentially proprietary technologies.

The proprietariness isn't why it's obtuse though, you can make a chip go super-duper fast for specific tasks, or more general for all kinds of tasks. Somewhere, folks are making a tradeoff of backwards compatibility and supporting new hardware accelerated tasks.

Neither of these are "general purpose compute and data flow" focuses. As such, you get the GPU that only sorta is configurable for what you want to do. Which in my opinion explains your "GPU programming seems to be both super low level, but also high level" comment.

That's been my experience. I still think what you're suggesting is a great idea and would make GPU's a more open compute platform for a wider variety of tasks, while also simplifying things a lot.

Re: Simplifying Vulkan one subsystem at a time

#85

Earlier quoted context omitted.

Debian updates even less frequently than Ubuntu and stays with years old versions of packages. If you're looking for fresh, Debian is not it. Maybe Arch?

Yeah, the folks in here recommending Debian as a solution to this problem are insane. I love Debian, it's a great distro. It's NOT the distro I'd pick to drive things like my laptop or personal development machine. At least not if you have even a passing interest in: - Using team communication apps (slack/teams/discord) - Using software built for windows (Wine/Proton) - Gaming (of any form) - Wayland support (or any…

I think Debian Stable, Ubuntu LTS, and derivatives thereof are particularly poor fits for general consumers who are more likely to try to run the OS on a random machine they picked up from Best Buy that’s probably built with hardware that kernels any older than what ships in Fedora are unlikely to support.

The stable/testing/etc distinction doesn't really help, either, because it's an alien concept to those outside of technical spheres.

I strongly believe that the Fedora model is the best fit for the broadest spread of users. Arch is nice for those capable of keeping it wrangled but that's a much smaller group of people.

Re: Simplifying Vulkan one subsystem at a time

#86

Vulkan takes like 600+ lines to do what Metal does in 50. I'm sure the comments will be all excuses and whys but they're all nonsense. It's just a poorly thought out API.

Agreed. It has way too much completely unnecessary verbosity. Like, why the hell does it take 30 lines to allocate memory rather than one single malloc.

Re: Simplifying Vulkan one subsystem at a time

#87
post #21

Earlier quoted context omitted.

Vulkan is by far the most powerful and the most pain in the ass API I've ever worked with. I agree on every point you just made.

Isn't the idea that 99% of people use a toolkit atop of Vulkan? Like, these days game devs just use Unreal Engine, which abstracts away having to work with the PS5 / PS4, DirectX 12, and Vulkan APIs. I imagine unless it's either for A. edification or B. very bespoke purpose code, you're not touching Vulkan.

>Like, these days game devs just use Unreal Engine

This is not true in the slightest. There are loads of custom 3D engines across many many companies/hobbyists. Vulkan has been out for a decade now, there are likely Vulkan backends in many (if not most) of them.

Re: Simplifying Vulkan one subsystem at a time

#88

Earlier quoted context omitted.

Isn't that what the Zink, ANGLE, or GLOVE projects meant to provide? Allow you to program in OpenGL, which is then automatically translated to Vulkan for you.

Those are mostly designed for back porting and not new projects. OpenGL is dead for new projects.

Wasn't it announced last year that it was getting a new mesh shader extension?

Re: Simplifying Vulkan one subsystem at a time

#89

Vulkan takes like 600+ lines to do what Metal does in 50. I'm sure the comments will be all excuses and whys but they're all nonsense. It's just a poorly thought out API.

Same with DirectX, if only COM actually had better tooling, instead of pick your adventure C++ framework, or first class support for .NET.

Re: Simplifying Vulkan one subsystem at a time

#90

Earlier quoted context omitted.

> WebGL worked perfectly fine without them Except it didn't. In the GL programming model it's trivial to accidentially leak the wrong granular render state into the next draw call, unless you always reconfigure all states anyway (and in that case PSOs are strictly better, they just include too much state). The basic idea of immutable state group objects is a good one, Vulkan 1.0 and D3D12 just went too far (while the…

> Except it didn't. In the GL programming model it's trivial to accidentially leak the wrong granular render state into the next draw call This is where I think Vulkan and WebGPU are chasing the wrong goal: To make draw calls faster. What's even faster, however, is making fewer draw calls and that's something graphics devs can easily do when you provide them with tools like multi-draw. Preferably multi-draw that allo…

Agreed, this is the console approach with command buffers that get DMAed, and having more code on the GPU side.
Post reply on HN