I suppose it's not worth worrying about, but note that in principle this would do the wrong thing if command buffer IDs were to wrap.
I don't think I see how, and anyway, don't we explicitly avoid wrapping in wined3d_context_vk_submit_command_buffer()?
I suppose this is fine, but couldn't we just call perform_periodic_submit() from wined3d_context_vk_get_command_buffer()? We already handle WINED3D_RETIRED_BO_SIZE_THRESHOLD there, and it would largely avoid having to worry about where the ideal places to insert these calls are. (E.g., would a ddraw application that largely just does blits hit these in time?)
That makes sense; I largely didn't consider it.
It might be nice to use constants for "4" and "2000", much like how we have e.g. WINED3D_CS_QUERY_POLL_INTERVAL and WINED3D_ALLOCATOR_CHUNK_SIZE.
Sure.