Mesa (main): anv: skip flush/invalidate faster
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Jul 13 02:06:32 UTC 2022
Module: Mesa
Branch: main
Commit: 3a8ad28524bc6c8b8ce31f57cd47ca538614c610
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=3a8ad28524bc6c8b8ce31f57cd47ca538614c610
Author: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Date: Tue Jul 12 11:21:57 2022 +0300
anv: skip flush/invalidate faster
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Reviewed-by: Marcin Ślusarz <marcin.slusarz at intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17481>
---
src/intel/vulkan/anv_device.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c
index 6766840851d..03cbea51f02 100644
--- a/src/intel/vulkan/anv_device.c
+++ b/src/intel/vulkan/anv_device.c
@@ -4199,11 +4199,11 @@ VkResult anv_FlushMappedMemoryRanges(
for (uint32_t i = 0; i < memoryRangeCount; i++) {
ANV_FROM_HANDLE(anv_device_memory, mem, pMemoryRanges[i].memory);
- uint64_t map_offset = pMemoryRanges[i].offset + mem->map_delta;
- if (map_offset >= mem->map_size)
+ if (mem->type->propertyFlags & VK_MEMORY_PROPERTY_HOST_COHERENT_BIT)
continue;
- if (mem->type->propertyFlags & VK_MEMORY_PROPERTY_HOST_COHERENT_BIT)
+ uint64_t map_offset = pMemoryRanges[i].offset + mem->map_delta;
+ if (map_offset >= mem->map_size)
continue;
intel_clflush_range(mem->map + map_offset,
@@ -4226,11 +4226,11 @@ VkResult anv_InvalidateMappedMemoryRanges(
for (uint32_t i = 0; i < memoryRangeCount; i++) {
ANV_FROM_HANDLE(anv_device_memory, mem, pMemoryRanges[i].memory);
- uint64_t map_offset = pMemoryRanges[i].offset + mem->map_delta;
- if (map_offset >= mem->map_size)
+ if (mem->type->propertyFlags & VK_MEMORY_PROPERTY_HOST_COHERENT_BIT)
continue;
- if (mem->type->propertyFlags & VK_MEMORY_PROPERTY_HOST_COHERENT_BIT)
+ uint64_t map_offset = pMemoryRanges[i].offset + mem->map_delta;
+ if (map_offset >= mem->map_size)
continue;
intel_invalidate_range(mem->map + map_offset,
More information about the mesa-commit
mailing list