mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-17 02:40:37 +01:00
frontends/va: Rename slice_idx to have_slice_params and move to context
Add explanation what it does. Reviewed-by: Ruijing Dong <ruijing.dong@amd.com> Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30011>
This commit is contained in:
parent
e0c15579f3
commit
feba91d390
2 changed files with 6 additions and 3 deletions
|
|
@ -137,6 +137,7 @@ vlVaBeginPicture(VADriverContextP ctx, VAContextID context_id, VASurfaceID rende
|
|||
context->needs_begin_frame = true;
|
||||
|
||||
context->slice_data_offset = 0;
|
||||
context->have_slice_params = false;
|
||||
|
||||
mtx_unlock(&drv->mutex);
|
||||
return VA_STATUS_SUCCESS;
|
||||
|
|
@ -973,7 +974,6 @@ vlVaRenderPicture(VADriverContextP ctx, VAContextID context_id, VABufferID *buff
|
|||
VAStatus vaStatus = VA_STATUS_SUCCESS;
|
||||
|
||||
unsigned i;
|
||||
unsigned slice_idx = 0;
|
||||
vlVaBuffer *seq_param_buf = NULL;
|
||||
|
||||
if (!ctx)
|
||||
|
|
@ -1024,12 +1024,14 @@ vlVaRenderPicture(VADriverContextP ctx, VAContextID context_id, VABufferID *buff
|
|||
|
||||
case VASliceParameterBufferType:
|
||||
handleSliceParameterBuffer(context, buf);
|
||||
slice_idx += buf->num_elements;
|
||||
context->have_slice_params = true;
|
||||
break;
|
||||
|
||||
case VASliceDataBufferType:
|
||||
vaStatus = handleVASliceDataBufferType(context, buf);
|
||||
if (slice_idx)
|
||||
/* Workaround for apps sending single slice data buffer followed
|
||||
* by multiple slice parameter buffers. */
|
||||
if (context->have_slice_params)
|
||||
context->slice_data_offset += buf->size;
|
||||
break;
|
||||
|
||||
|
|
|
|||
|
|
@ -387,6 +387,7 @@ typedef struct {
|
|||
bool packed_header_emulation_bytes;
|
||||
struct set *surfaces;
|
||||
unsigned slice_data_offset;
|
||||
bool have_slice_params;
|
||||
|
||||
struct {
|
||||
void **buffers;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue