Commit 03d623b1 authored by Nanley Chery's avatar Nanley Chery Committed by Eric Engestrom
Browse files

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: e8139286 ("iris/resource: Drop redundant checks for aux support")
Closes: #128

Reviewed-by: Kenneth Graunke's avatarKenneth Graunke <kenneth@whitecape.org>
Part-of: <!1371>
(cherry picked from commit 3cf6325e)
parent f035c0ca
......@@ -1777,7 +1777,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"
},
......@@ -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) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment