mesa/src
Lionel Landwerlin 40b67a2922 anv: allocate bigger batches as we grow command buffers
This is the first time we see an application running out of mmap().

We essentially allocate too many batches (+65k) and end up not being
able to mmap them, at which point we can't mmap anything anymore and
things go sideways.

This change allocates bigger batch BOs as we grow an existing command
buffer. This drastically reduces the number of BOs we need to allocate
(the benchmark that reported the issue now reaches a max of ~630 BOs,
instead of reaching 65k and failing previously).

v2: Track the total batch size of command buffers (Jason)
    Just give 0 for batch_len to i915 (Jason)

v3: Fix indentation (Jason)

v4: Drop uncessary reshuffling of error labels (Jason)

v5: Remove empty lines (Marcin)

v6: Limit BO growing to chunks of 16Mb (Jason)

v7: Add assert on initial size (Jason)

v8: Add define for max size (Jason)

v9: Fixup v7 assert for non softpin platforms (Lionel)

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4956
Cc: mesa-stable
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11482>
2021-06-26 12:23:54 +03:00
..
amd amd/ci: Use MESA_VK_IGNORE_CONFORMANCE_WARNING to reduce warnings 2021-06-25 19:45:38 +00:00
android_stub egl/android: refactor to use the legit vndk/window.h header 2021-06-09 21:07:54 +00:00
asahi asahi: Fix macOS macro. 2021-06-24 13:49:40 +00:00
broadcom v3dv/build: meson infrastructure for multi-hw-version support 2021-06-22 11:34:06 +02:00
compiler spirv: Support SPV_KHR_subgroup_uniform_control_flow 2021-06-25 22:41:32 +00:00
drm-shim drm-shim: fix compile with glibc >= 2.33 2021-04-20 05:49:29 +00:00
egl egl: fix in expected type 2021-06-19 19:34:20 +00:00
etnaviv etnaviv: tell the truth if alpha-test is supported 2021-04-08 19:25:26 +00:00
freedreno ci: Unify on MESA_VK_IGNORE_CONFORMANCE_WARNING 2021-06-25 19:45:38 +00:00
gallium zink: repack zink_context struct a bit 2021-06-25 17:04:42 +00:00
gbm gbm: list to stderr all the missing extension 2021-05-24 16:17:47 +00:00
getopt scons: Remove. 2021-03-20 10:38:55 +00:00
glx glx: create DRI screen for display GPU incase of prime 2021-06-03 09:12:32 +00:00
gtest gtest: Update to 1.10.0 2020-04-20 11:57:11 +00:00
hgl hgl: Major refactor and cleanup 2021-01-09 20:51:35 -06:00
imgui
intel anv: allocate bigger batches as we grow command buffers 2021-06-26 12:23:54 +03:00
loader loader/dri3: Don't churn through xfixes regions in SwapBuffers 2021-06-24 03:18:06 +00:00
mapi glthread: change when glFlush flushes asynchronously 2021-06-17 02:24:22 +00:00
mesa i965: Prevent invalid framebuffer usage 2021-06-25 22:08:13 +00:00
microsoft microsoft/spirv_to_dxil: Add drive_location assignment 2021-06-24 20:05:13 +00:00
nouveau nouveau: add drm-shim support 2021-01-11 22:45:01 +00:00
panfrost pan/mdg: Add 16 bytes of padding to the end of shaders 2021-06-23 14:42:55 +00:00
tool pps: Intel pps driver 2021-05-18 14:28:48 +00:00
util util: Add qsort_r/s args adapter for MSVC and BSD/macOS 2021-06-24 20:05:12 +00:00
virtio venus: remove workarounds for multi-planar format interop 2021-06-16 20:31:32 +00:00
vulkan ci: Unify on MESA_VK_IGNORE_CONFORMANCE_WARNING 2021-06-25 19:45:38 +00:00
meson.build panfrost: Add a Vulkan driver for Midgard/Bifrost GPUs 2021-06-22 14:07:34 +00:00