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 <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19060>
This commit is contained in:
Kenneth Graunke 2022-10-28 20:58:13 -07:00 committed by Marge Bot
parent 699e60681a
commit 880fab60a7

View file

@ -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);