mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 05:18:08 +02:00
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>
This commit is contained in:
parent
2f93398047
commit
09977d687d
2 changed files with 2 additions and 2 deletions
|
|
@ -53,7 +53,7 @@ vlVaHandleVAEncPictureParameterBufferTypeH264(vlVaDriver *drv, vlVaContext *cont
|
|||
coded_buf = handle_table_get(drv->htab, h264->coded_buf);
|
||||
if (!coded_buf->derived_surface.resource)
|
||||
coded_buf->derived_surface.resource = pipe_buffer_create(drv->pipe->screen, PIPE_BIND_VERTEX_BUFFER,
|
||||
PIPE_USAGE_STREAM, coded_buf->size);
|
||||
PIPE_USAGE_STAGING, coded_buf->size);
|
||||
context->coded_buf = coded_buf;
|
||||
|
||||
if (context->desc.h264enc.is_ltr)
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ vlVaHandleVAEncPictureParameterBufferTypeHEVC(vlVaDriver *drv, vlVaContext *cont
|
|||
|
||||
if (!coded_buf->derived_surface.resource)
|
||||
coded_buf->derived_surface.resource = pipe_buffer_create(drv->pipe->screen, PIPE_BIND_VERTEX_BUFFER,
|
||||
PIPE_USAGE_STREAM, coded_buf->size);
|
||||
PIPE_USAGE_STAGING, coded_buf->size);
|
||||
|
||||
context->coded_buf = coded_buf;
|
||||
context->desc.h265enc.pic.log2_parallel_merge_level_minus2 = h265->log2_parallel_merge_level_minus2;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue