iris: support dmabuf imports with offsets

this adds support for imports where the image data begins at an offset
from the start of the buffer, as used in h/x264

fixes kwg/mesa#47

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
Mike Blumenkrantz
2019-04-30 14:51:52 -04:00
committed by Kenneth Graunke
parent 748f603390
commit ddd716e746
4 changed files with 12 additions and 12 deletions

View File

@@ -246,7 +246,7 @@ iris_blorp_surf_for_resource(struct iris_vtable *vtbl,
.surf = &res->surf,
.addr = (struct blorp_address) {
.buffer = res->bo,
.offset = 0, // XXX: ???
.offset = res->offset,
.reloc_flags = is_render_target ? EXEC_OBJECT_WRITE : 0,
.mocs = vtbl->mocs(res->bo),
},