iris: Zero the add-on clear color BO on import
authorNanley Chery <nanley.g.chery@intel.com>
Fri, 10 Jul 2020 22:48:36 +0000 (15:48 -0700)
committerNanley Chery <nanley.g.chery@intel.com>
Mon, 3 Aug 2020 16:24:16 +0000 (16:24 +0000)
commit1f24c54458c64e073c91c4d98049266ac950f840
tree4054a5a2984466ccb2bc49a75118da037cb06591
parenta9560939e07a9b15c0e655dc2c4f9b38190b6293
iris: Zero the add-on clear color BO on import

When iris imports an I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS surface, it
allocates a buffer to hold the indirect clear color. When the import is
complete, iris_resource::aux::clear_color is set to zero but the
indirect buffer is filled with garbage values. This could break certain
texture view use-cases, so zero the allocated buffer to fix those.

Fixes: c19492bcdb9 ("iris: Handle importing aux-enabled surfaces on TGL")
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6092>
src/gallium/drivers/iris/iris_resource.c