Skip to content

Commit

Permalink
Don't dirty the vertex buffer for stride/rate changes on bundles.
Browse files Browse the repository at this point in the history
`wgpu_core::command::bundle::State::set_pipeline` marks a vertex
buffer slot dirty if the pipeline's stride or step mode for that
vertex buffer slot differs from what had been previously established.
The effect of marking the slot dirty is to ensure that a new
`SetVertexBuffer` command is inserted before the next draw command
that uses that vertex buffer. However, this is unnecessary:
`wgpu_hal::CommandEncoder::set_vertex_buffer` does not need to be
called simply because the stride or rate has changed.
  • Loading branch information
jimblandy committed Jun 6, 2022
1 parent 717bc40 commit 82c8b15
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion wgpu-core/src/command/bundle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1206,7 +1206,6 @@ impl<A: HalApi> State<A> {
if vs.stride != stride || vs.rate != step_mode {
vs.stride = stride;
vs.rate = step_mode;
vs.is_dirty = true;
}
}

Expand Down

0 comments on commit 82c8b15

Please sign in to comment.