On Sat Aug 19 08:17:56 2023 +0000, Giovanni Mascellani wrote:
I'll leave to Henri to decide what's best here, but I still think that having one thread per device should be easily doable and avoid wasting resources if an application, for some reason, creates a lot of heaps. Apparently neither us nor native implementations really enforce which heap descriptors come from, so it could still be that some application creates many heaps each with just a few descriptors.
We enforce one per heap type; see `d3d12_command_list_bind_descriptor_table()`. It's true this doesn't prevent an app from creating many heaps and using them in consecutive draw calls or multiple command lists. Changing heap bindings can impose a pretty big performance cost though.