gpu-allocator icon indicating copy to clipboard operation
gpu-allocator copied to clipboard

🦋 metal: Remove inconsistent descriptor creators from `Allocation`

Open Jasper-Bekkers opened this issue 1 year ago • 1 comments

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.

Jasper-Bekkers avatar Oct 14 '24 18:10 Jasper-Bekkers

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 :+1:

MarijnS95 avatar Oct 14 '24 20:10 MarijnS95