chore!: remove #[no_mangle] … extern "C" … from fns in bundle_ffi (#6272)

This commit is contained in:
Erich Gubler 2024-09-21 12:33:13 -04:00 committed by GitHub
parent 14abdd4754
commit 9977edc51f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 13 additions and 24 deletions

View File

@ -113,6 +113,7 @@ By @bradwerth [#6216](https://github.com/gfx-rs/wgpu/pull/6216).
- Fix error message that is thrown in create_render_pass to no longer say `compute_pass`. By @matthew-wong1 [#6041](https://github.com/gfx-rs/wgpu/pull/6041) - Fix error message that is thrown in create_render_pass to no longer say `compute_pass`. By @matthew-wong1 [#6041](https://github.com/gfx-rs/wgpu/pull/6041)
- Document `wgpu_hal` bounds-checking promises, and adapt `wgpu_core`'s lazy initialization logic to the slightly weaker-than-expected guarantees. By @jimblandy in [#6201](https://github.com/gfx-rs/wgpu/pull/6201) - Document `wgpu_hal` bounds-checking promises, and adapt `wgpu_core`'s lazy initialization logic to the slightly weaker-than-expected guarantees. By @jimblandy in [#6201](https://github.com/gfx-rs/wgpu/pull/6201)
- Raise validation error instead of panicking in `{Render,Compute}Pipeline::get_bind_group_layout` on native / WebGL. By @bgr360 in [#6280](https://github.com/gfx-rs/wgpu/pull/6280). - Raise validation error instead of panicking in `{Render,Compute}Pipeline::get_bind_group_layout` on native / WebGL. By @bgr360 in [#6280](https://github.com/gfx-rs/wgpu/pull/6280).
- **BREAKING**: Remove the last exposed C symbols in project, located in `wgpu_core::render::bundle::bundle_ffi`, to allow multiple versions of WGPU to compile together. By @ErichDonGubler in [#6272](https://github.com/gfx-rs/wgpu/pull/6272).
#### GLES / OpenGL #### GLES / OpenGL

View File

@ -1584,8 +1584,7 @@ pub mod bundle_ffi {
/// ///
/// This function is unsafe as there is no guarantee that the given pointer is /// This function is unsafe as there is no guarantee that the given pointer is
/// valid for `offset_length` elements. /// valid for `offset_length` elements.
#[no_mangle] pub unsafe fn wgpu_render_bundle_set_bind_group(
pub unsafe extern "C" fn wgpu_render_bundle_set_bind_group(
bundle: &mut RenderBundleEncoder, bundle: &mut RenderBundleEncoder,
index: u32, index: u32,
bind_group_id: Option<id::BindGroupId>, bind_group_id: Option<id::BindGroupId>,
@ -1612,8 +1611,7 @@ pub mod bundle_ffi {
}); });
} }
#[no_mangle] pub fn wgpu_render_bundle_set_pipeline(
pub extern "C" fn wgpu_render_bundle_set_pipeline(
bundle: &mut RenderBundleEncoder, bundle: &mut RenderBundleEncoder,
pipeline_id: id::RenderPipelineId, pipeline_id: id::RenderPipelineId,
) { ) {
@ -1627,8 +1625,7 @@ pub mod bundle_ffi {
.push(RenderCommand::SetPipeline(pipeline_id)); .push(RenderCommand::SetPipeline(pipeline_id));
} }
#[no_mangle] pub fn wgpu_render_bundle_set_vertex_buffer(
pub extern "C" fn wgpu_render_bundle_set_vertex_buffer(
bundle: &mut RenderBundleEncoder, bundle: &mut RenderBundleEncoder,
slot: u32, slot: u32,
buffer_id: id::BufferId, buffer_id: id::BufferId,
@ -1643,8 +1640,7 @@ pub mod bundle_ffi {
}); });
} }
#[no_mangle] pub fn wgpu_render_bundle_set_index_buffer(
pub extern "C" fn wgpu_render_bundle_set_index_buffer(
encoder: &mut RenderBundleEncoder, encoder: &mut RenderBundleEncoder,
buffer: id::BufferId, buffer: id::BufferId,
index_format: IndexFormat, index_format: IndexFormat,
@ -1658,8 +1654,7 @@ pub mod bundle_ffi {
/// ///
/// This function is unsafe as there is no guarantee that the given pointer is /// This function is unsafe as there is no guarantee that the given pointer is
/// valid for `data` elements. /// valid for `data` elements.
#[no_mangle] pub unsafe fn wgpu_render_bundle_set_push_constants(
pub unsafe extern "C" fn wgpu_render_bundle_set_push_constants(
pass: &mut RenderBundleEncoder, pass: &mut RenderBundleEncoder,
stages: wgt::ShaderStages, stages: wgt::ShaderStages,
offset: u32, offset: u32,
@ -1695,8 +1690,7 @@ pub mod bundle_ffi {
}); });
} }
#[no_mangle] pub fn wgpu_render_bundle_draw(
pub extern "C" fn wgpu_render_bundle_draw(
bundle: &mut RenderBundleEncoder, bundle: &mut RenderBundleEncoder,
vertex_count: u32, vertex_count: u32,
instance_count: u32, instance_count: u32,
@ -1711,8 +1705,7 @@ pub mod bundle_ffi {
}); });
} }
#[no_mangle] pub fn wgpu_render_bundle_draw_indexed(
pub extern "C" fn wgpu_render_bundle_draw_indexed(
bundle: &mut RenderBundleEncoder, bundle: &mut RenderBundleEncoder,
index_count: u32, index_count: u32,
instance_count: u32, instance_count: u32,
@ -1729,8 +1722,7 @@ pub mod bundle_ffi {
}); });
} }
#[no_mangle] pub fn wgpu_render_bundle_draw_indirect(
pub extern "C" fn wgpu_render_bundle_draw_indirect(
bundle: &mut RenderBundleEncoder, bundle: &mut RenderBundleEncoder,
buffer_id: id::BufferId, buffer_id: id::BufferId,
offset: BufferAddress, offset: BufferAddress,
@ -1743,8 +1735,7 @@ pub mod bundle_ffi {
}); });
} }
#[no_mangle] pub fn wgpu_render_bundle_draw_indexed_indirect(
pub extern "C" fn wgpu_render_bundle_draw_indexed_indirect(
bundle: &mut RenderBundleEncoder, bundle: &mut RenderBundleEncoder,
buffer_id: id::BufferId, buffer_id: id::BufferId,
offset: BufferAddress, offset: BufferAddress,
@ -1761,16 +1752,14 @@ pub mod bundle_ffi {
/// ///
/// This function is unsafe as there is no guarantee that the given `label` /// This function is unsafe as there is no guarantee that the given `label`
/// is a valid null-terminated string. /// is a valid null-terminated string.
#[no_mangle] pub unsafe fn wgpu_render_bundle_push_debug_group(
pub unsafe extern "C" fn wgpu_render_bundle_push_debug_group(
_bundle: &mut RenderBundleEncoder, _bundle: &mut RenderBundleEncoder,
_label: RawString, _label: RawString,
) { ) {
//TODO //TODO
} }
#[no_mangle] pub fn wgpu_render_bundle_pop_debug_group(_bundle: &mut RenderBundleEncoder) {
pub extern "C" fn wgpu_render_bundle_pop_debug_group(_bundle: &mut RenderBundleEncoder) {
//TODO //TODO
} }
@ -1778,8 +1767,7 @@ pub mod bundle_ffi {
/// ///
/// This function is unsafe as there is no guarantee that the given `label` /// This function is unsafe as there is no guarantee that the given `label`
/// is a valid null-terminated string. /// is a valid null-terminated string.
#[no_mangle] pub unsafe fn wgpu_render_bundle_insert_debug_marker(
pub unsafe extern "C" fn wgpu_render_bundle_insert_debug_marker(
_bundle: &mut RenderBundleEncoder, _bundle: &mut RenderBundleEncoder,
_label: RawString, _label: RawString,
) { ) {