hasvk: Switch to util/cache_ops.h
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37803>
This commit is contained in:
committed by
Marge Bot
parent
a47184e396
commit
6d67828839
@@ -1895,7 +1895,7 @@ 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) {
|
||||
intel_flush_range_no_fence((*bbo)->bo->map, (*bbo)->length);
|
||||
util_flush_range_no_fence((*bbo)->bo->map, (*bbo)->length);
|
||||
}
|
||||
}
|
||||
__builtin_ia32_mfence();
|
||||
@@ -1981,7 +1981,7 @@ setup_utrace_execbuf(struct anv_execbuf *execbuf, struct anv_queue *queue,
|
||||
|
||||
#ifdef SUPPORT_INTEL_INTEGRATED_GPUS
|
||||
if (device->physical->memory.need_flush)
|
||||
intel_flush_range(flush->batch_bo->map, flush->batch_bo->size);
|
||||
util_flush_range(flush->batch_bo->map, flush->batch_bo->size);
|
||||
#endif
|
||||
|
||||
execbuf->execbuf = (struct drm_i915_gem_execbuffer2) {
|
||||
@@ -2398,7 +2398,7 @@ anv_queue_submit_simple_batch(struct anv_queue *queue,
|
||||
memcpy(batch_bo->map, batch->start, batch_size);
|
||||
#ifdef SUPPORT_INTEL_INTEGRATED_GPUS
|
||||
if (device->physical->memory.need_flush)
|
||||
intel_flush_range(batch_bo->map, batch_size);
|
||||
util_flush_range(batch_bo->map, batch_size);
|
||||
#endif
|
||||
|
||||
struct anv_execbuf execbuf = {
|
||||
|
||||
@@ -2258,7 +2258,7 @@ anv_device_init_trivial_batch(struct anv_device *device)
|
||||
|
||||
#ifdef SUPPORT_INTEL_INTEGRATED_GPUS
|
||||
if (device->physical->memory.need_flush)
|
||||
intel_flush_range(batch.start, batch.next - batch.start);
|
||||
util_flush_range(batch.start, batch.next - batch.start);
|
||||
#endif
|
||||
|
||||
return VK_SUCCESS;
|
||||
@@ -3417,9 +3417,9 @@ VkResult anv_FlushMappedMemoryRanges(
|
||||
continue;
|
||||
|
||||
#ifdef SUPPORT_INTEL_INTEGRATED_GPUS
|
||||
intel_flush_range(mem->map + map_offset,
|
||||
MIN2(pMemoryRanges[i].size,
|
||||
mem->map_size - map_offset));
|
||||
util_flush_range(mem->map + map_offset,
|
||||
MIN2(pMemoryRanges[i].size,
|
||||
mem->map_size - map_offset));
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -3446,7 +3446,7 @@ VkResult anv_InvalidateMappedMemoryRanges(
|
||||
continue;
|
||||
|
||||
#ifdef SUPPORT_INTEL_INTEGRATED_GPUS
|
||||
intel_invalidate_range(mem->map + map_offset,
|
||||
util_flush_inval_range(mem->map + map_offset,
|
||||
MIN2(pMemoryRanges[i].size,
|
||||
mem->map_size - map_offset));
|
||||
#endif
|
||||
|
||||
@@ -45,7 +45,6 @@
|
||||
#include "common/intel_gem.h"
|
||||
#include "common/intel_l3_config.h"
|
||||
#include "common/intel_measure.h"
|
||||
#include "common/intel_mem.h"
|
||||
#include "common/intel_sample_positions.h"
|
||||
#include "decoder/intel_decoder.h"
|
||||
#include "dev/intel_device_info.h"
|
||||
@@ -54,6 +53,7 @@
|
||||
#include "ds/intel_driver_ds.h"
|
||||
#include "util/bitset.h"
|
||||
#include "util/bitscan.h"
|
||||
#include "util/cache_ops.h"
|
||||
#include "util/detect_os.h"
|
||||
#include "util/macros.h"
|
||||
#include "util/hash_table.h"
|
||||
@@ -1396,7 +1396,7 @@ write_reloc(const struct anv_device *device, void *p, uint64_t v, bool flush)
|
||||
|
||||
#ifdef SUPPORT_INTEL_INTEGRATED_GPUS
|
||||
if (flush && device->physical->memory.need_flush)
|
||||
intel_flush_range(p, reloc_size);
|
||||
util_flush_range(p, reloc_size);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -99,8 +99,8 @@ VkResult anv_QueuePresentKHR(
|
||||
device->debug_frame_desc->frame_id++;
|
||||
#ifdef SUPPORT_INTEL_INTEGRATED_GPUS
|
||||
if (device->physical->memory.need_flush) {
|
||||
intel_flush_range(device->debug_frame_desc,
|
||||
sizeof(*device->debug_frame_desc));
|
||||
util_flush_range(device->debug_frame_desc,
|
||||
sizeof(*device->debug_frame_desc));
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user