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

Clean up render bundle index buffer tracking. #2743

Merged
merged 2 commits into from
Jun 7, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Remove unused field bundle::IndexState::pipeline_format.
jimblandy committed Jun 6, 2022
commit 3abf33ebcca59fb2b7940f02e344c41c61fa9ce4
6 changes: 0 additions & 6 deletions wgpu-core/src/command/bundle.rs
Original file line number Diff line number Diff line change
@@ -355,7 +355,6 @@ impl RenderBundleEncoder {
pipeline_layout_id = Some(pipeline.layout_id.value);

state.set_pipeline(
pipeline.strip_index_format,
&pipeline.vertex_strides,
&layout.bind_group_layout_ids,
&layout.push_constant_ranges,
@@ -918,7 +917,6 @@ impl<A: HalApi> Resource for RenderBundle<A> {
struct IndexState {
buffer: Option<id::BufferId>,
format: wgt::IndexFormat,
pipeline_format: Option<wgt::IndexFormat>,
range: Range<wgt::BufferAddress>,
is_dirty: bool,
}
@@ -929,7 +927,6 @@ impl IndexState {
Self {
buffer: None,
format: wgt::IndexFormat::default(),
pipeline_format: None,
range: 0..0,
is_dirty: false,
}
@@ -1195,13 +1192,10 @@ impl<A: HalApi> State<A> {

fn set_pipeline(
&mut self,
index_format: Option<wgt::IndexFormat>,
vertex_strides: &[(wgt::BufferAddress, wgt::VertexStepMode)],
layout_ids: &[id::Valid<id::BindGroupLayoutId>],
push_constant_layouts: &[wgt::PushConstantRange],
) {
self.index.pipeline_format = index_format;

for (vs, &(stride, step_mode)) in self.vertex.iter_mut().zip(vertex_strides) {
if vs.stride != stride || vs.rate != step_mode {
vs.stride = stride;