Mesa (master): iris: Zero the add-on clear color BO on import
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Mon Aug 3 16:37:32 UTC 2020
Module: Mesa
Branch: master
Commit: 1f24c54458c64e073c91c4d98049266ac950f840
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=1f24c54458c64e073c91c4d98049266ac950f840
Author: Nanley Chery <nanley.g.chery at intel.com>
Date: Fri Jul 10 15:48:36 2020 -0700
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 at intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6092>
---
src/gallium/drivers/iris/iris_resource.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/gallium/drivers/iris/iris_resource.c b/src/gallium/drivers/iris/iris_resource.c
index d37f7426583..62888bbacd5 100644
--- a/src/gallium/drivers/iris/iris_resource.c
+++ b/src/gallium/drivers/iris/iris_resource.c
@@ -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;
}
More information about the mesa-commit
mailing list