iris: Add resolve on iris_flush_resource.
authorRafael Antognolli <rafael.antognolli@intel.com>
Thu, 28 Feb 2019 19:08:32 +0000 (11:08 -0800)
committerKenneth Graunke <kenneth@whitecape.org>
Wed, 13 Mar 2019 21:45:13 +0000 (14:45 -0700)
commit9159a5bbf882f94c48c21371049fef2d03d3dafd
treed8cecd28eeae658f2fc46af16aa7ccdb4e1720c7
parent759ceda07e122e3b2cc7a5e44698f41accb5e92c
iris: Add resolve on iris_flush_resource.

The flush_resource hook is supposedly called when the resource content
needs to be made visible to external (okay, that's pretty vague). For
instance, it gets called before a surface gets handled to the window
system. So we need to resolve it if it's not resolved yet.

v2 (Ken):
 - Check mod_info in iris_flush_resource instead of ISL_AUX_USAGE_NONE
 - Drop my old broken resolve code from iris_resource_get_handle() now
   that Rafael's got it hooked up in the right place.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/gallium/drivers/iris/iris_resource.c