I'm slowly working through the vulkan spec writing a compute-only vulkan program from scratch that doesn't render anything, and it's going pretty well because the spec is really well written and I already know more or less exactly what I want to do anyway, but I just want to say just how silly (fun) it feels to write a program like this because you get to just skip over large swaths of the API.
Like, I'm working from the spec because the tutorials all make it more complicated.
I think it's cute that practically every vulkan command has one or more optional args to let you enter Hard Mode
(sorry for the double post, I added this to the wrong thread)
I wonder how many people have actually managed to knuckle down and write a complete, useful vulkan program from scratch (no copy pasting from tutorials and stack overflow, no offloading significant parts to 3rd party libraries like VMA)
To think if I power through and get this thing working I could potentially be like the 20th person to bother
@aeva @demofox @photex @dougbinks @Flux
absolutely. It is a pretty cool design.
It is a bit sad that OS design has evolved so little in the last 30 years that Plan9 still feels "out there", though :(
@demofox that makes sense. I think they should let you hire some minions, that's a lot for one person to do.
What sort of blue noises are we talking?
@hipsterelectron the downside though is it's exquisitely verbose and filled to the brim with footguns that are not likely to be obvious without some kind of relevant experience.
The situation is a bit better now because there's a number of great high quality libraries for doing various common tasks that compose well with one another, but I don't think we're quite at the point where it can fill all of OpenGL's niches yet.
@aeva it's also so verbose to please the hakf dozen IHVs who all have different underlying models.
I miss OpenGL ES.
@aeva this is actually one of the main things I've found myself praising Metal for as it seems so so much more concrete in its design guiding you towards how to do things rather than feeling like a pile of APIs without coherent and obvious bonds.
I could probably write a small little Metal app from scratch but I could never see myself doing that with Vulkan without at the very least using a helper wrapper library
@aeva tbh I tuned out of graphics APIs completely when webgl2, vulkan, metal, and webgpu all came out around the same time while at the same time Apple deprecated opengl
I dont have time for that shit
@aeva So for example, here's passing some buffers into a compute shader with my thing.
Associated struct definition:
https://github.com/jsimmons/narcissus/blob/main/title/shark-shaders/src/pipelines.rs#L238-L246
Dispatch:
https://github.com/jsimmons/narcissus/blob/main/title/shark/src/draw.rs#L940-L956
took me a couple days to go through a tutorial to get to one triangle—and not only was i too tired at the end to want to go further, i was also left with a pile of seemingly unanswerable questions:
mostly what and why about the bazillion configuration and extension options.
but also about gpu memory allocation, because the tutorial spent quite a lot of time on setting that up before saying "oh you would never want to do it like this in production" and nothing more.