mesa/src/intel/blorp
Calder Young 64b5823d33 blorp: Work around sampler overfetch for buffer copies
First, the surface dimensions are used to determine the range of valid
pages that the data in the buffer overlaps, then rows are removed from
the surface until it does not overfetch into any neighboring pages. If
any rows were removed, an extra BTI is set up with a texel buffer that
views the contents of all the rows that were removed, and the shader is
compiled with a branch to sample the last rows through the texel buffer
instead of the main surface.

Using the texel buffer allows it to access the last rows without dealing
with overfetch or weird alignment hacks, and restricting texel buffer
usage to just the part of the surface that can't be accessed safely
ensures that we don't significantly impact performance for any buffer to
image copy that is unlucky enough to be close to a page boundry.

Co-authored-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40149>
2026-05-01 19:51:41 +00:00
..
blorp.c blorp: Work around sampler overfetch for buffer copies 2026-05-01 19:51:41 +00:00
blorp.h blorp: Work around sampler overfetch for buffer copies 2026-05-01 19:51:41 +00:00
blorp_blit.c blorp: Work around sampler overfetch for buffer copies 2026-05-01 19:51:41 +00:00
blorp_brw.c Rename more sha and sha1 names to blake3 2026-03-23 07:03:28 +00:00
blorp_clear.c intel/blorp: use dedicated clear ops in clear paths 2026-03-17 21:10:40 +00:00
blorp_elk.c blorp: add mda support 2026-03-06 06:34:42 +00:00
blorp_genX_exec_brw.h blorp: Work around sampler overfetch for buffer copies 2026-05-01 19:51:41 +00:00
blorp_genX_exec_elk.h blorp: Work around sampler overfetch for buffer copies 2026-05-01 19:51:41 +00:00
blorp_nir_builder.h intel/blorp: add blorp_shaders.cl 2026-01-15 04:34:55 +00:00
blorp_priv.h blorp: Work around sampler overfetch for buffer copies 2026-05-01 19:51:41 +00:00
blorp_shaders.cl intel/blorp: add blorp_shaders.cl 2026-01-15 04:34:55 +00:00
meson.build intel/blorp: add blorp_shaders.cl 2026-01-15 04:34:55 +00:00