vulkan-go / vulkan

Vulkan API bindings for Go programming language
MIT License
742 stars 55 forks source link

successful update to Vulkan version 1.3.239, working very reliably. #62

Open rcoreilly opened 2 years ago

rcoreilly commented 2 years ago

I added an UPDATING.md file that details what I did.

It builds, but crashes on my mac..

xlab commented 1 year ago

Hey! Thanks for the PR; I'll need some time to comprehend the changes :)

Few points: 1) moltenVK seems to have the support of 1.2, as stated on their GH. Need to check if that's true, also, not sure how much of a difference is between 1.2 and 1.3. Needs investigation

2) I am running macOS too, so will check the crashes

3) Did you try to generate using the latest c-for-go? I saw that you had to revert to the version from 2018.. Ideally if we debug crashing, better debug it using newer c-for-go ;)

4) Bazel seems like a good tool, but need to be sure that the package remains go-gettable. I'm fine if it's using tags (e.g. tags to switch between system-wide installation and provided artifacts).

Otherwise, good job on trying to keep this project up to date! Additional interest motivates me to return some day to these projects :D Spent too much time in the world of commercial development, time to revive hobby projects of the past, I guess...

rcoreilly commented 1 year ago

Yes I did have to revert to c-for-go 2018 -- I didn't try anything in between once the old version worked. There is some relevant discussion from another user in the issue there or a related issue -- I believe she reported it might have been fixed, but I haven't tried anything.

The good news not reflected in these PR comments perhaps is that everything is working quite reliably on a daily basis for my intensive use of the vulkan code, and across various collaborators and students on the 3 major platforms -- so from an empirical perspective, we're "all good" here! Would be great to get this stuff pushed upstream and supported with the latest c-for-go. I'll certainly be ready to give it a good test.

Here's my attempt to provide a layer on top of vulkan in case you're interested in taking a look at that: https://github.com/goki/vgpu -- your example code in asche was very helpful!

The last thing that we really need to make go-vulkan easily usable on mac is some easy way of installing the vulkan and molten-vk dependencies so that people don't have to download the SDK -- the homebrew effort on that front seems to have hit a wall of some sort..

tomas-mraz commented 1 year ago

Hi, Android mobile devices seem to be stuck on Vulkan 1.1 ... up to date SoC Snapdragon 695 (5G connectivity, 6nm lithography) https://www.qualcomm.com/products/application/smartphones/snapdragon-6-series-mobile-platforms/snapdragon-695-5g-mobile-platform What does it mean for compiling?

I have a working Linux pipeline on a shared GitLab runner to produce macOS binary using clang, llvm, ... https://github.com/tpoechtrager/osxcross https://github.com/phracker/MacOSX-SDKs and MoltenVK dylib library compiled before on macOS(friend's machine). Making it simpler will be fine :)

xlab commented 1 year ago

my intensive use of the vulkan code, and across various collaborators and students on the 3 major platforms -- so from an empirical perspective, we're "all good" here!

Glad it helps! Tbh originally I planned this project to be a great learning tool because the C++ primers for Vulkan were unreadable in 2016. Slowly but surely gets there :D

I will do my investigation, and then we can merge everything because I prefer practicality there over anything else. Even if that means I have to lock the generator using the version from 2018.

your example code in asche was very helpful!

Thanks! My heart melts :)

xlab commented 1 year ago

Hi, Android mobile devices seem to be stuck on Vulkan 1.1 ... up to date SoC Snapdragon 695 (5G connectivity, 6nm lithography) https://www.qualcomm.com/products/application/smartphones/snapdragon-6-series-mobile-platforms/snapdragon-695-5g-mobile-platform What does it mean for compiling?

I have a working Linux pipeline on a shared GitLab runner to produce macOS binary using clang, llvm, ... https://github.com/tpoechtrager/osxcross https://github.com/phracker/MacOSX-SDKs and MoltenVK dylib library compiled before on macOS(friend's machine). Making it simpler will be fine :)

I'll test on older Android devices to make sure. In any way, we can maintain BOTH 1.1 and 1.3 (tip), same way they do for opengl there https://github.com/go-gl/gl (sub ideal, but totally manageable)

johanhenriksson commented 1 year ago

This looks super promising! Any updates?

I will try to give it a test since im also on mac

xlab commented 1 year ago

Hey @rcoreilly I've added you as an owner to vulkan-go GitHub organisation, so you are actually free to create necessary repos to maintain Bazel platform artefacts there.

nergdron commented 5 months ago

any updates on what's going on with this PR or where it's headed? it'd be nice to get this stuff merged at some point, maybe with another update to match current vulkan releases, since it doesn't seem like the refactor xlabs was after is going to happen any time soon.