Module: Mesa Branch: main Commit: e7b95619596167025d26f07efb04dc5bfd5e9aee URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=e7b95619596167025d26f07efb04dc5bfd5e9aee
Author: Mike Blumenkrantz <[email protected]> Date: Thu Aug 5 15:28:52 2021 -0400 gallium: implement compute pbo download this reworks PIPE_CAP_PREFER_BLIT_BASED_TEXTURE_TRANSFER into an enum as PIPE_CAP_TEXTURE_TRANSFER_MODES, enabling drivers to choose a (sometimes) faster, compute-based download mechanism based on a new pipe_screen hook compute pbo download is implemented using shaders with a prolog to convert the input format to generic rgb float values, then an epilog to convert to the output value. the prolog and epilog are determined based on a vec4 of packed ubo data which is dynamically updated based on the API usage currently, the only known limitations are: * GL_ARB_texture_cube_map_array is broken somehow (and disabled) * AMD hardware somehow can't do depth readback? otherwise it should work for every possible case Acked-by: Pierre-Eric Pelloux-Prayer <[email protected]> Acked-by: Marek Olšák <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11984> --- docs/gallium/screen.rst | 4 +- src/gallium/include/pipe/p_defines.h | 1 + src/mesa/meson.build | 1 + src/mesa/state_tracker/st_cb_texture.c | 34 +- src/mesa/state_tracker/st_context.c | 9 +- src/mesa/state_tracker/st_context.h | 2 + src/mesa/state_tracker/st_pbo.c | 9 + src/mesa/state_tracker/st_pbo.h | 6 + src/mesa/state_tracker/st_pbo_compute.c | 1110 +++++++++++++++++++++++++++++++ 9 files changed, 1157 insertions(+), 19 deletions(-) Diff: http://cgit.freedesktop.org/mesa/mesa/diff/?id=e7b95619596167025d26f07efb04dc5bfd5e9aee
