Resize previously always destroyed + reallocated. It now reuses the existing allocation in place when the new request still fits the created capacity and the immutable-at-create properties match: usage flags are fixed at create, and the chosen memory type must still satisfy the required property flags. preferredPropertyFlags is a best-effort perf hint and is intentionally not part of the guard. On reuse the buffer handle, device address and mapped pointer are preserved; only `size` shrinks to the new logical extent. Tracks capacity and the created usage flags on VulkanBufferBase, set at Create and carried through the move constructor. Adds VulkanBufferResizeReuse, a device-free regression test that drives the reuse guard directly and asserts the in-place path issues no Vulkan call. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| main.cpp | ||