From 65804bbde5a519b3f9df5571c104da26521b43a0 Mon Sep 17 00:00:00 2001 From: Hans-Kristian Arntzen Date: Tue, 28 Jun 2022 19:29:28 +0200 Subject: [PATCH] vkd3d: Ignore cpu_access_domain when reporting heap tier. For host visible, we only place buffers anyways. Signed-off-by: Hans-Kristian Arntzen --- libs/vkd3d/device.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/libs/vkd3d/device.c b/libs/vkd3d/device.c index af0ccad2..f3094c7c 100644 --- a/libs/vkd3d/device.c +++ b/libs/vkd3d/device.c @@ -5552,16 +5552,14 @@ static D3D12_RESOURCE_HEAP_TIER d3d12_device_determine_heap_tier(struct d3d12_de const VkPhysicalDeviceLimits *limits = &device->device_info.properties2.properties.limits; const struct vkd3d_memory_info *mem_info = &device->memory_info; const struct vkd3d_memory_info_domain *non_cpu_domain; - const struct vkd3d_memory_info_domain *cpu_domain; non_cpu_domain = &mem_info->non_cpu_accessible_domain; - cpu_domain = &mem_info->cpu_accessible_domain; - // Heap Tier 2 requires us to be able to create a heap that supports all resource - // categories at the same time, except RT/DS textures on UPLOAD/READBACK heaps. + /* Heap Tier 2 requires us to be able to create a heap that supports all resource + * categories at the same time, except RT/DS textures on UPLOAD/READBACK heaps. + * Ignore CPU visible heaps since we only place buffers there. Textures are promoted to committed always. */ if (limits->bufferImageGranularity > D3D12_DEFAULT_RESOURCE_PLACEMENT_ALIGNMENT || - !(non_cpu_domain->buffer_type_mask & non_cpu_domain->sampled_type_mask & non_cpu_domain->rt_ds_type_mask) || - !(cpu_domain->buffer_type_mask & cpu_domain->sampled_type_mask)) + !(non_cpu_domain->buffer_type_mask & non_cpu_domain->sampled_type_mask & non_cpu_domain->rt_ds_type_mask)) return D3D12_RESOURCE_HEAP_TIER_1; return D3D12_RESOURCE_HEAP_TIER_2;