mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 00:00:11 +01:00
radeonsi: Support PIPE_BIND_VIDEO_DECODE/ENCODE_DPB
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32303>
This commit is contained in:
parent
308bae950f
commit
1d206ca94c
2 changed files with 6 additions and 0 deletions
|
|
@ -386,6 +386,9 @@ static int si_init_surface(struct si_screen *sscreen, struct radeon_surf *surfac
|
|||
if (ptex->flags & PIPE_RESOURCE_FLAG_SPARSE)
|
||||
flags |= RADEON_SURF_PRT;
|
||||
|
||||
if (ptex->bind & (PIPE_BIND_VIDEO_DECODE_DPB | PIPE_BIND_VIDEO_ENCODE_DPB))
|
||||
flags |= RADEON_SURF_VIDEO_REFERENCE;
|
||||
|
||||
surface->modifier = modifier;
|
||||
|
||||
r = sscreen->ws->surface_init(sscreen->ws, &sscreen->info, ptex, flags, bpe, array_mode,
|
||||
|
|
|
|||
|
|
@ -28,6 +28,9 @@ struct pipe_video_buffer *si_video_buffer_create(struct pipe_context *pipe,
|
|||
int modifiers_count = 0;
|
||||
uint64_t mod = DRM_FORMAT_MOD_LINEAR;
|
||||
|
||||
if (tmpl->bind & (PIPE_BIND_VIDEO_DECODE_DPB | PIPE_BIND_VIDEO_ENCODE_DPB))
|
||||
return vl_video_buffer_create_as_resource(pipe, &vidbuf, NULL, 0);
|
||||
|
||||
/* To get tiled buffers, users need to explicitly provide a list of
|
||||
* modifiers. */
|
||||
vidbuf.bind |= PIPE_BIND_LINEAR;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue