mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-03 00:40:09 +01:00
anv: skip flush/invalidate faster
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17481>
This commit is contained in:
parent
1aeb11cde1
commit
3a8ad28524
1 changed files with 6 additions and 6 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue