mesa/src
Paulo Zanoni 782efa29e6 iris: have a single border color pool per bufmgr
Have a single border color pool per bufmgr instead of per context.

We want to have a single VM shared among every context and the border
color pool is the last feature preventing us from having that.

Previously we had 1024 colors per context but once the buffer was full
we just waited for the buffer to be unused and restarted it. After
this patch we have 4096 colors for every single context and we can't
just flush buffers if they are full, so we simply return black.

There are many strategies we could try to implement to help alleviate
this new 4096 limit, none of which are implemented by this patch:

 - We could just expand the buffer to the full 16MB we can use,
   allowing 262144 colors.
 - We could use multiple buffers and make the contexts refcount them,
   so eventually older buffers would reach zero references and be
   recycled, moving us to a working set maximum from a lifetime
   maximum.
 - We could also make the border color pool be a standard memzone and
   then give smaller buffers to each context when they need, so the
   limit would be in the number of contexts that can use border color
   pools. This was my first implementation but Ken suggested I switch
   to the one provided by this patch, which is simpler.

Keep it like this since border colors don't seem to be used very much
and other Mesa drivers such as radeonsi also seem to employ the
"return black once we reach the limit" strategy.

As a last note, we could also move the contents of iris_border_color.c
to iris_bufmgr.c in order to avoid breaking some abstractions we have
in Iris, like we do with iris_bufmgr_get_border_color_pool(). I can do
this in case we want it.

v2: Switch from standard memzone to a per-screen thing (see above).
v3: Actually make it per bufmgr. Just making it per screen is not
    enough, since screens can share the same VM, an example being the
    gputest benchmark suite.
v4: Rebase.
v5: Remove dead code, lock around hash table lookup (Ken).
v6: Simple rebase.
v7: Another rebase (for_each_batch).

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12028>
2022-02-11 01:42:45 +00:00
..
amd radv/ci: update CI lists for CTS 1.3.1.0 2022-02-10 14:52:42 +00:00
android_stub android_stub: update platform headers to include atrace 2021-10-09 00:42:32 +00:00
asahi agx: Don't kill helper threads in ld_var 2022-02-06 15:02:39 +00:00
broadcom v3dv/ci: Update failure list 2022-02-09 15:46:23 +00:00
compiler nir: Produce correct results for atan with NaN 2022-02-10 18:15:39 +00:00
drm-shim drm-shim: Support kernels with >4k pages 2021-08-13 23:33:52 +00:00
egl egl/wayland: Don't replace existing backbuffer in get_buffers 2022-02-07 09:57:41 +00:00
etnaviv etnaviv: add support for INTEL_blackhole_render 2022-01-31 16:52:29 +00:00
freedreno freedreno/pps: Expose same counters as blob 2022-02-10 15:15:33 +00:00
gallium iris: have a single border color pool per bufmgr 2022-02-11 01:42:45 +00:00
gbm replace 0 with NULL for NULL pointers 2022-01-10 22:53:32 +00:00
getopt
glx glx: Use the new no-error driver interface 2022-02-04 18:36:24 +00:00
gtest gtest: Fix output of array ASSERT/EXPECT macros 2021-11-11 09:53:09 -08:00
hgl
imgui
intel anv: make the pointer valid before we assign stuff into it 2022-02-10 23:06:13 +00:00
loader gallium/dri: add missing PIPE_BIND_DRI_PRIME handling 2022-02-08 00:13:07 +00:00
mapi glthread: call _mesa_glthread_BindBuffer unconditionally 2022-02-01 06:11:22 +00:00
mesa st/mesa: only enable ARB_enhanced_layouts if there are xfb buffers 2022-02-09 03:31:16 +00:00
microsoft microsoft/compiler: Fill interpolation for sysval inputs to non-vertex shader 2022-02-11 00:19:17 +00:00
nouveau
panfrost ci: Bump VK-GL-CTS to 1.3.1.0. 2022-02-08 22:16:36 +00:00
tool ci: Use a dlclose-disabling preload library for leak checking in Vulkan. 2022-01-27 23:47:46 +00:00
util driconf: Add Heaven entries for Windows .exe 2022-02-10 20:19:00 +00:00
virtio venus: fix two VN_TRACE_SCOPE's in the same scope 2022-02-10 05:11:46 +00:00
vulkan vulkan,lavapipe: Simplify command recording code-gen 2022-02-08 19:50:57 +00:00
meson.build meson: start building intel earlier. 2022-01-20 06:41:17 +00:00