Skip to content
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

Merged
merged 1 commit into from
Dec 8, 2020
Merged

Conversation

ncharlton02
Copy link
Contributor

@ncharlton02 ncharlton02 commented Dec 6, 2020

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

@@ -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(
Copy link
Member

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.

Copy link
Member

@kvark kvark left a 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+

@bors
Copy link
Contributor

bors bot commented Dec 8, 2020

@bors bors bot merged commit 69196d8 into gfx-rs:master Dec 8, 2020
bors bot added a commit to gfx-rs/wgpu-native that referenced this pull request Dec 13, 2020
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]>
bors bot added a commit to gfx-rs/wgpu-rs that referenced this pull request Dec 14, 2020
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]>
kvark pushed a commit to kvark/wgpu that referenced this pull request Jun 3, 2021
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]>
jimblandy added a commit to jimblandy/wgpu that referenced this pull request May 15, 2022
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.
cwfitzgerald pushed a commit that referenced this pull request May 15, 2022
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants