-
Notifications
You must be signed in to change notification settings - Fork 933
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 extern "C" from set_index_buffer #1077
Conversation
wgpu-core/src/command/bundle.rs
Outdated
@@ -1076,8 +1076,7 @@ pub mod bundle_ffi { | |||
.push(RenderCommand::SetPipeline(pipeline_id)); | |||
} | |||
|
|||
#[no_mangle] | |||
pub extern "C" fn wgpu_render_bundle_set_index_buffer( | |||
pub fn wgpu_render_bundle_set_index_buffer( |
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.
We should probably just make it a method on RenderBundleEncoder
then. No need for a standalone function, it's just confusing the reader.
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.
thank you!
bors r+
61: Update to latest wgpu-core r=kvark a=DevOrc Updates wgpu-core to [69196d8](gfx-rs/wgpu@69196d8) Notes: - Currently blocked by wgpu-core (see gfx-rs/wgpu#1077) - Updates the error handling as a result of (gfx-rs/wgpu#1034) - set_index_buffer requires an IndexFormat Co-authored-by: Noah Charlton <[email protected]>
677: Update to latest wgpu master r=kvark a=yzsolt - Update to latest `wgpu` master - Fix build error caused by gfx-rs/wgpu#1077 Co-authored-by: Zsolt Bölöny <[email protected]>
677: Update to latest wgpu master r=kvark a=yzsolt - Update to latest `wgpu` master - Fix build error caused by gfx-rs#1077 Co-authored-by: Zsolt Bölöny <[email protected]>
It's very odd to have almost all the render pass and compute pass ffi functions in `wgpu` except for the `set_index_buffer` functions, which live in Firefox. I'd like to remove these from Firefox and put them back next to their companions. These functions were originally removed from wgpu in gfx-rs#1077, because wgpu-native has its own incompatible version of IndexFormat (see that PR for details). However, with wgpu-native#85, that code was removed, so having these functions in `wgpu` should be no longer be a problem for wgpu-native.
It's very odd to have almost all the render pass and compute pass ffi functions in `wgpu` except for the `set_index_buffer` functions, which live in Firefox. I'd like to remove these from Firefox and put them back next to their companions. These functions were originally removed from wgpu in #1077, because wgpu-native has its own incompatible version of IndexFormat (see that PR for details). However, with wgpu-native#85, that code was removed, so having these functions in `wgpu` should be no longer be a problem for wgpu-native.
Connections
Fixes an issue that is blocking gfx-rs/wgpu-native#61
Description
Moves the ffi definition of wgpu_render_bundle_set_index_buffer / wgpu_render_pass_set_index_buffer to wgpu-native. This is needed because wgpu-native has its own version of IndexFormat that is different than the wgpu_types version.
Testing
My projects with wgpu-native work