diff --git a/libs/vkd3d/device.c b/libs/vkd3d/device.c index a8647d15..df74b9c3 100644 --- a/libs/vkd3d/device.c +++ b/libs/vkd3d/device.c @@ -4521,11 +4521,15 @@ static D3D12_RESOURCE_ALLOCATION_INFO * STDMETHODCALLTYPE d3d12_device_GetResour D3D12_RESOURCE_ALLOCATION_INFO *info, UINT visible_mask, UINT count, const D3D12_RESOURCE_DESC1 *resource_descs, D3D12_RESOURCE_ALLOCATION_INFO1 *info1) { - FIXME("iface %p, info %p, visible_mask 0x%08x, count %u, resource_descs %p, info1 %p stub!\n", + struct d3d12_device *device = impl_from_ID3D12Device8(iface); + + TRACE("iface %p, info %p, visible_mask 0x%08x, count %u, resource_descs %p, info1 %p.\n", iface, info, visible_mask, count, resource_descs, info1); - info->Alignment = 0; - info->SizeInBytes = ~(uint64_t)0; + debug_ignored_node_mask(visible_mask); + + d3d12_device_get_resource1_allocation_info(device, info1, count, resource_descs, info); + return info; } diff --git a/libs/vkd3d/resource.c b/libs/vkd3d/resource.c index 7304846f..446ef3ab 100644 --- a/libs/vkd3d/resource.c +++ b/libs/vkd3d/resource.c @@ -1857,6 +1857,7 @@ static bool d3d12_resource_validate_texture_alignment(const D3D12_RESOURCE_DESC1 HRESULT d3d12_resource_validate_desc(const D3D12_RESOURCE_DESC1 *desc, struct d3d12_device *device) { + const D3D12_MIP_REGION *mip_region = &desc->SamplerFeedbackMipRegion; const struct vkd3d_format *format; switch (desc->Dimension) @@ -1926,6 +1927,12 @@ HRESULT d3d12_resource_validate_desc(const D3D12_RESOURCE_DESC1 *desc, struct d3 d3d12_validate_resource_flags(desc->Flags); + if (mip_region->Width && mip_region->Height && mip_region->Depth) + { + FIXME("Unhandled sampler feedback mip region size (%u, %u, %u).\n", mip_region->Width, mip_region->Height, + mip_region->Depth); + } + return S_OK; } diff --git a/tests/d3d12.c b/tests/d3d12.c index 6d49dbae..9d2cd113 100644 --- a/tests/d3d12.c +++ b/tests/d3d12.c @@ -32428,10 +32428,8 @@ static void test_resource_allocation_info(void) } info = ID3D12Device8_GetResourceAllocationInfo2(device8, 0, ARRAY_SIZE(desc_array1), desc_array1, infos1); - todo ok(info.Alignment >= D3D12_DEFAULT_RESOURCE_PLACEMENT_ALIGNMENT, "Got unexpected alignment %"PRIu64".\n", info.Alignment); - todo check_alignment(info.SizeInBytes, info.Alignment); ok(info.SizeInBytes >= total, "Got unexpected size %"PRIu64".\n", info.SizeInBytes); ok(!infos1[0].Offset, "Got unexpected offset %"PRIu64".\n", infos1[0].Offset);