mesa/src
Kenneth Graunke 39f06e2848 iris: Implement pipe->texture_subdata directly
Chris Wilson noted that u_default_texture_subdata's transfer path
sometimes results in wasteful double copies.  This patch is based
on an earlier path he wrote, but updated now that we have staging
blits for busy or compressed textures.

Consider the case of idle, non-CCS-compressed, tiled images:

The transfer-based CPU path has to return a "linear" mapping, so upon
map, it mallocs a temporary buffer.  u_default_texture_subdata then
copies the client memory to this malloc'd buffer, and transfer unmap
performs a tiled_memcpy to copy it back into the texture.  By writing
a direct texture_subdata() implementation, we're able to directly do
a tiled_memcpy from the client memory into the destination texture,
resulting in only one copy.

For linear buffers, there is no advantage to doing things directly, so
we simply fall back to u_default_texture_subdata()'s transfer path to
avoid replicating those cases.

We still may want to use GPU staging buffers for busy destinations
(to avoid stalls) or CCS-compressed images (to compress the data),
at which point we also fall back to the existing path.  We thought
to try and use a tiled temporary, but this didn't appear to help.

Improves performance in x11perf -shmput500 by 1.96x on my Icelake.

Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2500
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3818>
2020-06-26 21:20:41 +00:00
..
amd aco: fix partial copies on GFX6/7 2020-06-26 19:21:57 +00:00
broadcom v3d/compiler: don't rewrite unused temporaries to point to NOP register 2020-06-26 08:57:32 +00:00
compiler spirv: set variables to restrict by default 2020-06-24 10:52:27 +00:00
drm-shim
egl util: rename xmlpool.h to driconf.h 2020-06-22 21:50:12 +00:00
etnaviv etnaviv: replace all dup() with os_dupfd_cloexec() 2020-06-18 02:09:56 +00:00
freedreno turnip: Properly return VK_DEVICE_LOST on queuesubmit failures. 2020-06-26 19:34:17 +00:00
gallium iris: Implement pipe->texture_subdata directly 2020-06-26 21:20:41 +00:00
gbm
getopt
glx util: rename xmlpool.h to driconf.h 2020-06-22 21:50:12 +00:00
gtest
hgl
imgui
intel anv: Align "used" attribute to 64 bits. 2020-06-25 22:11:36 -07:00
loader util: rename xmlpool.h to driconf.h 2020-06-22 21:50:12 +00:00
mapi mapi: x86: Fix dynamic entries in x86 tsd stubs. 2020-06-26 18:28:01 +00:00
mesa glsl,driconf: add allow_glsl_120_subset_in_110 for SPECviewperf13 2020-06-23 09:25:24 +00:00
panfrost panfrost: Add PAN_MESA_DEBUG=gl3 flag 2020-06-26 10:30:03 +00:00
util driconf: add workarounds for SPECviewperf13 2020-06-23 09:25:24 +00:00
vulkan vulkan/overlay: fix crash on destroying NULL swapchain 2020-06-25 10:31:50 +00:00
meson.build
SConscript driconf: drop now unused translation facility 2020-06-22 21:50:12 +00:00