[PATCH] vkd3d: Implement ID3D12Device::GetCustomHeapProperties
Derek Lesho
dlesho at codeweavers.com
Mon Nov 4 15:30:56 CST 2019
Signed-off-by: Derek Lesho <dlesho at codeweavers.com>
---
Based solely off the documentation for the function on MSDN,
assuming the UMA and CacheCoherentUMA features are TRUE.
---
libs/vkd3d/device.c | 24 +++++++++++++++++++++++-
1 file changed, 23 insertions(+), 1 deletion(-)
diff --git a/libs/vkd3d/device.c b/libs/vkd3d/device.c
index 4d6f7c9..df81226 100644
--- a/libs/vkd3d/device.c
+++ b/libs/vkd3d/device.c
@@ -2974,11 +2974,33 @@ invalid:
static D3D12_HEAP_PROPERTIES * STDMETHODCALLTYPE d3d12_device_GetCustomHeapProperties(ID3D12Device *iface,
D3D12_HEAP_PROPERTIES *heap_properties, UINT node_mask, D3D12_HEAP_TYPE heap_type)
{
- FIXME("iface %p, heap_properties %p, node_mask 0x%08x, heap_type %#x stub!\n",
+ TRACE("iface %p, heap_properties %p, node_mask 0x%08x, heap_type %#x stub!\n",
iface, heap_properties, node_mask, heap_type);
debug_ignored_node_mask(node_mask);
+ heap_properties->Type = heap_type;
+ heap_properties->CreationNodeMask = 1;
+ heap_properties->VisibleNodeMask = 1;
+
+ switch (heap_type)
+ {
+ case D3D12_HEAP_TYPE_UPLOAD:
+ heap_properties->CPUPageProperty = D3D12_CPU_PAGE_PROPERTY_WRITE_BACK;
+ heap_properties->MemoryPoolPreference = D3D12_MEMORY_POOL_L0;
+ break;
+ case D3D12_HEAP_TYPE_DEFAULT:
+ heap_properties->CPUPageProperty = D3D12_CPU_PAGE_PROPERTY_NOT_AVAILABLE;
+ heap_properties->MemoryPoolPreference = D3D12_MEMORY_POOL_L0;
+ break;
+ case D3D12_HEAP_TYPE_READBACK:
+ heap_properties->CPUPageProperty = D3D12_CPU_PAGE_PROPERTY_WRITE_BACK;
+ heap_properties->MemoryPoolPreference = D3D12_MEMORY_POOL_L0;
+ break;
+ default:
+ FIXME("Unhandled heap type: %#x\n", heap_type);
+ };
+
return heap_properties;
}
--
2.23.0
More information about the wine-devel
mailing list