mirror of
https://github.com/gfx-rs/wgpu.git
synced 2025-02-16 17:02:32 +00:00
fix(metal): don't depend on BG{,L} entry order
This isn't guaranteed by `wgpu-core`; we should try to match by binding slot index instead.
This commit is contained in:
parent
74f514ca6b
commit
d12e89c483
@ -163,6 +163,10 @@ Bottom level categories:
|
||||
|
||||
- Set object labels when the DEBUG flag is set, even if the VALIDATION flag is disabled. By @DJMcNab in [#5345](https://github.com/gfx-rs/wgpu/pull/5345).
|
||||
|
||||
#### Metal
|
||||
|
||||
- Don't depend on bind group and bind group layout entry order in HAL. This caused incorrect severely incorrect command execution and, in some cases, crashes. By @ErichDonGubler in [#5421](https://github.com/gfx-rs/wgpu/pull/5421).
|
||||
|
||||
#### DX12
|
||||
|
||||
- Don't depend on bind group and bind group layout entry order in HAL. This caused incorrect severely incorrect command execution and, in some cases, crashes. By @ErichDonGubler in [#5421](https://github.com/gfx-rs/wgpu/pull/5421).
|
||||
|
@ -708,7 +708,16 @@ impl crate::Device for super::Device {
|
||||
for (&stage, counter) in super::NAGA_STAGES.iter().zip(bg.counters.iter_mut()) {
|
||||
let stage_bit = map_naga_stage(stage);
|
||||
let mut dynamic_offsets_count = 0u32;
|
||||
for (entry, layout) in desc.entries.iter().zip(desc.layout.entries.iter()) {
|
||||
let layout_and_entry_iter = desc.entries.iter().map(|entry| {
|
||||
let layout = desc
|
||||
.layout
|
||||
.entries
|
||||
.iter()
|
||||
.find(|layout_entry| layout_entry.binding == entry.binding)
|
||||
.expect("internal error: no layout entry found with binding slot");
|
||||
(entry, layout)
|
||||
});
|
||||
for (entry, layout) in layout_and_entry_iter {
|
||||
let size = layout.count.map_or(1, |c| c.get());
|
||||
if let wgt::BindingType::Buffer {
|
||||
has_dynamic_offset: true,
|
||||
|
Loading…
Reference in New Issue
Block a user