summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/radeon/radeon_video.c
diff options
context:
space:
mode:
authorLeo Liu <leo.liu@amd.com>2017-10-25 09:46:17 -0400
committerLeo Liu <leo.liu@amd.com>2017-10-26 08:30:21 -0400
commitea3dc75d72c148dabffa71e8657bfd831ad0afe9 (patch)
tree7d82eced8cdb9d9f8ec3173c2595eefc3475c0c5 /src/gallium/drivers/radeon/radeon_video.c
parent06a12f250f9f8d7790b7777240440c1ea525d908 (diff)
radeon/video: add gfx9 offsets when rejoin the video surface
For CPU access. Signed-off-by: Leo Liu <leo.liu@amd.com> Cc: mesa-stable@lists.freedesktop.org Reviewed-by: Christian König <christian.koenig@amd.com>
Diffstat (limited to 'src/gallium/drivers/radeon/radeon_video.c')
-rw-r--r--src/gallium/drivers/radeon/radeon_video.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gallium/drivers/radeon/radeon_video.c b/src/gallium/drivers/radeon/radeon_video.c
index 4f796e8036e..2a7ad187bec 100644
--- a/src/gallium/drivers/radeon/radeon_video.c
+++ b/src/gallium/drivers/radeon/radeon_video.c
@@ -182,8 +182,11 @@ void si_vid_join_surfaces(struct r600_common_context *rctx,
for (j = 0; j < ARRAY_SIZE(surfaces[i]->u.legacy.level); ++j)
surfaces[i]->u.legacy.level[j].offset += off;
- } else
+ } else {
surfaces[i]->u.gfx9.surf_offset += off;
+ for (j = 0; j < ARRAY_SIZE(surfaces[i]->u.gfx9.offset); ++j)
+ surfaces[i]->u.gfx9.offset[j] += off;
+ }
off += surfaces[i]->surf_size;
}