mesa/src
Francisco Jerez 622c2498d4 intel/xehp+: Import algorithm for TBIMR tiling parameter calculation.
This implements a minimalistic algorithm that can be used to obtain an
approximate solution for the integer programming problem of finding
the optimal tile dimensions based on an estimate of the tile cache
consumption per pixel of the current graphics pipeline -- Including
the TC footprint of render targets, depth and stencil buffers and
their auxiliary surfaces.  Considering other (less local) memory
accesses performed by the pipeline (like texturing and shader storage)
would be useful (and could be considered by this algorithm with little
modification), but it would be pretty difficult to estimate the L3
cache consumption per pixel of such accesses based on static analysis
of the pipeline state alone without some sort of dynamic feedback.

The present algorithm returns a config with tile area large enough to
utilize a target fraction of the L3, which can be adjusted to obtain
greater/lower utilization of the L3 at the cost of higher/lower risk
of L3 cache thrashing respectively.  The aspect ratio of the tile
layout returned attempts to minimize the number of poorly utilized
tiles around the boundaries of the framebuffer (due to partial
coverage), since having the tile sequencer process additional tiles
comes at a cost due to the latency of the additional passes, even if
they're mostly empty.  Finally, among the solutions with satisfactory
cache footprint and tile count, the tile aspect ratio closest to 1 is
returned where possible, since tiles with very high aspect ratios can
have a negative impact on cache locality.

The algorithm is primarily intended for TBIMR, but it could be used
for PTBR as well with little modifications, since the TBIMR-specific
assumptions are few and noted in comments below.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25493>
2023-10-27 14:48:29 -07:00
..
amd radv: correctly return oom from the device when failing to create a cs 2023-10-27 15:29:32 +00:00
android_stub
asahi asahi: flush denorms on exact fmin/fmax 2023-10-18 17:10:02 +00:00
broadcom broadcom/qpu: use back BITFIELD64_RANGE for ANYOPMASK 2023-10-27 11:45:09 +00:00
c11 util/meson: Getting mesa util core to be self contained 2023-08-02 03:41:24 +00:00
compiler vtn/opencl: always lower to libclc fmod 2023-10-27 10:52:54 +00:00
drm-shim compiler,vulkan,drm-shim: Remove unused include directories from meson.build 2023-10-27 01:35:10 +00:00
egl egl: fix leaking drmDevicePtr in _eglFindDevice 2023-10-25 12:37:30 +00:00
etnaviv etnaviv: drm: Be able to mark end of context init 2023-10-23 14:56:48 +00:00
freedreno nir: Split nir_lower_subgroup_options::lower_vote_eq into two bits 2023-10-26 23:05:44 +00:00
gallium intel/l3: Set up L3FullWayAllocationEnable config if ALL partition has over 126 ways. 2023-10-27 14:48:28 -07:00
gbm gbm: delete some zink handling 2023-10-09 18:43:09 +00:00
getopt
glx glx: Delete support for GLX_OML_swap_method. 2023-10-20 10:03:43 +00:00
gtest gtest: backport ansi color fix 2023-08-18 21:33:14 +00:00
imagination pvr: Only setup the bgobj to load if we have a load_op 2023-10-23 08:18:33 +00:00
imgui
intel intel/xehp+: Import algorithm for TBIMR tiling parameter calculation. 2023-10-27 14:48:29 -07:00
loader glx: Delete support for GLX_OML_swap_method. 2023-10-20 10:03:43 +00:00
mapi mesa: add GL_APPLE_sync support 2023-10-20 17:20:11 +00:00
mesa mesa/st/texture: match width+height for texture downloads of cube textures 2023-10-27 00:44:49 +00:00
microsoft nir: Use getters for nir_src::parent_* 2023-10-10 04:58:05 -04:00
nouveau nvk: Implement VK_EXT_dynamic_rendering_unused_attachments 2023-10-19 14:06:07 +00:00
panfrost panfrost: Add debug flag to force packing of AFBC textures on upload 2023-10-25 14:25:31 +00:00
tool radeonsi: Add tracepoints in radeonsi driver 2023-10-19 16:16:16 +00:00
util util: skip zero-sized SHA1Update 2023-10-25 17:27:47 +00:00
virtio util: Remove MESA_TRACE_BEGIN/END 2023-10-23 17:20:03 +00:00
vulkan compiler,vulkan,drm-shim: Remove unused include directories from meson.build 2023-10-27 01:35:10 +00:00
.clang-format nir: Add nir_foreach_block_in_cf_node_reverse 2023-09-22 10:05:58 +00:00
meson.build nvk: add vulkan skeleton 2023-08-04 21:31:52 +00:00