radeon/video: add gfx9 offsets when rejoin the video surface
authorLeo Liu <leo.liu@amd.com>
Wed, 25 Oct 2017 13:46:17 +0000 (09:46 -0400)
committerLeo Liu <leo.liu@amd.com>
Thu, 26 Oct 2017 12:30:21 +0000 (08:30 -0400)
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>
src/gallium/drivers/radeon/radeon_video.c

index 4f796e8036e143dcf9adeaa76bb1be461b75c4e2..2a7ad187bec208814727440ae94084920792e597 100644 (file)
@@ -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;
        }