summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeon/radeon_uvd.c
diff options
context:
space:
mode:
authorMarek Olšák <marek.olsak@amd.com>2015-04-30 16:07:12 +0200
committerMarek Olšák <marek.olsak@amd.com>2015-08-07 00:06:52 +0200
commit42d9f6323a523d786fc3797587fdf63048becceb (patch)
tree51fb11126d83eca3ab6be352b55817b2a3ce871e /src/gallium/drivers/radeon/radeon_uvd.c
parent592ce6e2d1b2c804a95cb00c06e7bbb9d83f554b (diff)
downloadexternal_mesa3d-42d9f6323a523d786fc3797587fdf63048becceb.zip
external_mesa3d-42d9f6323a523d786fc3797587fdf63048becceb.tar.gz
external_mesa3d-42d9f6323a523d786fc3797587fdf63048becceb.tar.bz2
winsys/radeon: add an interface for contexts
Same idea as in libdrm_amdgpu. A command stream can only be created for a specific context and it's always submitted to that context. This will mainly be used by amdgpu and it's required by the GPU reset status query too. (radeon only has a basic version of the query and thus doesn't need this) Reviewed-by: Christian König <christian.koenig@amd.com>
Diffstat (limited to 'src/gallium/drivers/radeon/radeon_uvd.c')
-rw-r--r--src/gallium/drivers/radeon/radeon_uvd.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gallium/drivers/radeon/radeon_uvd.c b/src/gallium/drivers/radeon/radeon_uvd.c
index be58d0b..79fc0c7 100644
--- a/src/gallium/drivers/radeon/radeon_uvd.c
+++ b/src/gallium/drivers/radeon/radeon_uvd.c
@@ -761,6 +761,7 @@ struct pipe_video_codec *ruvd_create_decoder(struct pipe_context *context,
{
struct radeon_winsys* ws = ((struct r600_common_context *)context)->ws;
unsigned dpb_size = calc_dpb_size(templ);
+ struct r600_common_context *rctx = (struct r600_common_context*)context;
unsigned width = templ->width, height = templ->height;
unsigned bs_buf_size;
struct radeon_info info;
@@ -807,7 +808,7 @@ struct pipe_video_codec *ruvd_create_decoder(struct pipe_context *context,
dec->stream_handle = rvid_alloc_stream_handle();
dec->screen = context->screen;
dec->ws = ws;
- dec->cs = ws->cs_create(ws, RING_UVD, NULL, NULL, NULL);
+ dec->cs = ws->cs_create(rctx->ctx, RING_UVD, NULL, NULL, NULL);
if (!dec->cs) {
RVID_ERR("Can't get command submission context.\n");
goto error;