diff options
author | Hans-Kristian Arntzen <post@arntzen-software.no> | 2022-06-28 20:29:28 +0300 |
---|---|---|
committer | Hans-Kristian Arntzen <post@arntzen-software.no> | 2022-06-28 20:38:36 +0300 |
commit | 8d9eee4c108883b21191756e2f963fb98e096b7a (patch) | |
tree | 8b2537c18bbe9fb9dac46fc493dec914a6da4cd1 | |
parent | 7877cc93a042ea13e0a398ac9669e95ac8808b48 (diff) |
vkd3d: Ignore cpu_access_domain when reporting heap tier.placed-linear-image-workarounds
For host visible, we only place buffers anyways.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
-rw-r--r-- | libs/vkd3d/device.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/libs/vkd3d/device.c b/libs/vkd3d/device.c index 19090951..210b9052 100644 --- a/libs/vkd3d/device.c +++ b/libs/vkd3d/device.c @@ -5539,16 +5539,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; |