iris: Export and import surfaces with modifiers that have aux data

The DRI interface for modifiers with aux data treats the aux data as a
separate plane of the main surface.

When the dri layer requests the plane associated with the aux data, we
save the required information into the dri aux plane image.

Later when the image is used, the dri plane image will be available in
the pipe_resource structure's `next` field. Therefore in iris, we
reconstruct the aux setup from this separate dri plane image when the
image is used.

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
Jordan Justen
2019-07-09 00:47:15 -07:00
parent 99c8eb997d
commit 246eebba4a
4 changed files with 117 additions and 24 deletions

View File

@@ -238,6 +238,8 @@ iris_blorp_surf_for_resource(struct iris_vtable *vtbl,
{
struct iris_resource *res = (void *) p_res;
assert(!iris_resource_unfinished_aux_import(res));
if (aux_usage == ISL_AUX_USAGE_HIZ &&
!iris_resource_level_has_hiz(res, level))
aux_usage = ISL_AUX_USAGE_NONE;