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: c19492bcdb
("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>
This commit is contained in:
parent
a9560939e0
commit
1f24c54458
|
@ -782,8 +782,9 @@ iris_resource_finish_aux_import(struct pipe_screen *pscreen,
|
|||
|
||||
if (clear_color_state_size > 0) {
|
||||
res->aux.clear_color_bo =
|
||||
iris_bo_alloc(screen->bufmgr, "clear color buffer",
|
||||
clear_color_state_size, IRIS_MEMZONE_OTHER);
|
||||
iris_bo_alloc_tiled(screen->bufmgr, "clear color_buffer",
|
||||
clear_color_state_size, 1, IRIS_MEMZONE_OTHER,
|
||||
I915_TILING_NONE, 0, BO_ALLOC_ZEROED);
|
||||
res->aux.clear_color_offset = 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue