-
Notifications
You must be signed in to change notification settings - Fork 938
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
Remove exposed C symbols from renderpass/computepass recording #5409
Conversation
I think Firefox relies on this, so we can't back this out without confirming with them. |
Pulled firefox source now to have a look at: Firefox has its own ffi layer https://hg.mozilla.org/mozilla-central/file/tip/gfx/wgpu_bindings/src/command.rs which again falls the methods from But best for some Mozilla folk to chime in and confirm. @jimblandy maybe since you commented on that ticket before? |
The However, it seems like Firefox is still using |
I assume resolving this issue requires all |
thank you! I have some ongoing work that requires changes to the compute functions specifically in compute & render (follow-up to #5432 ) so I'll change this PR to clean up only those and we can take bundles at a later point in time. |
all done and cleaned-up. Removed all FFI code now from compute & render, but didn't touch the bundle interface. |
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.
Amazing!
Blocked on #5549 |
wgpu::ComputePass
)
#5432
Connections
Description
There was a seemingly random assortment of C symbols exported from wgpu around command encoding. The C methods were already hardly usable since they first require initialization of objects that can only be created from Rust.
I noticed this a few weeks prior as unintentionally exported symbols on applications and libraries that use wgpu and the issue described in #3105 is caused by this.
The wgpu crate's wgpu-core implementation as well as
wgpu-native
rely on these methods, but not the fact that they're exported and#[no_mangle]
.Removing the FFI opens a few small clean-up opportunities and less unsafe code here.
EDIT: This PR leaves intentionally leaves out bundles because firefox still relies on this. See comment below
Testing
It compiles!
The real test here is the review - am I missing something and these need to stick around?
Checklist
cargo fmt
.cargo clippy
. If applicable, add:--target wasm32-unknown-unknown
--target wasm32-unknown-emscripten
cargo xtask test
to run tests.CHANGELOG.md
. See simple instructions inside file.