mirror of
https://github.com/gfx-rs/wgpu.git
synced 2024-11-25 16:24:24 +00:00
Remove extern "C" from set_index_buffer
This commit is contained in:
parent
7b886f4b1e
commit
b71c47a064
@ -436,6 +436,22 @@ impl RenderBundleEncoder {
|
||||
life_guard: LifeGuard::new(desc.label.borrow_or_default()),
|
||||
})
|
||||
}
|
||||
|
||||
pub fn set_index_buffer(
|
||||
&mut self,
|
||||
buffer_id: id::BufferId,
|
||||
index_format: wgt::IndexFormat,
|
||||
offset: wgt::BufferAddress,
|
||||
size: Option<wgt::BufferSize>,
|
||||
) {
|
||||
span!(_guard, DEBUG, "RenderBundle::set_index_buffer");
|
||||
self.base.commands.push(RenderCommand::SetIndexBuffer {
|
||||
buffer_id,
|
||||
index_format,
|
||||
offset,
|
||||
size,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/// Error type returned from `RenderBundleEncoder::new` if the sample count is invalid.
|
||||
@ -1076,23 +1092,6 @@ pub mod bundle_ffi {
|
||||
.push(RenderCommand::SetPipeline(pipeline_id));
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn wgpu_render_bundle_set_index_buffer(
|
||||
bundle: &mut RenderBundleEncoder,
|
||||
buffer_id: id::BufferId,
|
||||
index_format: wgt::IndexFormat,
|
||||
offset: BufferAddress,
|
||||
size: Option<BufferSize>,
|
||||
) {
|
||||
span!(_guard, DEBUG, "RenderBundle::set_index_buffer");
|
||||
bundle.base.commands.push(RenderCommand::SetIndexBuffer {
|
||||
buffer_id,
|
||||
index_format,
|
||||
offset,
|
||||
size,
|
||||
});
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn wgpu_render_bundle_set_vertex_buffer(
|
||||
bundle: &mut RenderBundleEncoder,
|
||||
|
@ -29,7 +29,9 @@ use crate::{
|
||||
use arrayvec::ArrayVec;
|
||||
use hal::command::CommandBuffer as _;
|
||||
use thiserror::Error;
|
||||
use wgt::{BufferAddress, BufferUsage, Color, IndexFormat, InputStepMode, TextureUsage};
|
||||
use wgt::{
|
||||
BufferAddress, BufferSize, BufferUsage, Color, IndexFormat, InputStepMode, TextureUsage,
|
||||
};
|
||||
|
||||
#[cfg(any(feature = "serial-pass", feature = "replay"))]
|
||||
use serde::Deserialize;
|
||||
@ -172,6 +174,22 @@ impl RenderPass {
|
||||
target_depth_stencil: self.depth_stencil_target,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn set_index_buffer(
|
||||
&mut self,
|
||||
buffer_id: id::BufferId,
|
||||
index_format: IndexFormat,
|
||||
offset: BufferAddress,
|
||||
size: Option<BufferSize>,
|
||||
) {
|
||||
span!(_guard, DEBUG, "RenderPass::set_index_buffer");
|
||||
self.base.commands.push(RenderCommand::SetIndexBuffer {
|
||||
buffer_id,
|
||||
index_format,
|
||||
offset,
|
||||
size,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
impl fmt::Debug for RenderPass {
|
||||
@ -1753,23 +1771,6 @@ pub mod render_ffi {
|
||||
.push(RenderCommand::SetPipeline(pipeline_id));
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn wgpu_render_pass_set_index_buffer(
|
||||
pass: &mut RenderPass,
|
||||
buffer_id: id::BufferId,
|
||||
index_format: wgt::IndexFormat,
|
||||
offset: BufferAddress,
|
||||
size: Option<BufferSize>,
|
||||
) {
|
||||
span!(_guard, DEBUG, "RenderPass::set_index_buffer");
|
||||
pass.base.commands.push(RenderCommand::SetIndexBuffer {
|
||||
buffer_id,
|
||||
index_format,
|
||||
offset,
|
||||
size,
|
||||
});
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn wgpu_render_pass_set_vertex_buffer(
|
||||
pass: &mut RenderPass,
|
||||
|
Loading…
Reference in New Issue
Block a user