Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🦋 metal: Remove inconsistent descriptor creators from Allocation #251

Merged
merged 3 commits into from
Jan 27, 2025

Conversation

Jasper-Bekkers
Copy link
Member

These helpers don't really belong in the metal implementation of GPU allocator, instead, they belong in the client APIs using gpu-allocator.

This issue surfaced in our codebase because the make_acceleration_structure function didn't pass through all the required information.

@MarijnS95 MarijnS95 changed the title 🦋 Simplify the metal Allocation interface 🦋 metal: Remove inconsistent descriptor creators from `Allocation Oct 14, 2024
@MarijnS95 MarijnS95 changed the title 🦋 metal: Remove inconsistent descriptor creators from `Allocation 🦋 metal: Remove inconsistent descriptor creators from Allocation Oct 14, 2024
@MarijnS95
Copy link
Member

Glad to see this finally happening after proposing it months ago. These things shouldn't have been there as they're inconsistent with our Vulkan and Dx12 backend, and above all provoked a terrible .allocate().make_xxx() pattern where the returned Allocation is never stored and hence never able to be .free()d anymore, causing massive memory leaks.

I've tried to retitle this PR to describe the specific bad pattern that you're removing, happy to see this reclarified/rewritten further if you have better ideas 👍

src/metal/mod.rs Outdated Show resolved Hide resolved
src/metal/mod.rs Outdated Show resolved Hide resolved
src/metal/mod.rs Outdated Show resolved Hide resolved
src/metal/mod.rs Outdated Show resolved Hide resolved
@MarijnS95 MarijnS95 force-pushed the proper-metal-helpers branch 4 times, most recently from 39ad9b7 to c79f38d Compare January 27, 2025 16:01
@MarijnS95 MarijnS95 enabled auto-merge (squash) January 27, 2025 16:02
@MarijnS95 MarijnS95 force-pushed the proper-metal-helpers branch from c79f38d to 7351ba9 Compare January 27, 2025 16:24
@MarijnS95 MarijnS95 merged commit 33fa052 into main Jan 27, 2025
26 checks passed
@MarijnS95 MarijnS95 deleted the proper-metal-helpers branch January 27, 2025 16:51
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.

3 participants