brw->blorp.upload_shader = brw_blorp_upload_shader;
}
-static uint32_t tex_mocs[] = {
+static uint32_t wb_mocs[] = {
[7] = GEN7_MOCS_L3,
[8] = BDW_MOCS_WB,
[9] = SKL_MOCS_WB,
[10] = CNL_MOCS_WB,
};
-static uint32_t rb_mocs[] = {
+static uint32_t pte_mocs[] = {
[7] = GEN7_MOCS_L3,
[8] = BDW_MOCS_PTE,
[9] = SKL_MOCS_PTE,
.buffer = mt->bo,
.offset = mt->offset,
.reloc_flags = is_render_target ? EXEC_OBJECT_WRITE : 0,
- .mocs = is_render_target ? rb_mocs[devinfo->gen] : tex_mocs[devinfo->gen],
+ .mocs = (is_render_target || mt->bo->external) ? pte_mocs[devinfo->gen] :
+ wb_mocs[devinfo->gen],
};
surf->aux_usage = aux_usage;