From: Conor McCarthy cmccarthy@codeweavers.com
Hitman 2 calls GetHeapProperties() for each swapchain buffer and checks if the creation node mask is 1. If not then it fails to store the resource pointers for later rendering.
Signed-off-by: Conor McCarthy cmccarthy@codeweavers.com Signed-off-by: Henri Verbeet hverbeet@codeweavers.com --- This supersedes patch 174171.
libs/vkd3d/resource.c | 2 ++ tests/vkd3d_api.c | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/libs/vkd3d/resource.c b/libs/vkd3d/resource.c index 89733ce..f5cdf4a 100644 --- a/libs/vkd3d/resource.c +++ b/libs/vkd3d/resource.c @@ -1522,6 +1522,8 @@ static HRESULT STDMETHODCALLTYPE d3d12_resource_GetHeapProperties(ID3D12Resource { memset(heap_properties, 0, sizeof(*heap_properties)); heap_properties->Type = D3D12_HEAP_TYPE_DEFAULT; + heap_properties->CreationNodeMask = 1; + heap_properties->VisibleNodeMask = 1; } if (flags) *flags = D3D12_HEAP_FLAG_NONE; diff --git a/tests/vkd3d_api.c b/tests/vkd3d_api.c index 135782d..d4fe79a 100644 --- a/tests/vkd3d_api.c +++ b/tests/vkd3d_api.c @@ -907,8 +907,8 @@ static void test_external_resource_map(void) "Got unexpected CPU page property %#x.\n", heap_properties.CPUPageProperty); ok(heap_properties.MemoryPoolPreference == D3D12_MEMORY_POOL_UNKNOWN, "Got unexpected memory pool preference %#x.\n", heap_properties.MemoryPoolPreference); - todo ok(!!heap_properties.CreationNodeMask, "Got unexpected node mask %#x.\n", heap_properties.CreationNodeMask); - todo ok(!!heap_properties.VisibleNodeMask, "Got unexpected node mask %#x.\n", heap_properties.VisibleNodeMask); + ok(!!heap_properties.CreationNodeMask, "Got unexpected node mask %#x.\n", heap_properties.CreationNodeMask); + ok(!!heap_properties.VisibleNodeMask, "Got unexpected node mask %#x.\n", heap_properties.VisibleNodeMask);
ID3D12Resource_Release(vk_resource); vk_device = vkd3d_get_vk_device(device);