Skip to content

Commit 8d9eee4

Browse files
vkd3d: Ignore cpu_access_domain when reporting heap tier.
For host visible, we only place buffers anyways. Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
1 parent 7877cc9 commit 8d9eee4

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

libs/vkd3d/device.c

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5539,16 +5539,14 @@ static D3D12_RESOURCE_HEAP_TIER d3d12_device_determine_heap_tier(struct d3d12_de
55395539
const VkPhysicalDeviceLimits *limits = &device->device_info.properties2.properties.limits;
55405540
const struct vkd3d_memory_info *mem_info = &device->memory_info;
55415541
const struct vkd3d_memory_info_domain *non_cpu_domain;
5542-
const struct vkd3d_memory_info_domain *cpu_domain;
55435542

55445543
non_cpu_domain = &mem_info->non_cpu_accessible_domain;
5545-
cpu_domain = &mem_info->cpu_accessible_domain;
55465544

5547-
// Heap Tier 2 requires us to be able to create a heap that supports all resource
5548-
// categories at the same time, except RT/DS textures on UPLOAD/READBACK heaps.
5545+
/* Heap Tier 2 requires us to be able to create a heap that supports all resource
5546+
* categories at the same time, except RT/DS textures on UPLOAD/READBACK heaps.
5547+
* Ignore CPU visible heaps since we only place buffers there. Textures are promoted to committed always. */
55495548
if (limits->bufferImageGranularity > D3D12_DEFAULT_RESOURCE_PLACEMENT_ALIGNMENT ||
5550-
!(non_cpu_domain->buffer_type_mask & non_cpu_domain->sampled_type_mask & non_cpu_domain->rt_ds_type_mask) ||
5551-
!(cpu_domain->buffer_type_mask & cpu_domain->sampled_type_mask))
5549+
!(non_cpu_domain->buffer_type_mask & non_cpu_domain->sampled_type_mask & non_cpu_domain->rt_ds_type_mask))
55525550
return D3D12_RESOURCE_HEAP_TIER_1;
55535551

55545552
return D3D12_RESOURCE_HEAP_TIER_2;

0 commit comments

Comments
 (0)