mirror of
https://github.com/storytold/wgpu.git
synced 2026-11-24 16:31:11 +01:00
Rename InputStepMode to VertexStepMode
This commit is contained in:
1 parent
d1068e915c
commit
1a9a855ea9
20 files changed
+52
-51
No files matched your search
@@ -833,7 +833,7 @@ struct VertexState {
|
||||
buffer: Option<id::BufferId>,
|
||||
range: Range<wgt::BufferAddress>,
|
||||
stride: wgt::BufferAddress,
|
||||
rate: wgt::InputStepMode,
|
||||
rate: wgt::VertexStepMode,
|
||||
is_dirty: bool,
|
||||
}
|
||||
|
||||
@@ -843,7 +843,7 @@ impl VertexState {
|
||||
buffer: None,
|
||||
range: 0..0,
|
||||
stride: 0,
|
||||
rate: wgt::InputStepMode::Vertex,
|
||||
rate: wgt::VertexStepMode::Vertex,
|
||||
is_dirty: false,
|
||||
}
|
||||
}
|
||||
@@ -967,13 +967,13 @@ impl State {
|
||||
}
|
||||
let limit = ((vbs.range.end - vbs.range.start) / vbs.stride) as u32;
|
||||
match vbs.rate {
|
||||
wgt::InputStepMode::Vertex => {
|
||||
wgt::VertexStepMode::Vertex => {
|
||||
if limit < vert_state.vertex_limit {
|
||||
vert_state.vertex_limit = limit;
|
||||
vert_state.vertex_limit_slot = idx as _;
|
||||
}
|
||||
}
|
||||
wgt::InputStepMode::Instance => {
|
||||
wgt::VertexStepMode::Instance => {
|
||||
if limit < vert_state.instance_limit {
|
||||
vert_state.instance_limit = limit;
|
||||
vert_state.instance_limit_slot = idx as _;
|
||||
@@ -1013,7 +1013,7 @@ impl State {
|
||||
fn set_pipeline(
|
||||
&mut self,
|
||||
index_format: Option<wgt::IndexFormat>,
|
||||
vertex_strides: &[(wgt::BufferAddress, wgt::InputStepMode)],
|
||||
vertex_strides: &[(wgt::BufferAddress, wgt::VertexStepMode)],
|
||||
layout_ids: &[id::Valid<id::BindGroupLayoutId>],
|
||||
push_constant_layouts: &[wgt::PushConstantRange],
|
||||
) {
|
||||
|
||||
@@ -27,7 +27,7 @@ use arrayvec::ArrayVec;
|
||||
use hal::CommandEncoder as _;
|
||||
use thiserror::Error;
|
||||
use wgt::{
|
||||
BufferAddress, BufferSize, BufferUsages, Color, IndexFormat, InputStepMode, TextureUsages,
|
||||
BufferAddress, BufferSize, BufferUsages, Color, IndexFormat, TextureUsages, VertexStepMode,
|
||||
};
|
||||
|
||||
#[cfg(any(feature = "serial-pass", feature = "replay"))]
|
||||
@@ -263,7 +263,7 @@ impl IndexState {
|
||||
struct VertexBufferState {
|
||||
total_size: BufferAddress,
|
||||
stride: BufferAddress,
|
||||
rate: InputStepMode,
|
||||
rate: VertexStepMode,
|
||||
bound: bool,
|
||||
}
|
||||
|
||||
@@ -271,7 +271,7 @@ impl VertexBufferState {
|
||||
const EMPTY: Self = VertexBufferState {
|
||||
total_size: 0,
|
||||
stride: 0,
|
||||
rate: InputStepMode::Vertex,
|
||||
rate: VertexStepMode::Vertex,
|
||||
bound: false,
|
||||
};
|
||||
}
|
||||
@@ -301,13 +301,13 @@ impl VertexState {
|
||||
}
|
||||
let limit = (vbs.total_size / vbs.stride) as u32;
|
||||
match vbs.rate {
|
||||
InputStepMode::Vertex => {
|
||||
VertexStepMode::Vertex => {
|
||||
if limit < self.vertex_limit {
|
||||
self.vertex_limit = limit;
|
||||
self.vertex_limit_slot = idx as _;
|
||||
}
|
||||
}
|
||||
InputStepMode::Instance => {
|
||||
VertexStepMode::Instance => {
|
||||
if limit < self.instance_limit {
|
||||
self.instance_limit = limit;
|
||||
self.instance_limit_slot = idx as _;
|
||||
@@ -1084,7 +1084,7 @@ impl<G: GlobalIdentityHandlerFactory> Global<G> {
|
||||
}
|
||||
for vbs in state.vertex.inputs.iter_mut().skip(vertex_strides_len) {
|
||||
vbs.stride = 0;
|
||||
vbs.rate = InputStepMode::Vertex;
|
||||
vbs.rate = VertexStepMode::Vertex;
|
||||
}
|
||||
state.vertex.update_limits();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user