iris: Fix BLORP vertex buffers to respect ISL MOCS settings
authorKenneth Graunke <kenneth@whitecape.org>
Wed, 5 Feb 2020 08:52:45 +0000 (00:52 -0800)
committerKenneth Graunke <kenneth@whitecape.org>
Sat, 22 Feb 2020 00:44:53 +0000 (16:44 -0800)
Fixes: a4da6008b6a ("iris: Use mocs from isl_dev.")
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3720>

src/gallium/drivers/iris/iris_blorp.c

index e3584e22549edfce9e593138f82b5702f48a3032..ec08c25019d49f7ad000730a8b81ef24d14eb786 100644 (file)
 #define BLORP_USE_SOFTPIN
 #include "blorp/blorp_genX_exec.h"
 
-#if GEN_GEN == 8
-#define MOCS_WB 0x78
-#else
-#define MOCS_WB (2 << 1)
-#endif
-
 static uint32_t *
 stream_state(struct iris_batch *batch,
              struct u_upload_mgr *uploader,
@@ -189,7 +183,7 @@ blorp_alloc_vertex_buffer(struct blorp_batch *blorp_batch,
    *addr = (struct blorp_address) {
       .buffer = bo,
       .offset = offset,
-      .mocs = MOCS_WB,
+      .mocs = iris_mocs(bo, &batch->screen->isl_dev),
    };
 
    return map;