From 4de13d53fee35fa7d9f2b45930356537a5b2c34a Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Thu, 3 Mar 2022 23:57:13 -0800 Subject: [PATCH] iris: Fix MOCS for copy regions These were, unfortunately, backwards. The source is the texture. The destination is the render target. Fixes: d8cb76211c5 ("iris: Fix MOCS for buffer copies") Reviewed-by: Francisco Jerez Reviewed-by: Jason Ekstrand Part-of: --- src/gallium/drivers/iris/iris_blit.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/iris/iris_blit.c b/src/gallium/drivers/iris/iris_blit.c index 59253230adc..3f1239cd5c1 100644 --- a/src/gallium/drivers/iris/iris_blit.c +++ b/src/gallium/drivers/iris/iris_blit.c @@ -689,14 +689,14 @@ iris_copy_region(struct blorp_context *blorp, struct blorp_address src_addr = { .buffer = src_res->bo, .offset = src_box->x, .mocs = iris_mocs(src_res->bo, &screen->isl_dev, - ISL_SURF_USAGE_RENDER_TARGET_BIT), + ISL_SURF_USAGE_TEXTURE_BIT), .local_hint = iris_bo_likely_local(src_res->bo), }; struct blorp_address dst_addr = { .buffer = dst_res->bo, .offset = dstx, .reloc_flags = EXEC_OBJECT_WRITE, .mocs = iris_mocs(dst_res->bo, &screen->isl_dev, - ISL_SURF_USAGE_TEXTURE_BIT), + ISL_SURF_USAGE_RENDER_TARGET_BIT), .local_hint = iris_bo_likely_local(dst_res->bo), };