anv: allow intel_clflush_range only on igpu

fixes: 521c216efc
closes: #9106

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23320>
This commit is contained in:
Filip Gawin 2023-05-30 18:03:50 +02:00 committed by Marge Bot
parent 26f6ea5c30
commit fb8c48f4fc

View file

@ -237,7 +237,10 @@ anv_utrace_create_ts_buffer(struct u_trace_context *utctx, uint32_t size_b)
assert(result == VK_SUCCESS);
memset(bo->map, 0, bo->size);
intel_clflush_range(bo->map, bo->size);
#ifdef SUPPORT_INTEL_INTEGRATED_GPUS
if (device->physical->memory.need_clflush)
intel_clflush_range(bo->map, bo->size);
#endif
return bo;
}