Skip to content

turnip: Make autotuner work with reusable command buffers

To achieve it each command buffer now has its own GPU memory.

However the BOs usage by autotuner is not optimal, the ideal pattern would be to use some memory pool to suballocate small GPU memory chunk since most command buffers have only a few renderpasses.

So the cost is ~1 bo per command buffer. I didn't emit the results into already existing tu_cs because it would require to make it writable and prolong its lifetime.


TBH the autotuner looks kind of ugly, passing objects around with complex lifetime isn't fun in C.

Added a comment describing what's going on in autotuner.


CC: @anholt, could you test it that trace where it failed previously?
It works with d3d12 game Age of Empires.

Also, autotuner still doesn't support simultaneous command buffers which I haven't encountered in the wild yet.

Edited by Danylo Piliaiev

Merge request reports