gfx-rs / wgpu

A cross-platform, safe, pure-Rust graphics API.
https://wgpu.rs
Apache License 2.0
12.62k stars 925 forks source link

multi_draw_indirect_count set incorrect count buffer id. #6182

Closed BlackStone1123 closed 2 months ago

BlackStone1123 commented 2 months ago

Description multi_draw_indexed_indirect_count & multi_draw_indirect_count api is regressed since upgrade to v22.0, the root cause is that the count buffer has been set wrong buffer id as code shown in snapshot.

Repro steps Ideally, a runnable example we can check out.

Expected vs observed behavior observed behavior: the count buffer has been set to be the same as indirect buffer, which will cause wrong command count in gpu side. expected behavior: retrieve the count buffer with correct count buffer id.

Extra materials 企业微信截图_1724915160935

Platform platform: windows graphics api: vulkan/dx12 wgpu version: 22.1.0

teoxoy commented 2 months ago

https://github.com/gfx-rs/wgpu/pull/5884 seems to have regressed this, could you put up a PR that fixes this?

BlackStone1123 commented 2 months ago

this is the fixes pr link: https://github.com/gfx-rs/wgpu/pull/6194