diff --git a/src/intel/vulkan/anv_allocator.c b/src/intel/vulkan/anv_allocator.c index 40491b2c760..33c894a5661 100644 --- a/src/intel/vulkan/anv_allocator.c +++ b/src/intel/vulkan/anv_allocator.c @@ -376,8 +376,7 @@ anv_block_pool_init(struct anv_block_pool *pool, ANV_BO_ALLOC_FIXED_ADDRESS | ANV_BO_ALLOC_MAPPED | ANV_BO_ALLOC_SNOOPED | - ANV_BO_ALLOC_CAPTURE | - (device->info->has_local_mem ? ANV_BO_ALLOC_WRITE_COMBINE : 0); + ANV_BO_ALLOC_CAPTURE; result = anv_block_pool_expand_range(pool, initial_size); if (result != VK_SUCCESS) @@ -1095,8 +1094,7 @@ anv_bo_pool_init(struct anv_bo_pool *pool, struct anv_device *device, pool->bo_alloc_flags = ANV_BO_ALLOC_MAPPED | ANV_BO_ALLOC_SNOOPED | - ANV_BO_ALLOC_CAPTURE | - (device->info->has_local_mem ? ANV_BO_ALLOC_WRITE_COMBINE : 0); + ANV_BO_ALLOC_CAPTURE; for (unsigned i = 0; i < ARRAY_SIZE(pool->free_list); i++) { util_sparse_array_free_list_init(&pool->free_list[i], @@ -1513,7 +1511,6 @@ anv_device_alloc_bo(struct anv_device *device, (alloc_flags & ANV_BO_ALLOC_CLIENT_VISIBLE_ADDRESS) != 0, .has_implicit_ccs = ccs_size > 0 || (device->info->verx10 >= 125 && !(alloc_flags & ANV_BO_ALLOC_NO_LOCAL_MEM)), - .map_wc = alloc_flags & ANV_BO_ALLOC_WRITE_COMBINE, .vram_only = nregions == 1 && regions[0] == device->physical->vram_non_mappable.region, }; diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c index ff89755c53c..d544af0e5c5 100644 --- a/src/intel/vulkan/anv_device.c +++ b/src/intel/vulkan/anv_device.c @@ -3229,9 +3229,7 @@ VkResult anv_CreateDevice( result = anv_device_alloc_bo(device, "workaround", 4096, ANV_BO_ALLOC_CAPTURE | - ANV_BO_ALLOC_MAPPED | - (device->info->has_local_mem ? - ANV_BO_ALLOC_WRITE_COMBINE : 0), + ANV_BO_ALLOC_MAPPED, 0 /* explicit_address */, &device->workaround_bo); if (result != VK_SUCCESS) @@ -3741,14 +3739,6 @@ VkResult anv_AllocateMemory( if (!mem_heap->is_local_mem) alloc_flags |= ANV_BO_ALLOC_NO_LOCAL_MEM; - /* If the allocated buffer might end up in local memory and it's host - * visible and uncached, enable CPU write-combining. It should be faster. - */ - if (mem_heap->is_local_mem && - (mem_type->propertyFlags & VK_MEMORY_PROPERTY_HOST_CACHED_BIT) == 0 && - (mem_type->propertyFlags & VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT)) - alloc_flags |= ANV_BO_ALLOC_WRITE_COMBINE; - if (mem->vk.alloc_flags & VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_BIT) alloc_flags |= ANV_BO_ALLOC_CLIENT_VISIBLE_ADDRESS; diff --git a/src/intel/vulkan/anv_private.h b/src/intel/vulkan/anv_private.h index ad708a94e7c..3ba559ac481 100644 --- a/src/intel/vulkan/anv_private.h +++ b/src/intel/vulkan/anv_private.h @@ -378,14 +378,8 @@ enum anv_bo_alloc_flags { /** For non device local allocations */ ANV_BO_ALLOC_NO_LOCAL_MEM = (1 << 11), - /** For local memory, ensure that the writes are combined. - * - * Should be faster for bo pools, which write but do not read - */ - ANV_BO_ALLOC_WRITE_COMBINE = (1 << 12), - /** This buffer will be scanout to display */ - ANV_BO_ALLOC_SCANOUT = (1 << 13), + ANV_BO_ALLOC_SCANOUT = (1 << 12), }; struct anv_bo { @@ -473,9 +467,6 @@ struct anv_bo { /** True if this BO has implicit CCS data attached to it */ bool has_implicit_ccs:1; - /** True if this BO should be mapped with Write Combine enabled */ - bool map_wc:1; - /** True if this BO can only live in VRAM */ bool vram_only:1; }; diff --git a/src/intel/vulkan/i915/anv_kmd_backend.c b/src/intel/vulkan/i915/anv_kmd_backend.c index a3c26dede4a..3c7222f2f87 100644 --- a/src/intel/vulkan/i915/anv_kmd_backend.c +++ b/src/intel/vulkan/i915/anv_kmd_backend.c @@ -134,8 +134,6 @@ mmap_calc_flags(struct anv_device *device, struct anv_bo *bo, if (!device->info->has_llc && (property_flags & VK_MEMORY_PROPERTY_HOST_COHERENT_BIT)) flags |= I915_MMAP_WC; - if (bo->map_wc) - flags |= I915_MMAP_WC; if (!(property_flags & VK_MEMORY_PROPERTY_HOST_CACHED_BIT)) flags |= I915_MMAP_WC;