diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/intel/vulkan/anv_private.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/intel/vulkan/anv_private.h b/src/intel/vulkan/anv_private.h index cd35eba2668..c36fdcf75b4 100644 --- a/src/intel/vulkan/anv_private.h +++ b/src/intel/vulkan/anv_private.h @@ -448,6 +448,19 @@ anv_clflush_range(void *start, size_t size) } } +static inline void +anv_invalidate_range(void *start, size_t size) +{ + void *p = (void *) (((uintptr_t) start) & ~CACHELINE_MASK); + void *end = start + size; + + while (p < end) { + __builtin_ia32_clflush(p); + p += CACHELINE_SIZE; + } + __builtin_ia32_mfence(); +} + static void inline anv_state_clflush(struct anv_state state) { |