Mesa (staging/19.2): iris: finish aux import on get_param

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Oct 17 16:29:37 UTC 2019


Module: Mesa
Branch: staging/19.2
Commit: 9a929cfef213e26b48045b6511ce399dacd21bb8
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=9a929cfef213e26b48045b6511ce399dacd21bb8

Author: James Xiong <james.xiong at intel.com>
Date:   Mon Oct 14 15:55:18 2019 -0700

iris: finish aux import on get_param

A buffer and its aux are imported separately, if the aux import is
not completed yet when resource_get_param is called, merge the
separate aux a.k.a the 2nd image into the main image.

Fixes: 246eebba4a8 ("iris: Export and import surfaces with modifiers that have aux data")

Signed-off-by: James Xiong <james.xiong at intel.com>
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
Reviewed-by: Jordan Justen <jordan.l.justen at intel.com>
(cherry picked from commit fd235484fef7d9164f98cc907d10cf680881a9c6)

---

 src/gallium/drivers/iris/iris_resource.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/gallium/drivers/iris/iris_resource.c b/src/gallium/drivers/iris/iris_resource.c
index c13356d1c83..07644eb94b3 100644
--- a/src/gallium/drivers/iris/iris_resource.c
+++ b/src/gallium/drivers/iris/iris_resource.c
@@ -1078,10 +1078,14 @@ iris_resource_get_param(struct pipe_screen *screen,
    bool mod_with_aux =
       res->mod_info && res->mod_info->aux_usage != ISL_AUX_USAGE_NONE;
    bool wants_aux = mod_with_aux && plane > 0;
-   struct iris_bo *bo = wants_aux ? res->aux.bo : res->bo;
    bool result;
    unsigned handle;
 
+   if (iris_resource_unfinished_aux_import(res))
+      iris_resource_finish_aux_import(screen, res);
+
+   struct iris_bo *bo = wants_aux ? res->aux.bo : res->bo;
+
    iris_resource_disable_aux_on_first_query(resource, handle_usage);
 
    switch (param) {




More information about the mesa-commit mailing list