summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeon/radeon_uvd.c
diff options
context:
space:
mode:
authorNicolai Hähnle <nicolai.haehnle@amd.com>2016-09-29 16:50:10 +0200
committerNicolai Hähnle <nicolai.haehnle@amd.com>2016-09-30 12:38:52 +0200
commit3e7cced4b999478dee955e647bb777e1893f8cc6 (patch)
treec4041900afa895bc27c2f393c6e81abcff4050b5 /src/gallium/drivers/radeon/radeon_uvd.c
parenta48bf02d053fb3db88e9fe50764728657d78214a (diff)
downloadexternal_mesa3d-3e7cced4b999478dee955e647bb777e1893f8cc6.zip
external_mesa3d-3e7cced4b999478dee955e647bb777e1893f8cc6.tar.gz
external_mesa3d-3e7cced4b999478dee955e647bb777e1893f8cc6.tar.bz2
radeon/uvd: adjust the buffer offset when relocation is used
We don't plan to use sub-allocated buffers with UVD, but just in case one slips through, this increases the chances of things working out anyway. 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.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gallium/drivers/radeon/radeon_uvd.c b/src/gallium/drivers/radeon/radeon_uvd.c
index 3ae0eaa..9c376cb 100644
--- a/src/gallium/drivers/radeon/radeon_uvd.c
+++ b/src/gallium/drivers/radeon/radeon_uvd.c
@@ -123,6 +123,7 @@ static void send_cmd(struct ruvd_decoder *dec, unsigned cmd,
set_reg(dec, RUVD_GPCOM_VCPU_DATA0, addr);
set_reg(dec, RUVD_GPCOM_VCPU_DATA1, addr >> 32);
} else {
+ off += dec->ws->buffer_get_virtual_address(buf);
set_reg(dec, RUVD_GPCOM_VCPU_DATA0, off);
set_reg(dec, RUVD_GPCOM_VCPU_DATA1, reloc_idx * 4);
}