[Mesa-dev] [PATCH 2/4] radeon/vce: adjust the buffer offset when relocation is used

Nicolai Hähnle nhaehnle at gmail.com
Thu Sep 29 16:35:22 UTC 2016


From: Nicolai Hähnle <nicolai.haehnle at amd.com>

---
 src/gallium/drivers/radeon/radeon_vce.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/gallium/drivers/radeon/radeon_vce.c b/src/gallium/drivers/radeon/radeon_vce.c
index dd4c367..d45ec12 100644
--- a/src/gallium/drivers/radeon/radeon_vce.c
+++ b/src/gallium/drivers/radeon/radeon_vce.c
@@ -542,14 +542,15 @@ void rvce_add_buffer(struct rvce_encoder *enc, struct pb_buffer *buf,
 
 	reloc_idx = enc->ws->cs_add_buffer(enc->cs, buf, usage | RADEON_USAGE_SYNCHRONIZED,
 					   domain, RADEON_PRIO_VCE);
 	if (enc->use_vm) {
 		uint64_t addr;
 		addr = enc->ws->buffer_get_virtual_address(buf);
 		addr = addr + offset;
 		RVCE_CS(addr >> 32);
 		RVCE_CS(addr);
 	} else {
+		offset += enc->ws->buffer_get_virtual_address(buf);
 		RVCE_CS(reloc_idx * 4);
 		RVCE_CS(offset);
 	}
 }
-- 
2.7.4



More information about the mesa-dev mailing list