On Tue, 1 Feb 2022 at 15:20, Conor McCarthy cmccarthy@codeweavers.com wrote:
February 1, 2022 3:08 AM, "Henri Verbeet" hverbeet@gmail.com wrote:
The descriptor limit changes would probably make sense as a separate patch. Note that we need these limits for d3d12_command_allocator_allocate_descriptor_pool() and vk_binding_count_from_descriptor_range() as well, as pointed out by Giovanni back in October.
So use an arbitrary fixed size for the descriptor set layout in the initial patch?
Well, no. But introducing the descriptor limits first and using them in the places mentioned above would (slightly) reduce the size of this patch. I.e., the general idea is to reduce the size of more complicated patches like this one by taking care of more peripheral issues beforehand, so that review can focus on the core changes as much as possible.
"serial_id" above can wrap, and for a 32-bit value that may not even take all that long.
Even if 10 descriptor heaps are created/destroyed per frame it would take 1000 hours of rendering at 120 fps to wrap. Since only two heaps can be bound per command list I figured it's unlikely to ever cause a problem.
Right, it's certainly not likely to wrap for typical "Desktop gaming" use-cases, but I could also think up use-cases where you'd want a process to run for longer than 1000 hours. (And hard to reproduce issues are simply just that much more frustrating to debug...)