anv: Use an address for each anv_image plane

This is better than having BO and offset fields.

Reviewed-by: Scott D Phillips <scott.d.phillips@intel.com>
This commit is contained in:
Jason Ekstrand
2018-05-30 18:55:00 -07:00
parent 1f2328c3b7
commit bf34ef16ac
5 changed files with 32 additions and 35 deletions

View File

@@ -93,8 +93,10 @@ VkResult anv_CreateDmaBufImageINTEL(
if (device->instance->physicalDevice.supports_48bit_addresses)
mem->bo->flags |= EXEC_OBJECT_SUPPORTS_48B_ADDRESS;
image->planes[0].bo = mem->bo;
image->planes[0].bo_offset = 0;
image->planes[0].address = (struct anv_address) {
.bo = mem->bo,
.offset = 0,
};
assert(image->extent.width > 0);
assert(image->extent.height > 0);