mesa/src/loader
Michel Dänzer 25a151533c loader/dri3: Overhaul draw->cur_num_back handling
draw->cur_num_back is no longer used for immediately reducing the number
of allocated back buffers. It just reflects how many of them are
currently allocated, and is used to prevent allocating more if the
current maximum is already reached.

This fixes an issue where the current in-progress back buffer could get
freed, which would result in visible artifacts.

Unused buffers are freed once they exceed buffer age 200. This ensures
we do not keep around more buffers than necessary in the long run.

v2:
* Drop buffer age threshold to 200. This will free unused buffers more
  quickly, and seems enough to avoid doing so prematurely even with
  "glxgears -fullscreen" running at thousands of frames per second.
* Use "buf_id != LOADER_DRI3_FRONT_ID". (Pierre-Eric Pelloux-Prayer)
* Simplify loader_dri3_get_buffers changes slightly.
* We can now use any unallocated back buffer slot in dri3_find_back.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20385>
2023-01-10 10:44:17 +00:00
..
loader.c dri: Introduce internal Mesa DRI driver loader extension. 2022-12-05 19:26:41 +00:00
loader.h gbm: Promote dri_bind_extensions() to the loader util library. 2022-12-05 19:26:41 +00:00
loader_dri3_helper.c loader/dri3: Overhaul draw->cur_num_back handling 2023-01-10 10:44:17 +00:00
loader_dri3_helper.h dri: get rid of LIBGL_SHOW_FPS 2023-01-09 14:25:51 +01:00
loader_dri_helper.c loader: Just include driconf.h instead of redefining its values. 2022-07-12 21:57:23 +00:00
loader_dri_helper.h glx: Unify dri2/dri3 vblank_mode logic. 2022-07-12 21:57:23 +00:00
meson.build dri: Introduce internal Mesa DRI driver loader extension. 2022-12-05 19:26:41 +00:00
pci_id_driver_map.h loader: Restore i915g support. 2021-12-09 09:05:23 -08:00