-
Notifications
You must be signed in to change notification settings - Fork 122
add support for vulkan #91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
I wonder about your usecase could you please clarify how are you using a pure vulkan flag |
|
Right. My usecase is russelltg/wl-screenrec#90 I'll add some comments around that. Ideally those lifetimes would be bubbled up through the bindgen interfaces but I don't think that's possible. |
|
Added a good comment about why |
|
Weird, rustup failed? |
3c76b04 to
79d2728
Compare
|
Is there interest in this? If so, what is needed to move forward? I'd like to make a release of wl-screenrec with vulkan support and would prefer to not fork. |
|
All the build flags are working. I’m using vulkan accelerated decoders and encoders just fine with rust ffmleg sys |
|
The issue isn't with using the vulkan encoders/decoders, it's with calling the functions/using struct definitions in |
|
@dmtrKovalenko freshly rebased. Let me know if you have other thoughts on how this could be handled--I'd really like to be able to call those ffmpeg functions! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still do not understand why do you need ffmpeg sys to be dependent on ash if you can continue working with the ash types and call the functions directly.
The av api is build around the C pointers so you can perfectly fine call aw_hw_create_device with your ash returned pointer (let me know if You need an example I have it)
|
Please can you give me an example of a single function call that you can not call rn? |
|
I need bindings to the AVVulkanFramesContext, which has vulkan types within it. I could have ffmpeg-sys generate the bindings for the vulkan types itself, but ash already has good (ABI correct) bindings for all vulkan structs. I suppose it is just a few enum/typedefs then a void* to vulkan stuff, so I guess we could maybe get away with something more minimal for the moment? |
|
Bindings to AVVulkanDeviceContext (which I don't need right now, but may eventually...) is more complex and requires access to some vulkan structs. With this PR I figured I'd allow generating bindings to all the important structs in hwcontext_vulkan.h |
|
Same with AVVkFrame |
|
In addition to the structs, I need av_vkfmt_from_pixfmt |
|
Okay let's make the CI to pass, I'll run my test suite against this patch and if everything works alright we can merge it |
|
Ping on approving CI for this |
use `ash` for the vulkan types
|
Another gentle ping on this :). I can't publish the latest wl-screenrec release to crates.io unless I publish a fork, which I would really like to avoid... |
use
ashfor the vulkan types. Requires a bit of effort to rename the ash types.Alternative is just letting bindgen do it's thing and generate all of vulkan.h, but that feels pretty messy....