diff options
author | Nanley Chery <nanley.g.chery@intel.com> | 2019-07-17 13:19:43 -0700 |
---|---|---|
committer | Eric Engestrom <eric@engestrom.ch> | 2020-09-16 19:23:24 +0200 |
commit | 59bd16ee861f5ff53bd3c4d25b7bc0a6ad672c8e (patch) | |
tree | 7cea6fe7e5565c0b0a645654f3285ce3ebc56371 | |
parent | db89c572095cec39b54b16d980560715a60c56c8 (diff) |
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@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/1371>
(cherry picked from commit 3cf6325e724dbc20076629983dd1fed5ecac533a)
-rw-r--r-- | .pick_status.json | 2 | ||||
-rw-r--r-- | src/gallium/drivers/iris/iris_resource.c | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/.pick_status.json b/.pick_status.json index a35d3ce18a3..a0001b6bd56 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -2731,7 +2731,7 @@ "description": "iris: Fix aux assertion in resource_get_handle", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "master_sha": null, "because_sha": "e81392868e6827360762fff38baf2c10c1f3b7f0" }, diff --git a/src/gallium/drivers/iris/iris_resource.c b/src/gallium/drivers/iris/iris_resource.c index 0f71c5a8593..b594110654f 100644 --- a/src/gallium/drivers/iris/iris_resource.c +++ b/src/gallium/drivers/iris/iris_resource.c @@ -1245,6 +1245,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) { |