iris: Fix aux assertion in resource_get_handle
authorNanley Chery <nanley.g.chery@intel.com>
Wed, 17 Jul 2019 20:19:43 +0000 (13:19 -0700)
committerMarge Bot <eric+marge@anholt.net>
Thu, 3 Sep 2020 23:43:02 +0000 (23:43 +0000)
commit3cf6325e724dbc20076629983dd1fed5ecac533a
treea491a5cb6a34cd881b65f85f434c135200eb109c
parentfd2ee49b2169c318627225bf74c645f7a3b71900
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>
src/gallium/drivers/iris/iris_resource.c