frontents/va: Use PIPE_USAGE_STAGING for coded buffer
authorDavid Rosca <nowrep@gmail.com>
Mon, 30 Jan 2023 15:31:21 +0000 (16:31 +0100)
committerMarge Bot <emma+marge@anholt.net>
Tue, 31 Jan 2023 10:22:05 +0000 (10:22 +0000)
commit09977d687dd89998cbed881f0f523fa01359040d
tree21b4867c1b303b729d572e2f78aa2c1d21cede21
parent2f933980479a30944087f13fe063d2347c91f9ae
frontents/va: Use PIPE_USAGE_STAGING for coded buffer

Coded buffer will only be read on CPU, setting
PIPE_USAGE_STAGING instead of PIPE_USAGE_STREAM
makes the CPU reads much faster.

On 6700XT this reduces the CPU copy by around
3ms to 0.3 ms on average while under high GPU
load - real-time game streaming.

Signed-off-by: David Rosca <nowrep@gmail.com>
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20989>
src/gallium/frontends/va/picture_h264_enc.c
src/gallium/frontends/va/picture_hevc_enc.c