winsys/amdgpu: fix running out of 32bit address space with high FPS

Reproduced with gfxbench5 gl_tess_off.

Fixes: 4d486888ee - winsys/amdgpu: rewrite BO fence tracking by adding a new queue fence system

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34983>
This commit is contained in:
Marek Olšák 2025-04-30 20:07:45 -04:00 committed by Marge Bot
parent d9e681ee3f
commit 4bf2a28334

View file

@ -123,8 +123,11 @@ struct amdgpu_screen_winsys {
* uint8_t wraps around so quickly that some BOs might never become idle because we don't
* remove idle fences from BOs, so they become "busy" again after a queue sequence number wraps
* around and they may stay "busy" in pb_cache long enough that we run out of memory.
*
* High FPS applications also wrap around uint16_t so quickly that 32-bit address space allocations
* aren't deallocated soon enough and we run out.
*/
typedef uint16_t uint_seq_no;
typedef uint32_t uint_seq_no;
struct amdgpu_queue {
/* Ring buffer of fences.