From 880fab60a79129e28e8453acb61b4067ddb85cb6 Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Fri, 28 Oct 2022 20:58:13 -0700 Subject: [PATCH] iris: Pin the clear color BO in use_image() Images with the RC_CCS modifier store the clear color in a separate BO, which we also need to pin when using an image view. Most images store the clear color in the same BO so it works anyway. Thanks to Nanley Chery for catching this! Reviewed-by: Nanley Chery Part-of: --- src/gallium/drivers/iris/iris_state.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/gallium/drivers/iris/iris_state.c b/src/gallium/drivers/iris/iris_state.c index d1e6a56..4ac9a25 100644 --- a/src/gallium/drivers/iris/iris_state.c +++ b/src/gallium/drivers/iris/iris_state.c @@ -5132,6 +5132,11 @@ use_image(struct iris_batch *batch, struct iris_context *ice, if (res->aux.bo) iris_use_pinned_bo(batch, res->aux.bo, write, IRIS_DOMAIN_NONE); + if (res->aux.clear_color_bo) { + iris_use_pinned_bo(batch, res->aux.clear_color_bo, false, + IRIS_DOMAIN_NONE); + } + enum isl_aux_usage aux_usage = iris_image_view_aux_usage(ice, &iv->base, info); -- 2.7.4