From: Nicolai Hähnle <[email protected]>

We don't plan to use sub-allocated buffers with VCE, but just in case one
slips through, this increases the chances of things working out anyway.
---
 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 10c5a78..30705c1 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

_______________________________________________
mesa-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to