Mesa (master): iris: Fix aux assertion in resource_get_handle

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Sep 3 23:49:09 UTC 2020


Module: Mesa
Branch: master
Commit: 3cf6325e724dbc20076629983dd1fed5ecac533a
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=3cf6325e724dbc20076629983dd1fed5ecac533a

Author: Nanley Chery <nanley.g.chery at intel.com>
Date:   Wed Jul 17 13:19:43 2019 -0700

iris: Fix aux assertion in resource_get_handle

iris_resource_get_handle currently asserts that the resource has an aux
state that is suitable for sharing. However, the caller of this function
can pass a flag to specify that it will handle flushing/resolving the
resource as needed for sharing. Take this flag into account when
asserting the state of the aux buffer.

Fixes: e81392868e6 ("iris/resource: Drop redundant checks for aux support")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/128
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/1371>

---

 src/gallium/drivers/iris/iris_resource.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/gallium/drivers/iris/iris_resource.c b/src/gallium/drivers/iris/iris_resource.c
index 212fa803cea..f1040073ed6 100644
--- a/src/gallium/drivers/iris/iris_resource.c
+++ b/src/gallium/drivers/iris/iris_resource.c
@@ -1183,6 +1183,7 @@ iris_resource_get_handle(struct pipe_screen *pscreen,
 
 #ifndef NDEBUG
    enum isl_aux_usage allowed_usage =
+      usage & PIPE_HANDLE_USAGE_EXPLICIT_FLUSH ? res->aux.usage :
       res->mod_info ? res->mod_info->aux_usage : ISL_AUX_USAGE_NONE;
 
    if (res->aux.usage != allowed_usage) {



More information about the mesa-commit mailing list