JuliaGPU / Vulkan.jl

Using Vulkan from Julia
Other
109 stars 12 forks source link

[docs] Add the venerable&useful "minimal compute example" #34

Closed exaexa closed 2 years ago

exaexa commented 2 years ago

Also shows how to use glslang to compile shaders, closing #33 . Comments and code styling hints very welcome.

I'm not sure how much the use of glslangValidator is actually portable between platforms; I wanted to avoid temporary files. Let me know if there's a better way to do that.

exaexa commented 2 years ago

Very well written, thanks! The docs don't build at the moment, trying to fix that (would be nice to preview the rendered version before we merge)

Thanks for the notes, I found the error, will push a fix in a few minutes.

serenity4 commented 2 years ago

Thanks for the notes, I found the error, will push a fix in a few minutes.

Cool, I wasn't sure it is related to this PR so I commented out some documentation code on master that requested an extension not available in the SwiftShader driver (as I ran into a few cases already where it could get a driver stuck).

exaexa commented 2 years ago

Re build problem: it seems that piping the shader into glslang validator just somehow doesn't work from within documenter (not even on my machine, even though executing the .jl manually works right). It should be fixed now, or at least it builds OK here.

exaexa commented 2 years ago

oh great we've got a :heavy_check_mark: :] Thanks for the file handling suggestions, looks better indeed.

serenity4 commented 2 years ago

Nice, there are a couple of unresolved comments, after that we're good!

exaexa commented 2 years ago

OK I guess all is okay now. I tried to reword the gc comments a bit so that the danger is more obvious to people who do this first time; feel free to kick out the reword commit if I got it wrong. :D

exaexa commented 2 years ago

Ah wow, I completely missed those, sorry. So now hopefully everything. :D

exaexa commented 2 years ago

Great! I'm hoping that, among others, this will help me when I'm searching how to bootstrap some vulkan stuff again :D