radeon/vce: adjust the buffer offset when relocation is used
authorNicolai Hähnle <nicolai.haehnle@amd.com>
Thu, 29 Sep 2016 14:47:53 +0000 (16:47 +0200)
committerNicolai Hähnle <nicolai.haehnle@amd.com>
Fri, 30 Sep 2016 10:38:48 +0000 (12:38 +0200)
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.

Reviewed-by: Christian König <christian.koenig@amd.com>
src/gallium/drivers/radeon/radeon_vce.c

index 10c5a78dd3375e5c90d136bd62a2a0e137ac431c..30705c1caef243e28005fd0b5310787374f72d81 100644 (file)
@@ -549,6 +549,7 @@ void rvce_add_buffer(struct rvce_encoder *enc, struct pb_buffer *buf,
                RVCE_CS(addr >> 32);
                RVCE_CS(addr);
        } else {
+               offset += enc->ws->buffer_get_virtual_address(buf);
                RVCE_CS(reloc_idx * 4);
                RVCE_CS(offset);
        }