From 82c8b15fb4a820334b1b05492730a13305131da3 Mon Sep 17 00:00:00 2001 From: Jim Blandy Date: Mon, 6 Jun 2022 15:49:58 -0700 Subject: [PATCH] Don't dirty the vertex buffer for stride/rate changes on bundles. `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. --- wgpu-core/src/command/bundle.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/wgpu-core/src/command/bundle.rs b/wgpu-core/src/command/bundle.rs index 6121ab8f9fe..9254f87dea6 100644 --- a/wgpu-core/src/command/bundle.rs +++ b/wgpu-core/src/command/bundle.rs @@ -1206,7 +1206,6 @@ impl State { if vs.stride != stride || vs.rate != step_mode { vs.stride = stride; vs.rate = step_mode; - vs.is_dirty = true; } }