diff options
author | Leo Liu <[email protected]> | 2017-02-09 10:25:20 -0500 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2017-03-30 14:44:33 +0200 |
commit | c836f2ce288f202a1c5a1514cd4890e47f60f3d7 (patch) | |
tree | 47fe33fbbba00fb21d51ea2a2ac9d25885dc631d /src/gallium/drivers/radeonsi | |
parent | 9d5db4e8f409baa4a32d4cd34d735877125684b4 (diff) |
radeon/uvd: adapt gfx9 surface to uvd
Signed-off-by: Leo Liu <[email protected]>
Acked-by: Alex Deucher <[email protected]>
Reviewed-by: Christian König <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeonsi')
-rw-r--r-- | src/gallium/drivers/radeonsi/si_uvd.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/gallium/drivers/radeonsi/si_uvd.c b/src/gallium/drivers/radeonsi/si_uvd.c index 0d5bc378b2b..53a7ce9402c 100644 --- a/src/gallium/drivers/radeonsi/si_uvd.c +++ b/src/gallium/drivers/radeonsi/si_uvd.c @@ -97,7 +97,7 @@ struct pipe_video_buffer *si_video_buffer_create(struct pipe_context *pipe, pbs[i] = &resources[i]->resource.buf; } - rvid_join_surfaces(ctx->b.ws, pbs, surfaces); + rvid_join_surfaces(&ctx->b, pbs, surfaces); for (i = 0; i < VL_NUM_COMPONENTS; ++i) { if (!resources[i]) @@ -121,12 +121,16 @@ error: /* set the decoding target buffer offsets */ static struct pb_buffer* si_uvd_set_dtb(struct ruvd_msg *msg, struct vl_video_buffer *buf) { + struct si_screen *sscreen = (struct si_screen*)buf->base.context->screen; struct r600_texture *luma = (struct r600_texture *)buf->resources[0]; struct r600_texture *chroma = (struct r600_texture *)buf->resources[1]; + enum ruvd_surface_type type = (sscreen->b.chip_class >= GFX9) ? + RUVD_SURFACE_TYPE_GFX9 : + RUVD_SURFACE_TYPE_LEGACY; msg->body.decode.dt_field_mode = buf->base.interlaced; - ruvd_set_dt_surfaces(msg, &luma->surface, &chroma->surface); + ruvd_set_dt_surfaces(msg, &luma->surface, &chroma->surface, type); return luma->resource.buf; } |