crocus: Fix MOCS for buffer copies.
authorKenneth Graunke <kenneth@whitecape.org>
Thu, 21 Oct 2021 04:29:57 +0000 (21:29 -0700)
committerMarge Bot <emma+marge@anholt.net>
Thu, 28 Oct 2021 19:45:55 +0000 (19:45 +0000)
We were passing a MOCS of 0, which is uncached.  Yikes.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13480>

src/gallium/drivers/crocus/crocus_blit.c

index 2fad9a3..c32bf9f 100644 (file)
@@ -708,9 +708,11 @@ crocus_copy_region(struct blorp_context *blorp,
    if (dst->target == PIPE_BUFFER && src->target == PIPE_BUFFER) {
       struct blorp_address src_addr = {
          .buffer = crocus_resource_bo(src), .offset = src_box->x,
+         .mocs = crocus_mocs(src_res->bo, &screen->isl_dev),
       };
       struct blorp_address dst_addr = {
          .buffer = crocus_resource_bo(dst), .offset = dstx,
+         .mocs = crocus_mocs(dst_res->bo, &screen->isl_dev),
          .reloc_flags = EXEC_OBJECT_WRITE,
       };