Skip to content

Commit 23edba1

Browse files
authored
gpuav: Fix bug found live testing (#11595)
1 parent 7bdb79f commit 23edba1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

layers/state_tracker/state_tracker.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2888,7 +2888,8 @@ void DeviceState::PreCallRecordDestroyAccelerationStructureKHR(VkDevice device,
28882888
const size_t i = std::distance(as_with_addresses.array.begin(), as_found_it);
28892889
std::swap(as_with_addresses.array[i], as_with_addresses.array[as_with_addresses.array.size() - 1]);
28902890
as_with_addresses.array.resize(as_with_addresses.array.size() - 1);
2891-
as_found_it = as_with_addresses.array.begin() + i;
2891+
2892+
as_found_it = std::find(as_with_addresses.array.begin() + i, as_with_addresses.array.end(), as_state.get());
28922893
}
28932894
as_state->acceleration_structure_address = 0;
28942895
}

0 commit comments

Comments
 (0)