Skip to content

Respect Vulkan allocation limits and preserve fallback error causes - #328

Open
simzy39 wants to merge 2 commits into
Traverse-Research:mainfrom
simzy39:fix/vulkan-allocation-contracts
Open

simzy39 wants to merge 2 commits into
Traverse-Research:mainfrom
simzy39:fix/vulkan-allocation-contracts

Conversation

@simzy39

@simzy39 simzy39 commented Nov 28, 2026

Copy link
Copy Markdown

Fixes #326; addresses this allocator's portion of #125.

Cap every native block to its selected heap, reject impossible requests before the driver call, guard owned allocation count, and try compatible types once in preference order only after recoverable failures. Preserve fatal allocation/mapping errors. Exclude AMD device-coherent types because device feature enablement is unavailable. Publish a new block only after its first suballocation succeeds.

Independent of #323: existing sizing threshold, growth and empty-cache policy remain in place. External native allocations still require caller coordination for the device-wide count limit.

Validation: ten public-constructor driver-stub tests pass (nine fail against main); strict std/no_std Clippy, formatting, Rust 1.71 std and Rust 1.81 no_std consumer builds pass. Normal failed-map cleanup already existed; null-success handling is defensive.

AI disclosure: an OpenAI coding agent implemented, tested and wrote this description at the contributor's explicit direction.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Vulkan fallback can exceed heap capacity, mask fatal errors and select feature-dependent memory

1 participant