mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-04 05:28:05 +02:00
anv: Add support for using layered surfaces in VP9 video decoding
Reviewed-by: Hyunjun Ko <zzoon@igalia.com> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35651>
This commit is contained in:
parent
d0bf3a96f6
commit
9bbb68a817
1 changed files with 5 additions and 4 deletions
|
|
@ -2805,6 +2805,9 @@ anv_vp9_decode_video(struct anv_cmd_buffer *cmd_buffer,
|
|||
const struct anv_image_view *iv = frame_info->pSetupReferenceSlot ?
|
||||
anv_image_view_from_handle(frame_info->pSetupReferenceSlot->pPictureResource->imageViewBinding) :
|
||||
dst_iv;
|
||||
const uint32_t array_layer = frame_info->pSetupReferenceSlot ?
|
||||
frame_info->pSetupReferenceSlot->pPictureResource->baseArrayLayer :
|
||||
frame_info->dstPictureResource.baseArrayLayer;
|
||||
|
||||
const struct anv_image *img = iv->image;
|
||||
|
||||
|
|
@ -2878,8 +2881,7 @@ anv_vp9_decode_video(struct anv_cmd_buffer *cmd_buffer,
|
|||
}
|
||||
|
||||
anv_batch_emit(&cmd_buffer->batch, GENX(HCP_PIPE_BUF_ADDR_STATE), buf) {
|
||||
buf.DecodedPictureAddress =
|
||||
anv_image_address(img, &img->planes[0].primary_surface.memory_range);
|
||||
buf.DecodedPictureAddress = anv_image_dpb_address(iv, array_layer);
|
||||
|
||||
buf.DecodedPictureMemoryAddressAttributes = (struct GENX(MEMORYADDRESSATTRIBUTES)) {
|
||||
.MOCS = anv_mocs(cmd_buffer->device, buf.DecodedPictureAddress.bo, 0),
|
||||
|
|
@ -2988,8 +2990,7 @@ anv_vp9_decode_video(struct anv_cmd_buffer *cmd_buffer,
|
|||
assert(frame_info->pReferenceSlots[idx].slotIndex == vp9_pic_info->referenceNameSlotIndices[i]);
|
||||
|
||||
buf.ReferencePictureAddress[i] =
|
||||
anv_image_address(ref_iv->image, &ref_iv->image->planes[0].primary_surface.memory_range);
|
||||
|
||||
anv_image_dpb_address(ref_iv, frame_info->pReferenceSlots[idx].pPictureResource->baseArrayLayer);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue