anvil,hasvk: Use intel_flush_range_no_fence to flush command buffers

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22379>
This commit is contained in:
Jordan Justen
2023-08-04 12:55:15 -07:00
committed by Marge Bot
parent 9f20be64e6
commit e111d3241a
2 changed files with 5 additions and 4 deletions
+3 -2
View File
@@ -1456,9 +1456,10 @@ anv_cmd_buffer_clflush(struct anv_cmd_buffer **cmd_buffers,
for (uint32_t i = 0; i < num_cmd_buffers; i++) {
u_vector_foreach(bbo, &cmd_buffers[i]->seen_bbos) {
for (uint32_t l = 0; l < (*bbo)->length; l += CACHELINE_SIZE)
__builtin_ia32_clflush((*bbo)->bo->map + l);
intel_flush_range_no_fence((*bbo)->bo->map, (*bbo)->length);
}
}
__builtin_ia32_mfence();
#endif
}
+2 -2
View File
@@ -1903,10 +1903,10 @@ setup_execbuf_for_cmd_buffers(struct anv_execbuf *execbuf,
__builtin_ia32_mfence();
for (uint32_t i = 0; i < num_cmd_buffers; i++) {
u_vector_foreach(bbo, &cmd_buffers[i]->seen_bbos) {
for (uint32_t l = 0; l < (*bbo)->length; l += CACHELINE_SIZE)
__builtin_ia32_clflush((*bbo)->bo->map + l);
intel_flush_range_no_fence((*bbo)->bo->map, (*bbo)->length);
}
}
__builtin_ia32_mfence();
}
struct anv_batch *batch = &cmd_buffers[0]->batch;