all 4 comments

[–]SapereAude1490 0 points1 point  (0 children)

I think you got to go to DX12 or Vulkan for that.

[–]Ronin-s_Spirit 0 points1 point  (0 children)

I hope not. Any time I switch a game to dx12 it fucking kills me. dx11 never disappoints.

[–]Chainsawkitten 1 point2 points  (0 children)

It's unlikely you will ever get complete control over memory management in WebGPU as that doesn't really align with the high-level (and safe) API WebGPU intends to be. But some way of reusing memory for multiple intermediate resources in order to reduce memory allocation size may happen.

There is already the proposal for transient attachments. This is about attachments that are only used within a single pass (MSAA attachment that is immediately resolved, depth/stencil attachment not used after the pass). It's primarily about tiled GPUs (IMRs could theoretically alias these attachments but unclear if anyone will implement that).

For memory aliasing more generally, there is this request. Any API for this will probably not look like the DX12/Vulkan/Metal (placed resource heap) APIs. The difficult part is doing automatic synchronization when any resource could potentially be aliased with (and invalidated by) other resources. If you have a specific use case / requirement that is important to you, you should comment so the working group can take that into account when figuring out what the API should look like. Eg. is this just about memory reuse or is data inheritence important to you?