On Fri Aug 18 13:41:27 2023 +0000, Giovanni Mascellani wrote:
This looks fine, as far as I can say. The only part I'm a bit concerned about is how many threads this is going to create. Is it possible that an application creates a lot of descriptor heaps, each of those spawning a new thread? That wouldn't be very gentle on the OS. Would it be possible to have on thread per device, taking care of all the heaps belonging to that device? Or, if parallel processing is advisable, a per-device pool of threads taking care of all the heaps belonging to that device?
Typically few heaps are used. Only one of each type can be used per draw or compute call, and they can be shared, so there's no gain in creating more than one shader-visible heap.