diff options
author | David Rosca <nowrep@gmail.com> | 2024-05-09 16:59:39 +0200 |
---|---|---|
committer | Marge Bot <emma+marge@anholt.net> | 2024-05-14 18:51:03 +0000 |
commit | b33bb4077d7500232a5cadd956b5c8810bb5c9ba (patch) | |
tree | f8874f5f35f810ffc35e2676971d1a8baf1863f4 | |
parent | 1240fbba212ed412712f8ed4b83a57eb00dc41fa (diff) |
frontends/va: Only increment slice offset after first slice parameters
Fixes slice offset if app submits exactly one data buffer followed by
parameter buffers.
Fixes: 6746d4df6ea ("frontends/va: Fix AV1 slice_data_offset with multiple slice data buffers")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11133
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11138
Tested-by: Marcus Seyfarth <m.seyfarth@gmail.com>
Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29124>
-rw-r--r-- | src/gallium/frontends/va/picture.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gallium/frontends/va/picture.c b/src/gallium/frontends/va/picture.c index 0956b065caa..eee502b5e4a 100644 --- a/src/gallium/frontends/va/picture.c +++ b/src/gallium/frontends/va/picture.c @@ -1033,7 +1033,8 @@ vlVaRenderPicture(VADriverContextP ctx, VAContextID context_id, VABufferID *buff case VASliceDataBufferType: vaStatus = handleVASliceDataBufferType(context, buf); - slice_offset += buf->size; + if (slice_idx) + slice_offset += buf->size; break; case VAProcPipelineParameterBufferType: |