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>
(cherry picked from commit 4bf2a28334)
This commit is contained in:
Marek Olšák 2025-04-30 20:07:45 -04:00 committed by Eric Engestrom
parent e35c5d643b
commit 39a8d4425a
2 changed files with 5 additions and 2 deletions

View file

@ -2914,7 +2914,7 @@
"description": "winsys/amdgpu: fix running out of 32bit address space with high FPS",
"nominated": true,
"nomination_type": 2,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": "4d486888ee895ee510fd0d0e77518c7c020482b9",
"notes": null

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.